Пример #1
0
 public void CheckMarshallingInformation(MarshalPseudoCustomAttributeData a, MarshalPseudoCustomAttributeData b)
 {
     Assert.Equal(a == null, b == null);
     if (a != null)
     {
         CheckSymbols((TypeSymbol)a.TryGetSafeArrayElementUserDefinedSubtype(),
                      (TypeSymbol)b.TryGetSafeArrayElementUserDefinedSubtype(),
                      recurse: false);
     }
 }
        MarshalPseudoCustomAttributeData IMarshalAsAttributeTarget.GetOrCreateData()
        {
            VerifySealed(expected: false);
            if (this.lazyMarshalAsData == null)
            {
                lazyMarshalAsData = new MarshalPseudoCustomAttributeData();
                SetDataStored();
            }

            return lazyMarshalAsData;
        }
 public MarshalPseudoCustomAttributeData Retarget(MarshalPseudoCustomAttributeData marshallingInfo)
 {
     // Retarget by type code - primitive types are encoded in short form in an attribute signature:
     return(marshallingInfo?.WithTranslatedTypes <TypeSymbol, RetargetingSymbolTranslator>(
                (type, translator) => translator.Retarget(type, RetargetOptions.RetargetPrimitiveTypesByTypeCode), this));
 }