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, decompilerManager, ownerType, ownerMethod))); V1XMLString = options.V1XMLString; DeclSecVerEnumList.SelectedItem = options.V1XMLString == null ? DeclSecVer.V2 : DeclSecVer.V1; }
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); }
void InitializeFrom(MemberRefOptions options) { this.Class = options.Class; this.Name = options.Name; if (IsField) { var fs = options.Signature as FieldSig; TypeSigCreatorVM.TypeSig = fs?.Type; } else { MethodSigCreatorVM.MethodSig = options.Signature as MethodSig; } CustomAttributesVM.InitializeFrom(options.CustomAttributes); }
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); }
void InitializeFrom(TypeDefOrRefAndCAOptions options) { TypeSigCreator.TypeSig = options.TypeDefOrRef.ToTypeSig(); CustomAttributesVM.InitializeFrom(options.CustomAttributes); }