示例#1
0
 void InitializeFrom(DeclSecurityOptions options)
 {
     SecurityActionEnumList.SelectedItem = (SecAc)options.Action;
     CustomAttributesVM.InitializeFrom(options.CustomAttributes);
     SecurityAttributesVM.Collection.Clear();
     SecurityAttributesVM.Collection.AddRange(options.SecurityAttributes.Select(a => new SecurityAttributeVM(a, ownerModule, language, ownerType, ownerMethod)));
     V1XMLString = options.V1XMLString;
     DeclSecVerEnumList.SelectedItem = options.V1XMLString == null ? DeclSecVer.V2 : DeclSecVer.V1;
 }
示例#2
0
 void InitializeFrom(GenericParamOptions options)
 {
     Number.Value = options.Number;
     Attributes   = options.Flags;
     Name         = options.Name;
     GPVarianceVM.SelectedItem = (GPVariance)((int)(options.Flags & GenericParamAttributes.VarianceMask) >> 0);
     TypeSigCreator.TypeSig    = options.Kind.ToTypeSig();
     TypeDefOrRefAndCAsVM.InitializeFrom(options.GenericParamConstraints);
     CustomAttributesVM.InitializeFrom(options.CustomAttributes);
 }
示例#3
0
 void InitializeFrom(MemberRefOptions options)
 {
     this.Class = options.Class;
     this.Name  = options.Name;
     if (IsField)
     {
         var fs = options.Signature as FieldSig;
         TypeSigCreatorVM.TypeSig = fs == null ? null : fs.Type;
     }
     else
     {
         MethodSigCreatorVM.MethodSig = options.Signature as MethodSig;
     }
     CustomAttributesVM.InitializeFrom(options.CustomAttributes);
 }
示例#4
0
 void InitializeFrom(ParamDefOptions options)
 {
     Name           = options.Name;
     Sequence.Value = options.Sequence;
     Attributes     = options.Attributes;
     if (options.Constant != null)
     {
         HasDefault       = true;
         ConstantVM.Value = options.Constant.Value;
     }
     else
     {
         HasDefault       = false;
         ConstantVM.Value = null;
     }
     MarshalTypeVM.Type = options.MarshalType;
     CustomAttributesVM.InitializeFrom(options.CustomAttributes);
 }
示例#5
0
 void InitializeFrom(TypeDefOrRefAndCAOptions options)
 {
     TypeSigCreator.TypeSig = options.TypeDefOrRef.ToTypeSig();
     CustomAttributesVM.InitializeFrom(options.CustomAttributes);
 }