Exemplo n.º 1
		public static byte ToByte(SharedObjectEventType type) {
			switch (type) {
				case SharedObjectEventType.SERVER_CONNECT:
					return 0x01;
				case SharedObjectEventType.SERVER_DISCONNECT:
					return 0x02;
				case SharedObjectEventType.SERVER_SET_ATTRIBUTE:
					return 0x03;
				case SharedObjectEventType.CLIENT_UPDATE_DATA:
					return 0x04;
				case SharedObjectEventType.CLIENT_UPDATE_ATTRIBUTE:
					return 0x05;
				case SharedObjectEventType.SERVER_SEND_MESSAGE:
					return 0x06;
				case SharedObjectEventType.CLIENT_SEND_MESSAGE:
					return 0x06;
				case SharedObjectEventType.CLIENT_STATUS:
					return 0x07;
				case SharedObjectEventType.CLIENT_CLEAR_DATA:
					return 0x08;
				case SharedObjectEventType.CLIENT_DELETE_DATA:
					return 0x09;
				case SharedObjectEventType.SERVER_DELETE_ATTRIBUTE:
					return 0x0A;
				case SharedObjectEventType.CLIENT_INITIAL_DATA:
					return 0x0B;
					//log.error("Unknown type " + type);
					return 0x00;
Exemplo n.º 2
        /// <summary>
        /// Initializes a new instance of the SharedObjectEvent class with the given initial value.
        /// </summary>
        /// <param name="type">Type of the event.</param>
        /// <param name="key">Key of the event.</param>
        /// <param name="value">Value of the event.</param>
		public SharedObjectEvent(SharedObjectEventType type, String key, Object value)
			_type = type;
			_key = key;
			_value = value;
Exemplo n.º 3
        /// <summary>
        /// Add a shared object event.
        /// </summary>
        /// <param name="type">Event type.</param>
        /// <param name="key">Handler key.</param>
        /// <param name="value">Event value.</param>
		public void AddEvent(SharedObjectEventType type, string key, object value)
			_events.Enqueue(new SharedObjectEvent(type, key, value));