}//main()

  ///<summary>Stub</summary>
  public static void Stub
  (
   ref UtilityServerManagementObjectSMOArgument  utilityServerManagementObjectSMOArgument,
   ref String              exceptionMessage
  )
  {

   Server  sQLServer  =  null;

   try 
   {

    sQLServer = new Server();

   }//try
   catch ( Exception exception )
   {
    UtilityDebug.Write
    (
     String.Format
     (
      "Exception: {0}",
      exception.Message
     )
    );
   }//catch ( Exception exception )   	
    
  }//public static void FileImport()
 /// <summary>The entry point for the application.</summary>
 /// <param name="argv">A list of arguments</param>
 public static void Main( String[] argv )
 {
  Boolean                         booleanParseCommandLineArguments   =  false;
  String                          exceptionMessage                   =  null;
  
  UtilityServerManagementObjectSMOArgument  utilityServerManagementObjectSMOArgument    =  null;
  
  utilityServerManagementObjectSMOArgument = new UtilityServerManagementObjectSMOArgument();
  
  booleanParseCommandLineArguments =  UtilityParseCommandLineArgument.ParseCommandLineArguments
  ( 
   argv, 
   utilityServerManagementObjectSMOArgument
  );
  
  if ( booleanParseCommandLineArguments  == false )
  {
   // error encountered in arguments. Display usage message
   UtilityDebug.Write
   (
    UtilityParseCommandLineArgument.CommandLineArgumentsUsage( typeof ( UtilityServerManagementObjectSMOArgument ) )    
   );  
   return;
  }//if ( booleanParseCommandLineArguments  == false )
  
  Stub
  (
   ref utilityServerManagementObjectSMOArgument,
   ref exceptionMessage
  );
  
 }//main()
Beispiel #3
0
  }//main()

  ///<summary>FaxSend</summary>
  public static void FaxSend
  (
   ref UtilityServerManagementObjectSMOArgument  utilityServerManagementObjectSMOArgument,
   ref String              exceptionMessage
  )
  {

   int             faxDocStatus                    =  -1;

   object          faxServerClassDocument          =  null;
   
   FaxDoc          faxDoc                          =  null;
   FaxServerClass  faxServerClass                  =  null;
   
   if ( utilityServerManagementObjectSMOArgument.FaxDocument == null || utilityServerManagementObjectSMOArgument.FaxDocument == String.Empty )
   {
    return;
   }//if ( utilityServerManagementObjectSMOArgument.FaxDocument == null || utilityServerManagementObjectSMOArgument.FaxDocument == String.Empty )    	

   try 
   {
    faxServerClass = new FaxServerClass();
    
    faxServerClass.Connect( utilityServerManagementObjectSMOArgument.SQLServerName ); //specifies the machinename
    
    faxServerClassDocument = faxServerClass.CreateDocument
    (
     utilityServerManagementObjectSMOArgument.FaxDocument
    );
    
    faxDoc = ( FaxDoc) faxServerClassDocument;
    
    faxDoc.FaxNumber = utilityServerManagementObjectSMOArgument.FaxNumber;
    faxDocStatus = faxDoc.Send();

    UtilityDebug.Write
    (
     String.Format
     (
      "Fax Status: {0}",
      faxDocStatus
     )
    );

    faxServerClass.Disconnect();

   }//try
   catch ( Exception exception )
   {
    UtilityDebug.Write
    (
     String.Format
     (
      "Exception: {0}",
      exception.Message
     )
    );
   }//catch ( Exception exception )   	
    
  }//public static void FileImport()