コード例 #1
0
ファイル: NfcDevice.cs プロジェクト: jesterret/NeardSharp
        /// <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()));
        }
コード例 #2
0
        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);
            }
        }
コード例 #3
0
ファイル: Context.cs プロジェクト: JoaoNunesDaSilva/Analyser
        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);
        }
コード例 #4
0
ファイル: Context.cs プロジェクト: JoaoNunesDaSilva/Analyser
        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);
        }
コード例 #5
0
ファイル: Context.cs プロジェクト: JoaoNunesDaSilva/Analyser
        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);
        }
コード例 #6
0
        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));
        }
コード例 #7
0
 public void registerServiceServant(ObjectImpl serviceServant, ObjectPrx serviceServantProxy)
 {
     helper.registerServiceServant(serviceServant, serviceServantProxy);
 }
コード例 #8
0
ファイル: NfcDevice.cs プロジェクト: jesterret/NeardSharp
 /// <summary>
 /// Reads raw bytes of NDEF record received from the device.
 /// </summary>
 /// <returns>Raw NDEF bytes.</returns>
 public Task <byte[]> GetRawNDEFAsync() => ObjectImpl.GetRawNDEFAsync();
コード例 #9
0
 public static bool operator !=(StringValueTag left, ValueTagBase right)
 {
     return(ObjectImpl.OperatorInequality(left, right));
 }
コード例 #10
0
 public static bool operator !=(ActionMatrixEntryKey left, ActionMatrixEntryKey right)
 {
     return(ObjectImpl.OperatorInequality(left, right));
 }
コード例 #11
0
 public static bool operator ==(IntValueTag left, ValueTagBase right)
 {
     return(ObjectImpl.OperatorEquality(left, right));
 }
コード例 #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));
 }