public override int GetHashCode() { int result = 17; unchecked { // <GetHashCodeList> // <GetHashCode> if (Id != default(long)) { result = (result * 31) + Id.GetHashCode(); } // </GetHashCode> if (JoinPolicy != default(SecurityPolicy)) { result = (result * 31) + JoinPolicy.GetHashCode(); } if (Owner != default(Employee)) { result = (result * 31) + Owner.GetHashCode(); } if (Members != default(IList <Employee>)) { result = (result * 31) + Members.GetHashCode(); } // </GetHashCodeList> } return(result); }
public static Request <Models.Room> CreateAndJoinPrivate(JoinPolicy joinPolicy, uint maxUsers, bool subscribeToNotifications = false) { if (Core.IsInitialized()) { return(new Request <Models.Room>(CAPI.ovr_Room_CreateAndJoinPrivate((uint)joinPolicy, maxUsers, subscribeToNotifications))); } return(null); }
private void OnDeserializedMethod(StreamingContext context) { if (_DataStoreRawArray != null) { DataStore = new Dictionary <string, string>(); foreach (Pair pair in _DataStoreRawArray) { DataStore[pair._Key] = pair._Value; } _DataStoreRawArray = null; } //Handle RoomType if ("MATCHMAKING".Equals(_TypeRaw)) { _Type = RoomType.Matchmaking; } else if ("MODERATED".Equals(_TypeRaw)) { _Type = RoomType.Moderated; } else if ("PRIVATE".Equals(_TypeRaw)) { _Type = RoomType.Private; } else if ("SOLO".Equals(_TypeRaw)) { _Type = RoomType.Solo; } else { _Type = RoomType.Unknown; } _TypeRaw = null; //Handle JoinPolicy if ("EVERYONE".Equals(_JoinPolicyRaw)) { _JoinPolicy = JoinPolicy.Everyone; } else if ("FRIENDS_OF_MEMBERS".Equals(_JoinPolicyRaw)) { _JoinPolicy = JoinPolicy.FriendsOfMembers; } else if ("FRIENDS_OF_OWNER".Equals(_JoinPolicyRaw)) { _JoinPolicy = JoinPolicy.FriendsOfOwner; } else if ("INVITED_USERS".Equals(_JoinPolicyRaw)) { _JoinPolicy = JoinPolicy.InvitedUsers; } else { _JoinPolicy = JoinPolicy.None; } _JoinPolicyRaw = null; //Handle Joinability if ("ARE_IN".Equals(_JoinabilityRaw)) { _Joinability = RoomJoinability.AreIn; } else if ("ARE_KICKED".Equals(_JoinabilityRaw)) { _Joinability = RoomJoinability.AreKicked; } else if ("CAN_JOIN".Equals(_JoinabilityRaw)) { _Joinability = RoomJoinability.CanJoin; } else if ("IS_FULL".Equals(_JoinabilityRaw)) { _Joinability = RoomJoinability.IsFull; } else if ("NO_VIEWER".Equals(_JoinabilityRaw)) { _Joinability = RoomJoinability.NoViewer; } else if ("POLICY_PREVENTS".Equals(_JoinabilityRaw)) { _Joinability = RoomJoinability.PolicyPrevents; } else { _Joinability = RoomJoinability.Unknown; } _JoinabilityRaw = null; }
public static Request <Models.Room> UpdatePrivateRoomJoinPolicy(UInt64 roomID, JoinPolicy newJoinPolicy) { if (Core.IsInitialized()) { return(new Request <Models.Room>(CAPI.ovr_Room_UpdatePrivateRoomJoinPolicy(roomID, (uint)newJoinPolicy))); } return(null); }