本文整理汇总了C#中Area.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# Area.ToString方法的具体用法?C# Area.ToString怎么用?C# Area.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Area
的用法示例。
在下文中一共展示了Area.ToString方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AreaRange_ToString_AreaFullRange1
public void AreaRange_ToString_AreaFullRange1()
{
Area<string> a = new Area<string>("a", "10", "19");
Assert.AreEqual<decimal>(0.1m, a.Start);
Assert.AreEqual<decimal>(0.2m, a.End);
Assert.AreEqual(a.ToString(), "1");
}
示例2: AreaRange_ToString_AreaFullRange2
public void AreaRange_ToString_AreaFullRange2()
{
Area<string> b = new Area<string>("a", "555");
Assert.AreEqual<decimal>(0.555m, b.Start);
Assert.AreEqual<decimal>(0.556m, b.End);
Assert.AreEqual(b.ToString(), "555");
Area<string> a = new Area<string>("a", "5550", "5559");
Assert.AreEqual<decimal>(0.555m, a.Start);
Assert.AreEqual<decimal>(0.556m, a.End);
Assert.AreEqual(a.ToString(), "555");
}
示例3: Area_WithSingleDigitStartingWithZeroCanBeCreatedCorrectly
public void Area_WithSingleDigitStartingWithZeroCanBeCreatedCorrectly()
{
Area<string> Area = new Area<string>("A", "01234", "01235");
Assert.AreEqual<string>("A", Area.Id);
Assert.AreEqual<string>("01234-01235", Area.ToString());
Assert.AreEqual<decimal>(0.01234m, Area.Start);
Assert.AreEqual<decimal>(0.01236m, Area.End);
}
示例4: Area_WithTwoDigitsCanBeCreatedCorrectly
public void Area_WithTwoDigitsCanBeCreatedCorrectly()
{
Area<string> Area = new Area<string>("A", "1234", "1236");
Assert.AreEqual<string>("A", Area.Id);
Assert.AreEqual<string>("1234-1236", Area.ToString());
Assert.AreEqual<decimal>(0.1234m, Area.Start);
Assert.AreEqual<decimal>(0.1237m, Area.End);
}
示例5: AreaRange_ZeroOne
public void AreaRange_ZeroOne()
{
Area<string> Area = new Area<string>("a", decimal.Zero, decimal.One);
Assert.AreEqual("a", Area.Id);
Assert.AreEqual(0m, Area.Start);
Assert.AreEqual(1m, Area.End);
Assert.AreEqual<string>("0-9", Area.ToString());
}
示例6: Area_WithSingleDigitCanBeCreatedCorrectly
public void Area_WithSingleDigitCanBeCreatedCorrectly()
{
Area<string> Area = new Area<string>("A", 1234);
Assert.AreEqual<string>("A", Area.Id);
Assert.AreEqual<string>("1234", Area.ToString());
Assert.AreEqual<decimal>(0.1234m, Area.Start);
Assert.AreEqual<decimal>(0.1235m, Area.End);
}
示例7: AreaRange_ToString_SingleArea
public void AreaRange_ToString_SingleArea()
{
Area<string> a = new Area<string>("a", 923);
Assert.AreEqual(a.ToString(), "923");
}
示例8: AreaRange_ToString_SingleArea_EndingWithZeros
public void AreaRange_ToString_SingleArea_EndingWithZeros()
{
Area<string> a = new Area<string>("a", "9232200000");
Assert.AreEqual(a.ToString(), "9232200000");
}
示例9: AreaRange_ToString_AreaRange_StartShorter
public void AreaRange_ToString_AreaRange_StartShorter()
{
Area<string> a = new Area<string>("a", new Decimal(0.23), new Decimal(0.235));
Assert.AreEqual(a.ToString(), "230-234");
}
示例10: AreaRange_ToString_AreaRange_EndShorter
public void AreaRange_ToString_AreaRange_EndShorter()
{
Area<string> a = new Area<string>("a", new Decimal(0.234), new Decimal(0.26));
Assert.AreEqual(a.ToString(), "234-259");
}
示例11: AreaRange_ToString_AreaFullRange_EndingWithZeros
public void AreaRange_ToString_AreaFullRange_EndingWithZeros()
{
Area<string> a = new Area<string>("a", "10000000000", "10000000003");
Assert.AreEqual<decimal>(0.1m, a.Start);
Assert.AreEqual<decimal>(0.10000000004m, a.End);
Assert.AreEqual(a.ToString(), "10000000000-10000000003");
}
示例12: MapChange
public void MapChange(Area area)
{
Send("map:change", o => { o.map = area.ToString(); }, MAP_CHANGE_REF);
}
示例13: RequestAccessToken
public bool RequestAccessToken(Area area, string character, out AccessCredentials accessCredentials)
{
const string ROUTE = "/api/token/entity";
return GetToken(ROUTE, new[]
{
new KeyValuePair<string, string>("map", area.ToString()),
new KeyValuePair<string, string>("char_name", character)
},
out accessCredentials);
}