public ProviderMethodBindingGenerator( ModuleDefinition moduleDefinition, References references, TypeReference moduleType, MethodDefinition providerMethod, bool isLibrary) : base(moduleDefinition, references) { this.providerMethod = providerMethod; this.moduleType = moduleType; this.isLibrary = isLibrary; var name = ProviderMethod.GetNamedAttributeName(); key = CompilerKeys.ForType(ProviderMethod.ReturnType, name); var attr = providerMethod.CustomAttributes.First(Attributes.IsProvidesAttribute); if (attr.HasConstructorArguments) { var providesTypeArg = attr.ConstructorArguments.Single(); ProvidesType = (ProvidesType)providesTypeArg.Value; } else { ProvidesType = ProvidesType.Default; } }
public ProjectInformation() { InitializeComponent(); ProviderMethod.LoadEnabled(TextboxReadOnly_ProjectNumber, false); ProviderMethod.LoadEnabled(Label_ProjectNumberReadOnly, false); this.ComboBox_Discipline.SelectedIndexChanged += new EventHandler(this.CbItemChanged); }
void CbItemChanged(object sender, EventArgs e) { ProviderMethod.CbDicipline(ComboBox_Discipline, "Architecture", "ARC"); ProviderMethod.CbDicipline(ComboBox_Discipline, "Structure", "STR"); ProviderMethod.CbDicipline(ComboBox_Discipline, "Construction", "CON"); ProviderMethod.CbDicipline(ComboBox_Discipline, "Coordination", "COO"); }
public void DefineProvider(QualifiedName name, Type providerType, MethodInfo factoryMethod, object metadata = null) { if (providerType == null) { throw new ArgumentNullException("providerType"); } if (factoryMethod == null) { throw new ArgumentNullException("factoryMethod"); } if (!factoryMethod.IsStatic || !providerType.IsAssignableFrom(factoryMethod.ReturnType)) { throw RuntimeFailure.InvalidProviderFieldOrMethod("factoryMethod"); } var qn = GetName(name, factoryMethod.DeclaringType, factoryMethod.Name); var methodResult = new ProviderMethod(factoryMethod, providerType, qn); methodResult.ProviderMetadata = ProviderMetadataWrapper.Create(metadata); methodResult.ProviderMetadata.Source = methodResult; AppendResult(methodResult); }
public ProviderMethodBindingGenerator( ModuleDefinition moduleDefinition, References references, TypeDefinition moduleType, MethodDefinition providerMethod, bool isLibrary) : base(moduleDefinition, references) { this.providerMethod = Conditions.CheckNotNull(providerMethod, "providerMethod"); this.moduleType = Conditions.CheckNotNull(moduleType, "moduleType"); this.isLibrary = isLibrary; var name = ProviderMethod.GetNamedAttributeName(); key = CompilerKeys.ForType(ProviderMethod.ReturnType, name); }
public void DefineProvider(QualifiedName name, Type providerType, MethodInfo factoryMethod, object metadata = null) { if (providerType == null) throw new ArgumentNullException("providerType"); if (factoryMethod == null) throw new ArgumentNullException("factoryMethod"); if (!factoryMethod.IsStatic || !providerType.IsAssignableFrom(factoryMethod.ReturnType)) { throw RuntimeFailure.InvalidProviderFieldOrMethod("factoryMethod"); } var qn = GetName(name, factoryMethod.DeclaringType, factoryMethod.Name); var methodResult = new ProviderMethod(factoryMethod, providerType, name); methodResult.Metadata = ProviderMetadataWrapper.Create(metadata); methodResult.Metadata.Source = methodResult; result.Add(methodResult); }
//Set ProjectLeader Combobox public void ProjectInformation_Load(object sender, EventArgs e) { xdoc.Load(@file); // Load XML ProviderMethod.SetCbTypes(ComboBox_Discipline); }
private void PlComboBox_DropDown(object sender, EventArgs e) { PlComboBox.Items.Clear(); ProviderMethod.Comboboxupdater(xdoc, PlComboBox); }