Empeld plugin documentation.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events
pluginbase.Helpers.BinaryCodecs.BinaryCodecAttribute Class Reference

Attribute that tells us how to encode a specific class More...

Inheritance diagram for pluginbase.Helpers.BinaryCodecs.BinaryCodecAttribute:

Public Member Functions

 BinaryCodecAttribute (Type binaryCodecType)

Public Attributes

readonly IBinaryCodec Codec

Detailed Description

Attribute that tells us how to encode a specific class

Attribute: AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, AllowMultiple = false)

Constructor & Destructor Documentation

pluginbase.Helpers.BinaryCodecs.BinaryCodecAttribute.BinaryCodecAttribute ( Type  binaryCodecType)
14  {
15  if (!typeof(IBinaryCodec).IsAssignableFrom(binaryCodecType))
16  {
17  throw new TypeAccessException("Expected codec to be of type IBinaryCodec");
18  }
20  this.Codec = (IBinaryCodec)Activator.CreateInstance(binaryCodecType);
21  }
readonly IBinaryCodec Codec
Definition: BinaryCodecAttribute.cs:11

Member Data Documentation

readonly IBinaryCodec pluginbase.Helpers.BinaryCodecs.BinaryCodecAttribute.Codec

The documentation for this class was generated from the following file: