本文整理汇总了C#中ITag类的典型用法代码示例。如果您正苦于以下问题:C# ITag类的具体用法?C# ITag怎么用?C# ITag使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ITag类属于命名空间,在下文中一共展示了ITag类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: TagValue
public TagValue(ITag tag, object value)
{
if (tag == null) throw new ArgumentNullException("tag");
Tag = tag;
Value = value;
}
开发者ID:ridhouan,项目名称:teamlab.v6.5,代码行数:7,代码来源:TagValue.cs
示例2: IsEditTag
public override bool IsEditTag(ITag tag)
{
// Cache the FieldInfo/PropertyInfo since we will be using it a lot
if (AttributeIdFieldInfo == null)
{
Type type = tag.GetType();
AttributeIdFieldInfo = type.GetField("myAttributeId", BindingFlags.Instance | BindingFlags.NonPublic);
}
if (AttributeIdFieldInfo == null)
{
return false;
}
var value = AttributeIdFieldInfo.GetValue(tag) as string;
if (value == null)
{
return false;
}
switch (value)
{
case ExternalEditAttribute1:
case ExternalEditAttribute2:
case ExternalEditAttribute3:
return true;
default:
return false;
}
}
开发者ID:Yzzl,项目名称:VsVim,代码行数:30,代码来源:ReSharperTagDetector.cs
示例3: GuardPresenceOfCategoriesOnTag
private void GuardPresenceOfCategoriesOnTag(ITag tag)
{
Type tagType = tag.GetType();
object[] categories = tagType.GetCustomAttributes(typeof(CategoryAttribute), true);
Assert.That(categories.Length, Is.EqualTo(1));
Console.WriteLine(((CategoryAttribute) categories[0]).Category);
}
开发者ID:rslijp,项目名称:sharptiles,代码行数:7,代码来源:TagLibTest.cs
示例4: Validate
public void Validate(ITag tag)
{
foreach (var validator in _validators)
{
validator?.Validate(tag);
}
}
开发者ID:rslijp,项目名称:sharptiles,代码行数:7,代码来源:TagValidatorCollection.cs
示例5: Photo
public Photo(FileInfo file, ITag parent)
{
this.file = file;
this.parent = parent;
this.id = CryptoUtil.Md5Encode(file.FullName);
metaReader = JpegMetadataReader.RetreiveFromFile(file.FullName);
}
开发者ID:BackupTheBerlios,项目名称:molecule-svn,代码行数:7,代码来源:Photo.cs
示例6: VisitTag
/// <summary>
///
/// </summary>
/// <param name="tag"></param>
public override void VisitTag(ITag tag)
{
if (IsPreTag(tag))
{
preTagBeingProcessed = true;
}
}
开发者ID:JamalAbuDayyeh,项目名称:slowandsteadyparser,代码行数:11,代码来源:TextExtractingVisitor.cs
示例7: TagViewModel
public TagViewModel(ITag tag)
{
if (tag == null)
throw new ArgumentNullException("tag");
this.tag = tag;
}
开发者ID:bossaia,项目名称:alexandrialibrary,代码行数:7,代码来源:TagViewModel.cs
示例8: Write
public override void Write(ITag value, NbtOptions options)
{
if (options.HasFlag(NbtOptions.Header) && value.Type != TagType.End)
this.WriteHeader(value);
switch (value.Type)
{
case TagType.End:
this.WriteEnd();
break;
case TagType.Byte:
this.Write((byte)value.Value);
break;
case TagType.Short:
this.Write((short)value.Value);
break;
case TagType.Int:
this.Write((int)value.Value);
break;
case TagType.Long:
this.Write((long)value.Value);
break;
case TagType.Float:
this.Write((float)value.Value);
break;
case TagType.Double:
this.Write((double)value.Value);
break;
case TagType.ByteArray:
this.Write((byte[])value.Value);
break;
case TagType.String:
this.Write((string)value.Value);
break;
case TagType.List:
this.Write((TagCollection)value.Value);
break;
case TagType.Compound:
this.Write((TagDictionary)value.Value);
break;
case TagType.IntArray:
this.Write((int[])value.Value);
break;
default:
throw new ArgumentException("Unrecognized or unsupported tag type.", "value");
}
}
开发者ID:koponk,项目名称:Cyotek.Data.Nbt,代码行数:59,代码来源:BinaryTagWriter.cs
示例9: SaveCommit
public void SaveCommit( ITag tag, out bool success )
{
using ( IUnitOfWork u = UnitOfWork.Begin() ) {
Save( tag, out success );
if ( success )
u.Commit();
}
}
开发者ID:coredweller,项目名称:Listened-List,代码行数:8,代码来源:TagService.cs
示例10: ToPostEntity
public static PostEntity ToPostEntity(this PostViewModel postViewModel, ITag tagRepository)
{
var postEntity = postViewModel.Post;
postEntity.Categories = GetSelectedCategories(postViewModel.Categories);
if (!string.IsNullOrEmpty(postViewModel.Tags))
postEntity.Tags = GetSelectedTags(postViewModel.Tags, tagRepository);
return postEntity;
}
开发者ID:rinckd,项目名称:sblog.net,代码行数:8,代码来源:PostViewModelExtensions.cs
示例11: BasicFilter
public BasicFilter(string name, ITag tag, IOperator filterOperator, string criteria)
: base(name)
{
_tag = tag;
_operator = filterOperator;
_tag.attachObserver(this);
this._criteria = criteria;
}
开发者ID:TungTh,项目名称:Email-Reader,代码行数:8,代码来源:BasicFilter.cs
示例12: FourthGenResourceLayoutTable
public FourthGenResourceLayoutTable(ITag playTag, FileSegmentGroup metaArea, MetaAllocator allocator,
EngineDescription buildInfo)
{
_tag = playTag;
_metaArea = metaArea;
_allocator = allocator;
_buildInfo = buildInfo;
}
开发者ID:t3hm00kz,项目名称:Assembly,代码行数:8,代码来源:FourthGenResourceLayoutTable.cs
示例13: Post
public Post(IUser userRepository, ICategory categoryRepository, ITag tagRepository, IComment commentRepository)
{
_postsTable = context.GetTable<PostEntity>();
_commentRepository = commentRepository;
_tagRepository = tagRepository;
_categoryRepository = categoryRepository;
_userRepository = userRepository;
}
开发者ID:rinckd,项目名称:sblog.net,代码行数:8,代码来源:Post.cs
示例14: EditBasicFilter
internal EditBasicFilter(BasicFilter target, string newName, ITag newTag, IOperator newOperator, string newCriteria)
{
_newName = newName;
_newTag = newTag;
_newCriteria = newCriteria;
_target = target;
_newOperator = newOperator;
}
开发者ID:TungTh,项目名称:Email-Reader,代码行数:8,代码来源:EditBasicFilter.cs
示例15: CreativeController
public CreativeController(ITag tag, ICreative creative, IChapter chapter, IUser user, ILike like)
{
this.tagRepository = tag;
this.creativeRepository = creative;
this.chapterRepository = chapter;
this.userRepository = user;
this.likeRepository = like;
}
开发者ID:NixonWatt,项目名称:Pohui,代码行数:8,代码来源:CreativeController.cs
示例16: HomeController
public HomeController(IPost postRepository, IUser userRepository, ICategory categoryRepository, ITag tagRepository, ISettings settingsRepository, ICacheService cacheService)
: base (settingsRepository)
{
_postRepository = postRepository;
_userRepository = userRepository;
_categoryRepository = categoryRepository;
_tagRepository = tagRepository;
_cacheService = cacheService;
}
开发者ID:rinckd,项目名称:sblog.net,代码行数:9,代码来源:HomeController.cs
示例17: TryCreateExternalEditMarker
public ExternalEditMarker? TryCreateExternalEditMarker(ITag tag, SnapshotSpan tagSpan)
{
if (IsVsAdornmentTagType(tag.GetType()) && IsEditTag(tag))
{
return new ExternalEditMarker(ExternalEditKind.Resharper, tagSpan);
}
return null;
}
开发者ID:rschatz,项目名称:VsVim,代码行数:9,代码来源:ResharperExternalEditorAdapter.cs
示例18: Delete
public void Delete( ITag tag )
{
Checks.Argument.IsNotNull( tag, "tag" );
using ( IUnitOfWork u = UnitOfWork.Begin() ) {
_repo.Remove( tag );
u.Commit();
}
}
开发者ID:coredweller,项目名称:Listened-List,代码行数:9,代码来源:TagService.cs
示例19: ReadTagValue
protected virtual object ReadTagValue(ITag tag)
{
object result;
switch (tag.Type)
{
case TagType.Byte:
result = this.ReadByte();
break;
case TagType.Short:
result = this.ReadShort();
break;
case TagType.Int:
result = this.ReadInt();
break;
case TagType.Long:
result = this.ReadLong();
break;
case TagType.Float:
result = this.ReadFloat();
break;
case TagType.Double:
result = this.ReadDouble();
break;
case TagType.ByteArray:
result = this.ReadByteArray();
break;
case TagType.String:
result = this.ReadString();
break;
case TagType.List:
result = this.ReadCollection((TagList)tag);
break;
case TagType.Compound:
result = this.ReadDictionary((TagCompound)tag);
break;
case TagType.IntArray:
result = this.ReadIntArray();
break;
default:
throw new InvalidDataException($"Unrecognized tag type: {tag.Type}");
}
return result;
}
开发者ID:cyotek,项目名称:Cyotek.Data.Nbt,代码行数:56,代码来源:XmlTagReader.cs
示例20: AddTag
public void AddTag(ITag tag)
{
if (tag == null)
throw new ArgumentNullException("tag");
if (tags.Contains(tag))
return;
tags.Add(tag);
}
开发者ID:bossaia,项目名称:alexandrialibrary,代码行数:10,代码来源:Entity.cs
注:本文中的ITag类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论