SfcKeyChain Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
A SfcKeyChain is a domain root and a key list which is a full identity path to an Sfc instance object. The domain root determines which domain and instance it represents. The list of SfcAbstractKeys determines what domain type instance objects at each level it represents. They can be compared for equality and used as unique dictionary keys even when mixed domains are present.
public sealed class SfcKeyChain : IEquatable<Microsoft.SqlServer.Management.Sdk.Sfc.SfcKeyChain>
type SfcKeyChain = class
interface IEquatable<SfcKeyChain>
Public NotInheritable Class SfcKeyChain
Implements IEquatable(Of SfcKeyChain)
- Inheritance
-
SfcKeyChain
- Implements
Constructors
SfcKeyChain(Urn, ISfcDomain) |
The constructor to be used for creating SfcKeyChains when the fully qualified URN is known. This is used when a fully qualified URN is known but we do not have an object yet |
Properties
Domain |
Return the domain interface for given KeyChain |
IsConnected | |
IsRooted | |
LeafKey |
Get the key of the leaf node An SfcKeyChain is immutable so you must construct a new one to change the leaf key. |
Parent |
Get the SfcKeyChain for the parent of this one. An SfcKeyChain is immutable so you must construct a new one to change the parent. |
RootKey |
Get the key of the root node |
Urn |
A SfcKeyChain can always be converted into the equivalent Urn format. |
Methods
ClientEquals(SfcKeyChain) |
Compares for client equality of the same instance object in the same object tree. |
Equals(Object) |
Two SfcKeyChains are equal iff
|
Equals(SfcKeyChain) |
The strongly-typed equality check used by the strongly-typed operators. Compares for client equality of the same instance in the same object tree. |
GetHashCode() |
The hash code for a SfcKeyChain is simply a XOR of all its component Key hash codes. Each Key class must implement a reasonable GetHashCode() for this to distribute itself well. |
GetObject() |
Get the Sfc object associated with this SfcKeyChain. This will look the object up in the hierarchy starting from the root of this key chain, and create new one (with putting it into collection) on demand. This is important so we never get orphaned objects |
IsClientAncestorOf(SfcKeyChain) |
Check if the given keychain is inside this one, using the rules of ClientEquality(). Inside is defined as comparing as equal from the top-down until the shorter (containing) keychain is exhausted. Note that comparing as equivalent, or either being null means not inside. |
IsServerAncestorOf(SfcKeyChain) |
Check if the given keychain is inside this one, using the rules of ServerEquality(). Inside is defined as comparing as equal from the top-down until the shorter (containing) keychain is exhausted. Note that comparing as equivalent, or either being null means not inside. |
ServerEquals(SfcKeyChain) |
Compares for server equivalence of the same logical server-side entity regardless of client-side object tree. |
ToString() |
The ToString() implementation should return a string representation usable in sorting by an external comparer. It should not respresent an XPath or any other format, unless intended as an actual collation format. TODO: Either add a GetComparerString() virtual, or make Keys do comprisons using an externally-provided Comparer. |
Operators
Equality(SfcKeyChain, SfcKeyChain) |
The == operator compares two SfcKeyChains.
|
Inequality(SfcKeyChain, SfcKeyChain) |
The != operator compares two SfcKeyChains for inequality by using the == operator and negating the result. See the == operator on the SfcKeyChain class for details on equality checking. |