Exemple #1
0
 // Token: 0x0600022D RID: 557 RVA: 0x0000906B File Offset: 0x0000726B
 public JsonPrimitive(short value)
 {
     this.value = value;
 }
 void ICameraHandler.ZoomWide(short zoomSpeed)
 {
     throw new NotImplementedException();
 }
Exemple #3
0
 public string GetSwitchName(short id)
 {
     RemoteClientDriver.SetClientTimeout(client, standardServerResponseTimeout);
     return(RemoteClientDriver.GetShortIndexedString(clientNumber, client, URIBase, TL, "GetSwitchName", id));
 }
 public void PanTiltDown(short moveSpeed)
 {
     PanTileWorking = true;
 }
 public void PanTiltUpRight(short moveSpeed)
 {
     PanTileWorking = true;
 }
 public TradeItem(MapleItem item, short count)
 {
     Count = count;
     Item = item;
 }
Exemple #7
0
 public static BindResult Bind(out short value) { value = 0; return BindResult.Short | BindResult.Out; }
 private bool PlayerExists(short id)
 {
     return(_context.Players.Any(e => e.Id == id));
 }
Exemple #9
0
        // ----------------- Server callbacks ------------------

        //we want to disable the button JOIN if we don't have enough player
        //But OnLobbyClientConnect isn't called on hosting player. So we override the lobbyPlayer creation
        public override GameObject OnLobbyServerCreateLobbyPlayer(NetworkConnection conn, short playerControllerId)
        {
            GameObject obj = Instantiate(lobbyPlayerPrefab.gameObject) as GameObject;

            LobbyPlayer newPlayer = obj.GetComponent <LobbyPlayer>();

            newPlayer.ToggleJoinButton(numPlayers + 1 >= minPlayers);

            for (int i = 0; i < lobbySlots.Length; ++i)
            {
                LobbyPlayer p = lobbySlots[i] as LobbyPlayer;

                if (p != null)
                {
                    p.RpcUpdateRemoveButton();
                    p.ToggleJoinButton(numPlayers + 1 >= minPlayers);
                }
            }

            return(obj);
        }
 public override Task WriteHeadersAsync(IChannelHandlerContext ctx, int streamId, IHttp2Headers headers, int streamDependency, short weight, bool exclusive, int padding, bool endOfStream, IPromise promise)
 {
     if (_closed)
     {
         promise.SetException(new Http2ChannelClosedException());
         return(promise.Task);
     }
     if (IsExistingStream(streamId) || Connection.GoAwayReceived())
     {
         return(base.WriteHeadersAsync(ctx, streamId, headers, streamDependency, weight, exclusive, padding, endOfStream, promise));
     }
     if (CanCreateStream())
     {
         return(base.WriteHeadersAsync(ctx, streamId, headers, streamDependency, weight, exclusive, padding, endOfStream, promise));
     }
     if (!_pendingStreams.TryGetValue(streamId, out var pendingStream))
     {
         pendingStream = new PendingStream(ctx, streamId);
         _pendingStreams.Add(streamId, pendingStream);
     }
     pendingStream._frames.Add(new HeadersFrame(this, headers, streamDependency, weight, exclusive,
                                                padding, endOfStream, promise));
     return(promise.Task);
 }
Exemple #11
0
 public static short Lerp(short x, short y, float amount)
 {
     return (short)(x * (1 - amount) + y * amount);
 }
Exemple #12
0
 public void setSearchPreference(short input)
 {
     searchPreference = input;
 }
Exemple #13
0
 void _MethodRental.Invoke(uint dispIdMember, [In] ref Guid riid, uint lcid, short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr)
 {
     throw new NotImplementedException();
 }
Exemple #14
0
 private byte[] GetBytes(short s)
 {
     byte[] count = BitConverter.GetBytes(s);
     return(count);
 }
Exemple #15
0
 /// <summary>
 /// Creates a message with binary data
 /// </summary>
 /// <param name="opCode"></param>
 /// <param name="data"></param>
 /// <returns></returns>
 public IMessage Message(short opCode, byte[] data)
 {
     return MessageHelper.Create(opCode, data);
 }
Exemple #16
0
 /// <summary>
 /// Converts the <see cref="Int16"/> to it's JavaScript string representation.
 /// </summary>
 /// <param name="value">The value to convert.</param>
 /// <returns>A Json string representation of the <see cref="Int16"/>.</returns>
 public static string ToString(short value)
 {
     return(value.ToString(null, CultureInfo.InvariantCulture));
 }
Exemple #17
0
 // Update a numeric parameter (or remove it if it's the default value).
 protected void UpdateParamNum(Dictionary <string, short> paramList, string paramKey, short value, short defVal)
 {
     if (value == defVal)
     {
         paramList.Remove(paramKey);
     }
     else
     {
         paramList[paramKey] = value;
     }
 }
