// Note: There are NO public constructors for this class - it is for internal // ObjectQuery<T> use only, but must be public so that an instance thereof can be // a public property on ObjectQuery<T>. #region Internal Constructors // <summary> // This internal constructor creates a new query parameter collection and // initializes the internal parameter storage. // </summary> internal ObjectParameterCollection(ClrPerspective perspective) { DebugCheck.NotNull(perspective); // The perspective is required to do type-checking on parameters as they // are added to the collection. _perspective = perspective; // Create a new list to store the parameters. _parameters = new List <ObjectParameter>(); }
// Note: There are NO public constructors for this class - it is for internal // ObjectQuery<T> use only, but must be public so that an instance thereof can be // a public property on ObjectQuery<T>. #region Internal Constructors // --------------------- // Internal Constructors // --------------------- #region ObjectParameterCollection (ClrPerspective) /// <summary> /// This internal constructor creates a new query parameter collection and /// initializes the internal parameter storage. /// </summary> internal ObjectParameterCollection(ClrPerspective perspective) { EntityUtil.CheckArgumentNull(perspective, "perspective"); // The perspective is required to do type-checking on parameters as they // are added to the collection. this._perspective = perspective; // Create a new list to store the parameters. _parameters = new List <ObjectParameter>(); }
// <summary> // This internal method ensures that the specified type is a scalar // type supported by the underlying provider by ensuring that scalar // metadata for this type is retrievable. // </summary> internal bool ValidateParameterType(ClrPerspective perspective) { TypeUsage type; // The parameter type metadata is only valid if it's scalar or enumeration type metadata. if ((perspective.TryGetType(_mappableType, out type)) && (TypeSemantics.IsScalarType(type))) { return(true); } return(false); }
internal bool ValidateParameterType(ClrPerspective perspective) { TypeUsage outTypeUsage; return(perspective.TryGetType(this._mappableType, out outTypeUsage) && TypeSemantics.IsScalarType(outTypeUsage)); }
internal ObjectParameterCollection(ClrPerspective perspective) { this._perspective = perspective; this._parameters = new List <ObjectParameter>(); }