Empeld
Empeld plugin documentation.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events
essentials.Systems.Structures.Network.Resources.ResourceConnectorAttribute Class Reference

Attribute that specifies which block types are used to transport a resource More...

Inheritance diagram for essentials.Systems.Structures.Network.Resources.ResourceConnectorAttribute:

Public Member Functions

 ResourceConnectorAttribute (params Type[] connectors)
 

Public Attributes

readonly Type[] ConnectorTypes
 

Detailed Description

Attribute that specifies which block types are used to transport a resource

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

Constructor & Destructor Documentation

essentials.Systems.Structures.Network.Resources.ResourceConnectorAttribute.ResourceConnectorAttribute ( params Type[]  connectors)
15  {
16  foreach(var block in connectors)
17  {
18  if (!typeof(IBlock).IsAssignableFrom(block))
19  throw new Exception("Type of resource connector must be IBlock");
20  }
21 
22  this.ConnectorTypes = connectors;
23  }
An interface representing a block
Definition: IBlock.cs:14
readonly Type[] ConnectorTypes
Definition: ResourceConnectorAttribute.cs:12

Member Data Documentation

readonly Type [] essentials.Systems.Structures.Network.Resources.ResourceConnectorAttribute.ConnectorTypes

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