public IStaticInclusionScopeCoercion AddStaticName(string name) { var result = new StaticInclusionScopeCoercion() { IncludedType = name.GetSymbolType() }; lock (this.baseList) this.baseList.Add(result); return(result); }
/// <summary> /// Adds a <see cref="ITypeInclusionScopeCoercion"/> with the /// <paramref name="includedType"/> and <paramref name="mergeStaticScope"/> /// explicitly given. /// </summary> /// <param name="includedType">The <see cref="IType"/> which /// is included explicitly into the active scope.</param> /// <param name="mergeStaticScope">Determines whether the inclusion /// should merge the identity of the type, or the static declarations /// of the type, into the active scope.</param> /// <returns>A <see cref="ITypeInclusionScopeCoercion"/> instance /// which denotes the specific type to include, and whether its to /// merge the type identity or the static declarations of the type. /// </returns> public ITypeInclusionScopeCoercion Add(IType includedType, bool mergeStaticScope) { TypeInclusionScopeCoercion result = null; if (!mergeStaticScope) { result = new TypeInclusionScopeCoercion() { IncludedType = includedType } } ; else { result = new StaticInclusionScopeCoercion() { IncludedType = includedType } }; this.baseList.Add(result); return(result); }