in Microsoft.Azure.Cosmos/src/DocumentClientEventSource.cs [61:271]
private unsafe void Request(
Guid activityId,
Guid localId,
string uri,
string resourceType,
// the following parameters are request headers
string accept,
string authorization,
string consistencyLevel,
string contentType,
string contentEncoding,
string contentLength,
string contentLocation,
string continuation,
string emitVerboseTracesInQuery,
string enableScanInQuery,
string eTag,
string httpDate,
string ifMatch,
string ifNoneMatch,
string indexingDirective,
string keepAlive,
string offerType,
string pageSize,
string preTriggerExclude,
string preTriggerInclude,
string postTriggerExclude,
string postTriggerInclude,
string profileRequest,
string resourceTokenExpiry,
string sessionToken,
string setCookie,
string slug,
string userAgent,
string xDate)
{
if (uri == null) throw new ArgumentException("uri");
if (resourceType == null) throw new ArgumentException("resourceType");
if (accept == null) throw new ArgumentException("accept");
if (authorization == null) throw new ArgumentException("authorization");
if (consistencyLevel == null) throw new ArgumentException("consistencyLevel");
if (contentType == null) throw new ArgumentException("contentType");
if (contentEncoding == null) throw new ArgumentException("contentEncoding");
if (contentLength == null) throw new ArgumentException("contentLength");
if (contentLocation == null) throw new ArgumentException("contentLocation");
if (continuation == null) throw new ArgumentException("continuation");
if (emitVerboseTracesInQuery == null) throw new ArgumentException("emitVerboseTracesInQuery");
if (enableScanInQuery == null) throw new ArgumentException("enableScanInQuery");
if (eTag == null) throw new ArgumentException("eTag");
if (httpDate == null) throw new ArgumentException("httpDate");
if (ifMatch == null) throw new ArgumentException("ifMatch");
if (ifNoneMatch == null) throw new ArgumentException("ifNoneMatch");
if (indexingDirective == null) throw new ArgumentException("indexingDirective");
if (keepAlive == null) throw new ArgumentException("keepAlive");
if (offerType == null) throw new ArgumentException("offerType");
if (pageSize == null) throw new ArgumentException("pageSize");
if (preTriggerExclude == null) throw new ArgumentException("preTriggerExclude");
if (preTriggerInclude == null) throw new ArgumentException("preTriggerInclude");
if (postTriggerExclude == null) throw new ArgumentException("postTriggerExclude");
if (postTriggerInclude == null) throw new ArgumentException("postTriggerInclude");
if (profileRequest == null) throw new ArgumentException("profileRequest");
if (resourceTokenExpiry == null) throw new ArgumentException("resourceTokenExpiry");
if (sessionToken == null) throw new ArgumentException("sessionToken");
if (setCookie == null) throw new ArgumentException("setCookie");
if (slug == null) throw new ArgumentException("slug");
if (userAgent == null) throw new ArgumentException("userAgent");
if (xDate == null) throw new ArgumentException("xDate");
byte[] guidBytes = activityId.ToByteArray();
byte[] localIdBytes = localId.ToByteArray();
fixed (byte* fixedGuidBytes = guidBytes)
fixed (byte* fixedLocalIdBytes = localIdBytes)
fixed (char* fixedUri = uri)
fixed (char* fixedResourceType = resourceType)
fixed (char* fixedAccept = accept)
fixed (char* fixedAuthorization = authorization)
fixed (char* fixedConsistencyLevel = consistencyLevel)
fixed (char* fixedContentType = contentType)
fixed (char* fixedContentEncoding = contentEncoding)
fixed (char* fixedContentLength = contentLength)
fixed (char* fixedContentLocation = contentLocation)
fixed (char* fixedContinuation = continuation)
fixed (char* fixedEmitVerboseTracesInQuery = emitVerboseTracesInQuery)
fixed (char* fixedEnableScanInQuery = enableScanInQuery)
fixed (char* fixedETag = eTag)
fixed (char* fixedHttpDate = httpDate)
fixed (char* fixedIfMatch = ifMatch)
fixed (char* fixedIfNoneMatch = ifNoneMatch)
fixed (char* fixedIndexingDirective = indexingDirective)
fixed (char* fixedKeepAlive = keepAlive)
fixed (char* fixedOfferType = offerType)
fixed (char* fixedPageSize = pageSize)
fixed (char* fixedPreTriggerExclude = preTriggerExclude)
fixed (char* fixedPreTriggerInclude = preTriggerInclude)
fixed (char* fixedPostTriggerExclude = postTriggerExclude)
fixed (char* fixedPostTriggerInclude = postTriggerInclude)
fixed (char* fixedProfileRequest = profileRequest)
fixed (char* fixedResourceTokenExpiry = resourceTokenExpiry)
fixed (char* fixedSessionToken = sessionToken)
fixed (char* fixedSetCookie = setCookie)
fixed (char* fixedSlug = slug)
fixed (char* fixedUserAgent = userAgent)
fixed (char* fixedXDate = xDate)
{
const int eventDataCount = 33;
const int UnicodeEncodingCharSize = CustomTypeExtensions.UnicodeEncodingCharSize;
EventData* dataDesc = stackalloc EventData[eventDataCount];
dataDesc[0].DataPointer = (IntPtr)(fixedGuidBytes);
dataDesc[0].Size = guidBytes.Length;
dataDesc[1].DataPointer = (IntPtr)(fixedLocalIdBytes);
dataDesc[1].Size = localIdBytes.Length;
dataDesc[2].DataPointer = (IntPtr)(fixedUri);
dataDesc[2].Size = (uri.Length + 1) * UnicodeEncodingCharSize;
dataDesc[3].DataPointer = (IntPtr)(fixedResourceType);
dataDesc[3].Size = (resourceType.Length + 1) * UnicodeEncodingCharSize;
dataDesc[4].DataPointer = (IntPtr)(fixedAccept);
dataDesc[4].Size = (accept.Length + 1) * UnicodeEncodingCharSize;
dataDesc[5].DataPointer = (IntPtr)(fixedAuthorization);
dataDesc[5].Size = (authorization.Length + 1) * UnicodeEncodingCharSize;
dataDesc[6].DataPointer = (IntPtr)(fixedConsistencyLevel);
dataDesc[6].Size = (consistencyLevel.Length + 1) * UnicodeEncodingCharSize;
dataDesc[7].DataPointer = (IntPtr)(fixedContentType);
dataDesc[7].Size = (contentType.Length + 1) * UnicodeEncodingCharSize;
dataDesc[8].DataPointer = (IntPtr)(fixedContentEncoding);
dataDesc[8].Size = (contentEncoding.Length + 1) * UnicodeEncodingCharSize;
dataDesc[9].DataPointer = (IntPtr)(fixedContentLength);
dataDesc[9].Size = (contentLength.Length + 1) * UnicodeEncodingCharSize;
dataDesc[10].DataPointer = (IntPtr)(fixedContentLocation);
dataDesc[10].Size = (contentLocation.Length + 1) * UnicodeEncodingCharSize;
dataDesc[11].DataPointer = (IntPtr)(fixedContinuation);
dataDesc[11].Size = (continuation.Length + 1) * UnicodeEncodingCharSize;
dataDesc[12].DataPointer = (IntPtr)(fixedEmitVerboseTracesInQuery);
dataDesc[12].Size = (emitVerboseTracesInQuery.Length + 1) * UnicodeEncodingCharSize;
dataDesc[13].DataPointer = (IntPtr)(fixedEnableScanInQuery);
dataDesc[13].Size = (enableScanInQuery.Length + 1) * UnicodeEncodingCharSize;
dataDesc[14].DataPointer = (IntPtr)(fixedETag);
dataDesc[14].Size = (eTag.Length + 1) * UnicodeEncodingCharSize;
dataDesc[15].DataPointer = (IntPtr)(fixedHttpDate);
dataDesc[15].Size = (httpDate.Length + 1) * UnicodeEncodingCharSize;
dataDesc[16].DataPointer = (IntPtr)(fixedIfMatch);
dataDesc[16].Size = (ifMatch.Length + 1) * UnicodeEncodingCharSize;
dataDesc[17].DataPointer = (IntPtr)(fixedIfNoneMatch);
dataDesc[17].Size = (ifNoneMatch.Length + 1) * UnicodeEncodingCharSize;
dataDesc[18].DataPointer = (IntPtr)(fixedIndexingDirective);
dataDesc[18].Size = (indexingDirective.Length + 1) * UnicodeEncodingCharSize;
dataDesc[19].DataPointer = (IntPtr)(fixedKeepAlive);
dataDesc[19].Size = (keepAlive.Length + 1) * UnicodeEncodingCharSize;
dataDesc[20].DataPointer = (IntPtr)(fixedOfferType);
dataDesc[20].Size = (offerType.Length + 1) * UnicodeEncodingCharSize;
dataDesc[21].DataPointer = (IntPtr)(fixedPageSize);
dataDesc[21].Size = (pageSize.Length + 1) * UnicodeEncodingCharSize;
dataDesc[22].DataPointer = (IntPtr)(fixedPreTriggerExclude);
dataDesc[22].Size = (preTriggerExclude.Length + 1) * UnicodeEncodingCharSize;
dataDesc[23].DataPointer = (IntPtr)(fixedPreTriggerInclude);
dataDesc[23].Size = (preTriggerInclude.Length + 1) * UnicodeEncodingCharSize;
dataDesc[24].DataPointer = (IntPtr)(fixedPostTriggerExclude);
dataDesc[24].Size = (postTriggerExclude.Length + 1) * UnicodeEncodingCharSize;
dataDesc[25].DataPointer = (IntPtr)(fixedPostTriggerInclude);
dataDesc[25].Size = (postTriggerInclude.Length + 1) * UnicodeEncodingCharSize;
dataDesc[26].DataPointer = (IntPtr)(fixedProfileRequest);
dataDesc[26].Size = (profileRequest.Length + 1) * UnicodeEncodingCharSize;
dataDesc[27].DataPointer = (IntPtr)(fixedResourceTokenExpiry);
dataDesc[27].Size = (resourceTokenExpiry.Length + 1) * UnicodeEncodingCharSize;
dataDesc[28].DataPointer = (IntPtr)(fixedSessionToken);
dataDesc[28].Size = (sessionToken.Length + 1) * UnicodeEncodingCharSize;
dataDesc[29].DataPointer = (IntPtr)(fixedSetCookie);
dataDesc[29].Size = (setCookie.Length + 1) * UnicodeEncodingCharSize;
dataDesc[30].DataPointer = (IntPtr)(fixedSlug);
dataDesc[30].Size = (slug.Length + 1) * UnicodeEncodingCharSize;
dataDesc[31].DataPointer = (IntPtr)(fixedUserAgent);
dataDesc[31].Size = (userAgent.Length + 1) * UnicodeEncodingCharSize;
dataDesc[32].DataPointer = (IntPtr)(fixedXDate);
dataDesc[32].Size = (xDate.Length + 1) * UnicodeEncodingCharSize;
this.WriteEventCoreWithActivityId(activityId, 1, eventDataCount, dataDesc);
}
}