Example #1
0
        public AlpineResponse Error(int code, string message, string messageExtra, bool alpine)
        {
            AlpineResponse error = new AlpineResponse();

            error.Meta = new MetaResponse
            {
                Code        = code,
                Time        = DateTime.UtcNow,
                Error       = message,
                Description = messageExtra,
                Alpine      = alpine
            };

            return(error);
        }
Example #2
0
        public AlpineResponse Success(int code, object data = null)
        {
            AlpineResponse success = new AlpineResponse
            {
                Meta = new MetaResponse
                {
                    Code = code,
                    Time = DateTime.UtcNow
                },

                Data = data
            };

            return(success);
        }