We recommend using Visual Studio 2017

IAvailabilityGroupState Interface

Represents the adapter class that implements the IAvailabilityGroupState logical facet for an Availability Group.

Namespace:  Microsoft.SqlServer.Management.Smo
Assembly:  Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)

public interface IAvailabilityGroupState : IDmfFacet, 

The IAvailabilityGroupState type exposes the following members.

Public propertyIsAutoFailoverReturns true if the failover mode of the current primary replica of the Availability Group is set to Automatic Failover.
Public propertyIsOnlineIndicates whether the Availability Group is up.
Public propertyNumberOfDisconnectedReplicasGets the number of replicas that are not in a "Connected" state.
Public propertyNumberOfNotSynchronizedReplicasGets the number of replicas that are not in a "Synchronized" state.
Public propertyNumberOfNotSynchronizingReplicasGets the number of replicas in a "Not Synchronizing" state.
Public propertyNumberOfReplicasWithUnhealthyRoleGets the number of replicas that are neither a primary or a secondary in the Availability Group.
Public propertyNumberOfSynchronizedSecondaryReplicasGets the number of synchronous secondary replicas with Automatic Failover mode and Synchronized state.

Public methodRefreshRefreshes object properties by reading them from the server. (Inherited from IRefreshable.)