SPDiagnosticsService.TypeName Property
Gets the friendly name for the service.
Namespace: Microsoft.SharePoint.Administration
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No
Syntax
'Declaration
Public Overrides ReadOnly Property TypeName As String
Get
'Usage
Dim instance As SPDiagnosticsService
Dim value As String
value = instance.TypeName
public override string TypeName { get; }
Property Value
Type: System.String
A String that contains a localized name.
Remarks
In English, this property returns "Windows SharePoint Diagnostics Service". The name is used in the Central Administration user interface and in logs.
Examples
The following example shows a console application that gets the various names that are associated with an instance of the service and prints them to the console.
Imports System
Imports Microsoft.SharePoint
Imports Microsoft.SharePoint.Administration
Module ConsoleApp
Sub Main()
Dim service As SPDiagnosticsService = SPDiagnosticsService.Local
If Not service Is Nothing Then
Console.WriteLine("DisplayName = {0} | Name = {1} | TypeName = {2}", _
service.DisplayName, service.Name, service.TypeName)
End If
Console.Write(vbCrLf + "Press ENTER to continue...")
Console.ReadLine()
End Sub
End Module
using System;
using Microsoft.SharePoint;
using Microsoft.SharePoint.Administration;
namespace Test
{
class ConsoleApp
{
static void Main(string[] args)
{
SPDiagnosticsService service = SPDiagnosticsService.Local;
if (service != null)
{
Console.WriteLine("DisplayName = {0} | Name = {1} | TypeName = {2}",
service.DisplayName, service.Name, service.TypeName);
}
Console.Write("\nPress ENTER to continue...");
Console.ReadLine();
}
}
}