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


C# Profile.ToString方法代码示例

本文整理汇总了C#中Profile.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# Profile.ToString方法的具体用法?C# Profile.ToString怎么用?C# Profile.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Profile的用法示例。


在下文中一共展示了Profile.ToString方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: WriteLinkStart

 private static void WriteLinkStart(XmlWriter writer, Profile profile, string deviceUrl, string text, string title = null)
 {
     writer.WriteStartElement("a");
     writer.WriteAttributeString("href", deviceUrl);
     writer.WriteAttributeString("title", title != null ? title : profile.ToString());
     writer.WriteValue(text);
 }
开发者ID:51Degrees,项目名称:dotNET-Device-Detection,代码行数:7,代码来源:BaseUserControl.cs

示例2: GetDefaultDisplayName

        private static string GetDefaultDisplayName(RuntimeType runtime, Version version, Profile profile)
        {
            string displayName;

            if (version == DefaultVersion)
                displayName = runtime.ToString();
            else if (runtime == RuntimeType.Any)
                displayName = "v" + version.ToString();
            else
                displayName = runtime.ToString() + " " + version.ToString();

            if (profile != Profile.Unspecified && profile != Profile.Full)
                displayName += " - " + profile.ToString();

            return displayName;
        }
开发者ID:mjedrzejek,项目名称:nunit,代码行数:16,代码来源:RuntimeFramework.cs

示例3: WriteDeviceProfile

        /// <summary>
        /// Writes the hardware profile to the writer.
        /// </summary>
        /// <param name="writer"></param>
        /// <param name="profile"></param>
        /// <param name="deviceUrl"></param>
        protected void WriteDeviceProfile(XmlWriter writer, Profile profile, string deviceUrl)
        {
            writer.WriteStartElement("li");
            writer.WriteAttributeString("class", ItemCssClass);

            // Write the model of the device.
            writer.WriteStartElement("h2");
            writer.WriteAttributeString("class", ModelCssClass);
            WriteLinkStart(writer, profile, deviceUrl, profile["HardwareVendor"].ToString());
            writer.WriteEndElement();
            writer.WriteEndElement();

            // Write the image.
            writer.WriteStartElement("div");
            writer.WriteAttributeString("class", ImagesCssClass);
            writer.WriteStartElement("a");
            writer.WriteAttributeString("href", deviceUrl);
            writer.WriteAttributeString("title", profile.ToString());
            BuildHardwareImages(writer, profile);
            writer.WriteEndElement();
            writer.WriteEndElement();

            // Write the name of the device.
            writer.WriteStartElement("h3");
            writer.WriteAttributeString("class", NameCssClass);
            WriteLinkStart(writer, profile, deviceUrl, profile["HardwareModel"].ToString(), profile["HardwareName"].ToString());
            writer.WriteEndElement();
            writer.WriteEndElement();

            writer.WriteEndElement();
        }
开发者ID:51Degrees,项目名称:dotNET-Device-Detection,代码行数:37,代码来源:BaseUserControl.cs


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