public OperationResult<OpcServerStatus> GetOpcDaServerStatus(OpcDaServer server)
		{
			var status = OpcDaServersProcessor.GetServerStatus(server);

			return status != null ? new OperationResult<OpcServerStatus>(status) :
				new OperationResult<OpcServerStatus>
				{
					Errors = new List<string> { string.Format("OPC DA сервер {0} не подключен", server.ServerName) },
					Result = null
				};
		}
		public OperationResult<OpcDaElement[]> GetOpcDaServerGroupAndTags(OpcDaServer server)
		{
			OperationResult<OpcDaElement[]> result;

			var tags = OpcDaServersProcessor.GetOpcDaServerGroupAndTags(server);

			if (tags != null)
			{
				result = new OperationResult<OpcDaElement[]>(tags);
			}
			else
			{
				result = new OperationResult<OpcDaElement[]>
				{
					Errors = new List<string> { string.Format("OPC DA сервер {0} не найден", server.ServerName) },
					Result = null
				};
			}
			return result;
		}
		public OperationResult<OpcDaTagValue[]> ReadOpcDaServerTags(OpcDaServer server)
		{
			var values = OpcDaServersProcessor.ReadTags(server);
			return new OperationResult<OpcDaTagValue[]>(values);
		}
		public static OpcDaTagValue[] ReadTags(OpcDaServer server)
		{
			return _tags.Where(tag => tag.ServerId == server.Uid).ToArray();
		}
		public static OpcDaElement[] GetOpcDaServerGroupAndTags(OpcDaServer server)
		{
			OpcDaElement[] result;
			var srv = _Servers.FirstOrDefault(x => x.Item1.ServerName == server.ServerName);
			var opcServer = srv == null ? null : srv.Item1;

			if (opcServer == null)
			{
				opcServer = (TsCDaServer)OpcDiscovery.GetServers(OpcSpecification.OPC_DA_20)
					.FirstOrDefault(y => y.ServerName == server.ServerName);

				if (opcServer == null)
				{
					result = null;
				}
				else
				{
					opcServer.Connect(new OpcUrl(OpcSpecification.OPC_DA_20, OpcUrlScheme.DA, server.Url), null);
					result = Browse(opcServer).Select(tag =>
					{
						return tag.IsItem ? OpcDaElement.Create(tag) : OpcDaElement.Create(tag);
					})
					.ToArray(); ;
					opcServer.Disconnect();
				}
			}
			else
			{
				if (opcServer.IsConnected)
				{
					result = Browse(opcServer)
						.Select(tag =>
						{
							return tag.IsItem ? OpcDaElement.Create(tag) : OpcDaElement.Create(tag);
						})
						.ToArray();
				}
				else
				{
					result = null;
				}
			}
			return result;
		}
		public static OpcServerStatus GetServerStatus(OpcDaServer server)
		{
			var opcServer = _Servers.FirstOrDefault(x => x.Item1.ServerName == server.ServerName);

			if (opcServer == null)
			{
				var srv = GetOpcDaServers().FirstOrDefault(s => s.ServerName == server.ServerName);
				if (srv != null)
				{
					var url = new OpcUrl(OpcSpecification.OPC_DA_20, OpcUrlScheme.DA, server.Url);
					var opcSrv = new TsCDaServer();
					try
					{
						opcSrv.Connect(url, null);
						var result = opcSrv.GetServerStatus();
						opcSrv.Disconnect();
						return result;
					}
					catch
					{
						return null;
					}
				}
				else
					return null;
			}
			else
			{
				return opcServer.Item1.IsConnected ? opcServer.Item1.GetServerStatus() : null;
			}
		}
		public static OpcDaServer[] GetOpcDaServers()
		{
			OpcDaServer[] result;

			try
			{
				result = (OpcDiscovery.GetServers(OpcSpecification.OPC_DA_20)
				.Select(srv => new OpcDaServer
				{
					IsChecked = false,
					Login = string.Empty,
					Password = string.Empty,
					ServerName = srv.ServerName,
					Url = srv.Url.ToString()
				})
				.ToArray());
			}
			catch (Exception ex)
			{
				result = new OpcDaServer[0];
				Notifier.UILog(ex.Message, true);
			}

			return result;
		}