/// <summary> /// Initializes a new instance of the <see cref="Component"/> class. /// </summary> /// <param name="ctype">The ctype.</param> public Component(ComponentType ctype) : this(CreateCppInstance<IComponent>()) { var descriptor = new ComponentDescriptor(); Native.Construct(ref descriptor, ctype); Initialize(descriptor); }
/// <summary> /// Initializes the specified descriptor. /// </summary> /// <param name="descriptor">The descriptor.</param> protected void Initialize(ComponentDescriptor descriptor) { _ctype = descriptor.Ctype; }