Exemple #1
0
        void InitializeFrom(CustomAttributeOptions options)
        {
            IsRawData     = options.RawData != null;
            RawData.Value = options.RawData;
            Constructor   = options.Constructor;
            ConstructorArguments.Clear();
            var sig = Constructor == null ? null : Constructor.MethodSig;

            for (int i = 0; i < options.ConstructorArguments.Count; i++)
            {
                TypeSig type = null;
                if (sig != null && i < sig.Params.Count)
                {
                    type = sig.Params[i];
                }
                ConstructorArguments.Add(new CAArgumentVM(ownerModule, options.ConstructorArguments[i], new TypeSigCreatorOptions(ownerModule, language), type));
            }
            CANamedArgumentsVM.InitializeFrom(options.NamedArguments);
            CreateArguments();
        }
 void InitializeFrom(SecurityAttribute sa)
 {
     AttributeType = sa.AttributeType;
     CANamedArgumentsVM.InitializeFrom(sa.NamedArguments);
 }