本文整理汇总了C#中LocationType类的典型用法代码示例。如果您正苦于以下问题:C# LocationType类的具体用法?C# LocationType怎么用?C# LocationType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
LocationType类属于命名空间,在下文中一共展示了LocationType类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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);
}
}
开发者ID:DIVEROVIEDO,项目名称:DotSpatial,代码行数:13,代码来源:OffsetCurveSetBuilder.cs
示例2: GatheringLocation
public GatheringLocation(string name, LocationType locationType,
ItemType gatheredItemType, ItemType requiredItemType)
: base(name, locationType)
{
this.GatheredType = gatheredItemType;
this.RequiredItem = requiredItemType;
}
开发者ID:etcet1,项目名称:TelerikAcademy,代码行数:7,代码来源:GatheringLocation.cs
示例3: Location
public Location(string name, LocationType type=LocationType.TOWN)
{
Name = name;
Type = type;
entityTable.rdsCount = 3;
}
开发者ID:InferiorOlive,项目名称:AIQuest,代码行数:7,代码来源:Location.cs
示例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>();
}
开发者ID:RhysC,项目名称:API,代码行数:28,代码来源:StorageAccount.cs
示例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;
}
}
开发者ID:jpespartero,项目名称:WorldWind,代码行数:28,代码来源:SettingsBase.cs
示例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>();
}
开发者ID:mortizzle,项目名称:API,代码行数:28,代码来源:StorageAccount.cs
示例7: ExpressionBreakpoint
internal ExpressionBreakpoint(DebuggerSession session, ThreadGroup group,
LocationType type, string expression)
: base(EventType.Breakpoint, expression, group)
{
this.Session = session;
this.LocationType = type;
}
开发者ID:baulig,项目名称:debugger,代码行数:7,代码来源:ExpressionBreakpoint.cs
示例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;
}
开发者ID:DIVEROVIEDO,项目名称:DotSpatial,代码行数:12,代码来源:Depth.cs
示例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;
}
开发者ID:DIVEROVIEDO,项目名称:DotSpatial,代码行数:16,代码来源:TopologyLocation.cs
示例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);
}
开发者ID:tomlane,项目名称:OpenRailData,代码行数:8,代码来源:TLocationTypeParser.cs
示例11: fillEnemyTypes
private void fillEnemyTypes (LocationType locationType) {
enemyTypes.Clear();
foreach (EnemyType type in Enum.GetValues(typeof(EnemyType))) {
if (type.getLocationType() == locationType) {
enemyTypes.Add(type);
}
}
}
开发者ID:aintech,项目名称:Heroes_of_Routine,代码行数:8,代码来源:Location.cs
示例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;
}
}
开发者ID:aintech,项目名称:Heroes_of_Routine,代码行数:8,代码来源:Imager.cs
示例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;
}
开发者ID:toolsche,项目名称:BusCon,代码行数:9,代码来源:Location.cs
示例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;
}
}
}
开发者ID:Roshov,项目名称:Telerik-Software-Academy-,代码行数:11,代码来源:Location.cs
示例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)
)
};
}
开发者ID:DemosAndTrials,项目名称:gmaps-api-net,代码行数:14,代码来源:GeocodingServiceTests.cs
示例16: AddLocation
public static int AddLocation(Guid organizationId, int deptID,
string name,
LocationType typeID)
{
Locations loc = new Locations(organizationId);
loc.AddNew();
loc.DId = deptID;
loc.Name = name;
loc.LocationTypeId = (int)typeID;
loc.Inactive = false;
loc.IsDefault = false;
loc.Save();
return loc.Id;
}
开发者ID:evgeniynet,项目名称:DataLayer,代码行数:14,代码来源:Locations.cs
示例17: OKbutton_Click
private void OKbutton_Click(object sender, EventArgs e)
{
_server = serverTextBox.Text;
if (dbNameRadioButton.Checked)
{
_locationType = LocationType.Name;
_location = dbNameTextBox.Text;
}
else if (dbPathRadioButton.Checked)
{
_locationType = LocationType.Path;
_location = dbPathTextBox.Text;
}
}
开发者ID:boussaffawalid,项目名称:CutOptima,代码行数:14,代码来源:NewDatabaseForm.cs
示例18: ToLocationSymbol
/// <summary>
/// Converts the location value to a location symbol, for example, <c>EXTERIOR => 'e'</c>.
/// </summary>
/// <param name="locationValue"></param>
/// <returns>Either 'e', 'b', 'i' or '-'.</returns>
public static char ToLocationSymbol(LocationType locationValue)
{
switch (locationValue)
{
case LocationType.Exterior:
return 'e';
case LocationType.Boundary:
return 'b';
case LocationType.Interior:
return 'i';
case LocationType.Null:
return '-';
}
throw new ArgumentException("Unknown location value: " + locationValue);
}
开发者ID:ExRam,项目名称:DotSpatial-PCL,代码行数:20,代码来源:Location.cs
示例19: Location
public Location(string name, string fylke)
{
switch (GetType().Name)
{
case ("City"):
m_type = LocationType.City;
break;
case ("Region"):
m_type = LocationType.Region;
break;
default:
m_type = LocationType.City;
break;
}
m_name = name;
m_fylke = fylke;
}
开发者ID:knut79,项目名称:coordinatesFactory,代码行数:18,代码来源:Location.cs
示例20: GetExistingAdvertisementUsingHalSelfLink
public async Task GetExistingAdvertisementUsingHalSelfLink(LocationType locationType, string givenStatement)
{
const string advertisementId = "8e2fde50-bc5f-4a12-9cfb-812e50500184";
OAuth2Token oAuth2Token = new OAuth2TokenBuilder().Build();
var link = $"{AdvertisementLink}/{advertisementId}";
var viewRenderedAdvertisementLink = $"{AdvertisementLink}/{advertisementId}/view";
var builderInitializer = new AllFieldsInitializer(locationType);
this.SetupPactForGettingExistingAdvertisement(givenStatement, link, oAuth2Token, builderInitializer, advertisementId, viewRenderedAdvertisementLink);
AdvertisementResource result;
using (AdPostingApiClient client = this.Fixture.GetClient(oAuth2Token))
{
result = await client.GetAdvertisementAsync(new Uri(this.Fixture.AdPostingApiServiceBaseUri, link));
}
this.AssertRetrievedAdvertisementMatchesExpected(builderInitializer, advertisementId, result);
}
开发者ID:SEEK-Jobs,项目名称:ad-posting-api-client,代码行数:21,代码来源:GetAdTests.cs
注:本文中的LocationType类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论