Esempio n. 1
0
        /// <summary>
        /// Pushes specified <see cref="NfcRecord"/> to the device.
        /// </summary>
        /// <param name="record">Record to push to device.</param>
        /// <returns></returns>
        /// <exception cref="ArgumentNullException"><paramref name="record"/> is <see langword="null"/>.</exception>
        public Task PushAsync(NfcRecord record)
        {
            if (record is null)
            {
                return(Task.FromException(new ArgumentNullException(nameof(record))));
            }

            return(ObjectImpl.PushAsync(record.ToDictionary()));
        }
        public void registerServiceServant(ObjectImpl serviceServant, ObjectPrx serviceServantProxy)
        {
            if ((serviceServant != null) && (serviceServantProxy != null))
            {
                string   typeId   = serviceServant.ice_id();
                Identity identity = serviceServantProxy.ice_getIdentity();
                Trace.TraceError("AbstractTerkUserServantHelper.registerServiceServant() is registering type id [" + typeId + "] to identity [" + Util.identityToString(identity) + "]");

                commandControllerTypeToProxyIdentityMap.Add(typeId, identity);
            }
        }
Esempio n. 3
0
        internal IView CreateView(string name)
        {
            if (ViewInstances.ContainsKey(name))
            {
                return(ViewInstances[name]);
            }
            ObjectImpl impl = this.Views[name];
            IView      view = (IView)refl.CreateInstance(impl);

            ViewInstances.Add(name, view);
            return(view);
        }
Esempio n. 4
0
        internal IModule CreateModule(string name)
        {
            if (ModuleInstances.ContainsKey(name))
            {
                return(ModuleInstances[name]);
            }
            ObjectImpl impl   = this.Modules[name];
            IModule    module = (IModule)refl.CreateInstance(impl);

            ModuleInstances.Add(name, module);
            return(module);
        }
Esempio n. 5
0
        internal IService CreateService(string name)
        {
            if (ServiceInstances.ContainsKey(name))
            {
                return(ServiceInstances[name]);
            }
            ObjectImpl impl    = this.Services[name];
            IService   service = (IService)refl.CreateInstance(impl);

            ServiceInstances.Add(name, service);
            return(service);
        }
        public void OperatorEquality()
        {
            EquatableClass eNull = null;
            EquatableClass e1    = new EquatableClass(1);
            EquatableClass e1b   = new EquatableClass(1);
            EquatableClass e2    = new EquatableClass(2);

            Assert.IsTrue(ObjectImpl.OperatorEquality(eNull, null));
            Assert.IsTrue(ObjectImpl.OperatorEquality(e1, e1));
            Assert.IsTrue(ObjectImpl.OperatorEquality(e1, e1b));
            Assert.IsFalse(ObjectImpl.OperatorEquality(e1, eNull));
            Assert.IsFalse(ObjectImpl.OperatorEquality(eNull, e1));
            Assert.IsFalse(ObjectImpl.OperatorEquality(e1, e2));
        }
Esempio n. 7
0
 public void registerServiceServant(ObjectImpl serviceServant, ObjectPrx serviceServantProxy)
 {
     helper.registerServiceServant(serviceServant, serviceServantProxy);
 }
Esempio n. 8
0
 /// <summary>
 /// Reads raw bytes of NDEF record received from the device.
 /// </summary>
 /// <returns>Raw NDEF bytes.</returns>
 public Task <byte[]> GetRawNDEFAsync() => ObjectImpl.GetRawNDEFAsync();
Esempio n. 9
0
 public static bool operator !=(StringValueTag left, ValueTagBase right)
 {
     return(ObjectImpl.OperatorInequality(left, right));
 }
Esempio n. 10
0
 public static bool operator !=(ActionMatrixEntryKey left, ActionMatrixEntryKey right)
 {
     return(ObjectImpl.OperatorInequality(left, right));
 }
 public static bool operator ==(IntValueTag left, ValueTagBase right)
 {
     return(ObjectImpl.OperatorEquality(left, right));
 }
Esempio n. 12
0
 /// <summary>
 /// Determines whether two specified <see cref="EquatableClass"/> objects have different value.
 /// </summary>
 /// <param name="left">An <see cref="EquatableClass"/> or a <c>null</c> reference.</param>
 /// <param name="right">An <see cref="EquatableClass"/> or a <c>null</c> reference.</param>
 /// <returns><c>true</c> if the value of <paramref name="left"/> is different from the value of <paramref name="right"/>; otherwise, <c>false</c>.</returns>
 public static bool operator !=(EquatableClass left, EquatableClass right)
 {
     return(ObjectImpl.OperatorInequality(left, right));
 }