Example #1
0
        // The special constructor is used to deserialize values.
        protected StreamId(SerializationInfo info, StreamingContext context)
        {
            // Reset the property value using the GetValue method.
            var guid         = (Guid)info.GetValue("Guid", typeof(Guid));
            var providerName = (string)info.GetValue("ProviderName", typeof(string));
            var nameSpace    = (string)info.GetValue("Namespace", typeof(string));

            key = new StreamIdInternerKey(guid, providerName, nameSpace);
        }
Example #2
0
 private static StreamId FindOrCreateStreamId(StreamIdInternerKey key)
 {
     return(streamIdInternCache.Value.FindOrCreate(key, () => new StreamId(key)));
 }
Example #3
0
 // TODO: need to integrate with Orleans serializer to really use Interner.
 private StreamId(StreamIdInternerKey key)
 {
     this.key = key;
 }
Example #4
0
        internal static LegacyStreamId GetStreamId(Guid guid, string providerName, string streamNamespace)
        {
            var key = new StreamIdInternerKey(guid, providerName, streamNamespace);

            return(streamIdInternCache.FindOrCreate(key, k => new LegacyStreamId(k)));
        }
Example #5
0
 private static LegacyStreamId FindOrCreateStreamId(StreamIdInternerKey key)
 {
     return(streamIdInternCache.Value.FindOrCreate(key, k => new LegacyStreamId(k)));
 }