/// <summary> /// Performs a look-up on the <see cref="InterfaceType"/> to determine its /// dependencies. /// </summary> /// <param name="result">A <see cref="ITypeReferenceCollection"/> which /// relates to the <see cref="ITypeReference"/> instance implementations /// that the <see cref="InterfaceType"/> relies on.</param> /// <param name="options">The <see cref="ICodeTranslationOptions"/> which is used to /// guide the gathering process.</param> public override void GatherTypeReferences(ref ITypeReferenceCollection result, ICodeTranslationOptions options) { if (result == null) { result = new TypeReferenceCollection(); } base.GatherTypeReferences(ref result, options); if (this.IsRoot && this.implementsList != null) { foreach (ITypeReference itr in this.ImplementsList) { result.Add(itr); } } if (options.AllowPartials) { this.Properties.GatherTypeReferences(ref result, options); this.Methods.GatherTypeReferences(ref result, options); } else { if (this.properties != null && this.IsRoot) { this.Properties.GatherTypeReferences(ref result, options); } if (this.methods != null && this.IsRoot) { this.Methods.GatherTypeReferences(ref result, options); } } }
public override void GatherTypeReferences(ref ITypeReferenceCollection result, ICodeTranslationOptions options) { if (this.Target != null) { this.Target.GatherTypeReferences(ref result, options); } }
public override IDeclaredTypeReference <TDom> GetTypeReference(ITypeReferenceCollection typeParameters) { if (this.IsPartial) { return(this.GetRootDeclaration().GetTypeReference(typeParameters)); } return(base.GetTypeReference(typeParameters)); }
protected TypeReferenceBase(IType typeInstance, ITypeReferenceCollection typeParameters) { this.typeInstance = typeInstance; if (typeParameters != null) { this.TypeParameters.AddRange(typeParameters.ToArray()); } }
/// <summary> /// Performs a look-up on the <see cref="MethodMember"/> to determine its /// dependencies. /// </summary> /// <param name="result">A <see cref="ITypeReferenceCollection"/> which /// relates to the <see cref="ITypeReference"/> instance implementations /// that the <see cref="MethodMember"/> relies on.</param> /// <param name="options">The <see cref="ICodeTranslationOptions"/> which is used to /// guide the gathering process.</param> public override void GatherTypeReferences(ref ITypeReferenceCollection result, ICodeTranslationOptions options) { if (result == null) { result = new TypeReferenceCollection(); } base.GatherTypeReferences(ref result, options); this.Statements.GatherTypeReferences(ref result, options); }
/// <summary> /// Adds a new <typeparamref name="TItem"/> with the <paramref name="name"/>, <paramref name="constraints"/>, /// and <paramref name="requiresConstructor"/> provided. /// </summary> /// <param name="name">The name of the constraint.</param> /// <param name="constraints">The type-reference constraints for the resulted <paramref name="TItem"/>.</param> /// <param name="requiresConstructor">Whether or not the resulted <typeparamref name="TItem"/> /// has a null-constructor constraint.</param> /// <returns>A new <typeparamref name="TItem"/> named <paramref name="name"/> and /// has the null constructor constraint based upon <paramref name="requiresConstructor"/> /// and additional constraints as expressed by <paramref name="constraints"/>.</returns> public override ITypeParameterMember <TParentDom> AddNew(string name, ITypeReferenceCollection constraints, bool requiresConstructor, TypeParameterSpecialCondition specialCondition) { TypeParameterMember <TParentDom> item = new TypeParameterMember <TParentDom>(name, this.TargetDeclaration); item.RequiresConstructor = requiresConstructor; item.Constraints.AddRange(constraints.ToArray()); item.SpecialCondition = specialCondition; this._Add(item.Name, item); return(item); }
private static ITypeReferenceCollection DelveFurther(ITypeReferenceCollection itc) { ITypeReferenceCollection result = new TypeReferenceCollection(); foreach (ITypeReference itr in itc) { result.AddRange(DelveFurther(itr)); } return(result); }
/// <summary> /// Performs a look-up on the <see cref="DeclaredType{TDom}"/> to determine its /// dependencies. /// </summary> /// <param name="result">A <see cref="ITypeReferenceCollection"/> which /// relates to the <see cref="ITypeReference"/> instance implementations /// that the <see cref="DeclaredType{TDom}"/> relies on.</param> /// <param name="options">The <see cref="ICodeTranslationOptions"/> which is used to /// guide the gathering process.</param> public override void GatherTypeReferences(ref ITypeReferenceCollection result, ICodeTranslationOptions options) { if (result == null) { result = new TypeReferenceCollection(); } if (this.Attributes != null) { this.Attributes.GatherTypeReferences(ref result, options); } }
public override IMethodTypeParameterMember AddNew(string name, ITypeReferenceCollection constraints, bool requiresConstructor, TypeParameterSpecialCondition specialCondition) { MethodTypeParameterMember result = new MethodTypeParameterMember(name, (IMethodMember)this.TargetDeclaration); result.Constraints.AddRange(constraints.ToArray()); result.SpecialCondition = specialCondition; result.RequiresConstructor = requiresConstructor; this._Add(result.GetUniqueIdentifier(), result); this.OnSignatureChanged(); return(result); }
/// <summary> /// Performs a look-up on the <see cref="AttributeConstructorParameters"/> to determine its /// dependencies. /// </summary> /// <param name="result">A <see cref="ITypeReferenceCollection"/> which /// relates to the <see cref="ITypeReference"/> instance implementations /// that the <see cref="AttributeConstructorParameters"/> relies on.</param> /// <param name="options">The <see cref="ICodeTranslationOptions"/> which is used to /// guide the gathering process.</param> public void GatherTypeReferences(ref ITypeReferenceCollection result, ICodeTranslationOptions options) { if (result == null) { result = new TypeReferenceCollection(); } foreach (IAttributeConstructorParameter iacp in this) { iacp.GatherTypeReferences(ref result, options); } }
public void GatherTypeReferences(ref ITypeReferenceCollection result, ICodeTranslationOptions options) { if (result == null) { result = new TypeReferenceCollection(); } if (DefaultType != null) { result.Add(this.DefaultType); } }
/// <summary> /// Performs a look-up on the <see cref="AttributeDeclarations"/> to determine its /// dependencies. /// </summary> /// <param name="result">A <see cref="ITypeReferenceCollection"/> which /// relates to the <see cref="ITypeReference"/> instance implementations /// that the <see cref="AttributeDeclarations"/> relies on.</param> /// <param name="options">The <see cref="ICodeTranslationOptions"/> which is used to /// guide the gathering process.</param> public void GatherTypeReferences(ref ITypeReferenceCollection result, ICodeTranslationOptions options) { if (result == null) { result = new TypeReferenceCollection(); } foreach (IAttributeDeclaration iad in this) { iad.GatherTypeReferences(ref result, options); } }
/// <summary> /// Performs a look-up on the <see cref="TypeReferenceExpression"/> to determine its /// dependencies. /// </summary> /// <param name="result">A <see cref="ITypeReferenceCollection"/> which /// relates to the <see cref="ITypeReference"/> instance implementations /// that the <see cref="TypeReferenceExpression"/> relies on.</param> /// <param name="options">The <see cref="ICodeTranslationOptions"/> which is used to /// guide the gathering process.</param> public override void GatherTypeReferences(ref ITypeReferenceCollection result, ICodeTranslationOptions options) { if (result == null) { result = new TypeReferenceCollection(); } if ((this.typeReference != null)) { result.Add(this.TypeReference); } }
/// <summary> /// Performs a look-up on the <see cref="AttributeConstructorParameter"/> to determine its /// dependencies. /// </summary> /// <param name="result">A <see cref="ITypeReferenceCollection"/> which /// relates to the <see cref="ITypeReference"/> instance implementations /// that the <see cref="AttributeConstructorParameter"/> relies on.</param> /// <param name="options">The <see cref="ICodeTranslationOptions"/> which is used to /// guide the gathering process.</param> public void GatherTypeReferences(ref ITypeReferenceCollection result, ICodeTranslationOptions options) { if (result == null) { result = new TypeReferenceCollection(); } if (this.value != null) { this.Value.GatherTypeReferences(ref result, options); } }
/// <summary> /// Performs a look-up on the <see cref="DirectionExpression"/> to determine its /// dependencies. /// </summary> /// <param name="result">A <see cref="ITypeReferenceCollection"/> which /// relates to the <see cref="ITypeReference"/> instance implementations /// that the <see cref="DirectionExpression"/> relies on.</param> /// <param name="options">The <see cref="ICodeTranslationOptions"/> which is used to /// guide the gathering process.</param> public override void GatherTypeReferences(ref ITypeReferenceCollection result, ICodeTranslationOptions options) { if (result == null) { result = new TypeReferenceCollection(); } if (this.directedExpression != null) { this.DirectedExpression.GatherTypeReferences(ref result, options); } }
/// <summary> /// Performs a look-up on the <see cref="ExpressionCollection"/> to determine its /// dependencies. /// </summary> /// <param name="result">A <see cref="ITypeReferenceCollection"/> which /// relates to the <see cref="ITypeReference"/> instance implementations /// that the <see cref="ExpressionCollection"/> relies on.</param> /// <param name="options">The <see cref="ICodeTranslationOptions"/> which is used to /// guide the gathering process.</param> public void GatherTypeReferences(ref ITypeReferenceCollection result, ICodeTranslationOptions options) { if (result == null) { result = new TypeReferenceCollection(); } foreach (IExpression iexp in this) { iexp.GatherTypeReferences(ref result, options); } }
/// <summary> /// Performs a look-up on the <see cref="EnumeratorType"/> to determine its /// dependencies. /// </summary> /// <param name="result">A <see cref="ITypeReferenceCollection"/> which /// relates to the <see cref="ITypeReference"/> instance implementations /// that the <see cref="EnumeratorType"/> relies on.</param> /// <param name="options">The <see cref="ICodeTranslationOptions"/> which is used to /// guide the gathering process.</param> public override void GatherTypeReferences(ref ITypeReferenceCollection result, ICodeTranslationOptions options) { if (result == null) { result = new TypeReferenceCollection(); } base.GatherTypeReferences(ref result, options); if (this.fields != null) { this.Fields.GatherTypeReferences(ref result, options); } }
/// <summary> /// Performs a look-up on the <see cref="ParameteredParameterMember{TParameter, TSignatureDom, TParent}"/> to determine its /// dependencies. /// </summary> /// <param name="result">A <see cref="ITypeReferenceCollection"/> which /// relates to the <see cref="ITypeReference"/> instance implementations /// that the <see cref="ParameteredParameterMember{TParameter, TSignatureDom, TParent}"/> relies on.</param> /// <param name="options">The <see cref="ICodeTranslationOptions"/> which is used to /// guide the gathering process.</param> public override void GatherTypeReferences(ref ITypeReferenceCollection result, ICodeTranslationOptions options) { if (result == null) { result = new TypeReferenceCollection(); } base.GatherTypeReferences(ref result, options); if ((this.parameterType != null)) { result.Add(this.parameterType); } }
public override void Dispose() { this.baseType = null; if (this.implementsList != null) { if (this.IsRoot) { this.implementsList.Clear(); } this.implementsList = null; } base.Dispose(); }
/// <summary> /// Performs a look-up on the <see cref="NameSpaceDeclarations"/> to determine its /// dependencies. /// </summary> /// <param name="result">A <see cref="ITypeReferenceCollection"/> which /// relates to the <see cref="ITypeReference"/> instance implementations /// that the <see cref="NameSpaceDeclarations"/> relies on.</param> /// <param name="options">The <see cref="ICodeTranslationOptions"/> which is used to /// guide the gathering process.</param> public void GatherTypeReferences(ref ITypeReferenceCollection result, ICodeTranslationOptions options) { if (result == null) { result = new TypeReferenceCollection(); } foreach (INameSpaceDeclaration ti in this.Values) { if (options.AllowPartials) { if (this.targetDeclaration is ISegmentableDeclarationTarget) { if (ti.ParentTarget == this.targetDeclaration) { ti.GatherTypeReferences(ref result, options); } } else { ti.GatherTypeReferences(ref result, options); } foreach (INameSpaceDeclaration insd in ti.Partials) { if (this.targetDeclaration is ISegmentableDeclarationTarget) { if (insd.ParentTarget == this.targetDeclaration) { insd.GatherTypeReferences(ref result, options); } } else { insd.GatherTypeReferences(ref result, options); } } } else if (this.targetDeclaration is ISegmentableDeclarationTarget) { if (((ISegmentableDeclarationTarget)this.targetDeclaration).IsRoot) { ti.GatherTypeReferences(ref result, options); } } else { ti.GatherTypeReferences(ref result, options); } } }
public override void GatherTypeReferences(ref ITypeReferenceCollection result, ICodeTranslationOptions options) { if (result == null) { result = new TypeReferenceCollection(); } if (this.cases != null) { foreach (var @case in this.cases) { @case.GatherTypeReferences(ref result, options); } } }
/// <summary> /// Performs a look-up on the <see cref="BinaryOperationExpression"/> to determine its /// dependencies. /// </summary> /// <param name="result">A <see cref="ITypeReferenceCollection"/> which /// relates to the <see cref="ITypeReference"/> instance implementations /// that the <see cref="BinaryOperationExpression"/> relies on.</param> /// <param name="options">The <see cref="ICodeTranslationOptions"/> which is used to /// guide the gathering process.</param> public override void GatherTypeReferences(ref ITypeReferenceCollection result, ICodeTranslationOptions options) { if (result == null) { result = new TypeReferenceCollection(); } if (this.leftSide != null) { this.leftSide.GatherTypeReferences(ref result, options); } if (this.rightSide != null) { this.RightSide.GatherTypeReferences(ref result, options); } }
/// <summary> /// Performs a look-up on the <see cref="BlockedStatement{TDom}"/> to determine its /// dependencies. /// </summary> /// <param name="result">A <see cref="ITypeReferenceCollection"/> which /// relates to the <see cref="ITypeReference"/> instance implementations /// that the <see cref="BlockedStatement{TDom}"/> relies on.</param> /// <param name="options">The <see cref="ICodeTranslationOptions"/> which is used to /// guide the gathering process.</param> public override void GatherTypeReferences(ref ITypeReferenceCollection result, ICodeTranslationOptions options) { if (this.isDisposed) { return; } if (result == null) { result = new TypeReferenceCollection(); } if (this.statements != null) { this.Statements.GatherTypeReferences(ref result, options); } }
/// <summary> /// Performs a look-up on the <see cref="CreateNewObjectExpression"/> to determine its /// dependencies. /// </summary> /// <param name="result">A <see cref="ITypeReferenceCollection"/> which /// relates to the <see cref="ITypeReference"/> instance implementations /// that the <see cref="CreateNewObjectExpression"/> relies on.</param> /// <param name="options">The <see cref="ICodeTranslationOptions"/> which is used to /// guide the gathering process.</param> public override void GatherTypeReferences(ref ITypeReferenceCollection result, ICodeTranslationOptions options) { if (result == null) { result = new TypeReferenceCollection(); } if (this.newType != null) { result.Add(this.NewType); } if (this.arguments != null) { this.arguments.GatherTypeReferences(ref result, options); } }
/// <summary> /// Performs a look-up on the <see cref="TypeParameterMember{TDom, TParent}"/> to determine its /// dependencies. /// </summary> /// <param name="result">A <see cref="ITypeReferenceCollection"/> which /// relates to the <see cref="ITypeReference"/> instance implementations /// that the <see cref="TypeParameterMember{TDom, TParent}"/> relies on.</param> /// <param name="options">The <see cref="ICodeTranslationOptions"/> which is used to /// guide the gathering process.</param> public override void GatherTypeReferences(ref ITypeReferenceCollection result, ICodeTranslationOptions options) { if (result == null) { result = new TypeReferenceCollection(); } base.GatherTypeReferences(ref result, options); if (this.constraints != null) { foreach (ITypeReference itr in this.Constraints) { result.Add(itr); } } }
/// <summary> /// Performs a look-up on the <see cref="BreakStatement"/> to determine its /// dependencies. /// </summary> /// <param name="result">A <see cref="ITypeReferenceCollection"/> which /// relates to the <see cref="ITypeReference"/> instance implementations /// that the <see cref="BreakStatement"/> relies on.</param> /// <param name="options">The <see cref="ICodeTranslationOptions"/> which is used to /// guide the gathering process.</param> public override void GatherTypeReferences(ref ITypeReferenceCollection result, ICodeTranslationOptions options) { if (result == null) { result = new TypeReferenceCollection(); } if (this.condition != null) { this.condition.GatherTypeReferences(ref result, options); } if (this.terminalVariable != null) { this.terminalVariable.GatherTypeReferences(ref result, options); } }
/// <summary> /// Performs a look-up on the <see cref="StatementBlock"/> to determine its /// dependencies. /// </summary> /// <param name="result">A <see cref="ITypeReferenceCollection"/> which /// relates to the <see cref="ITypeReference"/> instance implementations /// that the <see cref="StatementBlock"/> relies on.</param> /// <param name="options">The <see cref="ICodeTranslationOptions"/> which is used to /// guide the gathering process.</param> public void GatherTypeReferences(ref ITypeReferenceCollection result, ICodeTranslationOptions options) { if (result == null) { result = new TypeReferenceCollection(); } if (this.locals != null) { this.locals.GatherTypeReferences(ref result, options); } foreach (IStatement ist in this) { ist.GatherTypeReferences(ref result, options); } }
/// <summary> /// Performs a look-up on the <see cref="AttributeDeclaration"/> to determine its /// dependencies. /// </summary> /// <param name="result">A <see cref="ITypeReferenceCollection"/> which /// relates to the <see cref="ITypeReference"/> instance implementations /// that the <see cref="AttributeDeclaration"/> relies on.</param> /// <param name="options">The <see cref="ICodeTranslationOptions"/> which is used to /// guide the gathering process.</param> public void GatherTypeReferences(ref ITypeReferenceCollection result, ICodeTranslationOptions options) { if (result == null) { result = new TypeReferenceCollection(); } if (this.attributeType != null) { result.Add(this.AttributeType); } if (this.parameters != null) { this.parameters.GatherTypeReferences(ref result, options); } }
/// <summary> /// Performs a look-up on the <see cref="MethodInvokeExpression"/> to determine its /// dependencies. /// </summary> /// <param name="result">A <see cref="ITypeReferenceCollection"/> which /// relates to the <see cref="ITypeReference"/> instance implementations /// that the <see cref="MethodInvokeExpression"/> relies on.</param> /// <param name="options">The <see cref="ICodeTranslationOptions"/> which is used to /// guide the gathering process.</param> public override void GatherTypeReferences(ref ITypeReferenceCollection result, ICodeTranslationOptions options) { if (result == null) { result = new TypeReferenceCollection(); } if (this.argumentExpressions != null) { this.ArgumentExpressions.GatherTypeReferences(ref result, options); } if (this.reference != null) { this.reference.GatherTypeReferences(ref result, options); } }
/// <summary> /// Performs a look-up on the <see cref="CreateArrayExpression"/> to determine its /// dependencies. /// </summary> /// <param name="result">A <see cref="ITypeReferenceCollection"/> which /// relates to the <see cref="ITypeReference"/> instance implementations /// that the <see cref="CreateArrayExpression"/> relies on.</param> /// <param name="options">The <see cref="ICodeTranslationOptions"/> which is used to /// guide the gathering process.</param> public override void GatherTypeReferences(ref ITypeReferenceCollection result, ICodeTranslationOptions options) { if (result == null) { result = new TypeReferenceCollection(); } if (this.initializers != null) { this.Initializers.GatherTypeReferences(ref result, options); } if (this.sizeExpression != null) { this.SizeExpression.GatherTypeReferences(ref result, options); } result.Add(this.arrayType); }
public virtual ITypeReferenceCollection TransformTypeReferenceCollection(ITypeReferenceCollection types) { ITypeReference[] array = new ITypeReference[types.Count]; for (int i = 0; i < types.Count; i++) { array[i] = this.TransformTypeReference(types[i]); } ITypeReferenceCollection target = new TypeReferenceCollection(); target.AddRange(array); return target; }
public static bool Compare(this ITypeReferenceCollection source, ITypeReferenceCollection n, Func<ITypeReference, ITypeReference, bool> checkitem) { return Compare<ITypeReference>(source,n,checkitem); }
public static bool Compare(this ITypeReferenceCollection source, ITypeReferenceCollection n) { return Compare<ITypeReference>(source,n); }
public static bool Compare(this ITypeReferenceCollection source, ITypeReferenceCollection n, Func<ITypeReference, ITypeReference, Action<string, string>, bool> checkitem, Action<string, string> errAct) { return Compare<ITypeReference>(source,n,checkitem,errAct); }