Opc.Ua.BinaryDecoder.ReadEncodeable C# (CSharp) 메소드

ReadEncodeable() 공개 메소드

Reads an encodeable object from the stream.
public ReadEncodeable ( string fieldName, System systemType ) : IEncodeable
fieldName string
systemType System
리턴 IEncodeable
        public IEncodeable ReadEncodeable(string fieldName, System.Type systemType)
        {
            if (systemType == null) throw new ArgumentNullException("systemType");

            IEncodeable encodeable = Activator.CreateInstance(systemType) as IEncodeable;

            if (encodeable == null)
            {
                throw new ServiceResultException(
                    StatusCodes.BadDecodingError,
                    Utils.Format("Cannot decode type '{0}'.", systemType.FullName));
            }

            encodeable.Decode(this);

            return encodeable;
        }