text:
The `paket.dependencies` file is used to specify rules regarding your
application's dependencies. It contains top level dependencies from all projects
in the solution, while [`paket.references` file](references-files.html)
specifies dependencies for particular project.

To give you an overview, consider the following `paket.dependencies` file:

```paket
source https://nuget.org/api/v2

// NuGet packages
nuget NUnit ~> 2.6.3
nuget FAKE ~> 3.4
nuget DotNetZip >= 1.9

// Files from GitHub repositories.
github forki/FsUnit FsUnit.fs

// Gist files.
gist Thorium/1972349 timestamp.fs

// HTTP resources.
http http://www.fssnip.net/1n decrypt.fs
```

The file specifies that Paket's NuGet dependencies should be downloaded from
[nuget.org](https://www.nuget.org) and that projects require:

* [NUnit](http://www.nunit.org/) version
  [2.6.3 <= x < 2.7](nuget-dependencies.html#Pessimistic-version-constraint)
* [FAKE](http://fsharp.github.io/FAKE/) version
  [3.4 <= x < 4.0](nuget-dependencies.html#Pessimistic-version-constraint)
* [DotNetZip](http://dotnetzip.codeplex.com/) with a version that is at
  [least 1.9](nuget-dependencies.html#Greater-than-or-equal-version-constraint)
* [FSUnit.fs](https://github.com/forki/FsUnit) from GitHub
* [GitHub Gist](https://gist.github.com) number
  [1972349](https://gist.github.com/Thorium/1972349)
* External HTTP resource, i.e. [1n](http://www.fssnip.net/1n) from [FSSnip](http://www.fssnip.net/)

Paket uses this definition to compute a concrete dependency resolution, which
also includes [transitive dependencies](faq.html#transitive). The resulting
dependency graph is then persisted to the [`paket.lock` file](lock-file.html).

Only direct dependencies should be listed; you can use the
[`paket simplify` command](paket-simplify.html) to remove [transitive
dependencies](faq.html#transitive).

## Sources

Paket supports the following source types:

* [NuGet](nuget-dependencies.html)
* [Git](git-dependencies.html)
* [GitHub and Gist](github-dependencies.html)
* [HTTP](http-dependencies.html) (any single file from any site without version
  control)

## Global options

### Required Paket version

It is possible to require a specific Paket version for a
[`paket.dependencies` file](dependencies-file.html). This can be achieved by a
line which starts with `version` followed by a requested `paket.exe` version and
optionally [bootstrapper command line](bootstrapper.html) arguments:

```paket
version 3.24.1

source https://api.nuget.org/v3/index.json
nuget FAKE
nuget FSharp.Core ~> 4
```

or

```paket
version 3.24.1 --prefer-nuget

source https://api.nuget.org/v3/index.json
nuget FAKE
nuget FSharp.Core ~> 4
```

### Strict references

Paket usually adds all direct and [transitive dependencies](faq.html#transitive)
that are listed in [`paket.references` files](references-files.html) to project
files next to the respective [`paket.references` file](references-files.html).
In `strict` mode it will **only add** *direct* dependencies and you need to
add transitive dependencies yourself to
[`paket.references`](references-files.html).

```paket
references: strict
source https://nuget.org/api/v2

nuget Newtonsoft.Json ~> 6.0
nuget UnionArgParser ~> 0.7
```

Note that the resolution phase is not affected by this option, it will still
resolve, lock and download all transitive references.

### Framework restrictions

Sometimes you do not want to generate dependencies for other .NET Framework
versions than the ones your projects use. You can control this in the
[`paket.dependencies` file](dependencies-file.html):

```paket
// Download and install only for .NET 3.5 and .NET 4.0.
framework: net35, net40

source https://nuget.org/api/v2

nuget Example >= 2.0
```

Which may be translated to:

> Paket, I only compile for `net35` and `net40`, please leave out all other
> stuff I don't need to compile for this set of frameworks.

#### Automatic framework detection

Paket is able to detect the target frameworks from your projects and then limit
the installation to these. You can control this in the
[`paket.dependencies` file](dependencies-file.html):

```paket
// Only the target frameworks that are used in projects.
framework: auto-detect

source https://nuget.org/api/v2

nuget Example >= 2.0
```

If you change the target framework of the projects then you need to run
[`paket install`](paket-install.html) again.

### Controlling whether content files should be copied to the project

The `content` option controls the installation of any content files:

```paket
// Do not install jQuery content files.
content: none

source https://nuget.org/api/v2

nuget jQuery >= 0
```

The global option may be
[overridden per package](nuget-dependencies.html#Controlling-whether-content-files-should-be-copied-to-the-project).

### Controlling whether content files should be copied to the output directory during build

It's possible to influence the
[`CopyToOutputDirectory` property](https://msdn.microsoft.com/en-us/library/bb629388.aspx#Anchor_0)
for content references via the `copy_content_to_output_dir` option:

```paket
copy_content_to_output_dir: always

source https://nuget.org/api/v2

nuget jQuery
nuget Fody
nuget ServiceStack.Swagger
```

The global option may be
[overridden per package](nuget-dependencies.html#Controlling-whether-content-files-should-be-copied-to-the-output-directory-during-build).

### Controlling whether assemblies should be copied to the output directory during build

It's possible to influence the
[`Private` property](https://msdn.microsoft.com/en-us/library/bb629388.aspx#Anchor_0)
for references via the `copy_local` option:

```paket
copy_local: false

source https://nuget.org/api/v2

nuget Newtonsoft.Json
```

The global option may be
[overridden per package](nuget-dependencies.html#Controlling-whether-assemblies-should-be-copied-to-the-output-directory-during-build).

### Importing `*.targets` and `*.props` files

If you don't want to import `*.targets` and `*.props` files from packages, you
can disable it via the `import_targets` option:

```paket
// Do not import *.targets and *.props.
import_targets: false

source https://nuget.org/api/v2

nuget Microsoft.Bcl.Build
nuget UnionArgParser ~> 0.7
```

The global option may be
[overridden per package](nuget-dependencies.html#Importing-and-files).

### Controlling assembly binding redirects

This option tells Paket to create
[Assembly Binding Redirects](https://msdn.microsoft.com/en-us/library/433ysdt1(v=vs.110).aspx)
for all referenced libraries. This option only instructs Paket to create and manage
binding redirects in **existing `App.config` files**, it will not create new
`App.config` files for you.

However you can create `App.config` files as necessary by running
[`paket install --create-new-binding-files`](paket-install.html).

```paket
redirects: on

source https://nuget.org/api/v2

nuget UnionArgParser ~> 0.7
```

The global option may be
[overridden per package](nuget-dependencies.html#Controlling-assembly-binding-redirects).

If you're using multiple [groups](groups.html), you must set `redirects: off`
for each one.

```paket
redirects: off

source https://nuget.org/api/v2

nuget UnionArgParser ~> 0.7 redirects: on
nuget FSharp.Core redirects: force

group Build
  redirects: off

  source https://nuget.org/api/v2

  nuget FAKE redirects: on
```

### Resolver strategy for transitive dependencies

The `strategy` option tells Paket what resolver strategy it should use for
[transitive dependencies](faq.html#transitive). The strategy can be either `min`
or `max` with `max` being the default.

NuGet's dependency syntax led to a lot of incompatible packages on
[nuget.org](https://www.nuget.org). To make your transition to Paket easier and
to allow package authors to correct their version constraints you can have Paket
behave like NuGet when resolving [transitive dependencies](faq.html#transitive)
(i.e. defaulting to lowest matching versions).

```paket
strategy: min

source https://nuget.org/api/v2

nuget UnionArgParser ~> 0.7
```

The `min` strategy means you get the *lowest matching version* of your
[transitive dependencies](faq.html#transitive) (i.e. NuGet-style). In contrast,
a `max` strategy will get you the *highest matching version*.

Note, however, that all direct dependencies will still get their *latest
matching versions*, no matter the value of the `strategy` option. If you want to
influence the resolution of direct dependencies then read about the
[lowest_matching option](dependencies-file.html#Resolver-strategy-for-direct-dependencies).

The only exception is when you are updating a single package and one of your
direct dependencies is a [transitive dependency](faq.html#transitive) for that
specific package. In this case, only the updating package will get its *latest
matching version* and the dependency is treated as transitive.

The global option may be
[overridden per package](nuget-dependencies.html#Strategy-modifiers).

### Resolver strategy for direct dependencies

The `lowest_matching` option tells Paket what resolver strategy it should use
for direct dependencies. It can be either `true` or `false` with `false` being
the default.

```paket
lowest_matching: true
source https://nuget.org/api/v2

nuget UnionArgParser ~> 0.7
```

`lowest_matching: true` means you get the *lowest matching version* of your
direct dependencies. In contrast, a `lowest_matching: false` will get you the
*highest matching version*.

Note, however, that all [transitive dependencies](faq.html#transitive) will
still get their *latest matching versions*, no matter the value of the
`lowest_matching` option. If you want to influence the resolution of
[transitive dependencies](faq.html#transitive) then read about the
[strategy option](dependencies-file.html#Strategy-option).

The global option may be
[overridden per package](nuget-dependencies.html#Resolver-strategy-for-direct-dependencies).

### Load script generation

This option tells Paket to
[generate load scripts](paket-generate-load-scripts.html) for interactive
environments like F# Interactive or ScriptCS. These scripts reference installed
packages.

The `generate_load_scripts` option can be either `true` or `false` with `false`
being the default.

```paket
generate_load_scripts: true

source https://nuget.org/api/v2

nuget Suave
```

Generated load scripts can be loaded like this:

```fsharp
#load @".paket/load/net45/suave.fsx"
```

## Comments

All lines starting with with `//` or `#` are considered comments.


text:
* {
	outline:none !important;
	-moz-outline: none !important;
}
/* Main */
body {
	overflow-x: hidden;
    margin-top: -9px;
}
a:hover {
	text-decoration: none;
}

/* Header */
#header {
    height: 60px;
    position: relative;
    width: 100%;
    z-index: -9;
}

#header h1 {
    background: url("../img/logo.png") no-repeat scroll 0 0 transparent;
    height: 31px;
    left: 15px;
    line-height: 600px;
    overflow: hidden;
    position: relative;
    top:8px;
    width: 191px;
}

#header h1 a {
    display: block;
}
.fl{ float:left}
.fr{ float:right}
/* Search input */
#search {
	position: relative;
	z-index: 1;
	top:42px;
	float:right;
}
#search input[type=text] {
	border-radius: 0px 0 0 0px;
	padding:8px 10px ;
	border:1px; line-height:24px;
	width:166px;
}

#search button {
	border: 0;
	margin-top: -11px;
	padding:8px 10px; margin-left:-5px;
	background-color:#5c5c5c;
}
#search button i {
	opacity: 0.5;
}
#search button:hover i, #search button:active i {
	opacity: 0.9;
}
/* Top user navigation */
#sidebar{ width:100%; background:none;  position:absolute; clear:both; top:65px;}
#sidebar > ul{ margin:0px; padding:0px; width:100%; display:block; z-index:999;}
#sidebar > ul > li { list-style-type:none; float:left; display:block; margin:0px; border-right:1px dotted #6b6b6b; position:relative; padding:10px; cursor:pointer}
#sidebar > ul > li:hover ul { display:block; }
#sidebar > ul > li:hover { background-color:#2b2b2b;}
#sidebar > ul > li:hover a{ background:none;}
#sidebar > ul li ul { margin:0px; padding:0px; display:none; z-index:999;  position:absolute; border-radius:3px; left:0px; top:40px;  background:#2b2b2b; min-width:200px;}
#sidebar > ul li ul li { list-style-type:none; margin:0px; font-size:12px;line-height:30px;  }
#sidebar > ul li ul li a { display:block; padding:5px 10px; color:#fff; text-decoration:none; font-weight:bold; }
#sidebar > ul li ul li:hover a{ background-color:#606060; border-radius:3px;}
#sidebar > ul li span { cursor:pointer; margin:0px 2px 0 5px; font-weight:bold; color:#fff; font-size:11px; }
#sidebar > ul li a i{ background-image: url("../img/glyphicons-halflings-white.png");     margin-top:4px;    vertical-align: top;}
#my_menu_input{ display:none;}
#user-nav {
    position: absolute;
    right:0px;
    top: 5px;
    z-index: 20;
    margin: 0; border-left:1px solid #3d3a37;
}
#user-nav > ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

#user-nav > ul > li {
    float: left;
    list-style-type: none;
    margin: 0;
    position: relative;
    padding:6px 0;
	background:#2b2b2b;
	border-left:1px solid #1e1c1a;
	border-right:1px solid #3d3a37;
}
#user-nav > ul > li:hover{ background:#000;}
#user-nav > ul > li > a {
	padding: 13px 10px;
	display: block;
	font-size: 12px;
}

#user-nav > ul > li > a:hover, #user-nav > ul > li.open > a {
	color: #ffffff;
}
#user-nav > ul > li > a > i, #sidebar li a i {
	vertical-align: top;
	background-image: url('../img/glyphicons-halflings-white.png');
	margin-top: 2px;
}
#user-nav > ul > li > a:hover > i, #user-nav > ul > li.open > a > i {
	opacity: 1;
}

#user-nav > ul > li > a > .label {
	vertical-align: middle;
	padding: 1px 4px 1px;
	margin: -2px 4px 0;
	display: inline-block;
}

#user-nav > ul ul > li > a {
	text-align: left;
	text-shadow: 0 1px 0 #ffffff;
}
#user-nav > ul ul > li > a:hover {
	text-shadow: 0 1px 0 rgba(0,0,0,0.5);
}

/* Content */
#content {
    background: none repeat scroll 0 0 #fff;
    margin-left:0px;
    margin-right: 0;
	margin-top:80px;
    padding-bottom: 25px;
    position: relative;
    min-height: 500px;
    width: auto;
}

#content-header {
	position: abslute;
    width: 100%;
    margin-top: -38px;
    z-index: 20;
}

#content-header h1 {
    color: #555555;
    font-size: 28px;
    font-weight: normal;
    float: none;
    text-shadow: 0 1px 0 #ffffff;
    margin-left: 20px;
    position: relative;
}

#content-header .btn-group {
	float: right;
	right: 20px;
	position: absolute;
}

#content-header h1, #content-header .btn-group {
	margin-top: 20px;
}
#content-header .btn-group .btn {
	padding: 11px 14px 9px;
}
#content-header .btn-group .btn .label {
	position: absolute;
	top: -7px;
}

.container-fluid .row-fluid:first-child {
	margin-top: 20px;
}
/* Breadcrumb */
#breadcrumb {
	background-color: #e5e5e5;
	border-bottom: 1px solid #d6d6d6;
	padding-left: 10px;
}
#breadcrumb a {
	padding: 8px 20px 8px 10px;
	display: inline-block;
	background-image: url('../img/breadcrumb.png');
	background-position: center right;
	background-repeat: no-repeat;
	font-size: 11px;
	color: #666666;
}
#breadcrumb a:hover {
	color: #333333;
}
#breadcrumb a:last-child {
	background-image:none;
}
#breadcrumb a.current {
	font-weight: bold;
	color: #444444;
}
#breadcrumb a i {
	margin-right: 5px;
	opacity: .6;
}
#breadcrumb a:hover i {
	margin-right: 5px;
	opacity: .8;
}

/* Style Switcher */
#style-switcher {
	position: absolute;
	width: 220px;
	height: 30px;
	background-color: #000000;
	z-index: 40;
	right: 0;
	top: 123px;
	border-radius: 5px 0 0 5px;
	margin-right: -190px;
}
#style-switcher i {
	display: inline-block;
	margin: -5px 10px 0 10px;
}
#style-switcher i:hover {
	cursor: pointer;
}
#style-switcher span {
	font-weight: bold;
	color: #ffffff;
	display: inline-block;
	margin: -15px 20px 0 0;
	vertical-align:middle;
}
#style-switcher a {
	display: inline-block;
	width: 20px;
	height: 20px;
	margin-top: 4px;
	border-style: solid;
	border-width: 1px;
	border-color: transparent;
}
/* Footer */
#footer {
	text-align: center;
	color: #777777; padding:10px 0; background:#2B2927;
}
/* Stat boxes and quick actions */
.quick-actions_homepage{ width:100%; text-align:center; float:left; margin-top:10px;}
.stat-boxes, .quick-actions, .quick-actions-horizontal, .stats-plain {
    display: inline-block;
    list-style: none outside none;
    margin: 20px 0 10px;
    text-align: center;
}
.stat-boxes2{ background:none; width:100%;  padding:0px; margin:0 auto; position:relative; top:13px; right:10px;}
.stats-plain {	width: 100%;}

