/// <summary> /// Removes a <see cref="String"/> based namespace inclusion scope /// coercion. /// </summary> /// <param name="namespaceName">The name of the namespace /// which was included by the <see cref="INamespaceInclusionScopeCoercion"/>.</param> /// <returns>true if the namespace name was found and removed; false, otherwise.</returns> public bool Remove(string namespaceName) { INamespaceInclusionScopeCoercion foundItem = null; foreach (var element in this) { if ((element is INamespaceInclusionScopeCoercion) && (foundItem = (INamespaceInclusionScopeCoercion)element).Namespace == namespaceName) { break; } else { foundItem = null; } } if (foundItem == null) { return(false); } lock (this.baseList) this.baseList.Remove(foundItem); return(true); }
public abstract IScopeCoercion Transform(INamespaceInclusionScopeCoercion inclusion);
void IScopeCoercionVisitor.Visit(INamespaceInclusionScopeCoercion scopeCoercion) { this.Translate(scopeCoercion); }
TransformationImpact IInclusionVisitor <TransformationImpact> .Visit(INamespaceInclusionScopeCoercion 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="INamespaceInclusionScopeCoercion"/> which appeared previously in the /// active scope.</param> public static ICompilerSourceModelWarning <INamespaceInclusionScopeCoercion> WarningCS0105(INamespaceInclusionScopeCoercion coercion) { var start = coercion.Start ?? LineColumnPair.Zero; var end = coercion.End ?? LineColumnPair.Zero; return(new CompilerSourceModelWarning <INamespaceInclusionScopeCoercion>(CS0105, coercion, coercion.Location, start, end, coercion.Namespace)); }
public TestLinkerResult Visit(INamespaceInclusionScopeCoercion namespaceInclusion, ICompilationContext context) { throw new NotImplementedException(); }
public abstract TransformationImpact CalculateRefactorImpact(INamespaceInclusionScopeCoercion inclusion);
public abstract void Translate(INamespaceInclusionScopeCoercion inclusion);
public TransformationKind Visit(INamespaceInclusionScopeCoercion namespaceInclusion, ITransformationContext context) { throw new NotImplementedException(); }