コード例 #1
0
 public string Serialise(ActionSettings actionSettings)
 {
     using (var memoryStream = new MemoryStream())
     {
         _serialiser.WriteObject(memoryStream, actionSettings);
         return(Encoding.UTF8.GetString(memoryStream.ToArray()));
     }
 }
コード例 #2
0
 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);
        }