// return true = pending assembly added // return false = pending assembly is invalid // return null = no pending asesmbly private bool?AddPendingFrameworkAssembly() { // Blank assembly name but content in the supported framework textbox is an error if (string.IsNullOrWhiteSpace(NewAssemblyName.Text) && !string.IsNullOrWhiteSpace(NewSupportedFramework.Text)) { return(false); } // blank in both is ok, nothing to add if (string.IsNullOrWhiteSpace(NewAssemblyName.Text)) { return(null); } if (!NewFrameworkAssembly.UpdateSources()) { return(false); } _frameworkAssemblies.Add(_newFrameworkAssembly.AsReadOnly()); // after framework assembly is added, clear the textbox ClearFrameworkAssemblyTextBox(); return(true); }
// return true = pending assembly added // return false = pending assembly is invalid // return null = no pending asesmbly private bool?AddPendingFrameworkAssembly() { if (string.IsNullOrEmpty(NewAssemblyName.Text) && string.IsNullOrEmpty(NewSupportedFramework.Text)) { return(null); } if (!NewFrameworkAssembly.UpdateSources()) { return(false); } _frameworkAssemblies.Add(_newFrameworkAssembly.AsReadOnly()); // after framework assembly is added, clear the textbox ClearFrameworkAssemblyTextBox(); return(true); }