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); }
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"); }
public static bool IsSpecifiedStlEntity(EStlEntityType entityType, string stlEntity) { return(stlEntity != null && stlEntity.TrimStart('{').ToLower().StartsWith(EStlEntityTypeUtils.GetValue(entityType).ToLower())); }