.stat-boxes li, .quick-actions li, .quick-actions-horizontal li {
    background: #F6F6F6;
    border: 1px solid #D5D5D5;
    box-shadow: 0 1px 0 0 #FFFFFF inset, 0 1px 0 rgba(255, 255, 255, 0.4);
    display: inline-block;
    line-height: 18px;
    margin: 0 10px 10px;
    padding: 0 10px;
}
.stat-boxes li a:hover, .quick-actions li a:hover, .quick-actions-horizontal li a:hover, .stat-boxes li:hover, .quick-actions li:hover, .quick-actions-horizontal li:hover{ background: #fff;}
.quick-actions li {
	min-width: 175px;
}
.quick-actions li, .quick-actions-horizontal li {
	padding: 0;
}
.stats-plain li {
	padding: 0 30px;
	display: inline-block;
	margin: 0 10px 20px;
}
.quick-actions li a {
	padding: 10px 30px;
}
.stats-plain li h4 {
	font-size: 40px;
	margin-bottom: 15px;
}
.stats-plain li span {
	font-size: 14px;
	color: #555555;
}
.quick-actions-horizontal li a span {
	padding: 10px 12px 10px 10px;
	display: inline-block;
}
.quick-actions li a, .quick-actions-horizontal li a {
	display: block;
	color: #666666; font-weight:bold;
	text-shadow: 0 1px 0 #ffffff;
}
.quick-actions li a i[class^="icon-"], .quick-actions li a i[class*=" icon-"] {
	background-repeat: no-repeat;
	background-attachment: scroll;
	background-position: 0 0;
	background-color: transparent;
	width: 32px;
	height: 32px;
	display: block;
	margin: 0 auto 5px;
}
.quick-actions-horizontal li a i[class^="icon-"], .quick-actions-horizontal li a i[class*=" icon-"] {
	background-repeat: no-repeat;
	background-attachment: scroll;
	background-position: center;
	background-color: transparent;
	width: 16px;
	height: 16px;
	display: inline-block;
	margin: -2px 0 0 !important;
	border-right: 1px solid #dddddd;
	margin-right: 10px;
	padding: 10px;
	vertical-align: middle;
}

.quick-actions i.icon-book {
	background-image: url('../img/icons/32/book.png');
}
.quick-actions i.icon-cabinet {
	background-image: url('../img/icons/32/cabinet.png');
}
.quick-actions i.icon-calendar {
	background-image: url('../img/icons/32/calendar.png');
}
.quick-actions i.icon-client {
	background-image: url('../img/icons/32/client.png');
}
.quick-actions i.icon-database {
	background-image: url('../img/icons/32/database.png');
}
.quick-actions i.icon-download {
	background-image: url('../img/icons/32/download.png');
}
.quick-actions i.icon-graph {
	background-image: url('../img/icons/32/graph.png');
}
.quick-actions i.icon-home {
	background-image: url('../img/icons/32/home.png');
}
.quick-actions i.icon-lock {
	background-image: url('../img/icons/32/lock.png');
}
.quick-actions i.icon-mail {
	background-image: url('../img/icons/32/mail.png');
}
.quick-actions i.icon-pdf {
	background-image: url('../img/icons/32/pdf.png');
}
.quick-actions i.icon-people {
	background-image: url('../img/icons/32/people.png');
}
.quick-actions i.icon-piechart {
	background-image: url('../img/icons/32/piechart.png');
}
.quick-actions i.icon-search {
	background-image: url('../img/icons/32/search.png');
}
.quick-actions i.icon-shopping-bag {
	background-image: url('../img/icons/32/shopping-bag.png');
}
.quick-actions i.icon-survey {
	background-image: url('../img/icons/32/survey.png');
}
.quick-actions i.icon-tag {
	background-image: url('../img/icons/32/tag.png');
}
.quick-actions i.icon-user {
	background-image: url('../img/icons/32/user.png');
}
.quick-actions i.icon-wallet {
	background-image: url('../img/icons/32/wallet.png');
}
.quick-actions i.icon-web {
	background-image: url('../img/icons/32/web.png');
}
.quick-actions i.icon-dashboard {
	background-image: url('../img/icons/32/dashboard.png');
}
.quick-actions-horizontal i.icon-book {
	background-image: url('../img/icons/16/book.png');
}
.quick-actions-horizontal i.icon-cabinet {
	background-image: url('../img/icons/16/cabinet.png');
}
.quick-actions-horizontal i.icon-calendar {
	background-image: url('../img/icons/16/calendar.png');
}
.quick-actions-horizontal i.icon-client {
	background-image: url('../img/icons/16/client.png');
}
.quick-actions-horizontal i.icon-database {
	background-image: url('../img/icons/16/database.png');
}
.quick-actions-horizontal i.icon-download {
	background-image: url('../img/icons/16/download.png');
}
.quick-actions-horizontal i.icon-graph {
	background-image: url('../img/icons/16/graph.png');
}
.quick-actions-horizontal i.icon-home {
	background-image: url('../img/icons/16/home.png');
}
.quick-actions-horizontal i.icon-lock {
	background-image: url('../img/icons/16/lock.png');
}
.quick-actions-horizontal i.icon-mail {
	background-image: url('../img/icons/16/mail.png');
}
.quick-actions-horizontal i.icon-pdf {
	background-image: url('../img/icons/16/pdf.png');
}
.quick-actions-horizontal i.icon-people {
	background-image: url('../img/icons/16/people.png');
}
.quick-actions-horizontal i.icon-piechart {
	background-image: url('../img/icons/16/piechart.png');
}
.quick-actions-horizontal i.icon-search {
	background-image: url('../img/icons/16/search.png');
}
.quick-actions-horizontal i.icon-shopping-bag {
	background-image: url('../img/icons/16/shopping-bag.png');
}
.quick-actions-horizontal i.icon-survey {
	background-image: url('../img/icons/16/survey.png');
}
.quick-actions-horizontal i.icon-tag {
	background-image: url('../img/icons/16/tag.png');
}
.quick-actions-horizontal i.icon-user {
	background-image: url('../img/icons/16/user.png');
}
.quick-actions-horizontal i.icon-wallet {
	background-image: url('../img/icons/16/wallet.png');
}
.quick-actions-horizontal i.icon-web {
	background-image: url('../img/icons/16/web.png');
}

.quick-actions li:active, .quick-actions-horizontal li:active  {
	background-image: -webkit-gradient(linear, 0 0%, 0 100%, from(#EEEEEE), to(#F4F4F4));
	background-image: -webkit-linear-gradient(top, #EEEEEE 0%, #F4F4F4 100%);
    background-image: -moz-linear-gradient(top, #EEEEEE 0%, #F4F4F4 100%);
    background-image: -ms-linear-gradient(top, #EEEEEE 0%, #F4F4F4 100%);
    background-image: -o-linear-gradient(top, #EEEEEE 0%, #F4F4F4 100%);
    background-image: linear-gradient(top, #EEEEEE 0%, #F4F4F4 100%);
    box-shadow: 0 1px 4px 0 rgba(0,0,0,0.2) inset, 0 1px 0 rgba(255,255,255,0.4);
}

.stat-boxes .left, .stat-boxes .right {
	text-shadow: 0 1px 0 #fff;
    float: left;
}
.stat-boxes .left {
    border-right: 1px solid #DCDCDC;
    box-shadow: 1px 0 0 0 #FFFFFF;
    font-size: 10px;
    font-weight: bold;
    margin-right: 10px;
    padding: 10px 14px 6px 4px;
}

.stat-boxes .right {
 color: #666666;
    font-size: 12px;
    padding: 9px 10px 7px 0;
    text-align: center;
    width: 70px;
}
.stat-boxes .left span, .stat-boxes .right strong {
	display: block;
}
.stat-boxes .right strong {
	font-size: 26px;
	margin-bottom: 3px;
	margin-top: 6px;
}
.stat-boxes .peity_bar_good, .stat-boxes .peity_line_good  {
	color: #459D1C;
}
.stat-boxes .peity_bar_neutral, .stat-boxes .peity_line_neutral  {
	color: #757575;
}
.stat-boxes .peity_bar_bad, .stat-boxes .peity_line_bad  {
	color: #BA1E20;
}

.stats-plain {

}

/* Charts & graphs **/
.chart, .pie, .bars {
	height: 300px;
	max-width: 100%;
}
#tooltip {
	position: absolute;
	display:none;
	border: none;
	padding: 3px 8px;
	border-radius: 3px;
	font-size: 10px;
	background-color: #222222;
	color: #ffffff;
	z-index: 25;
}

/* Widgets */
.widget-box {
    background: none repeat scroll 0 0 #F9F9F9;
    border-top: 1px solid #CDCDCD;
    border-left: 1px solid #CDCDCD;
    border-right: 1px solid #CDCDCD;
    clear: both;
    margin-top: 16px;
    margin-bottom: 16px;
    position: relative;
}
.widget-box.widget-calendar, .widget-box.widget-chat {
    overflow:hidden !important;
}
.accordion .widget-box {
	margin-top: -2px;
	margin-bottom: 0;
	border-radius: 0;
}
.widget-box.widget-plain {
	background: transparent;
	border: none;
	margin-top: 0;
	margin-bottom: 0;
}

.widget-title, .modal-header, .table th, div.dataTables_wrapper .ui-widget-header {
	background-color: #efefef;

    border-bottom: 1px solid #CDCDCD;
    height: 36px;
}
.widget-title .nav-tabs {
    border-bottom: 0 none;
}
.widget-title .nav-tabs li a {
    border-bottom: medium none !important;
    border-left: 1px solid #DDDDDD;
    border-radius: 0 0 0 0;
    border-right: 1px solid #DDDDDD;
    border-top: medium none;
    color: #999999;
    margin: 0;
    outline: medium none;
    padding: 9px 10px 8px;
    font-weight: bold;
    text-shadow: 0 1px 0 #FFFFFF;
}
.widget-title .nav-tabs li:first-child a{
    border-left: medium none !important;
}
.widget-title .nav-tabs li a:hover {
    background-color: transparent !important;
    border-color: #D6D6D6;
    border-width: 0 1px;
    color: #666666;
}
.widget-title .nav-tabs li.active a {
    background-color: #F9F9F9 !important;
    color: #444444;
}
.widget-title span.icon {
	border-right: 1px solid #cdcdcd;
	padding: 9px 10px 7px 11px;
	float: left;
	opacity: .7;
}
.widget-title h5 {
    color: #666666;
	text-shadow: 0 1px 0 #ffffff;
    float: left;
    font-size: 12px;
    font-weight: bold;
    padding: 12px;
    line-height: 12px;
    margin: 0;
}
.widget-title .buttons {
	float: right;
	margin: 8px 10px 0 0;
}
.widget-title .label {
	padding: 3px 5px 2px;
	float: right;
	margin: 9px 11px 0 0;
	box-shadow: 0 1px 2px rgba(0,0,0,0.3) inset, 0 1px 0 #ffffff;
}
.widget-calendar .widget-title .label {
	margin-right: 190px;
}

.widget-content {
	padding: 12px 15px;
    border-bottom: 1px solid #cdcdcd;
}
.widget-box.widget-plain .widget-content {
	padding: 12px 0 0;
}
.widget-box.collapsible .collapse.in .widget-content {
    border-bottom: 1px solid #CDCDCD;
}
.recent-posts, .recent-comments, .recent-users {
	margin: 0;
	padding: 0;
}
.recent-posts li, .recent-comments li, .article-post li, .recent-users li {
    border-bottom: 1px dotted #AEBDC8;
    list-style: none outside none;
    padding: 10px;
}
.recent-posts li.viewall, .recent-comments li.viewall, .recent-users li.viewall {
	padding: 0;
}
.recent-posts li.viewall a, .recent-comments li.viewall a, .recent-users li.viewall a {
	padding: 5px;
	text-align: center;
	display: block;
	color: #888888;
}
.recent-posts li.viewall a:hover, .recent-comments li.viewall a:hover, .recent-users li.viewall a:hover {
	background-color: #eeeeee;
}

.recent-posts li:last-child, .recent-comments li:last-child, .recent-users li:last-child {
    border-bottom: none !important;
}

.user-thumb {
    background: none repeat scroll 0 0 #FFFFFF;
    border: 1px solid #B6BCBF;
    float: left;
    height: 40px;
    margin-right: 10px;
    margin-top: 5px;
    padding: 2px;
    width: 40px;
}
.user-info {
    color: #666666;
    font-size: 11px;
}

.site-stats {
	margin: 0;
	padding: 0;
	list-style: none;
}
.site-stats li {
    background-color: #F5F5F5;
    border: 1px solid #DDDDDD;
    cursor: pointer;
    margin: 0 0 10px;
    padding: 13px 20px 10px;
    position: relative;
}
.site-stats li:hover {
    background-color: #EDEDED;
}
.site-stats li.divider {
	padding: 0;
	border-width: 1px 0 0;
	border-color: #DDDDDD;
	border-style: dashed;
}
.site-stats li i {
	vertical-align: baseline;
}
.site-stats li strong {
	font-weight: bold;
	font-size: 20px;
	margin-left: 5px;
}
.site-stats li small {
	margin-left: 5px;
	font-size: 12px;
	color: #888888;
	font-style: italic;
}

.invoice-content {
	padding: 20px;
}
.invoice-action {
    margin-bottom: 30px;
}
.invoice-head {
    clear: both;
    margin-bottom: 40px;
    overflow: hidden;
    width: auto;
}
.invoice-meta {
    font-size: 18px;
    margin-bottom: 40px;
}
.invoice-date {
    float: right;
    font-size: 80%;
}
.invoice-content h5 {
    color: #333333;
    font-size: 16px;
    font-weight: normal;
    margin-bottom: 10px;
}
.invoice-content ul {
	list-style: none;
	margin: 0;
	padding: 0;
}
.invoice-to {
    float: left;
    width: 370px;
}
.invoice-from {
    float: right;
    width: 300px;
}
.invoice-to li, .invoice-from li {
    clear: left;
}
.invoice-to li span, .invoice-from li span {
    display: block;
}
.invoice-content th.total-label {
	text-align: right;
}
.invoice-content th.total-amount {
	text-align: left;
}
.amount-word {
    color: #666666;
    margin-bottom: 40px;
    margin-top: 40px;
}
.amount-word span {
    color: #5476A6;
    font-weight: bold;
    padding-left: 20px;
}
.panel-left {
	margin-top:103px;
}
.panel-left2 {
	margin-left:176px;
}
.panel-right {
	width: 100%;
	background-color: #fff;
	border-bottom: 1px solid #dddddd;
	position: absolute;
	right: 0; overflow:auto;
	top:38px;
	height:76px;
}
.panel-right2 {
	width: 100%;
	background-color: #fff;
	border-right: 1px solid #dddddd;
	position: absolute;
	left: 0; overflow:auto;
	top:38px;
	height:87%; width:175px;
}

.panel-right .panel-title, .panel-right2 .panel-title  {
	width: 100%;
	background-color: #ececec;
	border-bottom: 1px solid #dddddd;
}
.panel-right .panel-title h5 ,.panel-right2 .panel-title h5{
	font-size: 12px;
	color: #777777;
	text-shadow: 0 1px 0 #ffffff;
	padding: 6px 10px 5px;
    margin: 0;
}
.panel-right .panel-content {
	padding: 10px;
}
.chat-content {
	height: 470px;
	padding: 15px;
}
.chat-messages {
    height: 420px;
    overflow: auto;
    position: relative;
}
.chat-message {
	padding: 7px 15px;
	margin: 7px 0 0;
}
.chat-message input[type=text] {
	margin-bottom: 0 !important;
	width: 100%;
}
.chat-message .input-box {
    display: block;
    margin-right: 90px;
}
.chat-message button {
	float: right;
}
#chat-messages-inner p {
    padding:0px;
    margin: 10px 0 0 0;
}
#chat-messages-inner p img {
    display: inline-block;
    float: left;
    vertical-align: middle;
    width: 28px;
    height: 28px;
    margin-top:-1px;
	margin-right:10px;
}
#chat-messages-inner .msg-block, #chat-messages-inner p.offline span {
    background: none repeat scroll 0 0 #FFFFFF;
    border: 1px solid #cccccc;
    box-shadow: 1px 1px 0 1px rgba(0, 0, 0, 0.05);
    display: block;
    margin-left:0px;
    padding: 10px;
    position: relative;
}
#chat-messages-inner p.offline span {
    background: none repeat scroll  0 0 #FFF5F5;
}
#chat-messages-inner .time {
    color: #999999;
    font-size: 11px;
	float:right;
}
#chat-messages-inner .msg {
    display: block;
    margin-top: 13px; border-top:1px solid #dadada;
}
#chat-messages-inner .msg-block:before {
	border-right: 7px solid rgba(0,0,0,0.1);
	border-top: 7px solid transparent;
	border-bottom: 7px solid transparent;
	content: "";
	display:none;
	left: -7px;
	position: absolute;
	top: 11px;
}
#chat-messages-inner .msg-block:after {
	border-right: 6px solid #ffffff;
	border-top: 6px solid transparent;
	border-bottom: 6px solid transparent;
	content: "";
	display: none;
	left: -6px;
	position: absolute;
	top: 12px;
}
.chat-users {
	padding: 0 0 30px;
}
.chat-users .contact-list {
    line-height: 21px;
    list-style: none outside none;
    margin: 0;
    padding: 0;
    font-size: 10px;
}
.chat-users .contact-list li {
    border: 1px solid #DADADA;
    margin:5px 5px;
    padding: 1px;
    position: relative;
}
.chat-users .contact-list li:hover {
	background-color: #efefef;
}
.chat-users .contact-list li a {
    color: #666666;
    display: block;
    padding: 8px 5px;
}
.chat-users .contact-list li.online a {
	font-weight: bold;
}
.chat-users .contact-list li.new {
	background-color: #eaeaea;
}
.chat-users .contact-list li.offline {
	background-color: #EDE0E0;
}
.chat-users .contact-list li a img {
    display: inline-block;
    margin-right: 10px;
    vertical-align: middle;
    width: 28px;
    height: 28px;
    border-radius: 3px;
}
.chat-users .contact-list li .msg-count {
	padding: 3px 5px;
    position: absolute;
    right: 10px;
    top: 12px;
}
.taskDesc i {
    margin: 1px 5px 0;
}
.taskStatus, .taskOptions {
    text-align: center !important;
}
.taskStatus .in-progress {
    color: #64909E;
}
.taskStatus .pending {
    color: #AC6363;
}
.taskStatus .done {
    color: #75B468;
}
.activity-list {
    list-style: none outside none;
    margin: 0;
}
.activity-list li {
    border-bottom: 1px solid #EEEEEE;
    display: block;
}
.activity-list li:last-child {
    border-bottom: medium none;
}
.activity-list li a {
    color: #888888;
    display: block;
    padding: 7px 10px;
}
.activity-list li a:hover {
    background-color: #FBFBFB;
}
.activity-list li a span {
    color: #AAAAAA;
    font-size: 11px;
    font-style: italic;
}
.activity-list li a i {
    margin-right: 10px;
    opacity: 0.6;
    vertical-align: middle;
}
.new-update {
    border-top: 1px solid #DDDDDD;
    padding: 10px 12px;
}
.new-update:first-child {
    border-top: medium none;
}
.new-update span {
	display:block;
}
.new-update i{
	float: left;
	margin-top: 3px;
	margin-right: 13px;
}
.new-update .update-date {
    color: #BBBBBB;
    float: right;
    margin: 4px -2px 0 0;
    text-align: center;
    width: 30px;
}
.new-update .update-date .update-day {
    display: block;
    font-size: 20px;
    font-weight: bold;
    margin-bottom: -4px;
}
.update-done, .update-alert, .update-notice {
    display: block;
    float: left;
    max-width: 76%;
}

