//--- Constructors --- public CloudFormationResourceAttribute(string propertyName, CloudFormationResourceType resourceType, ResourceAttributeType attributeType, ExtendedCloudFormationSpecification specification) { Name = propertyName ?? throw new ArgumentNullException(nameof(propertyName)); _resourceType = resourceType ?? throw new ArgumentNullException(nameof(resourceType)); _attributeType = attributeType ?? throw new ArgumentNullException(nameof(attributeType)); _specification = specification ?? throw new ArgumentNullException(nameof(specification)); _complexType = new Lazy <IResourceType>(GetComplexType); }
//--- Constructors --- public CloudFormationTypeSystem(string source, ExtendedCloudFormationSpecification specification) { if (source is null) { throw new ArgumentNullException(nameof(source)); } _specification = specification; foreach (var resourceTypeEntry in _specification.ResourceTypes) { _resourceTypes[resourceTypeEntry.Key] = new CloudFormationResourceType(resourceTypeEntry.Key, resourceTypeEntry.Value, _specification); } Source = (_specification.ResourceSpecificationVersion != null) ? $"{source} (v{_specification.ResourceSpecificationVersion})" : source; }