public static IAsyncResult BeginCreate( NetworkSessionType sessionType, int maxLocalGamers, int maxGamers, AsyncCallback callback, Object asyncState ) { if (maxLocalGamers != 1) { throw new ArgumentOutOfRangeException("Maximum local players can only be 1 on the iPhone."); } if (maxGamers < 2 || maxGamers > 8) { throw new ArgumentOutOfRangeException("Maximum number of gamers must be between 2 and 8."); } try { NetworkSessionAsynchronousCreate AsynchronousCreate = new NetworkSessionAsynchronousCreate(Create); return(AsynchronousCreate.BeginInvoke(sessionType, maxLocalGamers, maxGamers, callback, asyncState)); } finally { } }
private static IAsyncResult BeginCreate(NetworkSessionType sessionType, int hostGamer, int maxLocalGamers, int maxGamers, int privateGamerSlots, NetworkSessionProperties sessionProperties, AsyncCallback callback, Object asyncState) { if (maxLocalGamers < 1 || maxLocalGamers > 4) { throw new ArgumentOutOfRangeException("Maximum local players must be between 1 and 4."); } if (maxGamers < 2 || maxGamers > 32) { throw new ArgumentOutOfRangeException("Maximum number of gamers must be between 2 and 32."); } try { NetworkSessionAsynchronousCreate AsynchronousCreate = new NetworkSessionAsynchronousCreate(Create); return(AsynchronousCreate.BeginInvoke(sessionType, maxLocalGamers, maxGamers, privateGamerSlots, sessionProperties, hostGamer, true, callback, asyncState)); } finally { } }
private static IAsyncResult BeginCreate (NetworkSessionType sessionType, int hostGamer, int maxLocalGamers, int maxGamers, int privateGamerSlots, NetworkSessionProperties sessionProperties, AsyncCallback callback, Object asyncState) { if (maxLocalGamers < 1 || maxLocalGamers > 4) throw new ArgumentOutOfRangeException ( "Maximum local players must be between 1 and 4." ); if (maxGamers < 2 || maxGamers > 32) throw new ArgumentOutOfRangeException ( "Maximum number of gamers must be between 2 and 32." ); try { NetworkSessionAsynchronousCreate AsynchronousCreate = new NetworkSessionAsynchronousCreate (Create); return AsynchronousCreate.BeginInvoke (sessionType, maxLocalGamers, maxGamers, privateGamerSlots, sessionProperties, hostGamer, true, callback, asyncState); } finally { } }
public static IAsyncResult BeginCreate( NetworkSessionType sessionType, int maxLocalGamers, int maxGamers, AsyncCallback callback, Object asyncState ) { if ( maxLocalGamers != 1 ) throw new ArgumentOutOfRangeException( "Maximum local players can only be 1 on the iPhone." ); if ( maxGamers < 2 || maxGamers > 8 ) throw new ArgumentOutOfRangeException( "Maximum number of gamers must be between 2 and 8." ); try { NetworkSessionAsynchronousCreate AsynchronousCreate = new NetworkSessionAsynchronousCreate(Create); return AsynchronousCreate.BeginInvoke(sessionType, maxLocalGamers, maxGamers, callback, asyncState); } finally { } }