/* Tables */

span.icon .checker {
	margin-top: -5px;
	margin-right: 0;
}

.dataTables_length {
    color: #878787;
    margin: 7px 5px 0;
    position: absolute;
    right: 2px;
    top: -2px;
}
.dataTables_length div {
	vertical-align: middle;
}

.dataTables_paginate {
    line-height: 16px;
    text-align: right;
    margin-top: 5px;
    margin-right: 10px;
}
.dataTables_paginate .ui-button,  .pagination.alternate li a {
    font-size: 12px;
    padding: 4px 10px !important;
    border-style: solid;
    border-width: 1px;
    border-color: #dddddd #dddddd #cccccc; /* for IE < 9 */
    border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
    display: inline-block;
    line-height: 16px;
    background: #f5f5f5;

    color: #333333;
    text-shadow: 0 1px 0 #ffffff;
}
.dataTables_paginate .ui-button:hover, .pagination.alternate li a:hover{
    background: #e8e8e8;

    color: #222222;
    text-shadow: 0 1px 0 #ffffff;
    cursor: pointer;
}

.dataTables_paginate .first{
    border-radius: 4px 0 0 4px;
}
.dataTables_paginate .last {
    border-radius: 0 4px 4px 0;
}
.dataTables_paginate .ui-state-disabled, .fc-state-disabled, .pagination.alternate li.disabled a {
    color: #AAAAAA !important;
}
.dataTables_paginate .ui-state-disabled:hover, .fc-state-disabled:hover, .pagination.alternate li.disabled a:hover {
    background: #f5f5f5;

    cursor: default !important;
}
.dataTables_paginate span .ui-state-disabled, .pagination.alternate li.active a {
    background:#F77825;
    color: #ffffff !important;
    cursor: default !important;
}
div.dataTables_wrapper .ui-widget-header {
    border-right: medium none;
    border-top: 1px solid #D5D5D5;
    font-weight: normal;
    margin-top: -1px;
}
.dataTables_wrapper .ui-toolbar {
    padding: 5px;
}
.dataTables_filter {
    color: #878787;
    font-size: 11px;
    left: 0;
    margin: 4px 8px 2px 10px;
    position: absolute;
    text-align: left;
}
.dataTables_filter input {
	margin-bottom: 0;
}