Exemple #18
0
        private static bool TryConvertFromTruncating<TOther>(TOther value, out long result)
            where TOther : INumberBase<TOther>
        {
            // In order to reduce overall code duplication and improve the inlinabilty of these
            // methods for the corelib types we have `ConvertFrom` handle the same sign and
            // `ConvertTo` handle the opposite sign. However, since there is an uneven split
            // between signed and unsigned types, the one that handles unsigned will also
            // handle `Decimal`.
            //
            // That is, `ConvertFrom` for `long` will handle the other signed types and
            // `ConvertTo` will handle the unsigned types

            if (typeof(TOther) == typeof(double))
            {
                double actualValue = (double)(object)value;
                result = (actualValue >= MaxValue) ? MaxValue :
                         (actualValue <= MinValue) ? MinValue : (long)actualValue;
                return true;
            }
            else if (typeof(TOther) == typeof(Half))
            {
                Half actualValue = (Half)(object)value;
                result = (actualValue == Half.PositiveInfinity) ? MaxValue :
                         (actualValue == Half.NegativeInfinity) ? MinValue : (long)actualValue;
                return true;
            }
            else if (typeof(TOther) == typeof(short))
            {
                short actualValue = (short)(object)value;
                result = actualValue;
                return true;
            }
            else if (typeof(TOther) == typeof(int))
            {
                int actualValue = (int)(object)value;
                result = actualValue;
                return true;
            }
            else if (typeof(TOther) == typeof(Int128))
            {
                Int128 actualValue = (Int128)(object)value;
                result = (long)actualValue;
                return true;
            }
            else if (typeof(TOther) == typeof(nint))
            {
                nint actualValue = (nint)(object)value;
                result = actualValue;
                return true;
            }
            else if (typeof(TOther) == typeof(sbyte))
            {
                sbyte actualValue = (sbyte)(object)value;
                result = actualValue;
                return true;
            }
            else if (typeof(TOther) == typeof(float))
            {
                float actualValue = (float)(object)value;
                result = (actualValue >= MaxValue) ? MaxValue :
                         (actualValue <= MinValue) ? MinValue : (long)actualValue;
                return true;
            }
            else
            {
                result = default;
                return false;
            }
        }
Exemple #19
0
 public static BindResult Bind(short value) { return BindResult.Short; }
 public static System.Collections.Specialized.BitVector32.Section CreateSection(short maxValue, System.Collections.Specialized.BitVector32.Section previous) { throw null; }
Exemple #21
0
 public static BindResult BindRef(ref short value) { value = 0; return BindResult.Short | BindResult.Ref; }
Exemple #22
0
        /// <summary>
        /// Updates a record, can be used with the Object Data Source
        /// </summary>
        public static void Update(int varBillOfMaterialsID, int?varProductAssemblyID, int varComponentID, DateTime varStartDate, DateTime?varEndDate, string varUnitMeasureCode, short varBOMLevel, decimal varPerAssemblyQty, DateTime varModifiedDate)
        {
            BillOfMaterial item = new BillOfMaterial();

            item.BillOfMaterialsID = varBillOfMaterialsID;

            item.ProductAssemblyID = varProductAssemblyID;

            item.ComponentID = varComponentID;

            item.StartDate = varStartDate;

            item.EndDate = varEndDate;

            item.UnitMeasureCode = varUnitMeasureCode;

            item.BOMLevel = varBOMLevel;

            item.PerAssemblyQty = varPerAssemblyQty;

            item.ModifiedDate = varModifiedDate;

            item.IsNew = false;
            if (System.Web.HttpContext.Current != null)
            {
                item.Save(System.Web.HttpContext.Current.User.Identity.Name);
            }
            else
            {
                item.Save(System.Threading.Thread.CurrentPrincipal.Identity.Name);
            }
        }
 public void PanTiltLeft(short moveSpeed)
 {
     PanTileWorking = true;
 }
Exemple #24
0
 /// <summary>
 /// Creates a message by serializing a packet
 /// </summary>
 /// <param name="opCode"></param>
 /// <param name="packet"></param>
 /// <returns></returns>
 public IMessage Message(short opCode, ISerializablePacket packet)
 {
     return MessageHelper.Create(opCode, packet.ToBytes());
 }
 void ICameraHandler.CameraMemorySet(short memory)
 {
     throw new NotImplementedException();
 }
Exemple #26
0
 /// <summary>
 /// Creates an empty message
 /// </summary>
 /// <param name="opCode"></param>
 /// <returns></returns>
 public IMessage Message(short opCode)
 {
     return MessageHelper.Create(opCode);
 }
Exemple #27
0
 public bool GetSwitch(short id)
 {
     RemoteClientDriver.SetClientTimeout(client, standardServerResponseTimeout);
     return(RemoteClientDriver.GetShortIndexedBool(clientNumber, client, URIBase, TL, "GetSwitch", id));
 }
Exemple #28
0
 /// <summary>
 /// Creates a message with string content
 /// </summary>
 /// <param name="opCode"></param>
 /// <param name="message"></param>
 /// <returns></returns>
 public IMessage Message(short opCode, string message)
 {
     return MessageHelper.Create(opCode, message);
 }
