예제 #1
0
 public static void Equality(string className, string methodName, string parameterValue, object output, string target)
 {
     if (output == null || output.ToString() != target)
     {
         Throws.A(new Exception(className + "." + methodName + "(" + parameterValue.ToString() + ") = " + output + " != " + target), Throws.Actions, "PS");
     }
 }
예제 #2
0
 public static void Equality(string className, string methodName, Endeme parameterValue, int output, int target)
 {
     if (output != target)
     {
         Throws.A(new Exception(className + "." + methodName + "(" + parameterValue.ToString() + ") = " + output + " != " + target), Throws.Actions, "PS");
     }
 }
예제 #3
0
 // ----------------------------------------------------------------------------------------
 /// <!-- FillFromReader -->
 /// <summary>
 ///
 /// </summary>
 /// <param name="dataTable"></param>
 /// <param name="dataReader"></param>
 /// <returns></returns>
 public int FillFromReader(DataTable dataTable, IDataReader dataReader)
 {
     if (dataReader == null)
     {
         Throws.A(new NoNullAllowedException("FillFromReader error - dataReader is null"), Throws.Actions, "P");
     }
     return(this.Fill(dataTable, dataReader));
 }
예제 #4
0
        // ----------------------------------------------------------------------------------------
        /// <!-- SetNamespacePrefix -->
        /// <summary>
        ///      Changes the namespace to _defaultRootTag
        /// </summary>
        /// <param name="namespacePrefix"></param>
        /// <returns>namespacePrefix</returns>
        private string SetNamespacePrefix(string namespacePrefix)
        {
            string xmlNamespace = NameSpace;

            if (xmlNamespace != _defaultRootTag)
            {
                Throws.A(new XmlException("Code did not properly pre-process the xml document!"
                                          + "\r\nxml namespace problem"), Throws.Actions, "P");
            }
            namespacePrefix = _defaultRootTag;
            return(namespacePrefix);
        }