DataSource.NET
Match Method (subject)
NamespacesCaplin.DataSource.NamespaceINamespaceMatch(String)
Tests an String to see if it falls within this INamespace.
Declaration Syntax
C#Visual BasicVisual C++
bool Match(
	string subject
)
Function Match ( _
	subject As String _
) As Boolean
bool Match(
	String^ subject
)
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
    }
}

Assembly: DataSource.NET (Module: DataSource.NET) Version: 6.2.6.2123 (6.2.6.2123)