コード例 #1
0
ファイル: HareDuFactory.cs プロジェクト: petedishman/HareDu
        public static HareDuClient New(Action <HareDuClientBehavior> args)
        {
            try
            {
                var init = new HareDuClientBehaviorImpl();
                args(init);
                var client = new HareDuClientImpl(init);

                return(client);
            }
            catch (Exception e)
            {
                throw new HareDuClientInitException("Unable to initialize the HareDu client.", e);
            }
        }
コード例 #2
0
ファイル: HareDuFactory.cs プロジェクト: ahives/HareDu
        public static HareDuClient New(Action<HareDuClientBehavior> args)
        {
            try
            {
                var init = new HareDuClientBehaviorImpl();
                args(init);
                var client = new HareDuClientImpl(init);

                return client;
            }
            catch (Exception e)
            {
                throw new HareDuClientInitException("Unable to initialize the HareDu client.", e);
            }
        }