コード例 #1
0
        public sealed override bool Equals(Object obj)
        {
            EcmaFormatRuntimePropertyInfo other = obj as EcmaFormatRuntimePropertyInfo;

            if (other == null)
            {
                return(false);
            }
            if (!(_reader == other._reader))
            {
                return(false);
            }
            if (!(_propertyHandle.Equals(other._propertyHandle)))
            {
                return(false);
            }
            if (!(ContextTypeInfo.Equals(other.ContextTypeInfo)))
            {
                return(false);
            }
            if (!(_reflectedType.Equals(other._reflectedType)))
            {
                return(false);
            }
            return(true);
        }
コード例 #2
0
        public sealed override bool Equals(Object obj)
        {
            NativeFormatRuntimeEventInfo other = obj as NativeFormatRuntimeEventInfo;

            if (other == null)
            {
                return(false);
            }
            if (!(_reader == other._reader))
            {
                return(false);
            }
            if (!(_eventHandle.Equals(other._eventHandle)))
            {
                return(false);
            }
            if (!(ContextTypeInfo.Equals(other.ContextTypeInfo)))
            {
                return(false);
            }
            if (!(ReflectedType.Equals(other.ReflectedType)))
            {
                return(false);
            }
            return(true);
        }
コード例 #3
0
 public GetCustomContextCompiler()
 {
     _contextData = typeof(IHasContextData)
                    .GetTypeInfo().GetDeclaredProperty(
         nameof(IResolverContext.ContextData));
     _scopedContextData = ContextTypeInfo.GetDeclaredProperty(
         nameof(IResolverContext.ScopedContextData));
 }
コード例 #4
0
 public GetArgumentCompiler()
 {
     _argument = ContextTypeInfo.GetDeclaredMethod(
         nameof(IResolverContext.ArgumentValue)) !;
     _argumentLiteral = ContextTypeInfo.GetDeclaredMethod(
         nameof(IResolverContext.ArgumentLiteral)) !;
     _argumentOptional = ContextTypeInfo.GetDeclaredMethod(
         nameof(IResolverContext.ArgumentOptional)) !;
 }
コード例 #5
0
ファイル: WorldContext.cs プロジェクト: xiebac/DebugWatch
 public WorldContext(IWatchContext parent, string relativePath, Entities.World world, ContextFieldInfo fieldInfo)
     : base(parent
            , relativePath
            , new ContextMemberInfo(fieldInfo, ContextTypeInfo.Make(typeof(WorldContext)))
            )
 {
     World = world;
     Variables.Add("Entity", new EntityDictionary(this, ".Entity", World, ContextFieldInfo.Make("Entity")));
 }
コード例 #6
0
 public CustomContextCompilerBase()
 {
     ContextData = typeof(IHasContextData)
                   .GetTypeInfo().GetDeclaredProperty(
         nameof(IResolverContext.ContextData));
     ScopedContextData = ContextTypeInfo.GetDeclaredProperty(
         nameof(IResolverContext.ScopedContextData));
     LocalContextData = ContextTypeInfo.GetDeclaredProperty(
         nameof(IResolverContext.LocalContextData));
 }
コード例 #7
0
 public sealed override bool Equals(object obj)
 {
     if (!(obj is NativeFormatRuntimePropertyInfo other))
     {
         return(false);
     }
     if (!(_reader == other._reader))
     {
         return(false);
     }
     if (!(_propertyHandle.Equals(other._propertyHandle)))
     {
         return(false);
     }
     if (!(ContextTypeInfo.Equals(other.ContextTypeInfo)))
     {
         return(false);
     }
     if (!(_reflectedType.Equals(other._reflectedType)))
     {
         return(false);
     }
     return(true);
 }
コード例 #8
0
 public GetObjectTypeCompiler()
 {
     _objectType = ContextTypeInfo.GetProperty(
         nameof(IResolverContext.ObjectType));
 }
