コード例 #1
0
 public UsingSpec(ClrNamespaceName NamespaceName)
 {
     this.IsStatic      = false;
     this.SubjectName   = NamespaceName;
     this.Documentation = null;
     this.AliasName     = String.Empty;
 }
コード例 #2
0
 public UsingSpec(string AliasName, ClrNamespaceName NamespaceName)
 {
     this.AliasName     = AliasName;
     this.IsStatic      = false;
     this.SubjectName   = NamespaceName;
     this.Documentation = null;
 }
コード例 #3
0
 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);
 }
コード例 #4
0
ファイル: ProjectX.cs プロジェクト: 0xCM/Meta.Core
 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);
     }
 }
コード例 #5
0
 /// <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);
コード例 #6
0
 public NamespaceSpec(ClrNamespaceName Name, params IClrElementSpec[] DeclaredElements)
     : base(Name, null, ClrAccessKind.Default, array <AttributionSpec>())
 {
     this.DeclaredElements = DeclaredElements;
     this.Usings           = array <UsingSpec>();
 }
コード例 #7
0
 public bool IsDeclaredIn(ClrNamespaceName ns)
 => Namespace.MapValueOrDefault(x => x.ToString(), string.Empty) == ns.ToString();