本文整理汇总了C#中IMatcher类的典型用法代码示例。如果您正苦于以下问题:C# IMatcher类的具体用法?C# IMatcher怎么用?C# IMatcher使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
IMatcher类属于命名空间,在下文中一共展示了IMatcher类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SameMatcher
public override bool SameMatcher(IMatcher other)
{
DateTimeMatcher dtOther = other as DateTimeMatcher;
if (dtOther == null)
return false;
return m_end == dtOther.m_end && m_start == dtOther.m_start && m_type == dtOther.m_type;
}
示例2: SameMatcher
public bool SameMatcher(IMatcher other)
{
if (other.GetType() != this.GetType())
return false;
ExactLiteralMatcher other1 = other as ExactLiteralMatcher;
return m_target == other1.m_target && m_ws == other1.m_ws;
}
示例3: setComponentNames
static void setComponentNames(Matcher matcher, IMatcher[] matchers)
{
var componentNames = getComponentNames(matchers);
if(componentNames != null) {
matcher.componentNames = componentNames;
}
}
示例4: VisualFingerprintMatchingFrm
public VisualFingerprintMatchingFrm(IMatcher matcher, IResourceProvider resourceProvider, string resourcePath)
{
InitializeComponent();
this.matcher = matcher;
provider = resourceProvider;
this.resourcePath = resourcePath;
repository = new ResourceRepository(resourcePath);
}
示例5: Equals
public override bool Equals(IMatcher other)
{
var referenceMatcher = other as ReferenceMatcher;
if (referenceMatcher == null)
return false;
return CompareValueTo(other);
}
示例6: extractIndices
static int[] extractIndices(IMatcher[] matchers)
{
var indices = new List<int>();
for (int i = 0, matchersLength = matchers.Length; i < matchersLength; i++) {
indices.AddRange(matchers[i].indices);
}
return indices.ToArray();
}
示例7: Matches
public bool Matches(IMatcher other)
{
if (this.Equals(other))
return true;
if (!this.CanMatch(other))
return false;
return this.MatchesCore(other);
}
示例8: CompareValueTo
private bool CompareValueTo(IMatcher other)
{
var valueMatcher = other as IValueMatcher;
if (valueMatcher == null)
return false;
if (this.IsValueType)
return Equals(this.reference, valueMatcher.Value);
return ReferenceEquals(this.reference, valueMatcher.Value);
}
示例9: ReactiveSystem
ReactiveSystem(Pool pool, IReactiveExecuteSystem subSystem, IMatcher[] triggers, GroupEventType[] eventTypes)
{
_subsystem = subSystem;
var groups = new Group[triggers.Length];
for (int i = 0, triggersLength = triggers.Length; i < triggersLength; i++) {
groups[i] = pool.GetGroup(triggers[i]);
}
_observer = new GroupObserver(groups, eventTypes);
_buffer = new List<Entity>();
}
示例10: getComponentNames
static string[] getComponentNames(IMatcher[] matchers)
{
for (int i = 0; i < matchers.Length; i++) {
var matcher = matchers[i] as Matcher;
if(matcher != null && matcher.componentNames != null) {
return matcher.componentNames;
}
}
return null;
}
示例11: GetEntityWithOrder
public static Entity GetEntityWithOrder(this Pool pool, int order, IMatcher matcher)
{
Entity[] entities = pool.GetGroup(Matcher.AllOf(CoreGameMatcher.Order, matcher)).GetEntities();
foreach(Entity e in entities){
if(e.order.value == order){
return e;
}
}
return null;
}
示例12: WindsorPersister
public WindsorPersister(IDatabase database, IKernel kernel, IMatcher matcher)
: base(database, matcher)
{
if (kernel == null)
{
throw new ArgumentNullException("kernel");
}
var converter = new WindsorConverter(kernel);
Settings.Converters = new[] {converter};
}
示例13: mergeIndices
static int[] mergeIndices(IMatcher[] matchers) {
var indices = new int[matchers.Length];
for (int i = 0, matchersLength = matchers.Length; i < matchersLength; i++) {
var matcher = matchers[i];
if (matcher.indices.Length != 1) {
throw new MatcherException(matcher);
}
indices[i] = matcher.indices[0];
}
return indices;
}
示例14: WithForwardSlashes
public static IMatcher<string> WithForwardSlashes(IMatcher<string> matcher)
{
return Matchers.Function((string actual,IMatchDiagnostics diag) =>
{
if (actual != null)
{
actual = actual.Replace("\\", "/");
}
return matcher.Matches(actual, diag);
},
"ignoring slash type, " + matcher
);
}
示例15: TaskRouter
public TaskRouter(IMatcher matcher, IEnumerable<IExecutorImplementation> taskQueues)
{
if (matcher == null)
{
throw new ArgumentNullException("matcher");
}
if (taskQueues == null)
{
throw new ArgumentNullException("taskQueues");
}
_matcher = matcher;
_executors = taskQueues.ToDictionary(x => x.Name, x => x);
}