Skip to content

Commit a381698

Browse files
committed
very preliminary first draft
1 parent c3613dd commit a381698

File tree

1 file changed

+40
-6
lines changed

1 file changed

+40
-6
lines changed

source/fundamentals/linq.txt

Lines changed: 40 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ as follows:
7070
.. code-block:: csharp
7171
:emphasize-lines: 3
7272

73-
var restaurantsDatabase = client.GetDatabase("sample_restaurants")
73+
var restaurantsDatabase = client.GetDatabase("sample_restaurants");
7474
var restaurantsCollection = restaurantsDatabase.GetCollection<Restaurant>("restaurants");
7575
var queryableCollection = restaurantsCollection.AsQueryable();
7676

@@ -591,29 +591,63 @@ in the Atlas manual and select :guilabel:`C#` from the language dropdown.
591591
$bitAnd
592592
~~~~~~~
593593

594-
The ``$bitAnd`` aggregation stage performs a bitwise AND operation on the list
595-
of arguments. The arguments should be a list of ``NumberInt`` and ``NumberLong`` //check these out
596-
values.
594+
The ``$bitAnd`` aggregation stage performs a bitwise AND operation on the given
595+
arguments. ``$bitAnd`` can take // describe arguments
596+
597+
..code-block:: csharp
598+
var queryable = collection.AsQueryable()
599+
.Select(x => x.P & x.Q
600+
);
601+
602+
The result of the preceding example look like this:
603+
604+
// what should the parameters look like?
597605

598606
// 2 arguments <-- the example should correspond to the pagewide example
599607
// 3 arguments
600608

601-
602609
// restaurants collection
603610

604611

605612
$bitOr
606613
~~~~~~
607614

615+
The ``$bitOr`` aggregation stage performs a bitwise OR operation on the given
616+
arguments. ``$bitOr`` can take // describe arguments - same as AND and XOR
617+
618+
..code-block:: csharp
619+
var queryable = collection.AsQueryable()
620+
.Select(x => x.P | x.Q
621+
);
622+
623+
The result of the preceding example look like this:
608624

609625
$bitNot
610626
~~~~~~~
611627

628+
The ``$bitNot`` aggregation stage performs a bitwise NOT operation on the given
629+
argument. ``$bitOr`` only takes one argument.
630+
631+
..code-block:: csharp
632+
var queryable = collection.AsQueryable()
633+
.Select(x => !x.P
634+
);
635+
636+
The result of the preceding example looks like this:
612637

613638
$bitXor
614639
~~~~~~~
615640

616-
// at the end, add note about the behaviors
641+
The ``$bitXor`` aggregation stage performs a bitwise XOR operation on the given
642+
arguments. ``$bitXor`` can take // describe arguments - same as AND and XOR
643+
644+
..code-block:: csharp
645+
var queryable = collection.AsQueryable()
646+
.Select(x => x.P ^ x.Q
647+
);
648+
649+
The result of the preceding example look like this:
650+
// at the end, add note about the behaviors? <-- what is this referring to?
617651

618652
Unsupported Aggregation Stages
619653
------------------------------

0 commit comments

Comments
 (0)