void InitializeFrom(CANamedArgument namedArg, TypeSigCreatorOptions options) { if (CAArgumentVM != null) { CAArgumentVM.PropertyChanged -= caArgumentVM_PropertyChanged; } CAArgumentVM = new CAArgumentVM(ownerModule, namedArg.Argument, options, null); OnPropertyChanged(nameof(CAArgumentVM)); CAArgumentVM.PropertyChanged += caArgumentVM_PropertyChanged; Name = namedArg.Name; IsField = namedArg.IsField; ConstantTypeEnumList.SelectedItem = GetConstantType(namedArg.Type, out var newEnumType); EnumType = newEnumType; CAArgumentVM.StorageType = GetType((ConstantType)ConstantTypeEnumList.SelectedItem); }
public override string ToString() { return(string.Format("{0} = {1}", Name, CAArgumentVM.ToString())); }