本文整理汇总了C#中Tags类的典型用法代码示例。如果您正苦于以下问题:C# Tags类的具体用法?C# Tags怎么用?C# Tags使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Tags类属于命名空间,在下文中一共展示了Tags类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Definitions
/// <summary>
/// Convert a halo 1 sound tag to the halo 2 version
/// </summary>
/// <param name="halo1"></param>
/// <param name="halo2"></param>
/// <returns></returns>
public bool Definitions(
Blam.Halo1.Tags.sound_group halo1,
Tags.sound_group halo2
)
{
return true;
}
示例2: SortBooksByTag
public void SortBooksByTag(Tags tag)
{
books = storageAdapter.Load();
Comparison<Book> comparison;
switch (tag)
{
case Tags.Title:
comparison = Book.CompareByTitle;
break;
case Tags.Author:
comparison = Book.CompareByAuthor;
break;
case Tags.Year:
comparison = Book.CompareByYear;
break;
case Tags.Languadge:
comparison = Book.CompareByLanguadge;
break;
default:
comparison = Book.CompareByTitle;
break;
}
books.Sort(comparison);
Commit();
}
示例3: PutTags
public async Task<IHttpActionResult> PutTags(Guid id, Tags tags)
{
if (!ModelState.IsValid)
{
return BadRequest(ModelState);
}
if (id != tags.id)
{
return BadRequest();
}
db.Entry(tags).State = EntityState.Modified;
try
{
await db.SaveChangesAsync();
}
catch (DbUpdateConcurrencyException)
{
if (!TagsExists(id))
{
return NotFound();
}
else
{
throw;
}
}
return StatusCode(HttpStatusCode.NoContent);
}
示例4: AdvancedSolverSettings
/// <summary>
/// Creates new AdvancesSolverSettings.
/// </summary>
/// <param name="baseSettings">Base settings to copy.</param>
/// <param name="totalPoints">Maximum for points spent in the result tree. (>= 0)</param>
/// <param name="initialAttributes">Starting attributes of stats that calculations are based on.</param>
/// <param name="attributeConstraints">The attribute constraints the solver should try to fullfill.</param>
/// <param name="pseudoAttributeConstraints">The pseudo attribute constraints the solver should try to fullfill.</param>
/// <param name="weaponClass">WeaponClass used for pseudo attribute calculation.</param>
/// <param name="tags">Tags used for pseudo attribute calculation.</param>
/// <param name="offHand">OffHand used for pseudo attribute calculation.</param>
public AdvancedSolverSettings(SolverSettings baseSettings,
int totalPoints,
Dictionary<string, float> initialAttributes,
Dictionary<string, Tuple<float, double>> attributeConstraints,
Dictionary<PseudoAttribute, Tuple<float, double>> pseudoAttributeConstraints,
WeaponClass weaponClass, Tags tags, OffHand offHand)
: base(baseSettings)
{
if (totalPoints < 0) throw new ArgumentOutOfRangeException(nameof(totalPoints), totalPoints, "must be >= 0");
TotalPoints = totalPoints;
WeaponClass = weaponClass;
Tags = tags;
OffHand = offHand;
AttributeConstraints = attributeConstraints ?? new Dictionary<string, Tuple<float, double>>();
PseudoAttributeConstraints = pseudoAttributeConstraints ?? new Dictionary<PseudoAttribute, Tuple<float, double>>();
InitialAttributes = initialAttributes ?? new Dictionary<string, float>();
if (AttributeConstraints.Values.Any(tuple => tuple.Item2 < 0 || tuple.Item2 > 1))
throw new ArgumentException("Weights need to be between 0 and 1", "attributeConstraints");
if (AttributeConstraints.Values.Any(t => t.Item1 <= 0))
throw new ArgumentException("Target values need to be greater zero", "attributeConstraints");
if (PseudoAttributeConstraints.Values.Any(tuple => tuple.Item2 < 0 || tuple.Item2 > 1))
throw new ArgumentException("Weights need to be between 0 and 1", "pseudoAttributeConstraints");
if (PseudoAttributeConstraints.Values.Any(t => t.Item1 <= 0))
throw new ArgumentException("Target values need to be greater zero", "pseudoAttributeConstraints");
}
示例5: ScenarioBuilder
public ScenarioBuilder(string name, string description, Tags tags, FilePosition position)
{
this.title = name;
this.description = description;
this.position = position;
this.tags = tags;
}
示例6: Windows8TouchHandler
/// <inheritdoc />
public Windows8TouchHandler(Tags touchTags, Tags mouseTags, Tags penTags, Func<Vector2, Tags, bool, TouchPoint> beginTouch, Action<int, Vector2> moveTouch, Action<int> endTouch, Action<int> cancelTouch) : base(touchTags, beginTouch, moveTouch, endTouch, cancelTouch)
{
this.mouseTags = mouseTags;
this.touchTags = touchTags;
this.penTags = penTags;
registerWindowProc(wndProcWin8);
}
示例7: FromJson
internal static Tags FromJson(VkResponse response)
{
var tags = new Tags();
tags.Count = response["count"];
return tags;
}
示例8: TouchHandler
/// <summary>
/// Initializes a new instance of the <see cref="TouchHandler" /> class.
/// </summary>
/// <param name="tags">Tags to add to touches.</param>
/// <param name="beginTouch">A function called when a new touch is detected. As <see cref="InputSource.beginTouch" /> this function must accept a Vector2 position of the new touch and return an instance of <see cref="TouchPoint" />.</param>
/// <param name="moveTouch">A function called when a touch is moved. As <see cref="InputSource.moveTouch" /> this function must accept an int id and a Vector2 position.</param>
/// <param name="endTouch">A function called when a touch is lifted off. As <see cref="InputSource.endTouch" /> this function must accept an int id.</param>
/// <param name="cancelTouch">A function called when a touch is cancelled. As <see cref="InputSource.cancelTouch" /> this function must accept an int id.</param>
public TouchHandler(Tags tags, Func<Vector2, Tags, bool, TouchPoint> beginTouch, Action<int, Vector2> moveTouch, Action<int> endTouch, Action<int> cancelTouch)
{
this.tags = tags;
this.beginTouch = beginTouch;
this.moveTouch = moveTouch;
this.endTouch = endTouch;
this.cancelTouch = cancelTouch;
}
示例9: ExampleSet
public ExampleSet(string keyword, string title, string description, Tags tags, GherkinTable table)
{
Keyword = keyword;
Title = title ?? string.Empty;
Description = description ?? "";
Tags = tags;
Table = table;
}
示例10: SetHeader
public void SetHeader(string keyword, string title, string description, Tags tags, FilePosition position)
{
this.keyword = keyword;
this.title = title;
this.description = description;
this.tags = tags;
this.position = position;
}
示例11: ExampleBuilder
public ExampleBuilder(string keyword, string name, string description, Tags tags, FilePosition position)
{
this.keyword = keyword;
this.name = name;
this.description = description;
this.tags = tags;
this.position = position;
}
示例12: ConditionSettings
public ConditionSettings(Tags tags, OffHand offHand, string[] keystones, WeaponClass weaponClass)
{
if (keystones == null) throw new ArgumentNullException("keystones");
Tags = tags;
OffHand = offHand;
Keystones = keystones;
WeaponClass = weaponClass;
}
示例13: Feature
public Feature(Text title, Tags tags, DescriptionLine[] description, Background background, params Scenario[] scenarios)
{
Tags = tags;
Description = description == null ? string.Empty : string.Join(Environment.NewLine, description.Select(d => d.LineText.Trim()).ToArray());
Background = background;
Scenarios = scenarios;
Title = title.Value;
}
示例14: Create
public TagDTO Create(Tags tag)
{
return new TagDTO(){
Url = urlbuilder.Link("GamingStoreRoute", new { id = tag.ID }),
Name = tag.Name
};
}
示例15: Awake
void Awake()
{
_tags = FindObjectOfType<Tags>();
_currencyManager = FindObjectOfType<CurrencyManager>();
_scoreManager = FindObjectOfType<ScoreManager>();
_enemyMovement = FindObjectOfType<EnemyMovement>();
_anim = GetComponent<Animator>();
}