本文整理汇总了C#中Common.Model.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# Model.ToString方法的具体用法?C# Model.ToString怎么用?C# Model.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Common.Model
的用法示例。
在下文中一共展示了Model.ToString方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Get
public static IBob Get(Model.Entities.ObjectType type, int k)
{
IBob b = null;
bool wrongType = false;
try
{
switch (type)
{
case Model.Entities.ObjectType.Photo:
b = new Photo(k);
break;
case Model.Entities.ObjectType.Event:
b = new Event(k);
break;
case Model.Entities.ObjectType.Venue:
b = new Venue(k);
break;
case Model.Entities.ObjectType.Place:
b = new Place(k);
break;
case Model.Entities.ObjectType.Thread:
b = new Thread(k);
break;
case Model.Entities.ObjectType.Country:
b = new Country(k);
break;
case Model.Entities.ObjectType.Article:
b = new Article(k);
break;
case Model.Entities.ObjectType.Para:
b = new Para(k);
break;
case Model.Entities.ObjectType.Brand:
b = new Brand(k);
break;
case Model.Entities.ObjectType.Promoter:
b = new Promoter(k);
break;
case Model.Entities.ObjectType.Usr:
b = new Usr(k);
break;
case Model.Entities.ObjectType.Region:
b = new Region(k);
break;
case Model.Entities.ObjectType.Gallery:
b = new Gallery(k);
break;
case Model.Entities.ObjectType.Group:
b = new Group(k);
break;
case Model.Entities.ObjectType.Banner:
b = new Banner(k);
break;
case Model.Entities.ObjectType.GuestlistCredit:
b = new GuestlistCredit(k);
break;
case Model.Entities.ObjectType.Ticket:
b = new Ticket(k);
break;
case Model.Entities.ObjectType.Invoice:
b = new Invoice(k);
break;
case Model.Entities.ObjectType.InsertionOrder:
b = new InsertionOrder(k);
break;
case Model.Entities.ObjectType.CampaignCredit:
b = new CampaignCredit(k);
break;
case Model.Entities.ObjectType.UsrDonationIcon:
b = new UsrDonationIcon(k);
break;
default:
wrongType = true;
b = null;
break;
}
}
catch { }
if (wrongType)
throw new Exception("Bob.Get attempted to get " + type.ToString() + " - can't do it!!! DUH!");
return b;
}