Exemple #29
0
 public double GetSwitchValue(short id)
 {
     RemoteClientDriver.SetClientTimeout(client, standardServerResponseTimeout);
     return(RemoteClientDriver.GetShortIndexedDouble(clientNumber, client, URIBase, TL, "GetSwitchValue", id));
 }
        public void checkEquality(PdxTypesReflectionTest other)
        {
            byte[][] baa = other.m_byteByteArray;
            m_byteByteArray = compareByteByteArray(baa, m_byteByteArray);
            m_char          = GenericValCompare(other.m_char, m_char);

            m_bool      = GenericValCompare(other.m_bool, m_bool);
            m_boolArray = GenericCompare(other.m_boolArray, m_boolArray);

            m_byte      = GenericValCompare(other.m_byte, m_byte);
            m_byteArray = GenericCompare(other.m_byteArray, m_byteArray);
            m_charArray = GenericCompare(other.m_charArray, m_charArray);

            List <object> tmpl = new List <object>();

            m_arraylist = compareCompareCollection(other.m_arraylist, m_arraylist);

            m_LinkedList = compareCompareCollection(other.m_LinkedList, m_LinkedList);

            IDictionary <object, object> tmpM = other.m_map;

            if (tmpM.Count != m_map.Count)
            {
                throw new IllegalStateException("Not got expected value for type: " + m_map.GetType().ToString());
            }

            Hashtable tmpH = other.m_hashtable;

            if (tmpH.Count != m_hashtable.Count)
            {
                throw new IllegalStateException("Not got expected value for type: " + m_hashtable.GetType().ToString());
            }

            ArrayList arrAl = other.m_vector;

            if (arrAl.Count != m_vector.Count)
            {
                throw new IllegalStateException("Not got expected value for type: " + m_vector.GetType().ToString());
            }

            CacheableHashSet rmpChs = other.m_chs;

            if (rmpChs.Count != m_chs.Count)
            {
                throw new IllegalStateException("Not got expected value for type: " + m_chs.GetType().ToString());
            }

            CacheableLinkedHashSet rmpClhs = other.m_clhs;

            if (rmpClhs.Count != m_clhs.Count)
            {
                throw new IllegalStateException("Not got expected value for type: " + m_clhs.GetType().ToString());
            }


            m_string = GenericValCompare(other.m_string, m_string);

            m_dateTime = compareData(other.m_dateTime, m_dateTime);

            m_double = GenericValCompare(other.m_double, m_double);

            m_doubleArray = GenericCompare(other.m_doubleArray, m_doubleArray);
            m_float       = GenericValCompare(other.m_float, m_float);
            m_floatArray  = GenericCompare(other.m_floatArray, m_floatArray);
            m_int16       = GenericValCompare(other.m_int16, m_int16);
            m_int32       = GenericValCompare(other.m_int32, m_int32);
            m_long        = GenericValCompare(other.m_long, m_long);
            m_int32Array  = GenericCompare(other.m_int32Array, m_int32Array);
            m_longArray   = GenericCompare(other.m_longArray, m_longArray);
            m_int16Array  = GenericCompare(other.m_int16Array, m_int16Array);
            m_sbyte       = GenericValCompare(other.m_sbyte, m_sbyte);
            m_sbyteArray  = GenericCompare(other.m_sbyteArray, m_sbyteArray);
            m_stringArray = GenericCompare(other.m_stringArray, m_stringArray);
            m_uint16      = GenericValCompare(other.m_uint16, m_uint16);
            m_uint32      = GenericValCompare(other.m_uint32, m_uint32);
            m_ulong       = GenericValCompare(other.m_ulong, m_ulong);
            m_uint32Array = GenericCompare(other.m_uint32Array, m_uint32Array);
            m_ulongArray  = GenericCompare(other.m_ulongArray, m_ulongArray);
            m_uint16Array = GenericCompare(other.m_uint16Array, m_uint16Array);

            byte[] ret = other.m_byte252;
            if (ret.Length != 252)
            {
                throw new Exception("Array len 252 not found");
            }

            ret = other.m_byte253;
            if (ret.Length != 253)
            {
                throw new Exception("Array len 253 not found");
            }

            ret = other.m_byte65535;
            if (ret.Length != 65535)
            {
                throw new Exception("Array len 65535 not found");
            }

            ret = other.m_byte65536;
            if (ret.Length != 65536)
            {
                throw new Exception("Array len 65536 not found");
            }
            if (other.m_pdxEnum != m_pdxEnum)
            {
                throw new Exception("Pdx enum is not equal");
            }
            //byte[] m_byte252 = new byte[252];
            //byte[] m_byte253 = new byte[253];
            //byte[] m_byte65535 = new byte[65535];
            //byte[] m_byte65536 = new byte[65536];
            AddressR[] otherA = other.m_address;
            for (int i = 0; i < m_address.Length; i++)
            {
                if (!m_address[i].Equals(otherA[i]))
                {
                    throw new Exception("AddressR array is not equal " + i);
                }
            }
        }