コード例 #1
0
ファイル: Channel.cs プロジェクト: PasierbKarol/CSPsharp
 /**
  * Constructs and returns an array of input channel ends, each of which can be shared by multiple
  * concurrent readers. The returned array, <code>r</code>, is constructed such that
  * <code>r[i] = c[i].in ()</code> for <code>0 <= i < c.Length</code>.
  *
  * @param c the array of channel to obtain input ends from.
  * @return the array of channel input ends.
  */
 public static SharedChannelInput[] getInputArray(One2AnyChannel[] c)
 {
     SharedChannelInput[] _in = new SharedChannelInput[c.Length];
     for (int i = 0; i < c.Length; i++)
     {
         _in[i] = c[i].In();
     }
     return(_in);
 }
コード例 #2
0
 /**
  * Creates a new filtered channel input end around an existing channel end. The created channel end
  * can be shared by multiple processes.
  *
  * @param in the existing channel end.
  * @return the created channel end.
  */
 public FilteredSharedChannelInput createFiltered(SharedChannelInput In)
 {
     return(new FilteredSharedChannelInputWrapper(In));
 }
コード例 #3
0
 /**
  * Constructs a new wrapper for the given channel input end.
  *
  * @param in the existing channel end.
  */
 public FilteredSharedChannelInputWrapper(SharedChannelInput In) : base(In)
 {
     synchObject = new Object();
 }
コード例 #4
0
 /**
  * Creates a new filtered input channel end around an existing input channel end that can be
  * shared by multiple processes.
  *
  * @param in the existing channel end to create a filtered form of,
  * @return the new channel end with filtering ability.
  */
 public static FilteredSharedChannelInput createFiltered(SharedChannelInput In)
 {
     return(factory.createFiltered(In));
 }