示例#1
0
 /// <summary>
 /// Adds a content type annotation to the given entity instance
 /// </summary>
 /// <param name="instance">The entity instance</param>
 /// <param name="contentTypeValue">The value for the annotation</param>
 /// <returns>The same entity instance</returns>
 public static EntityInstance WithContentType(this EntityInstance instance, string contentTypeValue)
 {
     return(instance.AddAnnotation(new ContentTypeAnnotation(contentTypeValue)));
 }
示例#2
0
 /// <summary>
 /// Adds the media link entry annotation to the given entity instance
 /// </summary>
 /// <param name="instance">The entity instance</param>
 /// <returns>The same entity instance</returns>
 public static EntityInstance AsMediaLinkEntry(this EntityInstance instance)
 {
     return(instance.AddAnnotation(new IsMediaLinkEntryAnnotation()));
 }