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


C# StringBuilder.AppendNewLine方法代码示例

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


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

示例1: ToString

        /// <summary>
        /// Returns the normalized representation of the timestamp data.
        /// </summary>
        public override string ToString()
        {
            StringBuilder builder = new StringBuilder();
            builder.AppendNewLine(PREAMBLE)
                .AppendNewLine(fresh.ToString());

            return builder.ToString();
        }
开发者ID:RyanLiu99,项目名称:Thinktecture.IdentityModel,代码行数:11,代码来源:NormalizedTimestamp.cs

示例2: ToString

        /// <summary>
        /// Returns the normalized representation of the timestamp data.
        /// </summary>
        public override string ToString()
        {
            StringBuilder builder = new StringBuilder();
            builder.AppendNewLine(PREAMBLE)
                .AppendNewLine(fresh.ToString());

            string normalizedTimestamp = builder.ToString();

            HawkEventSource.Log.NormalizedTimestamp(normalizedTimestamp);

            return normalizedTimestamp;
        }
开发者ID:SethRogers7420,项目名称:Thinktecture.IdentityModel,代码行数:15,代码来源:NormalizedTimestamp.cs

示例3: ToBytes

        /// <summary>
        /// Returns the normalized payload bytes.
        /// </summary>
        internal byte[] ToBytes()
        {
            if (this.body != null)
            {
                StringBuilder builder = new StringBuilder();

                builder
                    .AppendNewLine(PREAMBLE)
                    .AppendNewLine(contentType == null ? String.Empty : contentType.ToLower())
                    .AppendNewLine(this.body);

                return builder.ToString().ToBytesFromUtf8();
            }

            return null;
        }
开发者ID:Bihari,项目名称:Thinktecture.IdentityModel,代码行数:19,代码来源:NormalizedPayload.cs

示例4: ToString

        /// <summary>
        /// Returns the normalized request string.
        /// </summary>
        public override string ToString()
        {
            StringBuilder result = new StringBuilder();
            result
                .AppendNewLine(this.IsBewit ? BEWIT_PREAMBLE : REQUEST_PREAMBLE)
                .AppendNewLine(artifacts.Timestamp.ToString())
                .AppendNewLine(artifacts.Nonce)
                .AppendNewLine(this.method)
                .AppendNewLine(this.path)
                .AppendNewLine(this.hostName)
                .AppendNewLine(this.port)
                .AppendNewLine(artifacts.PayloadHash == null ? null : artifacts.PayloadHash.ToBase64String())
                .AppendNewLine(artifacts.ApplicationSpecificData);

            return result.ToString();
        }
开发者ID:jshantz,项目名称:Thinktecture.IdentityModel,代码行数:19,代码来源:NormalizedRequest.cs

示例5: ToString

        /// <summary>
        /// Returns the normalized request string.
        /// </summary>
        public override string ToString()
        {
            StringBuilder result = new StringBuilder();
            result
                .AppendNewLine(this.GetPreamble())
                .AppendNewLine(artifacts.Timestamp.ToString())
                .AppendNewLine(artifacts.Nonce)
                .AppendNewLine(this.method)
                .AppendNewLine(this.path)
                .AppendNewLine(this.hostName)
                .AppendNewLine(this.port)
                .AppendNewLine(artifacts.PayloadHash == null ? null : artifacts.PayloadHash.ToBase64String())
                .AppendNewLine(artifacts.ApplicationSpecificData);

            string normalizedRequest = result.ToString();

            HawkEventSource.Log.NormalizedRequest(normalizedRequest);

            return normalizedRequest;
        }
开发者ID:SethRogers7420,项目名称:Thinktecture.IdentityModel,代码行数:23,代码来源:NormalizedRequest.cs

示例6: ToBytes

        /// <summary>
        /// Returns the normalized payload bytes.
        /// </summary>
        internal byte[] ToBytes()
        {
            if (this.body != null)
            {
                StringBuilder builder = new StringBuilder();

                builder
                    .AppendNewLine(PREAMBLE)
                    .AppendNewLine(contentType == null ? String.Empty : contentType.ToLower())
                    .AppendNewLine(this.body);

                string normalizedPayload = builder.ToString();

                HawkEventSource.Log.NormalizedBody(normalizedPayload);

                return normalizedPayload.ToBytesFromUtf8();
            }

            HawkEventSource.Log.NormalizedBody("null");

            return null;
        }
开发者ID:SethRogers7420,项目名称:Thinktecture.IdentityModel,代码行数:25,代码来源:NormalizedPayload.cs

示例7: ToBytesAsync

        /// <summary>
        /// Returns the normalized payload bytes.
        /// </summary>
        internal async Task<byte[]> ToBytesAsync()
        {
            if (this.content != null)
            {
                string contentType = String.Empty;
                if (content.Headers.ContentType != null)
                {
                    contentType = content.Headers.ContentType.MediaType.ToLower();
                }

                string body = await content.ReadAsStringAsync();

                StringBuilder builder = new StringBuilder();

                builder
                    .AppendNewLine(PREAMBLE)
                    .AppendNewLine(contentType)
                    .AppendNewLine(body ?? String.Empty);

                return builder.ToString().ToBytesFromUtf8();
            }

            return null;
        }
开发者ID:ChrisRollason,项目名称:Thinktecture.IdentityModel.45,代码行数:27,代码来源:NormalizedPayload.cs

示例8: Address

 public string Address()
 {
     var sb = new StringBuilder();
     sb.AppendNewLine(AddressLineOne);
     sb.AppendNewLine(AddressLineTwo);
     var csz = Util.FormatCSZ(City, State, ZipCode);
     sb.AppendNewLine(csz);
     return sb.ToString();
 }
开发者ID:stevesloka,项目名称:bvcms,代码行数:9,代码来源:Helper.cs


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