.table th {
	height: auto;
	font-size: 10px;
	padding: 5px 10px 2px;
	border-bottom: 0;
	text-align: center;
	color: #666666;
}
.table.with-check tr th:first-child, .table.with-check tr td:first-child {
	width: 10px;
}
.table.with-check tr th:first-child i{
	margin-top: -2px;
	opacity: 0.6;
}
.table.with-check tr td:first-child .checker {
	margin-right: 0;
}
.table tr.checked td {
	background-color: #FFFFE3 !important;
}
/* Misc */
.nopadding {
	padding: 0 !important;
}
.nopadding .table {
	margin-bottom: 0;
}
.nopadding .table-bordered {
	border: 0;
}
.thumbnails {
	margin-left: -2.12766% !important;
}
.thumbnails [class*="span"] {
    margin-left: 2.12766% !important;
    position: relative;
}
.thumbnails .actions {
	width: 32px;
	height: 16px;
	background-color: #000000;
	padding: 4px 8px;
	position: absolute;
	bottom:0%;
	left:50%;
	margin-top: -13px;
	margin-left: -24px;
	opacity: 0;
	-moz-transition: opacity 0.3s ease-in-out;
}
.thumbnails li:hover .actions {
	opacity: 1;
}
.line {
    background: url("../img/line.png") repeat-x scroll 0 0 transparent;
    display: block;
    height: 8px;
}
.modal {
	z-index: 99999 !important;
}
.modal-backdrop {
	z-index: 999 !important;
}
.modal-header {
	height: auto;
	padding: 8px 15px 5px;
}
.modal-header h3 {
	font-size: 12px;
	text-shadow: 0 1px 0 #ffffff;
}

.notify-ui ul {
	list-style: none;
	margin: 0;
	padding: 0;
}
.notify-ui li {
	background-image: -moz-linear-gradient(top, #eeeeee,#dddddd);
	margin-bottom: 5px;
	padding: 5px 10px;
	text-align: center;
	border: 1px solid #dddddd;
}
.notify-ui li:hover {
	cursor: pointer;
	color: #777777;
}

/* Forms */
form {
	margin-bottom: 0;
}
.form-horizontal .control-group {
	border-top: 1px solid #ffffff;
	border-bottom: 1px solid #eeeeee;
	margin-bottom: 0;
}
.form-horizontal .control-group:last-child {
	border-bottom: 0;
}
.form-horizontal .control-label {
	padding-top: 15px;
	width: 180px;
}
.form-horizontal .controls {
	margin-left: 200px;
	padding: 10px 0;
}
.form-horizontal input[type=text], .form-horizontal input[type=password], .form-horizontal textarea {

}
.row-fluid .span20{ width:97.8%}
.form-horizontal .form-actions {
	margin-top: 0;
	margin-bottom: 0;
}
.help-block, .help-inline {
    color: #999999;
}
/***********light-box***************/
#lightbox {	position:fixed; /* keeps the lightbox window in the current viewport */	top:0; 	left:0; width:100%; height:100%; background:url(overlay.png) repeat #000; text-align:center;}
#lightbox p{ position:absolute; top:10px; right:10px; width:22px; height:22px; cursor:pointer; z-index:22; border:1px solid #fff; border-radius:100%; padding:2px; text-align:center; transition:0.5s;}
#lightbox p:hover{ transform:rotate(180deg)}
#imgbox{ position:absolute; /* keeps the lightbox window in the current viewport */	left:0;	top:0px; width:100%; height:100%; background:url(overlay.png) repeat #000; 	text-align:center; z-index:21; }
#imgbox img{ margin-top:100px; border:10px solid #fff;}
/***********light-box-end***************/

.btn-icon-pg ul{ margin:0px; padding:0px;}
.btn-icon-pg ul li{ margin:5px; padding:5px; list-style:none; display:inline-block; border:1px solid #dadada; min-width:157px; cursor:pointer }
.btn-icon-pg ul li:hover i{ transition:0.3s; -moz-transition:0.3s; -webkit-transition:0.3s; -o-transition:0.3s; transform:rotate(360deg); margin-left:8px; }
/* Responsive design */
@media (max-width: 480px) {
	#header h1 {
		top: auto;
		left: auto;
		margin: 3px auto;
	}
	#user-nav {
		position: relative;
		left: auto;
		right: auto;
		width: 100%;
		margin-top: -36px; border-top:1px solid #3D3A37;
		margin-bottom: 0px; background:#2b2b2b; float:right;
	}
	.navbar > .nav {
		float: none;
	}

	#my_menu{ display:none;}
	#my_menu_input{ display:block;}
	.stat-boxes2{ background:none; width:100%;  margin:-30px 0 20px 0; padding:0px; position:relative; top:13px; right:10px;}
	#user-nav > ul {
		right: 0px; margin-left:15%!important;
		margin-top:0px; width:100%; background:#000;
		position: relative;
	}
	#user-nav > ul > li{ padding:0px 0px;}
	#user-nav > ul > li > a{ padding:5px 10px;}
	#content {
		margin-left: 0 !important;
		border-top-left-radius: 0;
		margin-top:0px;
	}
	#content-header {
		margin-top: 0;

		text-align: center;
	}
	#content-header h1, #content-header .btn-group {
		float: none;
	}
	#content-header h1 {
		display: block;
		text-align: center;
		margin-left: auto;
		margin-top: 0;
		padding-top: 15px;
		width: 100%;
	}
	#content-header .btn-group {
		margin-top: 70px;
		margin-bottom: 0;
		margin-right: 0;
		left: 30%;
	}

#sidebar { float: none; width: 100% !important;	display:block; position:relative; top:0px;}
#sidebar > ul{ margin:0px; padding:0px; width:100%; display:block; z-index:999; position:relative}
#sidebar > ul > li { list-style-type:none; display:block; border-bottom:1px solid #333; border-top:1px solid #5d5d5d; float:none !important; margin:0px; border-left:1px dotted #6b6b6b; position:relative; padding:10px; cursor:pointer}
#sidebar > ul > li:hover ul { display:none;}
#sidebar > ul > li:hover { background-color:#2b2b2b;}
#sidebar > ul > li:hover a{ background:none;}
#sidebar > ul li ul { margin:0px; padding:0px; z-index:999; display:none; position:absolute;  background:#2b2b2b; width:100%; min-width:100%; border-radius:none;  box-shadow: 0 0 3px rgba(0,0,0,0.5) inset;}
#sidebar > ul li ul li { list-style-type:none; margin:0px; font-size:12px; line-height:30px;  }
#sidebar > ul li ul li a { display:block; padding:5px 10px; color:#fff; text-decoration:none; font-weight:bold; }
#sidebar > ul li ul li:hover a{ background-color:#606060; border-radius:0px;}
#sidebar > ul li span { cursor:pointer; margin:0px 2px 0 5px; font-weight:bold; color:#fff; font-size:12px; }
#sidebar > ul li a i{ background-image: url("../img/glyphicons-halflings-white.png");  margin-top:4px;  vertical-align: top;}
#sidebar > a { padding: 9px 20px 9px 15px; display: block !important; text-transform: uppercase; color: #eeeeee; float:none !important;	font-size:12px;	}
#sidebar > ul > li > a { padding:5px;	display:block; 	color: #AAAAAA;}
.widget-title .buttons > .btn {
		width: 11px;
		white-space: nowrap;
		overflow: hidden;
	}
    .form-horizontal .control-label {
        padding-left: 30px;
    }
    .form-horizontal .controls {
        margin-left: 0;
        padding: 10px 30px;
    }
    .form-actions {
        text-align: center;
    }
	.panel-right2 {
	width: 100%;
	background-color: #fff;
	border-right: 1px solid #dddddd;
	position: relative;
	left: 0; overflow:auto;
	top:0px;
	height:87%; width:100%;
}
.panel-left2{ margin-left:0px;}
.dataTables_paginate .ui-button,  .pagination.alternate li a { padding:4px 4px!important;}
.table th {	padding: 5px 4px 2px;}
}

@media (min-width: 481px) and (max-width: 970px) {
	#header h1 {
		top: 3px;
	}
	#search{ top:3px}
	#my_menu{ display:none;}
	#my_menu_input{ display:block;}
	#content{ margin-top:41px;}
	.stat-boxes2{ background:none; width:100%;  padding:60px 0 20px 0; margin:0 auto; position:relative; top:13px; right:10px;}
	#sidebar > ul > li{ float:none;}
	#sidebar > ul > li:hover ul{ display:block;}
	#sidebar, #sidebar > ul {
		width: 43px; display: block; position: absolute;
	}
	#sidebar > ul ul {
		display: none;
		position: absolute;
		left:50px;
		top: 0;
		min-width: 150px;
		box-shadow: 0 1px 5px rgba(0,0,0,0.7);
		border-radius: 5px;
		list-style: none;
	}
	#sidebar > ul ul li a {
		white-space: nowrap;
		padding: 10px 25px;
	}
	#sidebar > ul ul:before {
		border-top: 7px solid transparent;
		border-bottom: 7px solid transparent;
		content: "";
		display: inline-block;
		left: -6px;
		position: absolute;
		top: 11px;
	}
	#sidebar > ul ul:after {
		border-top: 6px solid transparent;
		border-bottom: 6px solid transparent;
		content: "";
		display: inline-block;
		left: -5px;
		position: absolute;
		top: 12px;
    }
	#sidebar > a {
		display: none !important;
	}
	#sidebar > ul > li.open.submenu > a {
    border-bottom: none !important;
	}
	#sidebar > ul > li > a > span {
		display: none;
	}
	#content {
		margin-left: 43px;
	}
}
@media (max-width: 600px) {
	.widget-title .buttons {
		float: left;
	}
	.panel-left {
		margin-right: 0;
	}
	.panel-right {
		border-top: 1px solid #DDDDDD;
		border-left: none;
		position: relative;
		top: auto;
		right: auto;
		height: auto;
		width: auto;
	}

}
@media (max-width: 767px) {
	body {
		padding: 0 !important;
	}
	.container-fluid {
		padding-left: 20px;
		padding-right: 20px;
	}
	#search { display: none; }
	#user-nav > ul > li > a > span.text {
		display: none;
	}
}
@media (min-width: 768px) and (max-width: 979px) {
	[class*="span"], .row-fluid [class*="span"] {
		display: block;
		float: none;
		margin-left: 0;
		width: auto;
	}
}
@media (max-width: 979px) {
	div.dataTables_wrapper .ui-widget-header {
		height: 68px;
	}
	.dataTables_filter {
		position: relative;
	}
	.dataTables_filter, .dataTables_paginate {
		text-align: center;
	}
}

redpajama_set_name: RedPajamaGithub


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Lime.Protocol;
using Lime.Protocol.Listeners;
using Lime.Protocol.Network;
using Lime.Protocol.Server;
using Lime.Transport.AspNetCore.Listeners;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;

namespace Lime.Transport.AspNetCore.Transport
{
    internal sealed class TransportListener
    {
        private readonly IOptions<LimeOptions> _options;
        private readonly IServiceScopeFactory _serviceScopeFactory;
        private readonly IChannelProvider _channelProvider;
        private readonly ILogger<TransportListener> _logger;

        public TransportListener(
            IOptions<LimeOptions> options,
            IServiceScopeFactory serviceScopeFactory,
            IChannelProvider channelProvider,
            ILogger<TransportListener> logger)
        {
            _options = options;
            _serviceScopeFactory = serviceScopeFactory;
            _channelProvider = channelProvider;
            _logger = logger;
        }

