void InitializeFrom(EventDefOptions options) { Attributes = options.Attributes; Name = options.Name; EventTypeSig = options.EventType.ToTypeSig(); AddMethod = options.AddMethod; InvokeMethod = options.InvokeMethod; RemoveMethod = options.RemoveMethod; OtherMethodsVM.InitializeFrom(options.OtherMethods); CustomAttributesVM.InitializeFrom(options.CustomAttributes); }
void InitializeFrom(PropertyDefOptions options) { Attributes = options.Attributes; Name = options.Name; PropertySig = options.PropertySig; if (options.Constant != null) { HasDefault = true; ConstantVM.Value = options.Constant.Value; } else { HasDefault = false; ConstantVM.Value = null; } GetMethodsVM.InitializeFrom(options.GetMethods); SetMethodsVM.InitializeFrom(options.SetMethods); OtherMethodsVM.InitializeFrom(options.OtherMethods); CustomAttributesVM.InitializeFrom(options.CustomAttributes); }