コード例 #1
0
 public string Serialise(ActionSettings actionSettings)
 {
     using (var memoryStream = new MemoryStream())
     {
         _serialiser.WriteObject(memoryStream, actionSettings);
         return Encoding.UTF8.GetString(memoryStream.ToArray());
     }
 }
 public string Serialise(ActionSettings actionSettings)
 {
     using (var memoryStream = new MemoryStream())
     {
         _serialiser.WriteObject(memoryStream, actionSettings);
         return(Encoding.UTF8.GetString(memoryStream.ToArray()));
     }
 }
コード例 #3
0
        private static string GetSerialisedActionSettings(string actionName, string controllerName, RouteValueDictionary routeValues)
        {
            var actionSettings = new ActionSettings
            {
                ActionName     = actionName,
                ControllerName = controllerName,
                RouteValues    = routeValues
            };

            return(Serialiser.Serialise(actionSettings));
        }
コード例 #4
0
        private static string GetSerialisedActionSettings(string actionName, string controllerName, RouteValueDictionary routeValues)
        {
            var actionSettings = new ActionSettings
            {
                ActionName = actionName,
                ControllerName = controllerName,
                RouteValues = routeValues
            };

            return Serialiser.Serialise(actionSettings);
        }
        public string Serialise(ActionSettings actionSettings)
        {
            var serialisedActionSettings = _serialiser.Serialise(actionSettings);

            return _encryptor.Encrypt(serialisedActionSettings);
        }
コード例 #6
0
        public string Serialise(ActionSettings actionSettings)
        {
            var serialisedActionSettings = _serialiser.Serialise(actionSettings);

            return(_encryptor.Encrypt(serialisedActionSettings));
        }