/// <summary> /// Removes an <paramref name="includedType"/> from the <see cref="ScopeCoercionCollection"/> /// provided it is present. /// </summary> /// <param name="includedType">The <see cref="IType"/> to remove.</param> /// <returns>true if the <paramref name="includedType"/> was found within the /// <see cref="IScopeCoercionCollection"/>.</returns> public bool Remove(IType includedType) { ITypeInclusionScopeCoercion foundItem = null; foreach (var element in this) { if ((element is ITypeInclusionScopeCoercion) && (foundItem = (ITypeInclusionScopeCoercion)element).IncludedType == includedType) { break; } else { foundItem = null; } } if (foundItem == null) { return(false); } lock (this.baseList) this.baseList.Remove(foundItem); return(true); }
public abstract IScopeCoercion Transform(ITypeInclusionScopeCoercion inclusion);
void IScopeCoercionVisitor.Visit(ITypeInclusionScopeCoercion scopeCoercion) { this.Translate(scopeCoercion); }
TransformationImpact IInclusionVisitor <TransformationImpact> .Visit(ITypeInclusionScopeCoercion inclusion) { return(CalculateRefactorImpact(inclusion)); }
/// <summary><para>Creates a C♯ compiler warning, relative to the abstract model, (level 3) #105:</para><para>The using directive for <paramref name="coercion"/> appeared previously in this namespace</para></summary> /// <param name="coercion">The <see cref="ITypeInclusionScopeCoercion"/> which appeared previously in the /// active scope.</param> public static ICompilerSourceModelWarning <ITypeInclusionScopeCoercion> WarningCS0105(ITypeInclusionScopeCoercion coercion) { var start = coercion.Start ?? LineColumnPair.Zero; var end = coercion.End ?? LineColumnPair.Zero; return(new CompilerSourceModelWarning <ITypeInclusionScopeCoercion>(CS0105, coercion, coercion.Location, start, end, coercion.IncludedType.FullName)); }
public TestLinkerResult Visit(ITypeInclusionScopeCoercion typeInclusion, ICompilationContext context) { throw new NotImplementedException(); }
public abstract TransformationImpact CalculateRefactorImpact(ITypeInclusionScopeCoercion inclusion);
public abstract void Translate(ITypeInclusionScopeCoercion inclusion);
public TransformationKind Visit(ITypeInclusionScopeCoercion typeInclusion, ITransformationContext context) { throw new NotImplementedException(); }