Table of Contents

IsBindingValid

Methods
[Obsolete("Use IsBindingValid(Coherence.Toolkit.CoherenceSync,int,out string) instead.")]
public static bool IsBindingValid(CoherenceSync sync, Binding binding, out string invalidReason)

Check if a binding on a CoherenceSync component is valid.

Parameters
Type Name Description
CoherenceSync sync

The CoherenceSync component the binding is on.

Binding binding

The Binding instance that represents a synced member.

string invalidReason

If the binding is invalid, this string holds the reason why.

Returns
Type Description
bool

true if the binding is valid; false otherwise.

Remarks

A binding is valid if:

  1. The target Component exists.
  2. The associated Descriptor for the given Component type exists.

IsBindingValid(CoherenceSync, int, out string) does additional validity checks that can only be performed knowing the specific binding index on Bindings.

public static bool IsBindingValid(CoherenceSync sync, int index, out string invalidReason)

Check if a binding on a CoherenceSync component is valid.

Parameters
Type Name Description
CoherenceSync sync

The CoherenceSync component the binding is on.

int index

The index on Bindings for the binding to validate.

string invalidReason

If the binding is invalid, this string holds the reason why.

Returns
Type Description
bool

true if the binding is valid; false otherwise.

Remarks

A binding is valid if:

  1. The target Component exists.
  2. The associated Descriptor for the given Component type exists.