예제 #1
0
 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);
 }
예제 #2
0
 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);
 }