        public async Task ListenAsync(ITransport transport, CancellationToken cancellationToken)
        {
            using var channel = CreateChannel(transport);
            await EstablishChannelAsync(channel, cancellationToken);

            if (channel.State == SessionState.Established)
            {
                await ListenChannelAsync(channel, cancellationToken);
            }

            await CloseChannelAsync(channel);
        }

        private ServerChannel CreateChannel(ITransport transport) =>
            new ServerChannel(
                EnvelopeId.NewId(),
                _options.Value.LocalNode,
                transport,
                _options.Value.SendTimeout,
                _options.Value.EnvelopeBufferSize,
                _options.Value.FillEnvelopeRecipients,
                _options.Value.AutoReplyPings,
                _options.Value.RemotePingInterval,
                _options.Value.RemoteIdleTimeout,
                _options.Value.ConsumeTimeout,
                _options.Value.CloseTimeout);

        private async Task EstablishChannelAsync(ServerChannel channel, CancellationToken cancellationToken)
        {
            var compressionOptions = channel
                .Transport
                .GetSupportedCompression()
                .Intersect(_options.Value.EnabledCompressionOptions)
                .ToArray();

            var encryptionOptions = channel
                .Transport
                .GetSupportedEncryption()
                .Intersect(_options.Value.EnabledEncryptionOptions)
                .ToArray();

            await channel.EstablishSessionAsync(
                compressionOptions,
                encryptionOptions,
                _options.Value.SchemeOptions,
                (identity, authentication, c) => _options.Value.AuthenticationHandler(identity, authentication, c),
                (node, serverChannel, c) => _options.Value.RegistrationHandler(node, serverChannel, c),
                cancellationToken);
        }

        private ChannelListener CreateChannelListener(SenderChannelAdapter senderChannel) =>
            new ChannelListener(
                (m, ct) => OnMessageAsync(m, senderChannel, ct),
                (n, ct) => OnNotificationAsync(n, senderChannel, ct),
                (c, ct) => OnCommandAsync(c, senderChannel, ct));

        public async Task<bool> OnCommandAsync(Command command, ISenderChannel channel, CancellationToken cancellationToken)
        {
            using var _ = _logger.BeginScope(
                new Dictionary<string, string>
                {
                    {"Command.Id", command.Id},
                    {"Command.From", command.From},
                    {"Command.To", command.To},
                    {"Command.Method", command.Method.ToString()},
                    {"Command.Uri", command.Uri},
                    {"Command.Type", command.Type},
                });

            await InvokeListenersAsync<ICommandListener, Command>(
                command,
                channel,
                cancellationToken);

            return true;
        }

        public async Task<bool> OnNotificationAsync(Notification notification, ISenderChannel channel, CancellationToken cancellationToken)
        {
            using var _ = _logger.BeginScope(
                new Dictionary<string, string>
                {
                    {"id", notification.Id},
                    {"from", notification.From},
                    {"to", notification.To},
                    {"event", notification.Event.ToString()},
                });

            await InvokeListenersAsync<INotificationListener, Notification>(
                notification,
                channel,
                cancellationToken);

            return true;
        }

        public async Task<bool> OnMessageAsync(Message message, ISenderChannel channel, CancellationToken cancellationToken)
        {
            using var _ = _logger.BeginScope(
                new Dictionary<string, string>
                {
                    {"id", message.Id},
                    {"from", message.From},
                    {"to", message.To},
                    {"type", message.Type},
                });

            await InvokeListenersAsync<IMessageListener, Message>(
                message,
                channel,
                cancellationToken);

            return true;
        }

        private async Task<int> InvokeListenersAsync<TListener, TEnvelope>(
            TEnvelope envelope,
            ISenderChannel channel,
            CancellationToken cancellationToken)
            where TEnvelope : Envelope, new()
            where TListener : IEnvelopeListener<TEnvelope>
        {
            using var scope = _serviceScopeFactory.CreateScope();

            var channelContext = new ChannelContext(channel, _channelProvider);
            var contextProvider = scope.ServiceProvider.GetRequiredService<ChannelContextProvider>();
            contextProvider.SetContext(channelContext);

            try
            {
                var listeners = scope
                    .ServiceProvider
                    .GetServices<TListener>()
                    ?.Where(l => l.Filter(envelope))
                    .ToArray();

                if (listeners != null && listeners.Length > 0)
                {
                    await Task.WhenAll(
                        listeners
                            .Select(l =>
                                Task.Run(() => l.OnEnvelopeAsync(envelope, cancellationToken), cancellationToken)));

                    return listeners.Length;
                }
            }
            catch (Exception ex)
            {
                _logger.LogError(ex, "{EnvelopeType} processing failed", typeof(TEnvelope).Name);
            }

            return 0;
        }

        private async Task ListenChannelAsync(IServerChannel channel, CancellationToken cancellationToken)
        {
            var node = channel.RemoteNode;
            var senderChannel = new SenderChannelAdapter(channel);
            _channelProvider.AddChannel(node, senderChannel);

            using var listener = CreateChannelListener(senderChannel);

            var sessionTask = channel.ReceiveFinishingSessionAsync(cancellationToken);

            listener.Start(channel);

            try
            {
                await Task.WhenAny(
                    sessionTask,
                    listener.CommandListenerTask,
                    listener.MessageListenerTask,
                    listener.NotificationListenerTask);
            }
            finally
            {
                listener.Stop();
                _channelProvider.RemoveChannel(node);

                await _options.Value.UnregistrationHandler(
                    node, channel, cancellationToken.IsCancellationRequested ? default : cancellationToken);
            }

            if (sessionTask.IsCompleted &&
                channel.Transport.IsConnected)
            {
                using var cts = new CancellationTokenSource(_options.Value.CloseTimeout);
                await channel.SendFinishedSessionAsync(cts.Token);
            }
        }

        private async Task CloseChannelAsync(IServerChannel channel)
        {
            if (channel.State != SessionState.Finished &&
                channel.State != SessionState.Failed &&
                channel.Transport.IsConnected)
            {
                using var cts = new CancellationTokenSource(_options.Value.CloseTimeout);
                await channel.SendFailedSessionAsync(
                    new Reason()
                    {
                        Code = ReasonCodes.SESSION_ERROR,
                        Description = "The session was finished by the server"
                    },
                    cts.Token);
            }
        }
    }
}


text:
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

#nullable disable

using Microsoft.CodeAnalysis.Text;
using Xunit;

namespace Microsoft.CodeAnalysis.UnitTests
{
    /// <summary>
    /// This is a test class for TextSpan and is intended
    /// to contain all TextSpan Unit Tests
    /// </summary>
    public class TextSpanTest
    {
        [Fact]
        public void Ctor1()
        {
            var span = new TextSpan(0, 42);
            Assert.Equal(0, span.Start);
            Assert.Equal(42, span.Length);
            Assert.Equal(42, span.End);
        }

        [Fact]
        public void Ctor2()
        {
            var span = new TextSpan(1, 40);
            Assert.Equal(1, span.Start);
            Assert.Equal(40, span.Length);
            Assert.Equal(41, span.End);
        }

        /// <summary>
        /// 0 length spans are valid
        /// </summary>
        [Fact]
        public void Ctor3()
        {
            var span = new TextSpan(0, 0);
            Assert.Equal(0, span.Start);
            Assert.Equal(0, span.Length);
        }

        [Fact]
        public void Equals1()
        {
            var s1 = new TextSpan(1, 40);
            var s2 = new TextSpan(1, 40);
            Assert.True(s1.Equals(s2), s1.ToString() + " : " + s2.ToString());
            Assert.True(s1 == s2, s1.ToString() + " : " + s2.ToString());
            Assert.False(s1 != s2, s1.ToString() + " : " + s2.ToString());
            Assert.Equal(s1, s2);
        }

        /// <summary>
        /// Different start values
        /// </summary>
        [Fact]
        public void Equals2()
        {
            var s1 = new TextSpan(1, 40);
            var s2 = new TextSpan(2, 40);
            Assert.False(s1.Equals(s2), s1.ToString() + " : " + s2.ToString());
            Assert.False(s1 == s2, s1.ToString() + " : " + s2.ToString());
            Assert.True(s1 != s2, s1.ToString() + " : " + s2.ToString());
            Assert.NotEqual(s1, s2);
        }

        /// <summary>
        /// Different length values
        /// </summary>
        [Fact]
        public void Equals3()
        {
            var s1 = new TextSpan(1, 5);
            var s2 = new TextSpan(1, 40);
            Assert.False(s1.Equals(s2), s1.ToString() + " : " + s2.ToString());
            Assert.False(s1 == s2, s1.ToString() + " : " + s2.ToString());
            Assert.True(s1 != s2, s1.ToString() + " : " + s2.ToString());
            Assert.NotEqual(s1, s2);
        }

        [Fact]
        public void TextSpan00()
        {
            TextSpan span = new TextSpan(0, 0);
            Assert.Equal(0, span.Start);
            Assert.Equal(0, span.End);
            Assert.Equal(0, span.Length);
            Assert.Equal("[0..0)", span.ToString());
            Assert.True(span.IsEmpty);
        }

        [Fact]
        public void TextSpan01()
        {
            TextSpan span = new TextSpan(0, 1);
            Assert.Equal(0, span.Start);
            Assert.Equal(1, span.End);
            Assert.Equal(1, span.Length);
            Assert.Equal("[0..1)", span.ToString());
            Assert.False(span.IsEmpty);
            span.GetHashCode();
        }

        [Fact]
        public void TextSpan02()
        {
            TextSpan span = new TextSpan(15, 1485);
            Assert.Equal(15, span.Start);
            Assert.Equal(1500, span.End);
            Assert.Equal(1485, span.Length);
            Assert.Equal("[15..1500)", span.ToString());
        }

        [Fact]
        public void TextSpan03()
        {
            TextSpan span = new TextSpan(0, int.MaxValue - 1);
            Assert.Equal(0, span.Start);
            Assert.Equal(span.End, int.MaxValue - 1);
            Assert.Equal(span.Length, int.MaxValue - 1);
        }

        [Fact]
        public void TextSpanContains00()
        {
            TextSpan span = new TextSpan(0, 10);
            Assert.True(span.Contains(3));
            Assert.False(span.Contains(30));
            Assert.False(span.Contains(11));
            Assert.False(span.Contains(-1));
        }

        [Fact]
        public void TextSpanContains01()
        {
            TextSpan span_05_15 = new TextSpan(5, 10);
            TextSpan span_03_10 = new TextSpan(3, 7);
            TextSpan span_10_11 = new TextSpan(10, 1);
            TextSpan span_00_03 = new TextSpan(0, 3);

            // non-overlapping
            Assert.False(span_05_15.Contains(span_00_03));
            Assert.False(span_00_03.Contains(span_05_15));

            // overlap with slop
            Assert.True(span_05_15.Contains(span_10_11));

            // same span
            Assert.True(span_05_15.Contains(span_05_15));

            // partial overlap
            Assert.False(span_05_15.Contains(span_03_10));
            Assert.False(span_03_10.Contains(span_05_15));
        }

        [Fact]
        public void TextSpanContainsEmpty()
        {
            // non-overlapping
            Assert.False(new TextSpan(2, 5).Contains(new TextSpan(0, 0)));
            Assert.False(new TextSpan(2, 5).Contains(new TextSpan(10, 0)));

            // contains
            Assert.True(new TextSpan(2, 5).Contains(new TextSpan(3, 0)));

            // same start
            Assert.True(new TextSpan(2, 5).Contains(new TextSpan(2, 0)));

            // same end
            Assert.True(new TextSpan(2, 5).Contains(new TextSpan(7, 0)));

            // same start and end
            Assert.True(new TextSpan(2, 0).Contains(new TextSpan(2, 0)));
        }

        [Fact]
        public void TextSpanEmptyContains()
        {
            // non-overlapping
            Assert.False(new TextSpan(0, 0).Contains(new TextSpan(2, 5)));
            Assert.False(new TextSpan(10, 0).Contains(new TextSpan(2, 5)));

            // contains
            Assert.False(new TextSpan(3, 0).Contains(new TextSpan(2, 5)));

            // same start
            Assert.False(new TextSpan(2, 0).Contains(new TextSpan(2, 5)));

            // same end
            Assert.False(new TextSpan(7, 0).Contains(new TextSpan(2, 5)));
        }

        [Fact]
        public void TextSpanEquality00()
        {
            TextSpan span1 = new TextSpan(0, 10);
            TextSpan span2 = new TextSpan(0, 10);

            Assert.True(span1.Equals(span2));
            Assert.NotEqual(default, span1);
            Assert.True(span1 == span2, span1.ToString() + " : " + span2.ToString());
            Assert.False(span1 != span2, span1.ToString() + " : " + span2.ToString());

            Assert.True(span2.Equals(span1));
            Assert.NotEqual(default, span2);
            Assert.True(span2 == span1, span2.ToString() + " : " + span1.ToString());
            Assert.False(span2 != span1, span2.ToString() + " : " + span1.ToString());
        }

