Compartir a través de


IsSynchronized Propiedad

Gets a value that indicates whether the collection is synchronized with the instance of SQL Server.

Espacio de nombres:  Microsoft.SqlServer.Management.Smo
Ensamblado:  Microsoft.SqlServer.Smo (en Microsoft.SqlServer.Smo.dll)

Sintaxis

'Declaración
Public ReadOnly Property IsSynchronized As Boolean
    Get
'Uso
Dim instance As CpuCollection
Dim value As Boolean

value = instance.IsSynchronized
public bool IsSynchronized { get; }
public:
virtual property bool IsSynchronized {
    bool get () sealed;
}
abstract IsSynchronized : bool
override IsSynchronized : bool
final function get IsSynchronized () : boolean

Valor de la propiedad

Tipo: System. . :: . .Boolean
Returns a boolean value. If true, the collection is synchronized with the instance of SQL Server.

Implementa

ICollection. . :: . .IsSynchronized

Ejemplos

The following example shows how to determine whether the CpuCollection is synchronized with the instance of SQL Server.

C#

using System;
using System.Collections.Specialized;
using Microsoft.SqlServer.Management.Smo;

namespace samples
{
    class Program
    {
        static void Main(string[] args)
        {
            Server dbServer = new Server(".\\MSSQLG64");

            Console.WriteLine("CPU Collection {0} synchronized.\n",
                (dbServer.AffinityInfo.Cpus.IsSynchronized) ?
                "is" : "is not");
        }
    }
}

Powershell

$dbServer = new-Object Microsoft.SqlServer.Management.Smo.Server("(local)")
If ($dbServer.AffinityInfo.Cpus.IsSynchronized = $TRUE)
{
   Write-Host "CPU Collection is synchronized."
}
Else
{
   Write-Host "CPU Collection is not synchronized."
}