コード例 #1
0
ファイル: SearchBits.cs プロジェクト: anycall/Orchard
        private ISearchBits Apply(ISearchBits other, Action<OpenBitSet, OpenBitSet> operation) {
            var bitset = (OpenBitSet)_openBitSet.Clone();
            var otherBitSet = other as SearchBits;

            if (otherBitSet == null) {
                throw new InvalidOperationException("The other bitset must be of type OpenBitSet");
            }

            operation(bitset, otherBitSet._openBitSet);

            return new SearchBits(bitset);

        }
コード例 #2
0
ファイル: SearchBits.cs プロジェクト: EhsanGhanbari/Seldino
        private ISearchBits Apply(ISearchBits other, Action <OpenBitSet, OpenBitSet> operation)
        {
            var bitset      = (OpenBitSet)_openBitSet.Clone();
            var otherBitSet = other as SearchBits;

            if (otherBitSet == null)
            {
                throw new InvalidOperationException("The other bitset must be of type OpenBitSet");
            }

            operation(bitset, otherBitSet._openBitSet);

            return(new SearchBits(bitset));
        }
コード例 #3
0
ファイル: SearchBits.cs プロジェクト: EhsanGhanbari/Seldino
 public ISearchBits Xor(ISearchBits other)
 {
     return(Apply(other, (x, y) => x.Xor(y)));
 }
コード例 #4
0
ファイル: SearchBits.cs プロジェクト: EhsanGhanbari/Seldino
 public ISearchBits And(ISearchBits other)
 {
     return(Apply(other, (x, y) => x.And(y)));
 }
コード例 #5
0
ファイル: SearchBits.cs プロジェクト: anycall/Orchard
 public ISearchBits Xor(ISearchBits other) {
     return Apply(other, (x, y) => x.Xor(y));
 }
コード例 #6
0
ファイル: SearchBits.cs プロジェクト: anycall/Orchard
 public ISearchBits And(ISearchBits other) {
     return Apply(other, (x, y) => x.And(y));
 }