Example #1
0
        /// <summary>
        /// Client for making requests to the API.
        /// </summary>
        /// <param name="authHandler">The authentication handler.</param>
        /// <param name="ctx">The HTTP context to use for this session.</param>
        private Client(Func <CancellationToken, Task <string> > authHandler, HttpContext ctx)
        {
            // Setup resources.
            Assets              = new AssetsResource(authHandler, ctx);
            TimeSeries          = new TimeSeriesResource(authHandler, ctx);
            DataPoints          = new DataPointsResource(authHandler, ctx);
            Events              = new EventsResource(authHandler, ctx);
            Sequences           = new SequencesResource(authHandler, ctx);
            Raw                 = new RawResource(authHandler, ctx);
            Relationships       = new RelationshipResource(authHandler, ctx);
            DataSets            = new DataSetsResource(authHandler, ctx);
            ThreeDModels        = new ThreeDModelsResource(authHandler, ctx);
            ThreeDRevisions     = new ThreeDRevisionsResource(authHandler, ctx);
            ThreeDAssetMappings = new ThreeDAssetMappingsResource(authHandler, ctx);
            Files               = new FilesResource(authHandler, ctx);
            Login               = new LoginResource(authHandler, ctx);
            Token               = new TokenResource(authHandler, ctx);
            ExtPipes            = new ExtPipesResource(authHandler, ctx);
            Labels              = new LabelsResource(authHandler, ctx);
            Groups              = new GroupsResource(authHandler, ctx);

            // Playground features (experimental)
            Playground = new PlaygroundResource(authHandler, ctx);
            // Beta features (experimental)
            Beta = new BetaResource(authHandler, ctx);
        }
Example #2
0
 public ResPool(string name, AssetsResource ar)
 {
     _poolName = name;
     _res      = ar;
     _res.AddRef();
     CreateUnLoader();
 }
    public GameObj GetGameObj(AssetsResource ar)
    {
        ResPool pool;

        if (!_poolDic.TryGetValue(ar.AssetPath, out pool))
        {
            pool = CreatePool(ar);
        }

        return(pool.GetGameObj());
    }
    ResPool CreatePool(AssetsResource ar)
    {
        string path = ar.AssetPath;

        if (!_poolDic.ContainsKey(path))
        {
            ResPool pool = new ResPool(path, ar);
            _poolDic.Add(path, pool);
            return(pool);
        }
        return(_poolDic[path]);
    }
Example #5
0
 public TimeUnLoader(AssetsResource ar, ResPool pool, int life) : base(ar, pool)
 {
     _pool     = pool;
     _res      = ar;
     _poolLife = life;
 }
 public PoolUnLoaderBase(AssetsResource ar, ResPool pool)
 {
     _pool = pool;
     _res  = ar;
 }