public BaseTypeViewSource (EvaluationContext ctx, IObjectSource objectSource, object type, object obj) { this.ctx = ctx; this.type = type; this.obj = obj; this.objectSource = objectSource; }
public SqlBuilderPreparerObjectSourceTable(string pTab, string pCol, IObjectSource pValue, SqlTypeRelations pRelMath, SqlTypeRelations pRelBool) { tab = pTab; col = pCol; value = pValue; relMath = pRelMath; relBool = pRelBool; }
public SqlBuilderPreparerObjectSourceTable(string pTab, string pCol, IObjectSource pValue) { tab = pTab; col = pCol; value = pValue; relMath = SqlTypeRelations.equal; relBool = SqlTypeRelations.boolAnd; }
public IEnumerable <ValueReference> GetMembers(EvaluationContext ctx, IObjectSource objectSource, object t, object co) { foreach (ValueReference val in GetMembers(ctx, t, co, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static)) { val.ParentSource = objectSource; yield return(val); } }
public FilteredMembersSource(EvaluationContext ctx, IObjectSource objectSource, object type, object obj, BindingFlags bindingFlags) { this.ctx = ctx; this.obj = obj; this.type = type; this.bindingFlags = bindingFlags; this.objectSource = objectSource; }
public FilteredMembersSource (EvaluationContext ctx, IObjectSource objectSource, object type, object obj, BindingFlags bindingFlags) { this.ctx = ctx; this.obj = obj; this.type = type; this.bindingFlags = bindingFlags; this.objectSource = objectSource; }
public AggregateNode(ITupleSource leftSource, IObjectSource rightSource, string name, ExpressionMap expressionMap, IAggregatorFactory aggregatorFactory, bool isSubnetJoin) : base(leftSource, rightSource) { Name = name; ExpressionMap = expressionMap; _aggregatorFactory = aggregatorFactory; _isSubnetJoin = isSubnetJoin; }
public static ObjectValue CreateRawView (EvaluationContext ctx, IObjectSource objectSource, object obj) { RawViewSource src = new RawViewSource (ctx, objectSource, obj); src.Connect (); ObjectValue val = ObjectValue.CreateObject (src, new ObjectPath ("Raw View"), "", "", ObjectValueFlags.Group|ObjectValueFlags.ReadOnly|ObjectValueFlags.NoRefresh, null); val.ChildSelector = ""; return val; }
public RemoteRawValueArray(EvaluationContext ctx, IObjectSource source, ICollectionAdaptor targetArray, object targetObject) { this.ctx = ctx; this.targetArray = targetArray; this.targetObject = targetObject; this.source = source; Connect(); }
protected BinaryBetaNode(ITupleSource leftSource, IObjectSource rightSource) { LeftSource = leftSource; RightSource = rightSource; LeftSource.Attach(this); RightSource.Attach(this); }
/// <summary> /// Initializes this class. /// </summary> /// <param name="objectSource"><see cref="IObjectSource"/> used get all objects of a type.</param> public ObjectQueryHandler(IObjectSource objectSource) { if (objectSource == null) { throw new ArgumentNullException("objectSource"); } this.objectSource = objectSource; }
static ObjectValue CreateNode (EvaluationContext ctx, IObjectSource objectSource, object type, object obj, BindingFlags bindingFlags, string label) { FilteredMembersSource src = new FilteredMembersSource (ctx, objectSource, type, obj, bindingFlags); src.Connect (); ObjectValue val = ObjectValue.CreateObject (src, new ObjectPath (label), "", "", ObjectValueFlags.Group|ObjectValueFlags.ReadOnly|ObjectValueFlags.NoRefresh, null); val.ChildSelector = ""; return val; }
public static CommandTokenMatcher Object( String CaptureName, IObjectSource Source, Func <MudObject, MudObject, MatchPreference> ScoreFunc, ObjectMatcherSettings Settings = ObjectMatcherSettings.UnderstandMe) { return(new ObjectMatcher(CaptureName, Source, ScoreFunc, Settings)); }
public ValueReference GetMember( EvaluationContext ctx, IObjectSource objectSource, object t, object value, string name) { var type = t as Type; var tupleNames = GetTupleElementNames(objectSource, ctx); while (type != null) { var field = FindByName(type.GetFields(), f => MapTupleName(f.Name, tupleNames), name, ctx.CaseSensitive); if (field != null && (field.IsStatic || value != null)) { return(new FieldValueReference(ctx, field, value, type)); } var prop = FindByName(type.GetProperties(), p => p.Name, name, ctx.CaseSensitive); if (prop != null && (IsStatic(prop) || value != null)) { var getter = prop.GetGetMethod(true); // Optimization: if the property has a CompilerGenerated backing field, use that instead. // This way we avoid overhead of invoking methods on the debugee when the value is requested. //But also check that this method is not virtual, because in that case we need to call getter to invoke override if (!getter.IsVirtual) { var cgFieldName = string.Format("<{0}>{1}", prop.Name, type.IsAnonymousType() ? "" : "k__BackingField"); if ((field = FindByName(type.GetFields(), f => f.Name, cgFieldName, true)) != null && IsCompilerGenerated(field)) { return(new FieldValueReference(ctx, field, value, type, prop.Name, ObjectValueFlags.Property)); } } // Backing field not available, so do things the old fashioned way. return(getter != null ? new PropertyValueReference(ctx, prop, value, type, getter, null) : null); } if (type.IsInterface) { foreach (var inteface in type.GetInterfaces()) { var result = GetMember(ctx, null, inteface, value, name); if (result != null) { return(result); } } //foreach above recursively checked all "base" interfaces //nothing was found, quit, otherwise we would loop forever return(null); } type = type.BaseType; } return(null); }
protected BinaryBetaNode(ITupleSource leftSource, IObjectSource rightSource, bool isSubnetJoin) { _isSubnetJoin = isSubnetJoin; LeftSource = leftSource; RightSource = rightSource; LeftSource.Attach(this); RightSource.Attach(this); }
public RemoteRawValue(EvaluationContext gctx, IObjectSource source, object targetObject) { this.ctx = gctx.Clone (); ctx.Options.AllowTargetInvoke = true; ctx.Options.AllowMethodEvaluation = true; this.targetObject = targetObject; this.source = source; Connect (); }
public BindDataRefenceAsActivity(IDataReference pReference, IRowSource pRowSource, string pFilterName, IObjectSource pFilterDataSource, string[] pColSource, string[] pColDest) { reference = pReference; colSource = pColSource; colDest = pColDest; rowSource = pRowSource; filterName = pFilterName; filterDataSource = pFilterDataSource; }
public static ObjectValue CreateBaseTypeView (EvaluationContext ctx, IObjectSource objectSource, object type, object obj) { BaseTypeViewSource src = new BaseTypeViewSource (ctx, objectSource, type, obj); src.Connect (); string tname = ctx.Adapter.GetDisplayTypeName (ctx, type); ObjectValue val = ObjectValue.CreateObject (src, new ObjectPath ("base"), tname, "{" + tname + "}", ObjectValueFlags.Type|ObjectValueFlags.ReadOnly|ObjectValueFlags.NoRefresh, null); val.ChildSelector = ""; return val; }
public RemoteRawValue(EvaluationContext gctx, IObjectSource source, object targetObject) { this.ctx = gctx.Clone(); ctx.Options.AllowTargetInvoke = true; ctx.Options.AllowMethodEvaluation = true; this.targetObject = targetObject; this.source = source; Connect(); }
/// <summary> /// Creates ZyanServerQueryHandler instance. /// </summary> /// <param name="source">IObjectSource instance</param> public ZyanServerQueryHandler(IObjectSource source) { if (source == null) { throw new ArgumentNullException("source"); } InnerHandler = new ServerQueryHandler(new ZyanObjectQueryHandler(source)); }
public ObjectMatcher( String CaptureName, IObjectSource ObjectSource, ObjectMatcherSettings Settings = ObjectMatcherSettings.UnderstandMe) { this.CaptureName = CaptureName; this.ObjectSource = ObjectSource; this.Settings = Settings; }
/// <summary> /// Creates a new ReverseMapper session. /// </summary> public ReverseMapper(IObjectSource objectSource) { // Construct instance: this._objectSource = objectSource; this._typesToUpdate = new HashSet <Type>(); this._typesToCreate = new HashSet <Type>(); this._mappedSources = new List <object>(); this._mappedTargets = new List <object>(); this._asNewVersion = false; }
public ValueReference GetMember(EvaluationContext ctx, IObjectSource objectSource, object t, object co, string name) { ValueReference m = GetMember(ctx, t, co, name); if (m != null) { m.ParentSource = objectSource; } return(m); }
static ObjectValue CreateNode(EvaluationContext ctx, IObjectSource objectSource, object type, object obj, BindingFlags bindingFlags, string label) { FilteredMembersSource src = new FilteredMembersSource(ctx, objectSource, type, obj, bindingFlags); src.Connect(); ObjectValue val = ObjectValue.CreateObject(src, new ObjectPath(label), "", "", ObjectValueFlags.Group | ObjectValueFlags.ReadOnly | ObjectValueFlags.NoRefresh, null); val.ChildSelector = ""; return(val); }
public JoinNode(ITupleSource leftSource, IObjectSource rightSource, List <ExpressionElement> expressionElements, List <ILhsExpression <bool> > compiledExpressions, bool isSubnetJoin) : base(leftSource, rightSource, isSubnetJoin) { _expressionElements = expressionElements; _compiledExpressions = compiledExpressions; _isSubnetJoin = isSubnetJoin; }
public static ObjectValue CreateRawView(EvaluationContext ctx, IObjectSource objectSource, object obj) { RawViewSource src = new RawViewSource(ctx, objectSource, obj); src.Connect(); ObjectValue val = ObjectValue.CreateObject(src, new ObjectPath("Raw View"), "", "", ObjectValueFlags.Group | ObjectValueFlags.ReadOnly | ObjectValueFlags.NoRefresh, null); val.ChildSelector = ""; return(val); }
protected BinaryBetaNode(ITupleSource leftSource, IObjectSource rightSource) { LeftSource = leftSource; RightSource = rightSource; LeftSource.Attach(this); RightSource.Attach(this); Conditions = new List <IBetaCondition>(); }
public CountingObjectSource(IObjectSource inner, IMetricsWriter writer, string key) { _inner = inner ?? throw new ArgumentNullException(nameof(inner)); _writer = writer ?? throw new ArgumentNullException(nameof(writer)); _prefix = "source."; if (key.Length != 0) { _prefix = _prefix + key + "."; } }
public ObjectMatcher( String CaptureName, IObjectSource ObjectSource, Func <MudObject, MudObject, MatchPreference> ScoreResults, ObjectMatcherSettings Settings = ObjectMatcherSettings.UnderstandMe) { this.CaptureName = CaptureName; this.ObjectSource = ObjectSource; this.ScoreResults = ScoreResults; this.Settings = Settings; }
protected override IEnumerable <ValueReference> GetMembers( EvaluationContext ctx, IObjectSource objectSource, object t, object co, BindingFlags bindingFlags) { var resolver = new MemberResolver(); return(resolver.GetMembers(ctx, objectSource, t, co, bindingFlags)); }
public static ObjectValue CreateBaseTypeView(EvaluationContext ctx, IObjectSource objectSource, object type, object obj) { BaseTypeViewSource src = new BaseTypeViewSource(ctx, objectSource, type, obj); src.Connect(); string tname = ctx.Adapter.GetDisplayTypeName(ctx, type); ObjectValue val = ObjectValue.CreateObject(src, new ObjectPath("base"), tname, "{" + tname + "}", ObjectValueFlags.Type | ObjectValueFlags.ReadOnly | ObjectValueFlags.NoRefresh, null); val.ChildSelector = ""; return(val); }
public AggregateNode(ITupleSource leftSource, IObjectSource rightSource, string name, List <Declaration> declarations, ExpressionCollection expressions, IAggregatorFactory aggregatorFactory, bool isSubnetJoin) : base(leftSource, rightSource, isSubnetJoin) { Name = name; Declarations = declarations; Expressions = expressions; _aggregatorFactory = aggregatorFactory; _isSubnetJoin = isSubnetJoin; }
public static EnumerableProvider <TResult, TOwner> Query <TSource, TResult, TOwner>( this IEnumerableProvider <TSource, TOwner> source, string valueName, Func <IEnumerable <TSource>, IEnumerable <TResult> > valueGetFunction) { source.CheckNotNull(nameof(source)); valueName.CheckNotNull(nameof(valueName)); valueGetFunction.CheckNotNull(nameof(valueGetFunction)); IObjectSource <IEnumerable <TResult> > valueSource = source.IsValueDynamic ? new DynamicObjectSource <IEnumerable <TResult>, IEnumerable <TSource> >( source, valueGetFunction) : (IObjectSource <IEnumerable <TResult> >) new LazyObjectSource <IEnumerable <TResult>, IEnumerable <TSource> >( source, valueGetFunction); return(new EnumerableProvider <TResult, TOwner>(source.Owner, valueSource, valueName)); }
public virtual object ToRawValue(EvaluationContext ctx, IObjectSource source, object obj) { if (IsEnum(ctx, obj)) { object longType = GetType(ctx, "System.Int64"); object c = Cast(ctx, obj, longType); return(TargetObjectToObject(ctx, c)); } if (IsPrimitive(ctx, obj)) { return(TargetObjectToObject(ctx, obj)); } if (IsArray(ctx, obj)) { ICollectionAdaptor adaptor = CreateArrayAdaptor(ctx, obj); return(new RawValueArray(new RemoteRawValueArray(ctx, source, adaptor, obj))); } return(new RawValue(new RemoteRawValue(ctx, source, obj))); }
public GetImportEntriesResults GetImportEntries(GetImportEntriesRunStep importRunStep) { IObjectSource <IExternalObject> objectSource = _objectSources[_currentRepoIndex]; List <IExternalObject> importedObjects = _objectImportsDictionary[objectSource]; List <IExternalObject> currentImportBatchEntities = importedObjects .Skip(_entitesImportedCount) .Take(ImportPageSize) .ToList(); _entitesImportedCount += currentImportBatchEntities.Count; List <CSEntryChange> csentries = objectSource.CSentryConverter.ConvertToCSentries(currentImportBatchEntities); var importInfo = new GetImportEntriesResults { MoreToImport = true }; if (_entitesImportedCount >= importedObjects.Count) { importInfo.MoreToImport = false; } //switching to next repository if (importInfo.MoreToImport == false) { if (_objectSources.Count > _currentRepoIndex + 1) { _currentRepoIndex++; importInfo.MoreToImport = true; _entitesImportedCount = 0; } } importInfo.CSEntries = csentries; return(importInfo); }
public virtual ObjectValue[] GetObjectValueChildren (EvaluationContext ctx, IObjectSource objectSource, object type, object obj, int firstItemIndex, int count, bool dereferenceProxy) { if (obj is EvaluationResult) return new ObjectValue[0]; if (IsArray (ctx, obj)) { ArrayElementGroup agroup = new ArrayElementGroup (ctx, CreateArrayAdaptor (ctx, obj)); return agroup.GetChildren (ctx.Options); } if (IsPrimitive (ctx, obj)) return new ObjectValue[0]; bool showRawView = false; // If there is a proxy, it has to show the members of the proxy object proxy = obj; if (dereferenceProxy) { proxy = GetProxyObject (ctx, obj); if (proxy != obj) { type = GetValueType (ctx, proxy); showRawView = true; } } TypeDisplayData tdata = GetTypeDisplayData (ctx, type); bool groupPrivateMembers = ctx.Options.GroupPrivateMembers && (ctx.Options.GroupUserPrivateMembers || IsExternalType (ctx, type)); List<ObjectValue> values = new List<ObjectValue> (); BindingFlags flattenFlag = ctx.Options.FlattenHierarchy ? (BindingFlags)0 : BindingFlags.DeclaredOnly; BindingFlags nonNonPublicFlag = groupPrivateMembers || showRawView ? (BindingFlags)0 : BindingFlags.NonPublic; BindingFlags staticFlag = ctx.Options.GroupStaticMembers ? (BindingFlags)0 : BindingFlags.Static; BindingFlags access = BindingFlags.Public | BindingFlags.Instance | flattenFlag | nonNonPublicFlag | staticFlag; // Load all members to a list before creating the object values, // to avoid problems with objects being invalidated due to evaluations in the target, List<ValueReference> list = new List<ValueReference> (); list.AddRange (GetMembersSorted (ctx, objectSource, type, proxy, access)); var names = new ObjectValueNameTracker (ctx); object tdataType = type; foreach (ValueReference val in list) { try { object decType = val.DeclaringType; if (decType != null && decType != tdataType) { tdataType = decType; tdata = GetTypeDisplayData (ctx, decType); } DebuggerBrowsableState state = tdata.GetMemberBrowsableState (val.Name); if (state == DebuggerBrowsableState.Never) continue; if (state == DebuggerBrowsableState.RootHidden && dereferenceProxy) { object ob = val.Value; if (ob != null) { values.Clear (); values.AddRange (GetObjectValueChildren (ctx, val, ob, -1, -1)); showRawView = true; break; } } else { ObjectValue oval = val.CreateObjectValue (true); names.Disambiguate (val, oval); values.Add (oval); } } catch (Exception ex) { ctx.WriteDebuggerError (ex); values.Add (ObjectValue.CreateError (null, new ObjectPath (val.Name), GetDisplayTypeName (GetTypeName (ctx, val.Type)), ex.Message, val.Flags)); } } if (showRawView) { values.Add (RawViewSource.CreateRawView (ctx, objectSource, obj)); } else { if (IsArray (ctx, proxy)) { ICollectionAdaptor col = CreateArrayAdaptor (ctx, proxy); ArrayElementGroup agroup = new ArrayElementGroup (ctx, col); ObjectValue val = ObjectValue.CreateObject (null, new ObjectPath ("Raw View"), "", "", ObjectValueFlags.ReadOnly, values.ToArray ()); values = new List<ObjectValue> (); values.Add (val); values.AddRange (agroup.GetChildren (ctx.Options)); } else { if (ctx.Options.GroupStaticMembers && HasMembers (ctx, type, proxy, BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic | flattenFlag)) { access = BindingFlags.Static | BindingFlags.Public | flattenFlag | nonNonPublicFlag; values.Add (FilteredMembersSource.CreateStaticsNode (ctx, objectSource, type, proxy, access)); } if (groupPrivateMembers && HasMembers (ctx, type, proxy, BindingFlags.Instance | BindingFlags.NonPublic | flattenFlag | staticFlag)) values.Add (FilteredMembersSource.CreateNonPublicsNode (ctx, objectSource, type, proxy, BindingFlags.Instance | BindingFlags.NonPublic | flattenFlag | staticFlag)); if (!ctx.Options.FlattenHierarchy) { object baseType = GetBaseType (ctx, type, false); if (baseType != null) values.Insert (0, BaseTypeViewSource.CreateBaseTypeView (ctx, objectSource, baseType, proxy)); } } } return values.ToArray (); }
public ObjectValue[] GetObjectValueChildren (EvaluationContext ctx, IObjectSource objectSource, object obj, int firstItemIndex, int count) { return GetObjectValueChildren (ctx, objectSource, GetValueType (ctx, obj), obj, firstItemIndex, count, true); }
/// <summary> /// Initializes a new instance of the <see cref="ObjectProvider{TValue, TOwner}"/> class. /// </summary> /// <param name="objectSource">The object source.</param> /// <param name="providerName">Name of the provider.</param> protected ObjectProvider(IObjectSource <TObject> objectSource, string providerName) { this.objectSource = objectSource.CheckNotNull(nameof(objectSource)); this.providerName = providerName.CheckNotNull(nameof(providerName)); }
public virtual bool ObjectValueHasChildren (EvaluationContext ctx, IObjectSource objectSource, object type, object obj, bool dereferenceProxy) { if (obj is EvaluationResult) return false; if (IsArray (ctx, obj)) return true; if (IsPrimitive (ctx, obj)) return false; bool showRawView = false; // If there is a proxy, it has to show the members of the proxy object proxy = obj; if (dereferenceProxy) { proxy = GetProxyObject (ctx, obj); if (proxy != obj) { type = GetValueType (ctx, proxy); showRawView = true; } } TypeDisplayData tdata = GetTypeDisplayData (ctx, type); bool groupPrivateMembers = ctx.Options.GroupPrivateMembers && (ctx.Options.GroupUserPrivateMembers || IsExternalType (ctx, type)); BindingFlags flattenFlag = ctx.Options.FlattenHierarchy ? (BindingFlags)0 : BindingFlags.DeclaredOnly; BindingFlags nonNonPublicFlag = groupPrivateMembers || showRawView ? (BindingFlags)0 : BindingFlags.NonPublic; BindingFlags staticFlag = ctx.Options.GroupStaticMembers ? (BindingFlags)0 : BindingFlags.Static; BindingFlags access = BindingFlags.Public | BindingFlags.Instance | flattenFlag | nonNonPublicFlag | staticFlag; // Load all members to a list before creating the object values, // to avoid problems with objects being invalidated due to evaluations in the target, List<ValueReference> list = new List<ValueReference> (); list.AddRange (GetMembersSorted (ctx, objectSource, type, proxy, access)); object tdataType = type; foreach (ValueReference val in list) { try { object decType = val.DeclaringType; if (decType != null && decType != tdataType) { tdataType = decType; tdata = GetTypeDisplayData (ctx, decType); } DebuggerBrowsableState state = tdata.GetMemberBrowsableState (val.Name); if (state == DebuggerBrowsableState.Never) continue; return true; } catch (Exception ex) { ctx.WriteDebuggerError (ex); } } if (IsArray (ctx, proxy)) return true; if (ctx.Options.GroupStaticMembers && HasMembers (ctx, type, proxy, BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic | flattenFlag)) return true; if (groupPrivateMembers && HasMembers (ctx, type, proxy, BindingFlags.Instance | BindingFlags.NonPublic | flattenFlag | staticFlag)) return true; if (!ctx.Options.FlattenHierarchy) { object baseType = GetBaseType (ctx, type, false); if (baseType != null) return true; } return false; }
public bool ObjectValueHasChildren (EvaluationContext ctx, IObjectSource objectSource, object obj) { return ObjectValueHasChildren (ctx, objectSource, GetValueType (ctx, obj), obj, true); }
public ObjectMatcher(String CaptureName, IObjectSource ObjectSource, ObjectMatcherSettings Settings = ObjectMatcherSettings.UnderstandMe) { this.CaptureName = CaptureName; this.ObjectSource = ObjectSource; this.Settings = Settings; }
public ValueReference GetMember (EvaluationContext ctx, IObjectSource objectSource, object t, object co, string name) { ValueReference m = GetMember (ctx, t, co, name); if (m != null) m.ParentSource = objectSource; return m; }
internal IEnumerable<ValueReference> GetMembersSorted (EvaluationContext ctx, IObjectSource objectSource, object t, object co, BindingFlags bindingFlags) { List<ValueReference> list = new List<ValueReference> (); foreach (ValueReference vr in GetMembers (ctx, t, co, bindingFlags)) { vr.ParentSource = objectSource; list.Add (vr); } list.Sort (delegate (ValueReference v1, ValueReference v2) { return v1.Name.CompareTo (v2.Name); }); return list; }
public static CommandTokenMatcher Object(String CaptureName, IObjectSource Source, ObjectMatcherSettings Settings = ObjectMatcherSettings.UnderstandMe) { return new ObjectMatcher(CaptureName, Source, Settings); }
public static CommandTokenMatcher Object(String CaptureName, IObjectSource Source, Func<Actor, MudObject, MatchPreference> ScoreFunc, ObjectMatcherSettings Settings = ObjectMatcherSettings.UnderstandMe) { return new ObjectMatcher(CaptureName, Source, ScoreFunc, Settings); }
public ObjectMatcher( String CaptureName, IObjectSource ObjectSource, Func<Actor, MudObject, MatchPreference> ScoreResults, ObjectMatcherSettings Settings = ObjectMatcherSettings.UnderstandMe) { this.CaptureName = CaptureName; this.ObjectSource = ObjectSource; this.ScoreResults = ScoreResults; this.Settings = Settings; }
public RemoteRawValueString (EvaluationContext ctx, IObjectSource source, IStringAdaptor targetString, object targetObject) { this.ctx = ctx; this.targetString = targetString; this.targetObject = targetObject; this.source = source; Connect (); }
public RemoteRawValueArray(EvaluationContext ctx, IObjectSource source, ICollectionAdaptor targetArray, object targetObject) { this.ctx = ctx; this.targetArray = targetArray; this.targetObject = targetObject; this.source = source; Connect (); }
public static ObjectValue CreateStaticsNode (EvaluationContext ctx, IObjectSource objectSource, object type, object obj, BindingFlags bindingFlags) { return CreateNode (ctx, objectSource, type, obj, bindingFlags, "Static members"); }
public IEnumerable<ValueReference> GetMembers (EvaluationContext ctx, IObjectSource objectSource, object t, object co) { foreach (ValueReference val in GetMembers (ctx, t, co, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static)) { val.ParentSource = objectSource; yield return val; } }
public ValueReference GetMember (EvaluationContext ctx, IObjectSource objectSource, object co, string name) { return GetMember (ctx, objectSource, GetValueType (ctx, co), co, name); }
public override void Start() { ObjectSource = new ObjectSource(); }
internal IEnumerable<ValueReference> GetMembersSorted (EvaluationContext ctx, IObjectSource objectSource, object t, object co) { return GetMembersSorted (ctx, objectSource, t, co, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static); }
internal IEnumerable<ValueReference> GetMembersSorted(EvaluationContext ctx, IObjectSource objectSource, object t, object co, BindingFlags bindingFlags) { var list = new List<ValueReference> (); foreach (var vr in GetMembers (ctx, t, co, bindingFlags)) { vr.ParentSource = objectSource; list.Add (vr); } list.Sort ((v1, v2) => string.Compare (v1.Name, v2.Name, StringComparison.Ordinal)); return list; }
public virtual object ToRawValue (EvaluationContext ctx, IObjectSource source, object obj) { if (IsEnum (ctx, obj)) { object longType = GetType (ctx, "System.Int64"); object c = Cast (ctx, obj, longType); return TargetObjectToObject (ctx, c); } if (ctx.Options.ChunkRawStrings && IsString (ctx, obj)) { IStringAdaptor adaptor = CreateStringAdaptor (ctx, obj); return new RawValueString (new RemoteRawValueString (adaptor, obj)); } if (IsPrimitive (ctx, obj)) return TargetObjectToObject (ctx, obj); if (IsArray (ctx, obj)) { ICollectionAdaptor adaptor = CreateArrayAdaptor (ctx, obj); return new RawValueArray (new RemoteRawValueArray (ctx, source, adaptor, obj)); } return new RawValue (new RemoteRawValue (ctx, source, obj)); }
public RawViewSource (EvaluationContext ctx, IObjectSource objectSource, object obj) { this.ctx = ctx; this.obj = obj; this.objectSource = objectSource; }