コード例 #1
0
ファイル: CommandTests.cs プロジェクト: hillwhite/DeltaEngine
 public void ConditionMatched(Type resolver)
 {
     Start(resolver, (InputCommands input) =>
     {
         var command = new TestResolver().Resolve<Command>();
         command.Add(new KeyTrigger(Key.Y, State.Released));
         command.Run(input);
     });
 }
コード例 #2
0
        private IReadOnlyList <ITypeModelDifference> FindDifferences(Type expected, Type actual)
        {
            var expectedTypeModel = new SharpRemote.TypeModel();
            var expectedType      = expectedTypeModel.Add(expected);

            var actualTypeModel = new SharpRemote.TypeModel();
            var actualType      = actualTypeModel.Add(actual);

            var typeResolver = new TestResolver();

            typeResolver.Add(expected.AssemblyQualifiedName, actual);
            actualTypeModel.TryResolveTypes(typeResolver);

            return(((TypeDescription)expectedType).FindDifferences((TypeDescription)actualType).ToList());
            //return expectedTypeModel.FindDifferences(actualTypeModel);
        }