本文整理匯總了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);
}
}