public virtual IEnumDebugProperty EnumChildren(EnumerationKind kind, int radix, int timeout, bool allowFuncEval) { IDebugClassType classType = this.type as IDebugClassType; if (classType != null) { IEnumDebugTypes enumBaseClasses = classType.GetBaseClasses(); IEnumSymbol enumMembers = classType.GetMembers(null, true, SymbolKind.Field, SymbolModifiers.All); return(new AggregateEnumDebugProperty( new EnumDebugPropertySymbols(enumMembers, this, this.containerValue, this.evaluator), new EnumDebugPropertyTypes(enumBaseClasses, this, containerValue, this.evaluator))); } return(null); }
public override IEnumDebugProperty EnumChildren(EnumerationKind kind, int radix, int timeout, bool allowFuncEval) { if (this.value == null || this.value.IsNullReference()) { return(null); } IDebugClassType classType = (IDebugClassType)this.value.RuntimeType(); if (classType.Name.IndexOf("closure") >= 0) { IEnumSymbol closureSymbol = classType.GetClosureClassMembers(this.value); return(new EnumDebugPropertySymbols(closureSymbol, this, this.value, this.evaluator)); } else { IEnumSymbol enumSymbol = classType.GetMembers(null, true, SymbolKind.Field | SymbolKind.Property, SymbolModifiers.All); IEnumDebugTypes enumBaseClasses = classType.GetBaseClasses(); return(new AggregateEnumDebugProperty( new EnumDebugPropertyTypes(enumBaseClasses, this, this.value, this.evaluator), new EnumDebugPropertySymbols(enumSymbol, this, this.value, this.evaluator))); } }
public static IEnumerable <T> EnumerateSafely <T>([JetBrains.Annotations.CanBeNull] this IEnumerable <T> sequence, EnumerationKind enumerationKind) { if (ReferenceEquals(sequence, null)) { yield break; } foreach (var item in sequence) { if (ReferenceEquals(item, null) && (enumerationKind == EnumerationKind.ExcludeNulls)) { continue; } #pragma warning disable S2259 yield return(item); #pragma warning restore S2259 } }
public virtual IEnumDebugProperty EnumChildren(EnumerationKind kind, int radix, int timeout, bool allowFuncEval){ IDebugClassType classType = this.type as IDebugClassType; if (classType != null){ IEnumDebugTypes enumBaseClasses = classType.GetBaseClasses(); IEnumSymbol enumMembers = classType.GetMembers(null, true, SymbolKind.Field, SymbolModifiers.All); return new AggregateEnumDebugProperty( new EnumDebugPropertySymbols(enumMembers,this, this.containerValue, this.evaluator), new EnumDebugPropertyTypes(enumBaseClasses, this, containerValue, this.evaluator)); } return null; }
public override IEnumDebugProperty EnumChildren(EnumerationKind kind, int radix, int timeout, bool allowFuncEval){ IDebugArrayType arrayType = this.staticType as IDebugArrayType; if (arrayType == null) arrayType = this.value.RuntimeType() as IDebugArrayType; return new EnumArrayIndices(this.arrayValue.GetElements(), arrayType.ElementType, this, this.value, this.evaluator); }
public override IEnumDebugProperty EnumChildren(EnumerationKind kind, int radix, int timeout, bool allowFuncEval){ if (this.value == null || this.value.IsNullReference()) return null; IDebugClassType classType = (IDebugClassType)this.value.RuntimeType(); IEnumSymbol enumCountSymbol = classType.GetMembers("Count", true, SymbolKind.Property, SymbolModifiers.All); IEnumSymbol enumElementsSymbol = classType.GetMembers("elements", true, SymbolKind.Field, SymbolModifiers.All); return new AggregateEnumDebugProperty( new EnumDebugPropertySymbols(enumCountSymbol, this, this.value, this.evaluator), new EnumDebugPropertySymbols(enumElementsSymbol, this, this.value, this.evaluator)); }
public override IEnumDebugProperty EnumChildren(EnumerationKind kind, int radix, int timeout, bool allowFuncEval){ if (this.value == null || this.value.IsNullReference()) return null; IDebugClassType classType = (IDebugClassType)this.value.RuntimeType(); if (classType.Name.IndexOf("closure") >= 0){ IEnumSymbol closureSymbol = classType.GetClosureClassMembers(this.value); return new EnumDebugPropertySymbols(closureSymbol, this, this.value, this.evaluator); } else{ IEnumSymbol enumSymbol = classType.GetMembers(null, true, SymbolKind.Field|SymbolKind.Property, SymbolModifiers.All); IEnumDebugTypes enumBaseClasses = classType.GetBaseClasses(); return new AggregateEnumDebugProperty( new EnumDebugPropertyTypes(enumBaseClasses, this, this.value, this.evaluator), new EnumDebugPropertySymbols(enumSymbol, this, this.value, this.evaluator)); } }
public override IEnumDebugProperty EnumChildren(EnumerationKind kind, int radix, int timeout, bool allowFuncEval){ if (this.value == null || this.value.IsNullReference()) return null; if (this.structuralType.StructuralType == StructTypes.Tuple){ IDebugStructuralType classType = (IDebugStructuralType)this.value.RuntimeType(); IEnumSymbol enumSymbol = classType.GetMembers(null, true, SymbolKind.Field|SymbolKind.Property, SymbolModifiers.All); return new EnumDebugPropertySymbols(enumSymbol, this, this.value, this.evaluator); } else if (this.structuralType.StructuralType == StructTypes.Union){ // TODO: Handle Union Types, Properly IDebugStructuralType structType = (IDebugStructuralType)this.value.RuntimeType(); IEnumSymbol enumSymbol = structType.GetMembers(null, true, SymbolKind.Field|SymbolKind.Property, SymbolModifiers.All); return new EnumDebugPropertySymbols(enumSymbol, this, this.value, this.evaluator); } else if (this.structuralType.StructuralType == StructTypes.Intersection){ // TODO: Handle Intersection Types, Properly return null; } return null; }
public override IEnumDebugProperty EnumChildren(EnumerationKind kind, int radix, int timeout, bool allowFuncEval){ if (this.value == null || this.value.IsNullReference()) return null; IDebugType typ = this.value.RuntimeType(); IDebugClassType classType = null; IDebugStreamType streamType = null; if ((classType = typ as IDebugClassType) != null){ //IEnumSymbol enumSymbol = new CEnumClosureClassSymbols(this.value, this.context); IEnumSymbol enumSymbol = classType.GetClosureClassMembers(this.value); //IEnumSymbol enumSymbol = classType.GetMembers(null, true, SymbolKind.Field|SymbolKind.Property, SymbolModifiers.All); return new EnumDebugPropertySymbols(enumSymbol, this, this.value, this.evaluator); } else if ((streamType = typ as IDebugStreamType) != null){ //IDebugStreamType classType = (IDebugStreamType)this.value.RuntimeType(); IEnumSymbol enumSymbol = streamType.GetMembers(null, true, SymbolKind.Field|SymbolKind.Property, SymbolModifiers.All); return new EnumDebugPropertySymbols(enumSymbol, this, this.value, this.evaluator); } else return null; }
public virtual IEnumDebugProperty EnumChildren(EnumerationKind kind, int radix, int timeout, bool allowFuncEval){ IEnumSymbol enumSymbols = null; if (kind == EnumerationKind.Locals) enumSymbols = this.method.GetLocals(); else if (kind == EnumerationKind.Arguments) enumSymbols = this.method.GetParameters(); else if (kind == EnumerationKind.LocalsPlusArguments){ IEnumSymbol thisEnum = new EnumSingleSymbol(this.method.GetThis()); IEnumSymbol localsEnum = this.method.GetLocals(); IEnumSymbol paramsEnum = this.method.GetParameters(); return new AggregateEnumDebugProperty(this.MakeEnumDebugProperty(thisEnum), this.MakeEnumDebugProperty(paramsEnum), this.MakeEnumDebugProperty(localsEnum)); } else if (kind == EnumerationKind.This) enumSymbols = new EnumSingleSymbol(this.method.GetThis()); return this.MakeEnumDebugProperty(enumSymbols); }
public override IEnumDebugProperty EnumChildren(EnumerationKind kind, int radix, int timeout, bool allowFuncEval){ return null; }
public override IEnumDebugProperty EnumChildren(EnumerationKind kind, int radix, int timeout, bool allowFuncEval) { return(null); }