本文整理汇总了C#中System.Methods.ToByteArrayPart方法的典型用法代码示例。如果您正苦于以下问题:C# Methods.ToByteArrayPart方法的具体用法?C# Methods.ToByteArrayPart怎么用?C# Methods.ToByteArrayPart使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Methods
的用法示例。
在下文中一共展示了Methods.ToByteArrayPart方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: WriteCseq
public void WriteCseq(int number, Methods method)
{
CSeq = number;
Method = method;
Write(C.CSeq, C.HCOLON, C.SP, number, C.SP, method.ToByteArrayPart(), C.CRLF);
}
示例2: WriteRequestLine
public void WriteRequestLine(Methods method, Transports transport, IPEndPoint endPoint)
{
Method = method;
Write(method.ToByteArrayPart(), C.SP, C.sip, C.HCOLON);
Write(endPoint);
Write(C.SEMI, C.transport, C.EQUAL);
Write(transport.ToTransportParamUtf8Bytes());
Write(C.SP, C.SIP_2_0, C.CRLF);
}
示例3: WriteAuthorization
/// Что с этой функцией делать?! Как отсюда убрать? Убрать в Helpers?
private void WriteAuthorization(SipMessageWriter writer, Methods method, ArraySegment<byte> content)
{
if (trunk.Nonce.IsValid)
{
int nc = trunk.GetNextNonceCount();
int cnonce = Environment.TickCount;
var response = SipDigestAuthentication.GetResponseHexChars(trunk.AuthenticationId, trunk.Realm, AuthAlgorithms.Md5, trunk.Nonce,
cnonce, nc, trunk.Password, trunk.Qop, trunk.Uri, method.ToByteArrayPart(), content);
writer.WriteDigestAuthorization(trunk.AuthHeader, trunk.AuthenticationId, trunk.Realm, trunk.Qop, AuthAlgorithms.Md5, trunk.Uri,
trunk.Nonce, nc, cnonce, trunk.Opaque, response);
}
}