        [Fact]
        public void TextSpanEquality01()
        {
            TextSpan span1 = new TextSpan(0, 10);
            TextSpan span2 = new TextSpan(0, 11);
            TextSpan span3 = new TextSpan(1, 11);

            Assert.False(span1.Equals(span2));
            Assert.False(span1.Equals(span3));
            Assert.False(span2.Equals(span3));
            Assert.True(span1 != span2, span1.ToString() + " : " + span2.ToString());
            Assert.True(span1 != span3, span1.ToString() + " : " + span3.ToString());
            Assert.True(span2 != span3, span2.ToString() + " : " + span3.ToString());
            Assert.False(span1 == span2, span1.ToString() + " : " + span2.ToString());

            Assert.NotEqual<object>(new string('a', 3), span1);
        }

        [Fact]
        public void TextSpanOverlap00()
        {
            TextSpan span1 = new TextSpan(10, 10); // 10..20
            TextSpan span2 = new TextSpan(5, 5); // 5..10

            Assert.False(span1.OverlapsWith(span2));
            Assert.False(span2.OverlapsWith(span1));
            Assert.Null(span1.Overlap(span2));
            Assert.Null(span2.Overlap(span1));
        }

        [Fact]
        public void TextSpanOverlap01()
        {
            TextSpan span1 = new TextSpan(10, 10); // 10..20
            TextSpan span2 = new TextSpan(5, 2); // 5..7

            Assert.False(span1.OverlapsWith(span2));
            Assert.False(span2.OverlapsWith(span1));
            Assert.Null(span1.Overlap(span2));
            Assert.Null(span2.Overlap(span1));
        }

        [Fact]
        public void TextSpanOverlap02()
        {
            TextSpan span1 = new TextSpan(10, 10); // 10..20
            TextSpan span2 = new TextSpan(5, 10); // 5..15

            Assert.True(span1.OverlapsWith(span2));
            Assert.True(span2.OverlapsWith(span1));
            Assert.Equal(span1.Overlap(span2), new TextSpan(10, 5));
            Assert.Equal(span2.Overlap(span1), new TextSpan(10, 5));
        }

        [Fact]
        public void TextSpanOverlap03()
        {
            TextSpan span1 = new TextSpan(10, 0); // [10, 10)
            TextSpan span2 = new TextSpan(10, 0); // [10, 10)

            Assert.False(span1.OverlapsWith(span2));
            Assert.False(span2.OverlapsWith(span1));
            Assert.Null(span1.Overlap(span2));
            Assert.Null(span2.Overlap(span1));
        }

        [Fact]
        public void TextSpanOverlap04()
        {
            TextSpan span1 = new TextSpan(10, 0);   // [10, 10)
            TextSpan span2 = new TextSpan(5, 10);   // [5, 15)

            Assert.False(span1.OverlapsWith(span2));
            Assert.False(span2.OverlapsWith(span1));
            Assert.Null(span1.Overlap(span2));
            Assert.Null(span2.Overlap(span1));
        }

        [Fact]
        public void TextSpanIntersection00()
        {
            TextSpan span1 = new TextSpan(10, 10); // 10..20
            TextSpan span2 = new TextSpan(5, 5); // 5..10

            Assert.True(span1.IntersectsWith(span2));
            Assert.True(span2.IntersectsWith(span1));
            Assert.Equal(span1.Intersection(span2), new TextSpan(10, 0));
            Assert.Equal(span2.Intersection(span1), new TextSpan(10, 0));
        }

        [Fact]
        public void TextSpanIntersection01()
        {
            TextSpan span1 = new TextSpan(10, 10); // 10..20
            TextSpan span2 = new TextSpan(5, 2); // 5..7

            Assert.False(span1.IntersectsWith(span2));
            Assert.False(span2.IntersectsWith(span1));
            Assert.Null(span1.Intersection(span2));
            Assert.Null(span2.Intersection(span1));
        }

        [Fact]
        public void TextSpanIntersection02()
        {
            TextSpan span1 = new TextSpan(10, 10); // 10..20
            TextSpan span2 = new TextSpan(5, 10); // 5..15

            Assert.True(span1.IntersectsWith(span2));
            Assert.True(span2.IntersectsWith(span1));
            Assert.Equal(span1.Intersection(span2), new TextSpan(10, 5));
            Assert.Equal(span2.Intersection(span1), new TextSpan(10, 5));
        }

        [Fact]
        public void TextSpanIntersection03()
        {
            TextSpan span1 = new TextSpan(10, 0); // [10, 10)
            TextSpan span2 = new TextSpan(10, 0); // [10, 10)

            Assert.True(span1.IntersectsWith(span2));
            Assert.True(span2.IntersectsWith(span1));
            Assert.Equal(span1.Intersection(span2), new TextSpan(10, 0));
            Assert.Equal(span2.Intersection(span1), new TextSpan(10, 0));
        }

        [Fact]
        public void TextSpanIntersection04()
        {
            TextSpan span1 = new TextSpan(2, 5); // [2, 7)
            TextSpan span2 = new TextSpan(7, 5); // [7, 12)

            Assert.True(span1.IntersectsWith(span2));
            Assert.True(span2.IntersectsWith(span1));
            Assert.Equal(span1.Intersection(span2), new TextSpan(7, 0));
            Assert.Equal(span2.Intersection(span1), new TextSpan(7, 0));
        }

        [Fact]
        public void TextSpanIntersectionEmpty01()
        {
            TextSpan span1 = new TextSpan(2, 5); // [2, 7)
            TextSpan span2 = new TextSpan(3, 0); // [3, 3)

            Assert.True(span1.IntersectsWith(span2));
            Assert.True(span2.IntersectsWith(span1));
            Assert.Equal(span1.Intersection(span2), new TextSpan(3, 0));
            Assert.Equal(span2.Intersection(span1), new TextSpan(3, 0));
        }

        [Fact]
        public void TextSpanIntersectionEmpty02()
        {
            TextSpan span1 = new TextSpan(2, 5); // [2, 7)
            TextSpan span2 = new TextSpan(2, 0); // [2, 2)

            Assert.True(span1.IntersectsWith(span2));
            Assert.True(span2.IntersectsWith(span1));
            Assert.Equal(span1.Intersection(span2), new TextSpan(2, 0));
            Assert.Equal(span2.Intersection(span1), new TextSpan(2, 0));
        }

