Exemple #1
0
        public HttpServiceClient(ICredentialsResolver credentialsResolver, ZetboxStreamReader.Factory readerFactory, ZetboxStreamWriter.Factory writerFactory)
        {
            if (credentialsResolver == null)
            {
                throw new ArgumentNullException("credentialsResolver");
            }
            if (readerFactory == null)
            {
                throw new ArgumentNullException("readerFactory");
            }
            if (writerFactory == null)
            {
                throw new ArgumentNullException("writerFactory");
            }

            SetObjectsUri         = new Uri(ConfigurationManager.AppSettings["serviceUri"] + "/SetObjects");
            GetListUri            = new Uri(ConfigurationManager.AppSettings["serviceUri"] + "/GetList");
            GetListOfUri          = new Uri(ConfigurationManager.AppSettings["serviceUri"] + "/GetListOf");
            FetchRelationUri      = new Uri(ConfigurationManager.AppSettings["serviceUri"] + "/FetchRelation");
            GetBlobStreamUri      = new Uri(ConfigurationManager.AppSettings["serviceUri"] + "/GetBlobStream");
            SetBlobStreamUri      = new Uri(ConfigurationManager.AppSettings["serviceUri"] + "/SetBlobStream");
            InvokeServerMethodUri = new Uri(ConfigurationManager.AppSettings["serviceUri"] + "/InvokeServerMethod");

            _credentialsResolver = credentialsResolver;
            _readerFactory       = readerFactory;
            _writerFactory       = writerFactory;
        }
        public override void SetUp()
        {
            base.SetUp();
            readerFactory = scope.Resolve<ZetboxStreamReader.Factory>();
            writerFactory = scope.Resolve<ZetboxStreamWriter.Factory>();

            stream = new MemoryStream();
            reader = readerFactory.Invoke(new BinaryReader(stream));
            writer = writerFactory.Invoke(new BinaryWriter(stream));
        }
Exemple #3
0
        public override void SetUp()
        {
            base.SetUp();
            readerFactory = scope.Resolve <ZetboxStreamReader.Factory>();
            writerFactory = scope.Resolve <ZetboxStreamWriter.Factory>();

            stream = new MemoryStream();
            reader = readerFactory.Invoke(new BinaryReader(stream));
            writer = writerFactory.Invoke(new BinaryWriter(stream));
        }
Exemple #4
0
        public ZetboxService(IServerObjectHandlerFactory sohFactory, Func<IZetboxContext> ctxFactory, InterfaceType.Factory iftFactory, IPerfCounter perfCounter, ZetboxStreamReader.Factory readerFactory, ZetboxStreamWriter.Factory writerFactory)
        {
            if (readerFactory == null) throw new ArgumentNullException("readerFactory");
            if (writerFactory == null) throw new ArgumentNullException("writerFactory");

            Logging.Facade.Debug("Creating new ZetboxService instance");

            _sohFactory = sohFactory;
            _ctxFactory = ctxFactory;
            _iftFactory = iftFactory;
            _perfCounter = perfCounter;
            _readerFactory = readerFactory;
            _writerFactory = writerFactory;
        }
Exemple #5
0
        public HttpServiceClient(ICredentialsResolver credentialsResolver, ZetboxStreamReader.Factory readerFactory, ZetboxStreamWriter.Factory writerFactory)
        {
            if (credentialsResolver == null) throw new ArgumentNullException("credentialsResolver");
            if (readerFactory == null) throw new ArgumentNullException("readerFactory");
            if (writerFactory == null) throw new ArgumentNullException("writerFactory");

            SetObjectsUri = new Uri(ConfigurationManager.AppSettings["serviceUri"] + "/SetObjects");
            GetObjectsUri = new Uri(ConfigurationManager.AppSettings["serviceUri"] + "/GetObjects");
            GetListOfUri = new Uri(ConfigurationManager.AppSettings["serviceUri"] + "/GetListOf");
            FetchRelationUri = new Uri(ConfigurationManager.AppSettings["serviceUri"] + "/FetchRelation");
            GetBlobStreamUri = new Uri(ConfigurationManager.AppSettings["serviceUri"] + "/GetBlobStream");
            SetBlobStreamUri = new Uri(ConfigurationManager.AppSettings["serviceUri"] + "/SetBlobStream");
            InvokeServerMethodUri = new Uri(ConfigurationManager.AppSettings["serviceUri"] + "/InvokeServerMethod");

            _credentialsResolver = credentialsResolver;
            _readerFactory = readerFactory;
            _writerFactory = writerFactory;
        }
Exemple #6
0
        public ZetboxService(IServerObjectHandlerFactory sohFactory, Func <IZetboxContext> ctxFactory, InterfaceType.Factory iftFactory, IPerfCounter perfCounter, ZetboxStreamReader.Factory readerFactory, ZetboxStreamWriter.Factory writerFactory)
        {
            if (readerFactory == null)
            {
                throw new ArgumentNullException("readerFactory");
            }
            if (writerFactory == null)
            {
                throw new ArgumentNullException("writerFactory");
            }

            Logging.Facade.Debug("Creating new ZetboxService instance");

            _sohFactory    = sohFactory;
            _ctxFactory    = ctxFactory;
            _iftFactory    = iftFactory;
            _perfCounter   = perfCounter;
            _readerFactory = readerFactory;
            _writerFactory = writerFactory;
        }
Exemple #7
0
        public ProxyImplementation(InterfaceType.Factory iftFactory, Zetbox.API.Client.ZetboxService.IZetboxService service, IPerfCounter perfCounter, ZetboxStreamReader.Factory readerFactory, ZetboxStreamWriter.Factory writerFactory)
        {
            if (perfCounter == null)
            {
                throw new ArgumentNullException("perfCounter");
            }
            if (readerFactory == null)
            {
                throw new ArgumentNullException("readerFactory");
            }
            if (writerFactory == null)
            {
                throw new ArgumentNullException("writerFactory");
            }

            _iftFactory    = iftFactory;
            _service       = service;
            _perfCounter   = perfCounter;
            _readerFactory = readerFactory;
            _writerFactory = writerFactory;
        }