internal OcLayerRestrictedCrudFactory(OcLayerType layerType, OcLayerConfiguration <TRequest> serviceLocator) { if (layerType == OcLayerType.Unknown || layerType == OcLayerType.Other) { throw new ArgumentOutOfRangeException(nameof(layerType)); } if (serviceLocator == null) { throw new ArgumentNullException(nameof(serviceLocator)); } LayerType = layerType; LayerTypeName = LayerType.ToString(); _serviceLocator = serviceLocator; }
internal OcLayerRestrictedCrudFactory(string layerTypeName, OcLayerConfiguration <TRequest> serviceLocator) { if (string.IsNullOrWhiteSpace(layerTypeName)) { throw new ArgumentNullException(nameof(layerTypeName)); } if (string.Equals(layerTypeName, OcLayerType.Unknown.ToString(), StringComparison.OrdinalIgnoreCase) || string.Equals(layerTypeName, OcLayerType.Other.ToString(), StringComparison.OrdinalIgnoreCase)) { throw new ArgumentOutOfRangeException(nameof(layerTypeName)); } if (serviceLocator == null) { throw new ArgumentNullException(nameof(serviceLocator)); } LayerType = OcLayerType.Other; LayerTypeName = layerTypeName.Trim(); _serviceLocator = serviceLocator; }