public InstanceKey(Guid value, IDictionary <XName, InstanceValue> metadata) { if (value == Guid.Empty) { throw Fx.Exception.Argument("value", SRCore.InstanceKeyRequiresValidGuid); } this.Value = value; if (metadata != null) { this.Metadata = ReadOnlyDictionary <XName, InstanceValue> .Create(metadata); } else { this.Metadata = emptyMetadata; } }
public CorrelationKey(IDictionary <string, string> keyData, XName scopeName, XNamespace provider) : this((keyData == null) ? emptyDictionary : ((ReadOnlyDictionary <string, string>)ReadOnlyDictionary <string, string> .Create(keyData)), (scopeName != null) ? scopeName.ToString() : null, provider ?? CorrelationNamespace) { this.ScopeName = scopeName; }