Tests an String to see if it falls within this INamespace.
Declaration Syntax
Parameters
- subject (String)
- The string to be tested for matching
Return Value
True if subject falls within this INamespace, false otherwise
Remarks
Examples
An example of a simple prefix based INamespace implementation is below. Note the ToString() method is used to to obtain the full string-version of the string.
CopyC#
using Caplin.DataSource; using Caplin.DataSource.Namespace; namespace DataSourceExamples.Namespace { class PrefixNamespaceExample : INamespace { string prefix; public PrefixNamespaceExample(string prefix) { this.prefix = prefix; } #region INamespace Members public bool Match(string subject) { return subject.ToString().StartsWith(prefix); } #endregion } }