C# Class Microsoft.Legal.MatterCenter.UpdateAppConfig.UpdateConfig

Class UpdateConfig updates build with appropriate configurations required before publishing the Site and Service.
Mostrar archivo Open project: Microsoft/mattercenter

Public Methods

Method Description
Main ( string args ) : void

Main function of the utility

UpdateConstants ( string>.Dictionary updateList, string folderName ) : bool

Method to update the values from Excel into constants file

UpdateManifest ( string inputXMLFile, string>.Dictionary excelInput, string sourceLocation, string defaultValue, string startPageElement, bool flag ) : XmlDocument

Method to update the manifest file

UpdateResource ( string>.Dictionary updateList, string folderName ) : void

Method to update the resource files

UpdateSearchConfig ( string filePath, string login, string password ) : void

Update Search Configuration file and set new Search Term for restricting search scope

UpdateWebConfig ( string>.Dictionary configUpdateList, string deployConfigName, string folderName ) : void

Update the web.config file and ApplicationInsights.config

UpdateXML ( string>.Dictionary excelInput ) : bool

Method to update the XML files in the solution

Private Methods

Method Description
AddToList ( ) : List

Static list to add elements

CheckValueAndReplace ( string>.Dictionary updateList, string constantElement, string constantAttribute, List UpdateHardCoded, string tenant, string catalog, string catalogSiteName, string serviceURL, string delveLink, string contentTypeGroupName, string replace, string emptyPlaceHolder, System.Xml.Linq.XDocument document ) : string

String method to check value and replace

GetResultSource ( string resultSourceName, System.Xml.Linq.XDocument xmlDoc, System.Xml.Linq.XElement &element ) : void

Get result source from Search Configuration

GetResultSourceId ( string login, string password ) : string

Returns result source id for Matter Center result source

GetSearchTerm ( ClientTermSets clientTermsets ) : string

Generates search term to be used in result source

UpdateList ( string>.Dictionary updateList, string constantElement, string constantAttribute, System.Xml.Linq.XDocument document ) : void

Method to update the list

UpdateResourceConstants ( string>.Dictionary updateList, string constantElement, string constantAttribute, List manifestFile ) : void

Method to update the resource constants

UpdateResourceFiles ( string args, string username, string password, string filePath ) : void

Created method to refractor Main method

Method Details

Main() public static method

Main function of the utility
public static Main ( string args ) : void
args string args[0] = Operation to be performed, 1: updating schema files, 2: updating constant files, 3: updating Search Configuration XML
return void

UpdateConstants() public static method

Method to update the values from Excel into constants file
public static UpdateConstants ( string>.Dictionary updateList, string folderName ) : bool
updateList string>.Dictionary List of values to be updated
folderName string Folder name in the solution directory
return bool

UpdateManifest() public static method

Method to update the manifest file
public static UpdateManifest ( string inputXMLFile, string>.Dictionary excelInput, string sourceLocation, string defaultValue, string startPageElement, bool flag ) : XmlDocument
inputXMLFile string XML file to be uploaded
excelInput string>.Dictionary List of values to be updated
sourceLocation string Key of Source Location
defaultValue string Key of Default Value
startPageElement string Key of Start Page Element
flag bool is XML update of constants update
return System.Xml.XmlDocument

UpdateResource() public static method

Method to update the resource files
public static UpdateResource ( string>.Dictionary updateList, string folderName ) : void
updateList string>.Dictionary List of values to be updated
folderName string Folder name in the solution directory
return void

UpdateSearchConfig() public static method

Update Search Configuration file and set new Search Term for restricting search scope
public static UpdateSearchConfig ( string filePath, string login, string password ) : void
filePath string path of the configuration Excel
login string Login detail
password string Password
return void

UpdateWebConfig() public static method

Update the web.config file and ApplicationInsights.config
public static UpdateWebConfig ( string>.Dictionary configUpdateList, string deployConfigName, string folderName ) : void
configUpdateList string>.Dictionary Excel inputs
deployConfigName string Name of configuration file to update
folderName string Name of folder (UI or Service)
return void

UpdateXML() public static method

Method to update the XML files in the solution
public static UpdateXML ( string>.Dictionary excelInput ) : bool
excelInput string>.Dictionary List of values to be updated
return bool