Beispiel #1
0
 /// <summary>
 /// Creates a textwriter to log to the log file
 /// </summary>
 /// <param name="logName">The name of log file to create</param>
 /// <returns>A textwriter to log to the log file</returns>
 public virtual TextWriter CreateLogTextWriter(string logName)
 {
     ExceptionUtilities.CheckStringArgumentIsNotNullOrEmpty(logName, "logName");
     return(File.CreateText(logName));
 }
Beispiel #2
0
 /// <summary>
 /// Initializes a new instance of the ApplyDefaultNamespaceFixup class with given default namespace name.
 /// </summary>
 /// <param name="defaultNamespaceName">Default namespace name</param>
 public ApplyDefaultNamespaceFixup(string defaultNamespaceName)
 {
     ExceptionUtilities.CheckStringArgumentIsNotNullOrEmpty(defaultNamespaceName, "defaultNamespaceName");
     this.DefaultNamespaceName = defaultNamespaceName;
 }
Beispiel #3
0
        /// <summary>
        /// Factory method to create a <see cref="QueryExpression"/> representing a function parameter reference
        /// </summary>
        /// <param name="parameterName">The function parameter name</param>
        /// <returns>The <see cref="QueryExpression"/> representing a function parameter reference</returns>
        public static QueryExpression FunctionParameterReference(string parameterName)
        {
            ExceptionUtilities.CheckStringArgumentIsNotNullOrEmpty(parameterName, "parameterName");

            return(new QueryFunctionParameterReferenceExpression(parameterName, QueryType.Unresolved));
        }
Beispiel #4
0
 /// <summary>
 /// Initializes a new instance of the OverrideNamespaceFixup class with the given namespace name.
 /// </summary>
 /// <param name="newNamespaceName">New namespace name to be applied</param>
 public OverrideNamespaceFixup(string newNamespaceName)
 {
     ExceptionUtilities.CheckStringArgumentIsNotNullOrEmpty(newNamespaceName, "newNamespaceName");
     this.NewNamespaceName = newNamespaceName;
 }
 /// <summary>
 /// Initializes a new instance of the TestMatrixConstraintAttribute class.
 /// </summary>
 /// <param name="constraintMethodName">The name of the method which represents constraint.
 /// The method must return boolean and have parameters for each dimension participating in the constraint
 /// (i.e. it does not have to have parameters for all dimensions, just for the ones that are part of the constraint)
 /// Parameter name should match corresponding dimension name from which all spaces (if any) are removed.
 /// The match is case-insensetive.
 /// </param>
 public TestMatrixConstraintAttribute(string constraintMethodName)
 {
     ExceptionUtilities.CheckStringArgumentIsNotNullOrEmpty(constraintMethodName, "constraintMethodName");
     this.ConstraintMethodName = constraintMethodName;
 }
 /// <summary>
 /// Returns the hint for string prefix.
 /// </summary>
 /// <param name="prefix">The prefix of generated string.</param>
 /// <returns>The hint for string prefix.</returns>
 public static StringPrefixHint StringPrefixHint(string prefix)
 {
     ExceptionUtilities.CheckStringArgumentIsNotNullOrEmpty(prefix, "prefix");
     return(new StringPrefixHint(prefix));
 }
Beispiel #7
0
 /// <summary>
 /// Initializes a new instance of the TestMatrixCombinationCallbackAttribute class.
 /// </summary>
 /// <param name="callbackMethodName">The name of the method to call for each combination</param>
 public TestMatrixCombinationCallbackAttribute(string callbackMethodName)
 {
     ExceptionUtilities.CheckStringArgumentIsNotNullOrEmpty(callbackMethodName, "callbackMethodName");
     this.CallbackMethodName = callbackMethodName;
 }
            /// <summary>
            /// Gets data adapter to store/modify/look-up structural data for the specified <see cref="StructuralType"/>  in forms of object.
            /// </summary>
            /// <param name="structuralTypeFullName">A structural type.</param>
            /// <returns>Structural data adapter.</returns>
            public IStructuralDataAdapter GetObjectAdapter(string structuralTypeFullName)
            {
                ExceptionUtilities.CheckStringArgumentIsNotNullOrEmpty(structuralTypeFullName, "structuralTypeFullName");

                return(this.GetDataService <IStructuralDataAdapter>(structuralTypeFullName, this.dataAdapters));
            }
            /// <summary>
            /// Gets data generator for the specified <see cref="ComplexType"/>.
            /// </summary>
            /// <param name="complexTypeFullName">A complex type full name.</param>
            /// <returns>
            /// An <see cref="IDataGenerator"/> that generates data for complex type in the form defined by the corresponding <see cref="IStructuralDataAdapter"/>. <seealso cref="GetObjectAdapter"/>
            /// </returns>
            public IDataGenerator GetObjectGenerator(string complexTypeFullName)
            {
                ExceptionUtilities.CheckStringArgumentIsNotNullOrEmpty(complexTypeFullName, "complexTypeFullName");

                return(this.GetDataService <IDataGenerator>(complexTypeFullName, this.complexTypeDataGenerators));
            }
            /// <summary>
            /// Gets an <see cref="IEntityGraphCreator"/> that can create graphs of entities based on current metadata.
            /// </summary>
            /// <param name="containerName">The name of the entity container for which to retrieve an <see cref="IEntityGraphCreator"/>.</param>
            /// <returns>An <see cref="IEntityGraphCreator"/> based on current metadata.</returns>
            public IEntityGraphCreator GetEntityGraphCreator(string containerName)
            {
                ExceptionUtilities.CheckStringArgumentIsNotNullOrEmpty(containerName, "containerName");

                return(this.GetDataService <IEntityGraphCreator>(containerName, this.graphCreators));
            }