internal static IAsyncResult BeginCreate(string serverHost, SessionType sessionType, int maxLocalGamers, int maxGamers, int privateReservedSlots, SessionProperties sessionProperties, AsyncCallback callback, object asyncState) { if ((maxLocalGamers < 1) || (maxLocalGamers > 4)) { throw new ArgumentOutOfRangeException("maxLocalGamers"); } if (maxGamers < 1 || maxGamers > 31) { throw new ArgumentOutOfRangeException("maxGamers"); } if ((privateReservedSlots < 0) || (privateReservedSlots >= maxGamers)) { throw new ArgumentOutOfRangeException("privateReservedSlots"); } var asyncCreate = new AsynchronousCreate(Create); return(asyncCreate.BeginInvoke(serverHost, sessionType, maxGamers, privateReservedSlots, sessionProperties, true, callback, asyncState)); }
internal static IAsyncResult BeginCreate(string serverHost, SessionType sessionType, int maxLocalGamers, int maxGamers, int privateReservedSlots, SessionProperties sessionProperties, AsyncCallback callback, object asyncState) { if ((maxLocalGamers < 1) || (maxLocalGamers > 4)) { throw new ArgumentOutOfRangeException("maxLocalGamers"); } if (maxGamers < 1 || maxGamers > 31) { throw new ArgumentOutOfRangeException("maxGamers"); } if ((privateReservedSlots < 0) || (privateReservedSlots >= maxGamers)) { throw new ArgumentOutOfRangeException("privateReservedSlots"); } var asyncCreate = new AsynchronousCreate(Create); return asyncCreate.BeginInvoke(serverHost, sessionType, maxGamers, privateReservedSlots, sessionProperties, true, callback, asyncState); }