本文整理汇总了C#中LocationType类的典型用法代码示例。如果您正苦于以下问题:C# LocationType类的具体用法?C# LocationType怎么用?C# LocationType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
LocationType类属于命名空间,在下文中一共展示了LocationType类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AddCurves
/// <summary>
///
/// </summary>
/// <param name="lineList"></param>
/// <param name="leftLoc"></param>
/// <param name="rightLoc"></param>
private void AddCurves(IEnumerable lineList, LocationType leftLoc, LocationType rightLoc)
{
for (IEnumerator i = lineList.GetEnumerator(); i.MoveNext(); )
{
AddCurve(i.Current as IList<Coordinate>, leftLoc, rightLoc);
}
}
示例2: GatheringLocation
public GatheringLocation(string name, LocationType locationType,
ItemType gatheredItemType, ItemType requiredItemType)
: base(name, locationType)
{
this.GatheredType = gatheredItemType;
this.RequiredItem = requiredItemType;
}
示例3: Location
public Location(string name, LocationType type=LocationType.TOWN)
{
Name = name;
Type = type;
entityTable.rdsCount = 3;
}
示例4: StorageAccount
public StorageAccount(
string serviceName,
string description,
string locationOrAffinityGroup,
LocationType locationType,
StorageAccountGeoReplication geoReplication)
: this()
{
Contract.Requires(!string.IsNullOrWhiteSpace(serviceName));
Contract.Requires(!string.IsNullOrWhiteSpace(description));
Contract.Requires(!string.IsNullOrWhiteSpace(locationOrAffinityGroup));
ServiceName = Label = serviceName;
Description = description;
if (locationType == LocationType.Region)
{
Location = locationOrAffinityGroup;
}
else
{
AffinityGroup = locationOrAffinityGroup;
}
GeoReplicationEnabled = geoReplication != StorageAccountGeoReplication.Disabled;
SecondaryReadEnabled = geoReplication == StorageAccountGeoReplication.ReadAccessEnabled;
ExtendedProperties = new Dictionary<string, string>();
Endpoints = new List<Uri>();
SecondaryEndpoints = new List<Uri>();
}
示例5: DefaultLocation
// get the default location, given type of location
public static string DefaultLocation(LocationType locationType)
{
string directory;
switch(locationType)
{
case LocationType.UserLocal:
// Example: @"C:\Documents and Settings\<user>\Local Settings\Application Data\NASA\NASA World Wind\1.3.3.11250"
return Application.LocalUserAppDataPath;
case LocationType.UserCommon:
// Example: @"C:\Documents and Settings\All Users\Application Data\NASA\NASA World Wind\1.3.3.11250"
return Application.CommonAppDataPath;
case LocationType.Application:
// Example: @"C:\Program Files\NASA\World Wind\"
return Application.StartupPath;
default:
// fall through to regular (roaming) user
case LocationType.User:
// Example: @"C:\Documents and Settings\<user>\Application Data\NASA\World Wind\1.3.3"
directory = Log.DefaultSettingsDirectory();
Directory.CreateDirectory(directory);
return directory;
}
}
示例6: StorageAccount
public StorageAccount(
string serviceName,
string description,
string locationOrAffinityGroup,
LocationType locationType,
StorageAccountType storageAccountType)
: this()
{
Contract.Requires(!string.IsNullOrWhiteSpace(serviceName));
Contract.Requires(!string.IsNullOrWhiteSpace(description));
Contract.Requires(!string.IsNullOrWhiteSpace(locationOrAffinityGroup));
ServiceName = Label = serviceName;
Description = description;
if (locationType == LocationType.Region)
{
Location = locationOrAffinityGroup;
}
else
{
AffinityGroup = locationOrAffinityGroup;
}
AccountType = storageAccountType.ToString();
ExtendedProperties = new Dictionary<string, string>();
Endpoints = new List<Uri>();
SecondaryEndpoints = new List<Uri>();
}
示例7: ExpressionBreakpoint
internal ExpressionBreakpoint(DebuggerSession session, ThreadGroup group,
LocationType type, string expression)
: base(EventType.Breakpoint, expression, group)
{
this.Session = session;
this.LocationType = type;
}
示例8: DepthAtLocation
/// <summary>
///
/// </summary>
/// <param name="location"></param>
/// <returns></returns>
public static int DepthAtLocation(LocationType location)
{
if (location == LocationType.Exterior)
return 0;
return location == LocationType.Interior ? 1 : NULL;
}
示例9: TopologyLocation
/// <summary>
/// Constructs a TopologyLocation specifying how points on, to the left of, and to the
/// right of some GraphComponent relate to some Geometry. Possible values for the
/// parameters are Location.Null, Location.Exterior, Location.Boundary,
/// and Location.Interior.
/// </summary>
/// <param name="on"></param>
/// <param name="left"></param>
/// <param name="right"></param>
public TopologyLocation(LocationType on, LocationType left, LocationType right)
{
Init(3);
_location[(int)PositionType.On] = on;
_location[(int)PositionType.Left] = left;
_location[(int)PositionType.Right] = right;
}
示例10: returns_expected_result_when_argument_is_valid
public void returns_expected_result_when_argument_is_valid(string value, LocationType expectedResult)
{
var parser = BuildParser();
var result = parser.ParseProperty(value);
Assert.AreEqual(expectedResult, result);
}
示例11: fillEnemyTypes
private void fillEnemyTypes (LocationType locationType) {
enemyTypes.Clear();
foreach (EnemyType type in Enum.GetValues(typeof(EnemyType))) {
if (type.getLocationType() == locationType) {
enemyTypes.Add(type);
}
}
}
示例12: getBackgroundSprite
public static Sprite getBackgroundSprite (LocationType locationType) {
switch (locationType) {
case LocationType.ENCHANTED_FOREST: return enchantedForest;
case LocationType.PLAINS: return plains;
case LocationType.TWILIGHT_VALLEY: return twilightValley;
default: Debug.Log("Unknown Location type"); return null;
}
}
示例13: Location
public Location(LocationType type, int id, int lat, int lon, string place, string name)
{
this.Type = type;
this.Id = id;
this.Lat = lat;
this.Lon = lon;
this.Place = place;
this.Name = name;
}
示例14: Location
public Location(string name, string type)
: base(name)
{
foreach (var locType in (LocationType[])Enum.GetValues(typeof(LocationType)))
{
if (locType.ToString() == type)
{
this.LocationType = locType;
}
}
}
示例15: MakeGeometry
private static Geometry MakeGeometry(LocationType locationType, double locationLat, double locationLong, double swLat, double swLong, double neLat, double neLong)
{
return new Geometry()
{
LocationType = locationType
,
Location = new LatLng(locationLat, locationLong)
,
Viewport = new Viewport(
southWest: new LatLng(swLat, swLong)
, northEast: new LatLng(neLat, neLong)
)
};
}