コード例 #9
0
 public GetOperationCompiler()
 {
     _operation = ContextTypeInfo.GetProperty(
         nameof(IResolverContext.Operation));
 }
コード例 #10
0
 public GetQueryCompiler()
 {
     _query = ContextTypeInfo.GetProperty(
         nameof(IResolverContext.Document));
 }
コード例 #11
0
 public GetSchemaCompiler()
 {
     _schema = ContextTypeInfo.GetProperty(
         nameof(IResolverContext.Schema));
 }
コード例 #12
0
 public ContextMemberInfo(ContextFieldInfo fieldInfo, ContextTypeInfo typeInfo)
 {
     FieldInfo = fieldInfo;
     TypeInfo  = typeInfo;
 }
コード例 #13
0
ファイル: DebugWatcher.cs プロジェクト: xiebac/DebugWatch
        void UpdateAutoComplete()
        {
            AutoCompleteSuggestions.Clear();
            RangeInt cursor = addWatchText.Range();

            if (AutoCompleteGlobalContext.TryParseDeepest(addWatchText, ref cursor, out AutoCompleteDeepestContext))
            {
                if (AutoCompleteDeepestContext != AutoCompleteGlobalContext)
                {
                    AutoCompleteSuggestions.Add(new ContextMemberInfo(ContextFieldInfo.Make(".."), ContextTypeInfo.Make(AutoCompleteDeepestContext.GetType())));
                }
                AutoCompleteValidString = addWatchText.Substring(0, cursor.start);
                AutoCompleteDeepestContext.VisitAllMembers((ContextMemberInfo info) =>
                {
                    AutoCompleteSuggestions.Add(info);
                    return(true);
                });
                //ParserUtils.TryParseAt(addWatchText, ref cursor, ".");
                //if (ctx.TryCreateWatch(addWatchText, cursor, out var w))
                //{
                //    WatchRegistry.AddWatch(w);
                //}
            }
        }
コード例 #14
0
 public GlobalContext()
     : base(null, "", new ContextMemberInfo(ContextFieldInfo.Make(""), ContextTypeInfo.Make(typeof(GlobalContext))))
 {
     Variables.Add("World", new WorldDictionary(this, "World", ContextFieldInfo.Make("World")));
     Variables.Add("Scene", new SceneDictionary(this, "Scene", ContextFieldInfo.Make("Scene")));
 }
コード例 #15
0
 public GetCancellationTokenCompiler()
 {
     _requestAborted = ContextTypeInfo.GetDeclaredProperty(
         nameof(IResolverContext.RequestAborted));
 }
コード例 #16
0
 public GetFieldSelectionCompiler()
 {
     _fieldSelection = ContextTypeInfo.GetProperty(
         nameof(IResolverContext.FieldSelection));
 }
コード例 #17
0
 public GetEventMessageCompiler()
 {
     _argument = ContextTypeInfo.GetDeclaredMethod(
         nameof(IResolverContext.CustomProperty));
 }
コード例 #18
0
 public static ContextMemberInfo MakeNotImplemented()
 {
     return(new ContextMemberInfo(ContextFieldInfo.Make("Not Implemented"), ContextTypeInfo.MakeUnknown()));
 }
コード例 #19
0
 public GetOutputFieldCompiler()
 {
     _outputField = ContextTypeInfo.GetProperty(
         nameof(IResolverContext.Field));
 }
コード例 #20
0
 public GetParentCompiler()
 {
     GenericMethod = ContextTypeInfo.GetDeclaredMethod(
         nameof(IResolverContext.Parent));
 }
コード例 #21
0
 public GetServiceCompiler()
 {
     GenericMethod = ContextTypeInfo.GetDeclaredMethods(
         nameof(IResolverContext.Service))
                     .First(t => t.IsGenericMethod);
 }
コード例 #22
0
 public GetArgumentCompiler()
 {
     _argument = ContextTypeInfo.GetDeclaredMethod(
         nameof(IResolverContext.Argument));
 }