/// <summary> /// Configures component by passing configuration parameters. /// </summary> /// <param name="config">configuration parameters to be set.</param> public void Configure(ConfigParams config) { Name = config.GetAsStringWithDefault("name", Name); Name = config.GetAsStringWithDefault("info.name", Name); Description = config.GetAsStringWithDefault("description", Description); Description = config.GetAsStringWithDefault("info.description", Description); Properties = config.GetSection("properties"); }
protected ApplicationException(SerializationInfo info, StreamingContext context) : base(info, context) { Category = info.GetString("category"); CorrelationId = info.GetString("correlation_id"); Cause = info.GetString("cause"); Code = info.GetString("code"); Status = info.GetInt32("status"); _stackTrace = info.GetString("stack_trace"); Details = StringValueMap.FromString(info.GetString("details")); }
public ApplicationExceptionFactoryTest() { _descr.CorrelationId = "correlationId"; _descr.Code = "code"; _descr.Message = "message"; _descr.Status = 777; _descr.Cause = "cause"; _descr.StackTrace = "stackTrace"; var map = new StringValueMap(); map["key"] = "value"; _descr.Details = map; }
public RouteBuilder AddSortParams(SortParams sort) { if (sort == null) { return(this); } var map = new StringValueMap(); foreach (var sortField in sort) { map[sortField.Name] = StringConverter.ToString(sortField.Ascending); } _queryParameters["sort"] = map.ToString(); return(this); }
/// <summary> /// Creates a new ConfigParams object filled with key-value pairs serialized as a string. /// </summary> /// <param name="line">a string with serialized key-value pairs as /// "key1=value1;key2=value2;..." /// Example: "Key1=123;Key2=ABC;Key3=2016-09-16T00:00:00.00Z"</param> /// <returns>a new ConfigParams object.</returns> /// See <see cref="StringValueMap.FromString(string)"/> public new static ConfigParams FromString(string line) { var map = StringValueMap.FromString(line); return(new ConfigParams(map)); }
/// <summary> /// Creates a new ConfigParams object filled with provided key-value pairs called tuples. /// Tuples parameters contain a sequence of key1, value1, key2, value2, ... pairs /// </summary> /// <param name="tuples">the tuples to fill a new ConfigParams object.</param> /// <returns>a new ConfigParams object.</returns> /// See <see cref="StringValueMap.FromTuples(object[])"/> public new static ConfigParams FromTuples(params object[] tuples) { var map = StringValueMap.FromTuples(tuples); return(new ConfigParams(map)); }
public new static CredentialParams FromString(string line) { var map = StringValueMap.FromString(line); return(new CredentialParams(map)); }
/// <summary> /// Creates a new ConnectionParams object filled with provided key-value pairs called tuples. /// Tuples parameters contain a sequence of key1, value1, key2, value2, ... pairs. /// </summary> /// <param name="tuples">the tuples to fill a new ConnectionParams object.</param> /// <returns>a new ConnectionParams object.</returns> public static new ConnectionParams FromTuples(params object[] tuples) { var map = StringValueMap.FromTuplesArray(tuples); return(new ConnectionParams(map)); }
public SystemEventV1(string correlationId, string source, string type, int severity, string message, StringValueMap details) { Id = IdGenerator.NextLong(); Time = new DateTime(); CorrelationId = correlationId; Source = source; Type = type ?? EventLogTypeV1.Other; Severity = severity | EventLogSeverityV1.Informational; Message = message; Details = details ?? new StringValueMap(); }
public static new AzureStorageConnectionParams FromString(string line) { var map = StringValueMap.FromString(line); return(new AzureStorageConnectionParams(map)); }