public int Count { get; } Public ReadOnly Property Count As Integer public:property int Count {int get();}
The number of items contained in the collection.
using Leadtools;using Leadtools.MediaStreaming;public Server _server = null;public bool _result = false;public void PrintClientsExample(){try{int Count = 0;string strClients = "";// create an instance of the server object_server = new Leadtools.MediaStreaming.Server();// edit network properties, application properties, MIME types, or IP filters here// start the server_server.Start();// make sure that there is some clients connected to the server.// retrieve a copy of the Application PropertiesClients clients = _server.GetClients();//Get the Application Properties countCount = clients.Count;// print the clients items to a stringstrClients += string.Format("--- Clients (count = {0}) ---\n\n", Count.ToString());int nIndex = 0;foreach (Client client in clients){string ip;int connections;double connectiontime;// get IP Addressip = client.IPAddress;// get number of connectionsconnections = client.Connections;// get connection timeconnectiontime = client.ConnectionTime;// convert to local timeDateTime dt = DateTime.FromOADate(connectiontime);DateTime dtLocal = dt.ToLocalTime();string sconnectiontime = dtLocal.ToString("yyyy-MM-dd HH:mm:ss");strClients += string.Format("Client[{0}]: {1}, connections = {2}, connection time = {3}\n", nIndex.ToString(), ip, connections.ToString(), sconnectiontime);nIndex++;}// display a message contains the clients information stringMessageBox.Show(strClients, "LEADTOOLS Media Streaming Examples", MessageBoxButtons.OK, MessageBoxIcon.Information);_result = true;}catch (Exception){_result = false;}}
Imports LeadtoolsImports Leadtools.MediaStreamingPublic _server As Server = NothingPublic _result As Boolean = FalsePublic Sub PrintClientsExample()TryDim Count As Integer = 0Dim strClients As String = ""' create an instance of the server object_server = New Leadtools.MediaStreaming.Server()' edit network properties, application properties, MIME types, or IP filters here' start the server_server.Start()' make sure that there is some clients connected to the server.' retrieve a copy of the Application PropertiesDim clients As Clients = _server.GetClients()'Get the Application Properties countCount = clients.Count' print the clients items to a stringstrClients &= String.Format("--- Clients (count = {0}) ---" & Constants.vbLf + Constants.vbLf, Count.ToString())Dim nIndex As Integer = 0For Each client As Client In clientsDim ip As StringDim connections As IntegerDim connectiontime As Double' get IP Addressip = client.IPAddress' get number of connectionsconnections = client.Connections' get connection timeconnectiontime = client.ConnectionTime' convert to local timeDim dt As DateTime = DateTime.FromOADate(connectiontime)Dim dtLocal As DateTime = dt.ToLocalTime()Dim sconnectiontime As String = dtLocal.ToString("yyyy-MM-dd HH:mm:ss")strClients &= String.Format("Client[{0}]: {1}, connections = {2}, connection time = {3}" & Constants.vbLf, nIndex.ToString(), ip, connections.ToString(), sconnectiontime)nIndex += 1Next client' display a message contains the clients information stringMessageBox.Show(strClients, "LEADTOOLS Media Streaming Examples", MessageBoxButtons.OK, MessageBoxIcon.Information)_result = TrueCatch e1 As Exception_result = FalseEnd TryEnd Sub
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document
