private static void SetErrorIfExists(object errorMessage, CosmosEventMetadata dep, object stackTrace)
 {
     if (!string.IsNullOrEmpty(errorMessage.ToString()))
     {
         dep.Error = new Exception($"{errorMessage} {stackTrace}");
     }
 }
        internal static CosmosEventCall CreateCosmosEventCall(
            this object agent,
            string data,
            Dictionary <string, object> properties = null,
            string target = null,
            string name   = null)
        {
            var dependencyData = new CosmosEventMetadata()
            {
                DependencyTypeName = "Cosmos DB",
                Target             = target,
                DependencyName     = name,
                Data       = data,
                Properties = properties ?? new Dictionary <string, object>()
            };

            return(new CosmosEventCall(dependencyData));
        }
Esempio n. 3
0
 internal CosmosEventCall(CosmosEventMetadata eventMetadata)
 {
     EventMetadata = eventMetadata;
 }