コード例 #1
0
 public static bool Equals(EStlEntityType type, string typeStr)
 {
     if (string.IsNullOrEmpty(typeStr))
     {
         return(false);
     }
     if (string.Equals(GetValue(type).ToLower(), typeStr.ToLower()))
     {
         return(true);
     }
     return(false);
 }
コード例 #2
0
ファイル: EStlEntityType.cs プロジェクト: yankaics/cms-1
 public static string GetValue(EStlEntityType type)
 {
     if (type == EStlEntityType.Stl)
     {
         return("Stl");
     }
     if (type == EStlEntityType.StlElement)
     {
         return("StlElement");
     }
     if (type == EStlEntityType.Content)
     {
         return("Content");
     }
     if (type == EStlEntityType.Channel)
     {
         return("Channel");
     }
     if (type == EStlEntityType.Photo)
     {
         return("Photo");
     }
     if (type == EStlEntityType.Comment)
     {
         return("Comment");
     }
     if (type == EStlEntityType.Request)
     {
         return("Request");
     }
     if (type == EStlEntityType.Navigation)
     {
         return("Navigation");
     }
     if (type == EStlEntityType.Sql)
     {
         return("Sql");
     }
     if (type == EStlEntityType.User)
     {
         return("User");
     }
     return("Unkown");
 }
コード例 #3
0
 public static bool IsSpecifiedStlEntity(EStlEntityType entityType, string stlEntity)
 {
     return(stlEntity != null && stlEntity.TrimStart('{').ToLower().StartsWith(EStlEntityTypeUtils.GetValue(entityType).ToLower()));
 }