Ejemplo n.º 1
0
        public async Task <IHttpActionResult> GetAllTerritoryHandles()
        {
            ICollection <iS3TerritoryHandle> result = null;

            result = await MiniServer.GetAllTerritoryHandles();

            return(Ok(result));
        }
Ejemplo n.º 2
0
        public async Task <IHttpActionResult> AddDomain(iS3DomainHandle handle)
        {
            if (handle == null)
            {
                return(BadRequest("Argument Null"));
            }

            iS3DomainHandle newHandle = await MiniServer.AddDomain(handle);

            return(Ok(newHandle));
        }
Ejemplo n.º 3
0
        public async Task <IHttpActionResult> GetDomainHandle(string nameOrID, string parentNameOrID)
        {
            if (nameOrID == null)
            {
                return(BadRequest("Argument Null"));
            }

            iS3DomainHandle result = null;

            result = await MiniServer.GetDomainHandle(nameOrID, parentNameOrID);

            return(Ok(result));
        }
Ejemplo n.º 4
0
        public async Task <IHttpActionResult> GetTerritoryHandle(string nameOrID)
        {
            if (nameOrID == null)
            {
                return(BadRequest("Argument Null"));
            }

            iS3TerritoryHandle result = null;

            result = await MiniServer.getTerritoryHandle(nameOrID);

            return(Ok(result));
        }
Ejemplo n.º 5
0
        // Add territory using the corresponding information in handle
        // Returns the newly added territory handle (not the input one).
        //
        public static async Task <iS3TerritoryHandle> AddTerritory(
            iS3TerritoryHandle territoryHandle)
        {
            iS3TerritoryHandle newHandle =
                await MiniServer.AddTerritoryHandle(territoryHandle.Name,
                                                    territoryHandle.Type, territoryHandle.DbName);

            Type         t         = MiniServer.GetType(newHandle.Type);
            iS3Territory territory = (iS3Territory)
                                     Activator.CreateInstance(t, newHandle);

            MiniServer.AddTerritory(territory);

            return(newHandle);
        }
Ejemplo n.º 6
0
        // Add domain using the corresponding information in handle
        // Returns the newly added domain handle (not the input one).
        //
        public static async Task <iS3DomainHandle> AddDomain(
            iS3DomainHandle domainHandle)
        {
            iS3DomainHandle newHandle =
                await MiniServer.AddDomainHandle(domainHandle.Name, domainHandle.Type,
                                                 domainHandle.ParentID, domainHandle.DbName);

            iS3Territory territory = MiniServer.GetTerritory(newHandle.ParentID);

            Type      t      = MiniServer.GetType(newHandle.Type);
            iS3Domain domain = (iS3Domain)
                               Activator.CreateInstance(t, newHandle);

            territory.Domains.Add(domain);

            return(newHandle);
        }
Ejemplo n.º 7
0
        public ICollection <string> SupportedProjects()
        {
            ICollection <string> result = MiniServer.GetSubClasses <iS3Project>();

            return(result);
        }
Ejemplo n.º 8
0
        public ICollection <string> SupportedDomains()
        {
            ICollection <string> result = MiniServer.GetSubClasses <iS3Domain>();

            return(result);
        }
Ejemplo n.º 9
0
        public ICollection <string> SupportedTerritories()
        {
            ICollection <string> result = MiniServer.GetSubClasses <iS3Territory>();

            return(result);
        }