Deveel.Data.ServiceUseOptions.CheckImplementationType C# (CSharp) Method

CheckImplementationType() private method

private CheckImplementationType ( Type type ) : void
type System.Type
return void
        private void CheckImplementationType(Type type)
        {
            if (type == null)
                return;

            if (!ServiceType.IsAssignableFrom(type))
                throw new ArgumentException(String.Format("The type '{0}' is not assignable from service type '{1}'.", type, ServiceType));
            if (type.IsAbstract || type.IsInterface)
                throw new ArgumentException(String.Format("The type '{0}' is not instantiable.", type));
        }