예제 #1
0
        public void Add( string partitionKey, string rowKey, Guid callerInstanceId, Dictionary<string, object> properties )
        {
            var tableServiceEntity = new TableServiceEntity( partitionKey, rowKey );

             var entry = new MemoryTableEntry( properties, callerInstanceId );

             if ( HasEntity( partitionKey, rowKey ) )
             {
            throw new EntityAlreadyExistsException();
             }
             _tableEntries[tableServiceEntity] = entry;
        }
예제 #2
0
        public void Add( string partitionKey, string rowKey, Guid callerInstanceId, GenericEntity entity )
        {
            Dictionary<string, object> properties = entity.GetProperties().ToDictionary( kp => kp.Key, kp => kp.Value.Value );

             var tableServiceEntity = new TableServiceEntity( partitionKey, rowKey );

             var entry = new MemoryTableEntry( properties, callerInstanceId );

             if ( HasEntity( partitionKey, rowKey ) )
             {
            throw new EntityAlreadyExistsException();
             }
             _tableEntries[tableServiceEntity] = entry;
        }