本文整理汇总了C#中Region.Save方法的典型用法代码示例。如果您正苦于以下问题:C# Region.Save方法的具体用法?C# Region.Save怎么用?C# Region.Save使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Region
的用法示例。
在下文中一共展示了Region.Save方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Acc_Delete_Simple
public void Acc_Delete_Simple()
{
//insert a test product
Region r = new Region();
r.RegionDescription = "Test";
r.Save("test");
int records = DB.Select()
.From(Region.Schema)
.Where("regiondescription").IsEqualTo("Test")
.GetRecordCount();
Assert.IsTrue(records == 1);
DB.Delete()
.From(Region.Schema)
.Where("regiondescription").IsEqualTo("Test")
.Execute();
records = DB.Select()
.From(Region.Schema)
.Where("regiondescription").IsEqualTo("Test")
.GetRecordCount();
Assert.IsTrue(records == 0);
}
示例2: TestSaveRegion
public void TestSaveRegion()
{
Region region = new Region(Vector3.Zero, new FlatlandGenerator(), "r.0.0.mca");
region.GetChunk(Vector3.Zero);
region.SetBlock(Vector3.Zero, new GoldBlock());
region.Save();
region.Dispose();
region = new Region(Vector3.Zero, new FlatlandGenerator(), "r.0.0.mca");
}
示例3: TestSaveRegion
public void TestSaveRegion()
{
if (File.Exists("r.0.0.mca"))
File.Delete("r.0.0.mca");
Region region = new Region(Vector3.Zero, new FlatlandGenerator(), "r.0.0.mca");
region.WorldGenerator.Initialize(null);
region.GetChunk(Vector3.Zero);
region.SetBlock(Vector3.Zero, new GoldBlock());
region.Save();
region.Dispose();
region = new Region(Vector3.Zero, new FlatlandGenerator(), "r.0.0.mca");
}
示例4: Insert
public void Insert(Guid RegionGuid,int ProviderId,string Title,int TemplateRegionId,int SortOrder,bool ShowTitle,string CreatedBy,DateTime CreatedOn,string ModifiedBy,DateTime ModifiedOn)
{
Region item = new Region();
item.RegionGuid = RegionGuid;
item.ProviderId = ProviderId;
item.Title = Title;
item.TemplateRegionId = TemplateRegionId;
item.SortOrder = SortOrder;
item.ShowTitle = ShowTitle;
item.CreatedBy = CreatedBy;
item.CreatedOn = CreatedOn;
item.ModifiedBy = ModifiedBy;
item.ModifiedOn = ModifiedOn;
item.Save(UserName);
}
示例5: Insert
public void Insert(string RegionDescription)
{
Region item = new Region();
item.RegionDescription = RegionDescription;
item.Save(UserName);
}
示例6: Update
public void Update(int RegionID,string RegionDescription)
{
Region item = new Region();
item.MarkOld();
item.IsLoaded = true;
item.RegionID = RegionID;
item.RegionDescription = RegionDescription;
item.Save(UserName);
}