/// <summary>
 /// Accept the local peg assigned by the binder after it's been downloaded from the cloud.
 /// </summary>
 /// <param name="peg">The local peg to take.</param>
 public void SetLocalPeg(ILocalPeg peg)
 {
     if (peg?.Name == localPeg?.Name)
     {
         SimpleConsole.AddLine(ConsoleHigh, $"Redundant SLP: {name} {peg.Name}");
         return;
     }
     if (localPeg != null)
     {
         SimpleConsole.AddLine(ConsoleHigh, $"SLP release {localPeg?.Name} take {peg?.Name}");
         Publisher.ReleaseLocalPeg(localPeg);
     }
     localPeg = peg;
     SimpleConsole.AddLine(ConsoleLow, $"SLP: {name} - {localPeg.GlobalPose.position.ToString("F3")}");
 }
        /// <summary>
        /// Create a local peg based on current state (LockedPose).
        /// </summary>
        /// <remarks>
        /// This typically happens when the SpacePinASA is locally manipulated into a new pose.
        /// </remarks>
        public async void ConfigureLocalPeg()
        {
            if (Publisher == null)
            {
                SimpleConsole.AddLine(ConsoleHigh, $"Publisher hasn't been set on SpacePin={name}");
                return;
            }
            if (localPeg != null)
            {
                SimpleConsole.AddLine(ConsoleHigh, $"Releasing existing peg {name}");
                Publisher.ReleaseLocalPeg(localPeg);
            }
            localPeg = await Publisher.CreateLocalPeg($"{SpacePinId}_peg", LockedPose);

            SimpleConsole.AddLine(ConsoleLow, $"CLP: {name} - {localPeg.GlobalPose.position.ToString("F3")}");
        }
 public LocalPegAndProperties(ILocalPeg lp, IDictionary <string, string> props)
 {
     this.localPeg   = lp;
     this.properties = props;
 }