コード例 #1
0
ファイル: Sync.svc.cs プロジェクト: sergiosorias/terminalzero
        public ZeroResponse<bool> SendClientProperties(string ID, string properties)
        {
            var ret = new ZeroResponse<bool>();

            using (var hlp = new ServiceLogHelper(System.Reflection.MethodBase.GetCurrentMethod().Name, ID, properties))
            {
                hlp.Handle(() =>
                    {
                        using (var Config = new ZeroServerConfiguration())
                        {
                            if (Config.ValidateConnection(ID, out hlp.TerminalCode, out hlp.StatusMessage))
                            {
                                ret.Result = true;
                                Config.MergeTerminalProperties(hlp.TerminalCode, ContextExtentions.GetEntitiesFromXMLObjectList<TerminalProperty>(properties));
                            }
                            else
                            {
                                ret.Result = false;
                            }
                        }
                    });

                ret.IsValid = hlp.IsValid;
                ret.Message = hlp.StatusMessage;
            }

            return ret;
        }
コード例 #2
0
ファイル: Sync.svc.cs プロジェクト: sergiosorias/terminalzero
        public ZeroResponse<bool> SendClientProperties(string ID, string properties)
        {
            ZeroResponse<bool> ret = new ZeroResponse<bool>();
            ret.IsValid = true;
            using (ZeroServerConfiguration Config = new ZeroServerConfiguration())
            {
                string msg;
                int tCode = -1;
                if (Config.ValidateConnection(ID, out tCode, out msg))
                {
                    ret.Result = true;
                    Config.MergeTerminalProperties(tCode,IEnumerableExtentions.GetEntitiesFromXMLObjectList<TerminalProperty>(properties));
                }

                ret.Result = false;
                ret.Status = msg;
            }

            return ret;
        }