C# SCADA
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

50 lines
1.2 KiB

using System;
using System.ServiceModel;
namespace BatchCoreService
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
static void Main()
{
BatchCoreTest srv = new BatchCoreTest();
Console.ReadLine();
}
}
public class BatchCoreTest : IDisposable
{
//DAService service;
ServiceHost serviceHost = null;
public BatchCoreTest()
{
//service = new DAService();
if (serviceHost != null)
{
serviceHost.Close();
}
// Create a ServiceHost for the CalculatorService type and
// provide the base address.
serviceHost = new ServiceHost(typeof(DAService));
// Open the ServiceHostBase to create listeners and start
// listening for messages.
serviceHost.Open();
//Console.ReadLine();
}
public void Dispose()
{
if (serviceHost != null)
{
serviceHost.Close();
serviceHost = null;
}
}
}
}