Exemple #1
0
        public static Result <ShoveWrapper> Get(String Url)
        {
            Result <Shove> result = ShoveDAL.GetByTinyUrl(Helper.UrlDecode(Url));

            if (result.Data != null)
            {
                result.Data.TinyUrl = "{0}{1}".F(UtiliSetting.AppSetting("ServiceUrl"), result.Data.TinyUrl);
            }

            return(GetResult(result));
        }
Exemple #2
0
        public static Result <ShoveWrapper> Create(String Url, String Keyword)
        {
            OperationContext              context  = OperationContext.Current;
            MessageProperties             prop     = context.IncomingMessageProperties;
            RemoteEndpointMessageProperty endpoint = prop[RemoteEndpointMessageProperty.Name] as RemoteEndpointMessageProperty;
            String ip = endpoint.Address;

            Result <Shove> result = ShoveDAL.Create(Helper.UrlDecode(Url), Helper.UrlDecode(Keyword), ip);

            if (result.Data != null)
            {
                result.Data.TinyUrl = "{0}{1}".F(UtiliSetting.AppSetting("ServiceUrl"), result.Data.TinyUrl);
            }

            return(GetResult(result));
        }