当前位置: 首页>>代码示例>>C#>>正文


C# Utilities.ToString方法代码示例

本文整理汇总了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");
 }
开发者ID:andyedinborough,项目名称:OyAuth,代码行数:3,代码来源:OAuth.cs

示例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);
        }
开发者ID:djrosanova,项目名称:azure-sdk-tools,代码行数:32,代码来源:WebsitesClient.cs

示例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;
 }
开发者ID:EgyFalseX-Nestle,项目名称:NestleMenu,代码行数:15,代码来源:AppManager.cs

示例4: SetTopLevelNavigation

 public void SetTopLevelNavigation(Utilities.TopLevelNavigation topLevelNavigation)
 {
     HtmlGenericControl link = (HtmlGenericControl)this.FindControl("nav" + topLevelNavigation.ToString());
     link.Attributes["class"] += " navigationNodeActive";
 }
开发者ID:OneMissionSociety,项目名称:OMS-Corporate-Website,代码行数:5,代码来源:SiteNavigation.ascx.cs


注:本文中的Utilities.ToString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。