예제 #1
0
        public void Insert <T>(SsdsEntity <T> entity) where T : class
        {
            SsdsEntitySerializer <T> serializer = new SsdsEntitySerializer <T>();
            string         payload = serializer.Serialize(entity);
            SsdsRestFacade facade  = this.CreateFacade();

            facade.Insert(payload);
        }
예제 #2
0
        /// <summary>
        /// Creates a container on the given authority.
        /// </summary>
        /// <param name="name">The containers name.</param>
        /// <returns>The URI of the created container.</returns>
        public string CreateContainer(string name)
        {
            SsdsRestFacade facade    = this.CreateFacade();
            var            container = new XElement(Constants.ns + "Container",
                                                    new XElement(Constants.ns + "Id", name)
                                                    );

            return(facade.Insert(container.ToString()));
        }
예제 #3
0
        /// <summary>
        /// Creates an authority with given name.
        /// </summary>
        /// <param name="name">The authority name.</param>
        /// <returns>The URI of the created authority.</returns>
        public string CreateAuthority(string name)
        {
            SsdsRestFacade facade    = this.CreateFacade(true);
            var            authority = new XElement(Constants.ns + "Authority",
                                                    new XElement(Constants.ns + "Id", name)
                                                    );

            return(facade.Insert(authority.ToString()));
        }
예제 #4
0
        public string Insert(SsdsBlobEntity blob)
        {
            SsdsRestFacade facade = this.CreateFacade();

            return(facade.Insert(blob));
        }