本文整理汇总了C#中Utilities.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# Utilities.ToString方法的具体用法?C# Utilities.ToString怎么用?C# Utilities.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Utilities
的用法示例。
在下文中一共展示了Utilities.ToString方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetQueryString
private static string GetQueryString(Utilities.Query query, bool encode) {
return query.ToString(encode, "oauth_signature", "realm");
}
示例2: SetConnectionString
/// <summary>
/// Sets a connection string for a website.
/// </summary>
/// <param name="name">Name of the website.</param>
/// <param name="key">Connection string key.</param>
/// <param name="value">Value for the connection string.</param>
/// <param name="connectionStringType">Type of connection string.</param>
public void SetConnectionString(string name, string key, string value, Utilities.DatabaseType connectionStringType)
{
Utilities.Site website = GetWebsite(name);
var update = WebsiteManagementClient.WebSites.GetConfiguration(website.WebSpace, website.Name).ToUpdate();
var csToUpdate = update.ConnectionStrings.FirstOrDefault(cs => cs.Name.Equals(key, StringComparison.OrdinalIgnoreCase));
if (csToUpdate == null)
{
csToUpdate = new WebSiteUpdateConfigurationParameters.ConnectionStringInfo
{
ConnectionString = value,
Name = key,
Type = (ConnectionStringType)Enum.Parse(typeof(ConnectionStringType), connectionStringType.ToString(), ignoreCase: true),
};
update.ConnectionStrings.Add(csToUpdate);
}
else
{
csToUpdate.ConnectionString = value;
csToUpdate.Type = (ConnectionStringType)Enum.Parse(typeof(ConnectionStringType), connectionStringType.ToString(), ignoreCase: true);
}
WebsiteManagementClient.WebSites.UpdateConfiguration(website.WebSpace, website.Name, update);
}
示例3: GetServerOption
public object GetServerOption(Utilities.Types.ServerOptions OptionType)
{
DataSources.dsNU.ServerOptionRow[] row =
(DataSources.dsNU.ServerOptionRow[])dsData.ServerOption.Select("OptionId = " + (int)OptionType);
if (row.Length == 0)
{
//Option doesn't exists so create it
DataSources.dsNU.ServerOptionRow newOptions = dsData.ServerOption.NewServerOptionRow();
newOptions.ServerOptionId = (int)OptionType; newOptions.ServerOption = OptionType.ToString();
adpserverOptions.Update(newOptions);
return null;
}
else
return row[0].ServerValue;
}
示例4: SetTopLevelNavigation
public void SetTopLevelNavigation(Utilities.TopLevelNavigation topLevelNavigation)
{
HtmlGenericControl link = (HtmlGenericControl)this.FindControl("nav" + topLevelNavigation.ToString());
link.Attributes["class"] += " navigationNodeActive";
}