当前位置: 首页>>代码示例>>C#>>正文


C# IMatcher类代码示例

本文整理汇总了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;
		}
开发者ID:sillsdev,项目名称:WorldPad,代码行数:7,代码来源:DateTimeMatcher.cs

示例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;
		}
开发者ID:sillsdev,项目名称:WorldPad,代码行数:7,代码来源:ExactLiteralMatcher.cs

示例3: setComponentNames

 static void setComponentNames(Matcher matcher, IMatcher[] matchers)
 {
     var componentNames = getComponentNames(matchers);
     if(componentNames != null) {
         matcher.componentNames = componentNames;
     }
 }
开发者ID:sschmid,项目名称:Entitas-CSharp,代码行数:7,代码来源:MatcherStatic.cs

示例4: VisualFingerprintMatchingFrm

 public VisualFingerprintMatchingFrm(IMatcher matcher, IResourceProvider resourceProvider, string resourcePath)
 {
     InitializeComponent();
     this.matcher = matcher;
     provider = resourceProvider;
     this.resourcePath = resourcePath;
     repository = new ResourceRepository(resourcePath);
 }
开发者ID:HydAu,项目名称:FingerprintRecognition-v2.2,代码行数:8,代码来源:VisualMatchingForm.cs

示例5: Equals

		public override bool Equals(IMatcher other)
		{
			var referenceMatcher = other as ReferenceMatcher;
			if (referenceMatcher == null)
				return false;

			return CompareValueTo(other);
		}
开发者ID:BiBongNet,项目名称:JustMockLite,代码行数:8,代码来源:ReferenceMatcher.cs

示例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();
        }
开发者ID:fversnel,项目名称:Entitas-CSharp,代码行数:9,代码来源:AbstractCompoundMatcher.cs

示例7: Matches

		public bool Matches(IMatcher other)
		{
			if (this.Equals(other))
				return true;

			if (!this.CanMatch(other))
				return false;

			return this.MatchesCore(other);
		}
开发者ID:BiBongNet,项目名称:JustMockLite,代码行数:10,代码来源:CategoricalMatcherBase.cs

示例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);
		}
开发者ID:BiBongNet,项目名称:JustMockLite,代码行数:10,代码来源:ReferenceMatcher.cs

示例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>();
 }
开发者ID:Geroppo,项目名称:Entitas-CSharp,代码行数:10,代码来源:ReactiveSystem.cs

示例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;
        }
开发者ID:sschmid,项目名称:Entitas-CSharp,代码行数:11,代码来源:MatcherStatic.cs

示例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;
    }
开发者ID:Reimerei,项目名称:port_experiments,代码行数:11,代码来源:OrderComponent.cs

示例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};
        }
开发者ID:Codestellation,项目名称:DarkFlow,代码行数:11,代码来源:WindsorPersister.cs

示例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;
        }
开发者ID:Cotoff,项目名称:Entitas-CSharp,代码行数:12,代码来源:Matcher.cs

示例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
   );
 }
开发者ID:andreasetti,项目名称:TestFirst.Net,代码行数:13,代码来源:APath.cs

示例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);
        }
开发者ID:Codestellation,项目名称:DarkFlow,代码行数:15,代码来源:TaskRouter.cs


注:本文中的IMatcher类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。