public UsingSpec(ClrNamespaceName NamespaceName) { this.IsStatic = false; this.SubjectName = NamespaceName; this.Documentation = null; this.AliasName = String.Empty; }
public UsingSpec(string AliasName, ClrNamespaceName NamespaceName) { this.AliasName = AliasName; this.IsStatic = false; this.SubjectName = NamespaceName; this.Documentation = null; }
public NamespaceSpec(ClrNamespaceName Name, IEnumerable <IClrElementSpec> DeclaredElements, IEnumerable <UsingSpec> Usings) : base(Name, null, ClrAccessKind.Default, array <AttributionSpec>()) { this.DeclaredElements = rovalues(DeclaredElements); this.Usings = rovalues(Usings); }
public static Option <int> RepresentStructure(this FolderPath SrcDir, ClrNamespaceName DstNs, FilePath DstFile) { using (var writer = new StreamWriter(DstFile)) { writer.WriteLine($"namespace {DstNs}"); writer.WriteLine("{"); var result = Render(SrcDir, writer); writer.WriteLine("}"); return(result); } }
/// <summary> /// Specifies a using statement /// </summary> /// <param name="ns">The namespace to be brought into scope</param> /// <returns></returns> public static UsingSpec SpecifyUsing(this ClrNamespaceName ns) => new UsingSpec(ns);
public NamespaceSpec(ClrNamespaceName Name, params IClrElementSpec[] DeclaredElements) : base(Name, null, ClrAccessKind.Default, array <AttributionSpec>()) { this.DeclaredElements = DeclaredElements; this.Usings = array <UsingSpec>(); }
public bool IsDeclaredIn(ClrNamespaceName ns) => Namespace.MapValueOrDefault(x => x.ToString(), string.Empty) == ns.ToString();