static StructureMessage() { _CodeGenerator = (IStructureCodeGenerator <T>)MessageBuilder.GetCodeGenerator <T>(); if (_CodeGenerator == null) { throw new NotSupportedException($"Type of \"{typeof(T).FullName}\" does not supported by StructureMessage<T>, because there is no code generator found."); } }
/// <summary> /// Create a nullable code generator. /// </summary> /// <param name="codeGenerator">Structure code generator.</param> public NullableCodeGenerator(IStructureCodeGenerator <T> codeGenerator) { _codeGenerator = codeGenerator ?? throw new ArgumentNullException(nameof(codeGenerator)); }