        [Fact]
        public void TextSpanIntersectionEmpty03()
        {
            TextSpan span1 = new TextSpan(2, 5); // [2, 7)
            TextSpan span2 = new TextSpan(7, 0); // [7, 0)

            Assert.True(span1.IntersectsWith(span2));
            Assert.True(span2.IntersectsWith(span1));
            Assert.Equal(span1.Intersection(span2), new TextSpan(7, 0));
            Assert.Equal(span2.Intersection(span1), new TextSpan(7, 0));
        }
    }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<Type Name="DescriptorSetLayoutCreateInfo" FullName="Vulkan.DescriptorSetLayoutCreateInfo">
  <TypeSignature Language="C#" Value="public class DescriptorSetLayoutCreateInfo : Vulkan.MarshalledObject" />
  <TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit DescriptorSetLayoutCreateInfo extends Vulkan.MarshalledObject" />
  <AssemblyInfo>
    <AssemblyName>Vulkan</AssemblyName>
    <AssemblyVersion>0.0.5950.20892</AssemblyVersion>
    <AssemblyVersion>0.0.6105.39043</AssemblyVersion>
    <AssemblyVersion>0.0.6106.39464</AssemblyVersion>
    <AssemblyVersion>0.0.6134.41045</AssemblyVersion>
    <AssemblyVersion>0.0.6142.19338</AssemblyVersion>
  </AssemblyInfo>
  <Base>
    <BaseTypeName>Vulkan.MarshalledObject</BaseTypeName>
  </Base>
  <Interfaces />
  <Docs>
    Structure specifying parameters of a newly created descriptor set layout
    <remarks></remarks>
  </Docs>
  <Members>
    <Member MemberName=".ctor">
      <MemberSignature Language="C#" Value="public DescriptorSetLayoutCreateInfo ();" />
      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
      <MemberType>Constructor</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>0.0.5950.20892</AssemblyVersion>
        <AssemblyVersion>0.0.6105.39043</AssemblyVersion>
        <AssemblyVersion>0.0.6106.39464</AssemblyVersion>
        <AssemblyVersion>0.0.6134.41045</AssemblyVersion>
        <AssemblyVersion>0.0.6142.19338</AssemblyVersion>
      </AssemblyInfo>
      <Parameters />
      <Docs>
        To be added.
        <remarks>To be added.</remarks>
      </Docs>
    </Member>
    <Member MemberName="BindingCount">
      <MemberSignature Language="C#" Value="public uint BindingCount { get; set; }" />
      <MemberSignature Language="ILAsm" Value=".property instance unsigned int32 BindingCount" />
      <MemberType>Property</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>0.0.5950.20892</AssemblyVersion>
        <AssemblyVersion>0.0.6105.39043</AssemblyVersion>
        <AssemblyVersion>0.0.6106.39464</AssemblyVersion>
        <AssemblyVersion>0.0.6134.41045</AssemblyVersion>
        <AssemblyVersion>0.0.6142.19338</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>System.UInt32</ReturnType>
      </ReturnValue>
      <Docs>
        is the number of elements in pname:pBindings.
        <value>To be added.</value>
        <remarks></remarks>
      </Docs>
    </Member>
    <Member MemberName="Bindings">
      <MemberSignature Language="C#" Value="public Vulkan.DescriptorSetLayoutBinding[] Bindings { get; set; }" />
      <MemberSignature Language="ILAsm" Value=".property instance class Vulkan.DescriptorSetLayoutBinding[] Bindings" />
      <MemberType>Property</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>0.0.5950.20892</AssemblyVersion>
        <AssemblyVersion>0.0.6105.39043</AssemblyVersion>
        <AssemblyVersion>0.0.6106.39464</AssemblyVersion>
        <AssemblyVersion>0.0.6134.41045</AssemblyVersion>
        <AssemblyVersion>0.0.6142.19338</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>Vulkan.DescriptorSetLayoutBinding[]</ReturnType>
      </ReturnValue>
      <Docs>
        is a pointer to an array of slink:VkDescriptorSetLayoutBinding structures.
        <value>To be added.</value>
        <remarks></remarks>
      </Docs>
    </Member>
    <Member MemberName="Dispose">
      <MemberSignature Language="C#" Value="public override void Dispose (bool disposing);" />
      <MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance void Dispose(bool disposing) cil managed" />
      <MemberType>Method</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>0.0.6134.41045</AssemblyVersion>
        <AssemblyVersion>0.0.6142.19338</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>System.Void</ReturnType>
      </ReturnValue>
      <Parameters>
        <Parameter Name="disposing" Type="System.Boolean" />
      </Parameters>
      <Docs>
        <param name="disposing">To be added.</param>
        To be added.
        <remarks>To be added.</remarks>
      </Docs>
    </Member>
    <Member MemberName="Flags">
      <MemberSignature Language="C#" Value="public uint Flags { get; set; }" />
      <MemberSignature Language="ILAsm" Value=".property instance unsigned int32 Flags" />
      <MemberType>Property</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>0.0.5950.20892</AssemblyVersion>
        <AssemblyVersion>0.0.6105.39043</AssemblyVersion>
        <AssemblyVersion>0.0.6106.39464</AssemblyVersion>
        <AssemblyVersion>0.0.6134.41045</AssemblyVersion>
        <AssemblyVersion>0.0.6142.19338</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>System.UInt32</ReturnType>
      </ReturnValue>
      <Docs>
        is reserved for future use.
        <value>To be added.</value>
        <remarks></remarks>
      </Docs>
    </Member>
    <Member MemberName="VirtualDispose">
      <MemberSignature Language="C#" Value="public override void VirtualDispose ();" />
      <MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance void VirtualDispose() cil managed" />
      <MemberType>Method</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>0.0.6105.39043</AssemblyVersion>
        <AssemblyVersion>0.0.6106.39464</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>System.Void</ReturnType>
      </ReturnValue>
      <Parameters />
      <Docs>
        To be added.
        <remarks>To be added.</remarks>
      </Docs>
    </Member>
  </Members>
</Type>


text:
"use strict";

const React = require("react");
const CompLibrary = require("../../core/CompLibrary");
const Container = CompLibrary.Container;

const CWD = process.cwd();

const versions = require(`${CWD}/versions.json`);

const rootPackageJson = require(`${CWD}/../package.json`);
const masterVersion = rootPackageJson.version;
const isMasterDevVersion = masterVersion.endsWith("-dev");
const devVersion = isMasterDevVersion ? masterVersion : null;
const latestVersion = isMasterDevVersion
  ? rootPackageJson.devDependencies.prettier
  : masterVersion;

const latestDocsVersion = versions[0];
const pastDocsVersions = versions.slice(1);

function Versions(props) {
  const { config: siteConfig } = props;
  return (

      <Container className="mainContainer versionsContainer">

{siteConfig.title} Versions

                Version
                Install with
                Documentation

                {latestVersion}

                  npm install prettier

                  <a href={`${siteConfig.baseUrl}docs/en/index.html`}>
                    {latestDocsVersion}
                  {" "}
                  (latest)

                {devVersion}

                  npm install prettier/prettier

                  <a href={`${siteConfig.baseUrl}docs/en/next/index.html`}>
                    next
                  {" "}
                  (master)

              {pastDocsVersions.length !== 0 &&
                pastDocsVersions.map((pastDocsVersion, index) => {
                  const pastMajorVersion = pastDocsVersion.replace(/^v/, "");
                  return (

                      {pastMajorVersion}.x

                          npm install prettier@
                          {pastMajorVersion}

                        <a
                          href={`${siteConfig.baseUrl}docs/en/${pastDocsVersion}/index.html`}
                        >
                          {pastDocsVersion}

                  );
                })}

      </Container>

  );
}

module.exports = Versions;


text: module.exports = require('debug')('replay');


text:
test4/test.cpp
test4/tb.cpp
test4/monitor.cpp
test4/main.cpp


text:
import { assert } from "chai"
import sinon from "sinon"

import LearningResourceDrawer from "./LearningResourceDrawer"
import ExpandedLearningResourceDisplay from "../components/ExpandedLearningResourceDisplay"
import * as LRCardMod from "../components/LearningResourceCard"

import {
  makeCourse,
  makeProgram,
  makeVideo,
  makeUserList,
  makeLearningResource
} from "../factories/learning_resources"
import { makeYoutubeVideo } from "../factories/embedly"
import {
  LR_TYPE_PROGRAM,
  LR_TYPE_COURSE,
  LR_TYPE_LEARNINGPATH
} from "../lib/constants"
import IntegrationTestHelper from "../util/integration_test_helper"
import { pushLRHistory } from "../actions/ui"

import {
  courseDetailApiURL,
  programDetailApiURL,
  userListDetailApiURL,
  videoDetailApiURL,
  embedlyApiURL,
  similarResourcesURL,
  interactionsApiURL
} from "../lib/url"
import { mockHTMLElHeight } from "../lib/test_utils"
import { makeSearchResult } from "../factories/search"

describe("LearningResourceDrawer", () => {
  let course, helper, render, similarItems, similarItemsRequest

  beforeEach(() => {
    helper = new IntegrationTestHelper()
    course = makeCourse()
    similarItems = [
      makeSearchResult(LR_TYPE_COURSE),
      makeSearchResult(LR_TYPE_PROGRAM),
      makeSearchResult(LR_TYPE_COURSE)
    ]
    helper.stubComponent(
      LRCardMod,
      "LearningResourceRow",
      "LearningResourceRow"
    )
    similarItemsRequest = helper.handleRequestStub
      .withArgs(similarResourcesURL)
      .returns({
        status: 200,
        body:   similarItems
      })
    helper.handleRequestStub.withArgs(interactionsApiURL).returns({
      status: 201,
      body:   {} // body is ignored
    })
    render = helper.configureReduxQueryRenderer(LearningResourceDrawer)
    mockHTMLElHeight(100, 50)
  })

  afterEach(() => {
    helper.cleanup()
  })

  const mockObjectAPI = (object, apiUrl) =>
    helper.handleRequestStub.withArgs(`${apiUrl}/${object.id}/`).returns({
      status: 200,
      body:   object
    })

  const renderWithObject = async (object, apiUrl, extraProps = {}) => {
    helper.handleRequestStub.withArgs(apiUrl).returns({
      status: 200,
      body:   object
    })

    const { wrapper, store } = await render(extraProps, [
      pushLRHistory({
        objectId:   object.id,
        objectType: object.object_type
      })
    ])
    return { wrapper, store }
  }

  it("should have a button to hide the course drawer", async () => {
    const { wrapper, store } = await renderWithObject(
      course,
      courseDetailApiURL.param({ courseId: course.id }).toString()
    )
    wrapper.find(".drawer-close").simulate("click")
    // this means that the history has been cleared
    assert.deepEqual(store.getState().ui.LRDrawerHistory, [])
  })

  it("should scroll to the top on drawer close", async () => {
    const { wrapper } = await renderWithObject(
      course,
      courseDetailApiURL.param({ courseId: course.id }).toString()
    )
    wrapper.find(".drawer-close").simulate("click")
    sinon.assert.calledWith(helper.scrollStub, { top: 0 })
  })

  it("should have a back button if there is more than one object in the drawer history", async () => {
    const course = makeCourse()
    const program = makeProgram()
    mockObjectAPI(
      course,
      courseDetailApiURL.param({ courseId: course.id }).toString()
    )
    mockObjectAPI(
      program,
      programDetailApiURL.param({ programId: program.id }).toString()
    )
    const { wrapper, store } = await render({}, [
      pushLRHistory({
        objectId:   course.id,
        objectType: course.object_type
      }),
      pushLRHistory({
        objectId:   program.id,
        objectType: program.object_type
      })
    ])
    wrapper.find(".back").simulate("click")
    assert.deepEqual(store.getState().ui.LRDrawerHistory, [
      {
        objectId:   course.id,
        objectType: LR_TYPE_COURSE,
        runId:      undefined
      }
    ])
  })

  it("should put an event listener on window resize", async () => {
    const addEventListenerStub = helper.sandbox.stub(window, "addEventListener")
    await render()
    assert.ok(addEventListenerStub.called)
  })

  it("should log a view interaction when the drawer is shown", async () => {
    await renderWithObject(
      course,
      courseDetailApiURL.param({ courseId: course.id }).toString()
    )
    assert.ok(helper.handleRequestStub.calledWith(interactionsApiURL))
  })

  it("should not include an ExpandedLearningResourceDisplay if there isn't a focused object", async () => {
    const { wrapper } = await render()
    assert.isNotOk(wrapper.find(ExpandedLearningResourceDisplay).exists())
  })

  it("should pass a callback to add to the history stack to ExpandedLearningResourceDisplay", async () => {
    const learningPath = makeLearningResource(LR_TYPE_LEARNINGPATH)
    mockObjectAPI(
      learningPath,
      userListDetailApiURL.param({ userListId: learningPath.id }).toString()
    )
    const { wrapper, store } = await renderWithObject(
      course,
      courseDetailApiURL.param({ courseId: course.id }).toString()
    )
    wrapper.find(ExpandedLearningResourceDisplay).prop("setShowResourceDrawer")(
      {
        objectId:   "test-id",
        objectType: LR_TYPE_LEARNINGPATH
      }
    )
    assert.deepEqual(store.getState().ui.LRDrawerHistory, [
      {
        objectId:   course.id,
        objectType: LR_TYPE_COURSE,
        runId:      undefined
      },
      {
        objectId:   "test-id",
        objectType: LR_TYPE_LEARNINGPATH,
        runId:      undefined
      }
    ])
  })

  //
  ;[
    [makeProgram(), programDetailApiURL, "programId"],
    [makeCourse(), courseDetailApiURL, "courseId"],
    [makeUserList(), userListDetailApiURL, "userListId"]
  ].forEach(([object, apiUrl, key]) => {
    it(`should render ExpandedLearningResourceDisplay with object of type ${object.object_type}`, async () => {
      const url = apiUrl.param({ [key]: object.id }).toString()
      const { wrapper } = await renderWithObject(object, url)
      const expandedDisplay = wrapper.find(ExpandedLearningResourceDisplay)
      assert.deepEqual(expandedDisplay.prop("object"), object)
    })
  })

  it("should include an ExpandedLearningResourceDisplay for a video", async () => {
    const video = makeVideo()
    const embedly = makeYoutubeVideo()
    helper.handleRequestStub
      .withArgs(
        `${embedlyApiURL}/${encodeURIComponent(encodeURIComponent(video.url))}/`
      )
      .returns({
        status: 200,
        body:   embedly
      })
    const { wrapper } = await renderWithObject(
      video,
      videoDetailApiURL.param({ videoId: video.id }).toString()
    )
    const expandedDisplay = wrapper.find(ExpandedLearningResourceDisplay)
    assert.deepEqual(expandedDisplay.prop("object"), video)
    assert.deepEqual(expandedDisplay.prop("embedly"), embedly)
    assert.deepEqual(expandedDisplay.prop("similarItems"), similarItems)
  })

  it("should pass hideSimilarLearningResources prop to ExpandedLearningResourceDisplay", async () => {
    const url = courseDetailApiURL.param({ courseId: course.id }).toString()
    const { wrapper } = await renderWithObject(course, url, {
      hideSimilarLearningResources: true
    })
    assert.ok(
      wrapper
        .find(ExpandedLearningResourceDisplay)
        .prop("hideSimilarLearningResources")
    )
  })

  it("should not make a requst to similarResourcesURL if hideSimilarLearningResources is true", async () => {
    const url = courseDetailApiURL.param({ courseId: course.id }).toString()
    await renderWithObject(course, url, {
      hideSimilarLearningResources: true
    })
    sinon.assert.notCalled(similarItemsRequest)
  })
})


text:
from django.db import models
from django.core.validators import RegexValidator
from django.utils.text import slugify

class Business(models.Model):
    BUSINESS_TYPES = (
        ('shopping', 'Shopping'),
        ('entertainment', 'Entertainment'),
        ('restaurants', 'Restaurants'),
        ('services', 'Services'),
    )
    name = models.CharField(max_length=100) #If this is too much/little we should modify
    slug = models.SlugField(max_length=100, unique=True)
    business_type = models.CharField(max_length=20, choices=BUSINESS_TYPES, default='shopping')
    description = models.CharField(max_length=500)
    address = models.CharField(max_length=300)
    phone_validator = RegexValidator(regex=r'^[1-9]\d{9}$', message='Invalid phone number!')
    phone_number = models.CharField(max_length=10, validators=[phone_validator])
    email = models.EmailField()
    website = models.URLField(blank=True)
    social_fb = models.URLField(blank=True)
    social_twitter = models.URLField(blank=True)
    social_instagram = models.URLField(blank=True)
     # Add other social media links here if needed

    class Meta:
        ordering = ('name',)

    def _generate_slug(self):
        unique_slug = slugify(self.name)
        num = 1
        while Business.objects.filter(slug=unique_slug).exists():
            unique_slug = '{}-{}'.format(unique_slug, num)
            num +=1
        return unique_slug

    def save(self, *args, **kwargs):
        if not self.slug:
            self.slug = self._generate_slug()
        super().save()

    def __str__(self):
        return self.name

class CalendarEvent(models.Model):
    title = models.CharField(max_length=100)
    slug = models.SlugField(max_length=100)
    address = models.CharField(max_length=300)
    date_time = models.DateTimeField()
    description = models.CharField(max_length=500)
    photos = models.FilePathField()
    businesses = models.ManyToManyField(Business) #In case we want to show participating businesses

    class Meta:
        ordering = ('-date_time',)

    def _generate_slug(self):
        unique_slug = slugify(self.title)
        num = 1
        while CalendarEvent.objects.filter(slug=unique_slug).exists():
            unique_slug = '{}-{}'.format(unique_slug, num)
            num +=1
        return unique_slug

    def save(self, *args, **kwargs):
        if not self.slug:
            self.slug = self._generate_slug()
        super().save()

    def __str__(self):
        return self.title

class EventPicture(models.Model):
    file_path = models.FilePathField()
    event = models.ForeignKey(CalendarEvent, on_delete=models.CASCADE)

