MediaEntryAttribute 类
表示指定的类将被视为媒体链接项。
继承层次结构
System.Object
System.Attribute
System.Data.Services.Client.MediaEntryAttribute
命名空间: System.Data.Services.Client
程序集: Microsoft.Data.Services.Client(在 Microsoft.Data.Services.Client.dll 中)
语法
声明
<AttributeUsageAttribute(AttributeTargets.Class, AllowMultiple := False, Inherited := True)> _
Public NotInheritable Class MediaEntryAttribute _
Inherits Attribute
用法
Dim instance As MediaEntryAttribute
[AttributeUsageAttribute(AttributeTargets.Class, AllowMultiple = false, Inherited = true)]
public sealed class MediaEntryAttribute : Attribute
[AttributeUsageAttribute(AttributeTargets::Class, AllowMultiple = false, Inherited = true)]
public ref class MediaEntryAttribute sealed : public Attribute
[<SealedAttribute>]
[<AttributeUsageAttribute(AttributeTargets.Class, AllowMultiple = false, Inherited = true)>]
type MediaEntryAttribute =
class
inherit Attribute
end
public final class MediaEntryAttribute extends Attribute
MediaEntryAttribute 类型公开以下成员。
构造函数
名称 | 说明 | |
---|---|---|
MediaEntryAttribute | 创建 MediaEntryAttribute 的新实例。 |
页首
属性
名称 | 说明 | |
---|---|---|
MediaMemberName | 包含媒体数据(通常为二进制数据)的类上的属性的名称。 | |
TypeId | (从 Attribute 继承。) |
页首
方法
名称 | 说明 | |
---|---|---|
Equals | (从 Attribute 继承。) | |
Finalize | (从 Object 继承。) | |
GetHashCode | (从 Attribute 继承。) | |
GetType | (从 Object 继承。) | |
IsDefaultAttribute | (从 Attribute 继承。) | |
Match | (从 Attribute 继承。) | |
MemberwiseClone | (从 Object 继承。) | |
ToString | (从 Object 继承。) |
页首
显式接口实现
名称 | 说明 | |
---|---|---|
_Attribute.GetIDsOfNames | (从 Attribute 继承。) | |
_Attribute.GetTypeInfo | (从 Attribute 继承。) | |
_Attribute.GetTypeInfoCount | (从 Attribute 继承。) | |
_Attribute.Invoke | (从 Attribute 继承。) |
页首
注释
该类将被视为媒体链接项,是处理二进制数据和有关该二进制数据的元数据的 AtomPub 协议。
使用此属性标记的类型已在调用 SaveChanges 时改变行为。 媒体属性也称为媒体资源。 保存时,由 MediaMemberName 属性表示的类型的媒体属性,将通过 POST 请求插入到 URI /<EntitySet>/$value。
在POST 后,除 MediaMemberName属性外,该类型的所有属性的 PUT 请求都是二进制内容,将被发送到 URI /<EntitySet>(<key>)。
有关使用属性的更多信息,请参见Extending Metadata Using Attributes。
线程安全
此类型的任何公共 static(在 Visual Basic 中为 Shared) 成员都是线程安全的。不保证所有实例成员都是线程安全的。