コード例 #1
0
ファイル: DefType.Runtime.cs プロジェクト: z77ma/runtime
 internal IEnumerable <FieldDesc> GetDiagnosticFields()
 {
     if (HasNativeLayout)
     {
         // Universal template fields get diagnostic info, but normal canon templates do not
         if (IsTemplateUniversal())
         {
             NativeLayoutFieldAlgorithm.EnsureFieldLayoutLoadedForGenericType(this);
             return(NativeLayoutFields);
         }
         return(FieldDesc.EmptyFields);
     }
     else
     {
         // This will only happen for fully formed metadata based loads...
         return(GetFields());
     }
 }
コード例 #2
0
ファイル: DefType.Runtime.cs プロジェクト: z77ma/runtime
 public FieldDesc GetFieldByNativeLayoutOrdinal(uint ordinal)
 {
     NativeLayoutFieldAlgorithm.EnsureFieldLayoutLoadedForGenericType(this);
     return(NativeLayoutFields[ordinal]);
 }