    class Meta:
        ordering = ('file_path',)


text:
<?php
$lan = array(
  "BackEditTemp" => "Back to edit template",
  "TempSample" => '

While Socrates was speaking, Pythodorus thought that Parmenides and Zeno
were not altogether pleased at the successive steps of the argument; but
still they gave the closest attention, and often looked at one another, and
smiled as if in admiration of him.  When he had finished, Parmenides
expressed their feelings in the following words:--

Socrates, he said, I admire the bent of your mind towards philosophy; tell
me now, was this your own distinction between ideas in themselves and the
things which partake of them? and do you think that there is an idea of
likeness apart from the likeness which we possess, and of the one and many,
and of the other things which Zeno mentioned?

I think that there are such ideas, said Socrates.

Parmenides proceeded:  And would you also make absolute ideas of the just
and the beautiful and the good, and of all that class?

Yes, he said, I should.

And would you make an idea of man apart from us and from all other human
creatures, or of fire and water?

I am often undecided, Parmenides, as to whether I ought to include them or
not.

',
);
?>


text:
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

using System.Threading;
using System.Threading.Tasks;
using Azure.Storage.Blobs.Specialized;
using Microsoft.Azure.WebJobs.Extensions.Storage.Blobs;

namespace Microsoft.Azure.WebJobs.Host.Blobs.Bindings
{
    internal class BlobCommittedAction : IBlobCommitedAction
    {
        private readonly BlobWithContainer<BlobBaseClient> _blob;
        private readonly IBlobWrittenWatcher _blobWrittenWatcher;

        public BlobCommittedAction(BlobWithContainer<BlobBaseClient> blob, IBlobWrittenWatcher blobWrittenWatcher)
        {
            _blob = blob;
            _blobWrittenWatcher = blobWrittenWatcher;
        }

        public Task ExecuteAsync(CancellationToken cancellationToken)
        {
            if (_blobWrittenWatcher != null)
            {
                _blobWrittenWatcher.Notify(_blob);
            }

            return Task.FromResult(0);
        }

        public void Execute()
        {
            if (_blobWrittenWatcher != null)
            {
                _blobWrittenWatcher.Notify(_blob);
            }
        }
    }
}


text:
    Home

    Back


text:
package org.apache.camel.dataformat.xstream;

import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.component.mock.MockEndpoint;
import org.apache.camel.model.dataformat.JsonLibrary;
import org.junit.Test;

public class MarshalDomainObjectJSONTest extends MarshalDomainObjectTest {

    @Test
    public void testMarshalAndUnmarshalWithPrettyPrint() throws Exception {
        PurchaseOrder order = new PurchaseOrder();
        order.setName("pretty printed Camel");
        order.setAmount(1);
        order.setPrice(7.91);

        MockEndpoint mock = getMockEndpoint("mock:reverse");
        mock.expectedMessageCount(1);
        mock.message(0).body().isInstanceOf(PurchaseOrder.class);
        mock.message(0).body().isEqualTo(order);

        Object marshalled = template.requestBody("direct:inPretty", order);
        String marshalledAsString = context.getTypeConverter().convertTo(String.class, marshalled);
        // the line-separator used by JsonWriter is "\n", even on windows
        String expected = "{\"org.apache.camel.dataformat.xstream.PurchaseOrder\": {\n"
                          + "  \"name\": \"pretty printed Camel\",\n"
                          + "  \"price\": 7.91,\n"
                          + "  \"amount\": 1.0\n"
                          + "}}";
        assertEquals(expected, marshalledAsString);

        template.sendBody("direct:backPretty", marshalled);

        mock.assertIsSatisfied();
    }

    protected RouteBuilder createRouteBuilder() throws Exception {
        return new RouteBuilder() {
            public void configure() throws Exception {
                from("direct:in").marshal().json(JsonLibrary.XStream).to("mock:result");

                // just used for helping to marshal
                from("direct:marshal").marshal().json(JsonLibrary.XStream);

                from("direct:reverse").unmarshal().json(JsonLibrary.XStream, PurchaseOrder.class).to("mock:reverse");

                from("direct:inPretty").marshal().json(JsonLibrary.XStream, true);
                from("direct:backPretty").unmarshal().json(JsonLibrary.XStream, PurchaseOrder.class, true).to("mock:reverse");
            }
        };
    }

}


text:
require "re_configus/version"

module ReConfigus
  # Your code goes here...
end


text:
A* (#98)
by Steven Davidovitz

The A* (A-Star) search algorithm is a path-finding algorithm with many uses, including Artificial Intelligence for games. The search builds the route from tile to tile until it reaches the goal. To help choose the best possible tile the algorithm will use an equation that takes into account the distance from the tile to the goal and the cost of moving to that tile.

Let's work through an example, so you can see how this comes together.

Movement Cost for Terrain:
  Non-walkable:
    N/A = Water (~)
  Walkable:
    1 = Flatlands (. or @ or X)
    2 = Forest (*)
    3 = Mountain (^)

Test Map:
  @*^^^    @ = User start
  ~~*~.    X = The goal tile
  **...
  ^..*~
  ~~*~X

Step 1: Search the surrounding tiles for walkable choices.

The only possible tile for the fist step is to the right: a forest (*) tile.

Step 2: Go through that list finding the cost of movement for each of those choice tiles. The cost of movement is the path cost so far, plus the cost to move to the tile being considered.

Our cost so far is 0, since we just started. The cost of a forest is 2 so the total cost of this move is 2 (0 + 2).

Step 3: Determine the distance from the choice tiles to the goal and add that to the cost from Step 2 to find the score for each tile.

You can calculate the distance from the tile to the goal using Manhattan distance formula |x1 - x2| + |y1 - y2|. For our example that is:

|1 - 4| + |0 - 4| = |-3| + |-4| = 7

Knowing that we can produce the final score for this move:

score = cost (2) + distance to goal (7) = 9

Step 4: Choose the best tile to move to by comparing the score of the surrounding tiles and choosing the lowest.

Step 5: Repeat Steps 1-4 until you reach the goal tile. Be careful to prevent checking tiles twice and/or circling back.

Test Map Solution:
  ##^^^    # = Best path
  ~~#~.
  **.#.
  ^..#~
  ~~*~#

(taken from rubyquiz.com/quiz98.html)


text:
void first(
    MiniQbt::Core::QuantumState<3>& ent,
    const MiniQbt::QuantumEmulator<3,false>& emulator){

    emulator.hadamardGate(0,ent);
    emulator.hadamardGate(1,ent);
    emulator.pauliX(2,ent);
    emulator.controlledNot(1,2, ent);
    emulator.controlledNot(0,2, ent);
    emulator.hadamardGate(0,ent);
    emulator.hadamardGate(1,ent);
    emulator.hadamardGate(2,ent);
}

void ending(
    MiniQbt::Core::QuantumState<3>& ent,
    const MiniQbt::QuantumEmulator<3,false>& emulator,
    std::string testName,
    const size_t minimal_test_amount){
        std::random_device rd;
        std::default_random_engine generator(rd());

        std::pair<std::bitset<3>, size_t> first = std::make_pair(std::bitset<3>("000"),0);
        std::pair<std::bitset<3>, size_t> second = std::make_pair(std::bitset<3>("011"),0);
        std::pair<std::bitset<3>, size_t> third = std::make_pair(std::bitset<3>("101"),0);
        std::pair<std::bitset<3>, size_t> fourth = std::make_pair(std::bitset<3>("110"),0);
        for(size_t i = 0; i < minimal_test_amount; i++){
            try{
                std::bitset<3> bitset = emulator.measure(ent, generator);
                if(bitset == first.first){
                    first.second++;
                } else if(bitset == second.first){
                    second.second++;
                } else if(bitset == third.first){
                    third.second++;
                } else if(bitset == fourth.first){
                    fourth.second++;
                } else {
                    FAIL(testName << " failed because an invalid result is given" );
                }
            } catch(const MiniQbt::QuantumException& exp){
                FAIL(testName << " failed with the exception " << exp.getMessage() );
            }
        }
    }

TEST_CASE( "GHZ States") {
    constexpr size_t MINIMAL_TEST_AMOUNT = 10000;
    using namespace MiniQbt;
    typedef QuantumEmulator<3, false> DebugQuantum3;
    std::random_device rd;
    std::default_random_engine generator(rd());

    constexpr char THREE_Q_GHZ_STATE[] = "3Q GHZ state";
    SECTION(THREE_Q_GHZ_STATE){
        DebugQuantum3 emulator;
        auto ent = emulator.generateRegister();
        first(ent, emulator);
        std::pair<std::bitset<3>, size_t> first = std::make_pair(std::bitset<3>("000"),0);
        std::pair<std::bitset<3>, size_t> second = std::make_pair(std::bitset<3>("111"),0);
        for(size_t i = 0; i < MINIMAL_TEST_AMOUNT; i++){
            try{
                std::bitset<3> bitset = emulator.measure(ent, generator);
                if(bitset == first.first){
                    first.second++;
                } else if(bitset == second.first){
                    second.second++;
                } else{
                    FAIL(THREE_Q_GHZ_STATE << " failed because an invalid result is given" );
                }
            } catch(const QuantumException& exp){
                FAIL(THREE_Q_GHZ_STATE << " failed with the exception " << exp.getMessage() );
            }
        }
    }

    constexpr char THREE_Q_GHZ_STATE_YYX_MEASUREMENT[] = "3Q GHZ state YYX-Measurement";
    SECTION(THREE_Q_GHZ_STATE_YYX_MEASUREMENT){
        DebugQuantum3 emulator;
        auto ent = emulator.generateRegister();
        first(ent,emulator);

        //barrier ???

        emulator.phaseSDG(0,ent);
        emulator.phaseSDG(1,ent);
        emulator.hadamardGate(0,ent);
        emulator.hadamardGate(1,ent);
        emulator.hadamardGate(2,ent);

        ending(
            ent,
            emulator,
            std::string(THREE_Q_GHZ_STATE_YYX_MEASUREMENT),
            MINIMAL_TEST_AMOUNT
            );

    }

    constexpr char THREE_Q_GHZ_STATE_YXY_MEASUREMENT[] = "3Q GHZ state XYY-Measurement";
    SECTION(THREE_Q_GHZ_STATE_YXY_MEASUREMENT){
        DebugQuantum3 emulator;
        auto ent = emulator.generateRegister();
        first(ent,emulator);

        emulator.phaseSDG(0,ent);
        emulator.phaseSDG(2,ent);
        emulator.hadamardGate(0,ent);
        emulator.hadamardGate(1,ent);
        emulator.hadamardGate(2,ent);
        ending(
            ent,
            emulator,
            std::string(THREE_Q_GHZ_STATE_YXY_MEASUREMENT),
            MINIMAL_TEST_AMOUNT);

    }

    constexpr char THREE_Q_GHZ_STATE_XYY_MEASUREMENT[] = "3Q GHZ state XYY-Measurement";
    SECTION(THREE_Q_GHZ_STATE_XYY_MEASUREMENT){
            DebugQuantum3 emulator;
            auto ent = emulator.generateRegister();
            first(ent,emulator);

            emulator.phaseSDG(1,ent);
            emulator.phaseSDG(2,ent);
            emulator.hadamardGate(0,ent);
            emulator.hadamardGate(1,ent);
            emulator.hadamardGate(2,ent);
            ending(
                ent,
                emulator,
                std::string(THREE_Q_GHZ_STATE_XYY_MEASUREMENT),
                MINIMAL_TEST_AMOUNT);
        }

        constexpr char THREE_Q_GHZ_STATE_XXX_MEASUREMENT[] = "3Q GHZ state XXX-Measurement";
        SECTION(THREE_Q_GHZ_STATE_XXX_MEASUREMENT){
            DebugQuantum3 emulator;
            auto ent = emulator.generateRegister();
            first(ent,emulator);
            emulator.hadamardGate(0,ent);
            emulator.hadamardGate(1,ent);
            emulator.hadamardGate(2,ent);
            std::pair<std::bitset<3>, size_t> first = std::make_pair(std::bitset<3>("001"),0);
            std::pair<std::bitset<3>, size_t> second = std::make_pair(std::bitset<3>("010"),0);
            std::pair<std::bitset<3>, size_t> third = std::make_pair(std::bitset<3>("111"),0);
            std::pair<std::bitset<3>, size_t> fourth = std::make_pair(std::bitset<3>("100"),0);
            for(size_t i = 0; i < MINIMAL_TEST_AMOUNT; i++){
                try{
                    std::bitset<3> bitset = emulator.measure(ent, generator);
                    if(bitset == first.first){
                        first.second++;
                    } else if(bitset == second.first){
                        second.second++;
                    } else if(bitset == third.first){
                        third.second++;
                    } else if(bitset == fourth.first){
                        fourth.second++;
                    } else {
                        FAIL(THREE_Q_GHZ_STATE_XXX_MEASUREMENT << " failed because an invalid result is given" );
                    }
                } catch(const MiniQbt::QuantumException& exp){
                    FAIL(THREE_Q_GHZ_STATE_XXX_MEASUREMENT << " failed with the exception " << exp.getMessage() );
                }
            }
        }
}