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()));
     }
 }
        private static string GetSerialisedActionSettings(string actionName, string controllerName, RouteValueDictionary routeValues)
        {
            var actionSettings = new ActionSettings
            {
                ActionName     = actionName,
                ControllerName = controllerName,
                RouteValues    = routeValues
            };

            return(Serialiser.Serialise(actionSettings));
        }
        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));
        }