当前位置: 首页>>代码示例>>C#>>正文


C# ISerializer.Serializer方法代码示例

本文整理汇总了C#中ISerializer.Serializer方法的典型用法代码示例。如果您正苦于以下问题:C# ISerializer.Serializer方法的具体用法?C# ISerializer.Serializer怎么用?C# ISerializer.Serializer使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ISerializer的用法示例。


在下文中一共展示了ISerializer.Serializer方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: RefreshCache

        internal string RefreshCache(string fullName, ISerializer serializer)
        {
            if (PermissionValidate.Instance.CheckChangePermission())
            {
                List<Arch.CFramework.RefreshResult> refreshResults = CacheRefreshManager.Instance.Refresh(fullName);
                ResultCollection resultCollection = new ResultCollection();
                resultCollection.Results = new List<RefreshResult>();

                foreach (var item in refreshResults)
                {
                    resultCollection.Results.Add(new RefreshResult() { IsSuccessful = item.IsSuccessful, Message = item.Message, FullName = CacheRefreshManager.Instance.GetFullName(item.Source) });
                }
                return serializer.Serializer(resultCollection, Encoding.UTF8);
            }
            else
            {
                var msg = new Result();
                msg.IsSuccess = false;
                msg.Message = "Sorry,执行刷新失败,您没有执行权限。";
                return msg.Read(serializer);
            }

        }
开发者ID:felix-tien,项目名称:TechLab,代码行数:23,代码来源:CacheRefreshPresent.cs

示例2: DoDefault

 private string DoDefault(ISerializer serializer)
 {
     if (serializer.GetType() == typeof(HTMLSerializer))
     {
         return DoComponetsContent(ContextHelper.GetCategory(AppConst.Components), serializer);
     }
     else
     {
         return serializer.Serializer(MenusContainer.Current.GetMenus(), Encoding.UTF8);
     }
 }
开发者ID:felix-tien,项目名称:TechLab,代码行数:11,代码来源:AppInernalsManager.cs

示例3: ListView

        internal string ListView(ISerializer serializer)
        {
            return serializer.Serializer(BuildCollections(), Encoding.UTF8);

        }
开发者ID:felix-tien,项目名称:TechLab,代码行数:5,代码来源:CacheRefreshPresent.cs

示例4: DoComponetsContent

 /// <summary>
 /// 处理Components
 /// </summary>
 /// <param name="name"></param>
 /// <param name="serializer"></param>
 /// <returns></returns>
 private string DoComponetsContent(string name, ISerializer serializer)
 {
     if (name.Length == 0)
     {
         return serializer.Serializer(ComponentManager.Current.GetCollection(), Encoding.UTF8);
     }
     else
     {
         var reader = ComponentManager.Current.GetComponent(name);
         if (reader != null)
         {
             return reader.Read(serializer);
         }
     }
     return "Not found action : " + name;
 }
开发者ID:felix-tien,项目名称:TechLab,代码行数:22,代码来源:AppInernalsManager.cs

示例5: DoLocalLog

 /// <summary>
 /// 处理LocalLog
 /// </summary>
 /// <param name="name"></param>
 /// <param name="serializer"></param>
 /// <returns></returns>
 private string DoLocalLog(string name, ISerializer serializer)
 {
     if (name.Length == 0)
     {
         return serializer.Serializer(LocalLogManager.Current.GetCategories(), Encoding.UTF8);
     }
     else
     {
         return LocalLogManager.Current.GetLogContent(name, serializer);
     }
 }
开发者ID:felix-tien,项目名称:TechLab,代码行数:17,代码来源:AppInernalsManager.cs

示例6: DoValidationContent

 private string DoValidationContent(string name, ISerializer serializer)
 {
     if (name.Length == 0)
     {
         return serializer.Serializer(ValidatorManager.Current.GetValidatorCollection(), Encoding.UTF8);
     }
     else
     {
         var reader = ValidatorManager.Current.GetValidator(name);
         if (reader != null)
         {
             return reader.Read(serializer);
         }
     }
     return "Not found action : " + name;
 }
开发者ID:felix-tien,项目名称:TechLab,代码行数:16,代码来源:AppInernalsManager.cs

示例7: GetLogContent

        public string GetLogContent(string name, ISerializer serializer)
        {
            var file = GetPaths(name);
            if (File.Exists(file))
            {
                var tname = ContextHelper.GetLastResource();
                return Download(tname, name);
            }
            else
            {
                return serializer.Serializer(GetLogFileOrDics(name), Encoding.UTF8);
            }

        }
开发者ID:felix-tien,项目名称:TechLab,代码行数:14,代码来源:LocalLogManager.cs

示例8: GetFeatureContingencies

 internal string GetFeatureContingencies(ISerializer serializer)
 {
     if (serializer is HTMLSerializer)
     {
         return serializer.Serializer(Collections(), Encoding.UTF8);
     }
     else
     {
         FCCollection fcCollection = new FCCollection();
         fcCollection.FCList = fcInfos.Values.ToList();
         return serializer.Serializer(fcCollection, Encoding.UTF8);
     }
 }
开发者ID:felix-tien,项目名称:TechLab,代码行数:13,代码来源:FCManager.cs


注:本文中的ISerializer.Serializer方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。