public string Format(IUrn urn) { if (urn is null) { throw new ArgumentNullException(nameof(urn)); } return(base64UrlTokenUrnFormatProvider.Format(urn)); }
public string Format(IUrn urn) { if (urn is null) { throw new ArgumentNullException(nameof(urn)); } return(urn.Value.UrlEncode()); }
protected AggregateRootId(string aggregateRootName, IUrn urn) { if (string.IsNullOrEmpty(aggregateRootName)) { throw new ArgumentNullException(nameof(aggregateRootName)); } RawId = setRawId(urn); AggregateRootName = aggregateRootName.ToLower(); this.urn = urn; }
public GuidTenantId(IUrn urn, string aggregateRootName) { if (ReferenceEquals(null, urn)) throw new ArgumentNullException(nameof(urn)); var tenantUrn = new Urn(urn); Tenant = tenantUrn.NID; AggregateRootName = tenantUrn.Parts[2].ToLowerInvariant(); if (AggregateRootName.Equals(aggregateRootName.ToLowerInvariant()) == false) { throw new ArgumentException("Invalid Urn for " + aggregateRootName + " AggregateRootId"); } Id = Guid.Parse(string.Join(string.Empty, tenantUrn.Parts.Skip(3).ToString())); RawId = setRawId(Urn); }
public AtomTrackerId(IUrn userUrn, string tenant) : base(userUrn.NSS, "atomtracker", tenant) { }
public ProjectionVersionManagerId(IUrn urn) : base(urn, "projectionmanager") { }
public Urn(IUrn urn) { Initialize(urn.NID, urn.NSS); }