text:
<!DOCTYPE html>

	<meta charset="utf-8">
	<title>Clang frontend actions (Part 1) | Daniel Beard</title>
	<meta name="description" content="I had an interesting discussion with a co-worker yesterday, we were discussing how to grab all the comments from an Objective-C source file. We tried to thin...">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<meta http-equiv="X-Frame-Options" content="sameorigin">

	<link rel="stylesheet" href="/css/main.css">

	<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">

	<link rel="canonical" href="https://danielbeard.io/2016/04/19/clang-frontend-action-part-1.html">

	<link rel="alternate" type="application/atom+xml" title="Daniel Beard" href="https://danielbeard.io/feed.xml" />

	<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet">

	<link href="//fonts.googleapis.com/css?family=Source+Sans+Pro:400,700,700italic,400italic" rel="stylesheet" type="text/css">

	<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/KaTeX/0.3.0/katex.min.css">

			Daniel Beard

					About

Clang frontend actions (Part 1)

    April 19, 2016

I had an interesting discussion with a co-worker yesterday, we were discussing how to grab all the comments from an Objective-C source file. We tried to think about how to do that with a regex, which probably would have worked ok, but definitely wouldn't have handled all the edge cases easily.

I've been using clang's awesome libTooling library for writing frontend actions recently so I thought I'd try and take a quick pass at writing a frontend action that can grab all the comments from a source file.

Setting up the envionment for building frontend actions is covered in the awesome clang Tutorial for building tools using LibTooling and LibASTMatchers documentation, so go do that if you haven't already!

Next, I set up a new frontend action. I cloned down llvm into the ~/clang-llvm folder:

cd ~/clang-llvm/llvm/tools/clang
mkdir tools/extra/commentparser
echo 'add_subdirectory(commentparser)' >> tools/extra/CMakeLists.txt
vim tools/extra/commentparser/CMakeLists.txt

Then the CMakeLists.txt should look like this:

set(LLVM_LINK_COMPONENTS support)

add_clang_executable(commentparser
  CommentParser.cpp
)
target_link_libraries(commentparser
  clangTooling
  clangBasic
  clangASTMatchers
)

Now we can start writing our fontend action. We need a couple of different elements: setting up command line parsing in the main function, an ASTFrontendAction and an ASTConsumer. Starting with the command line parsing and setup:

static llvm::cl::OptionCategory MyToolCategory("My tool options");
int main(int argc, const char **argv) {
  CommonOptionsParser OptionsParser(argc, argv, MyToolCategory);
  ClangTool Tool(OptionsParser.getCompilations(),
                 OptionsParser.getSourcePathList());
  return Tool.run(newFrontendActionFactory<FindCommentsAction>().get());
}

Nothing too interesting going on here yet, although note that we setup a new OptionCategory, this lets us hide all the default clang options displayed in the help, we don't want those for our tool.

Next is the ASTFrontendAction, all we are going to do here is create our ASTConsumer and forward the compiler's ASTContext to it. Here's that code:

class FindCommentsAction : public clang::ASTFrontendAction {
public:
  virtual std::unique_ptr<clang::ASTConsumer> CreateASTConsumer(
    clang::CompilerInstance &Compiler, llvm::StringRef InFile) {
    return std::unique_ptr<clang::ASTConsumer>(
        new FindCommentsConsumer(&Compiler.getASTContext()));
  }
};

Now for the interesting part, our ASTConsumer, this is the class that we can visit AST nodes in. If we wanted to, we could perform an action on all IfStmt, ForLoop, EnumDecl, etc. All we need to visit to handle comments is the translation unit. A TranslationUnitDecl is always the top level node in the Abstract Syntax Tree1

class FindCommentsConsumer : public clang::ASTConsumer {
public:
  explicit FindCommentsConsumer(ASTContext *Context) {}

  // This is called after the full translation unit is parsed
  virtual void HandleTranslationUnit(clang::ASTContext &Context) {
    auto comments = Context.getRawCommentList().getComments();
    for (auto comment : comments) {
      std::cout << comment->getRawText(Context.getSourceManager()).str() << std::endl;
    }
    std::cout << "Finished parsing for comments" << std::endl;
  }
};

That's all we need for this frontend action, we are just going to print out the comments that we find in each translation unit.

For testing, I'm going to use a simple source file test.cpp:

/** Other comment */
// This is the main method
/// Documentation comment
/* block comment */

int f(int x) {
  int result = (x / 42); // end of line comment
  return result;
}
/** this is a block comment */

int main(int argc, char** argv) {
  return 0;
}

Compiling and running the frontend action:

ninja commentparser
./commentparser test.cpp --

/** Other comment */
/// Documentation comment
/** this is a block comment */
Finished parsing for comments

Wait, what happened to the other comments in the file? Clang treats some comments differently to others. Comments that start with /** or /// are treated as documentation comments. By default, clang only parses documentation comments.2

Luckily, there's a command line flag to override this and parse all comments -fparse-all-comments:

./commentparser test.cpp -- -fparse-all-comments

/** Other comment */
// This is the main method
/// Documentation comment
/* block comment */
// end of line comment
/** this is a block comment */
Finished parsing for comments

That gives us all the comments in the translation unit! Note that if we wanted to compile a more complicated class with imports or a project that has multiple files, we'd have to use a compilation database3. Checkout out the full source code for this frontend action CommentParser.cpp

http://clang.llvm.org/docs/IntroductionToTheClangAST.html ↩

http://www.cs.ubbcluj.ro/~studia-i/2014-macs/06Cseri.pdf ↩

http://clang.llvm.org/docs/JSONCompilationDatabase.html ↩

Powered by Jekyll with Type Theme


text:
/*
 * uuid_util.h
 *
 *  Created on: 30 Apr 2021
 *      Author: billy
 */

#ifndef CORE_SHARED_UUID_INCLUDE_UUID_UTIL_H_
#define CORE_SHARED_UUID_INCLUDE_UUID_UTIL_H_

#include "uuid_util_library.h"
#include "typedefs.h"
#include "string_linked_list.h"

#include "uuid_defs.h"

#ifdef __cplusplus
extern "C"
{
#endif

/**
 * Get the string representation of a uuid_t.
 *
 * @param id The uuid_t to get the string representation of.
 * @return A newly-allocated string of the id or NULL upon error.
 * @see FreeUUIDString.
 * @ingroup utility_group
 */
GRASSROOTS_UUID_API char *GetUUIDAsString (const uuid_t id);

/**
 * Convert a uuid_t into a given string buffer.
 *
 * @param id The uuid_t to get the string representation of.
 * @param uuid_s The buffer to write the representation to. This must be at least
 * UUID_STRING_BUFFER_SIZE bytes long.
 * @see UUID_STRING_BUFFER_SIZE
 * @ingroup utility_group
 */
GRASSROOTS_UUID_API void ConvertUUIDToString (const uuid_t id, char *uuid_s);

/**
 * Convert the string representation of a uuid_t to a uuid_t.
 *
 * @param id_s The buffer containing the representation.
 * @param id The uuid_t to set.
 * @return true if the uuid_t was set successfully, false otherwise.
 * @ingroup utility_group
 */
GRASSROOTS_UUID_API bool ConvertStringToUUID (char *id_s, uuid_t id);

/**
 * Free a string representation of a uuid_t.
 *
 * @param uuid_s The string representation to free.
 * @see GetUUIDAsString.
 * @ingroup utility_group
 */
GRASSROOTS_UUID_API void FreeUUIDString (char *uuid_s);

/**
 * Test whether a uuid_t contains a valid value.
 *
 * @param id The uuid_t to test.
 * @return true if the uuid_t is valid, false otherwise.
 * @ingroup utility_group
 */
GRASSROOTS_UUID_API bool IsUUIDSet (uuid_t id);

/**
 * Create a LinkedList of StringListNodes with each entry being
 * a uuid.
 *
 * @param ids_s The string to parse from which the LinkedList will be
 * generated. The values in this string need to be separated by
 * whitespace.
 * @return The newly-allocated LinkedList of StringListNodes where each
 * entry is a uuid or NULL upon error.
 * @memberof StringListNode
 */
GRASSROOTS_UUID_API LinkedList *GetUUIDSList (const char *ids_s);

#ifdef __cplusplus
}
#endif

#endif /* CORE_SHARED_UUID_INCLUDE_UUID_UTIL_H_ */

redpajama_set_name: RedPajamaGithub


text:
FOUNDATION_EXPORT double AlertHandlerVersionNumber;

//! Project version string for AlertHandler.
FOUNDATION_EXPORT const unsigned char AlertHandlerVersionString[];

// In this header, you should import all the public headers of your framework using statements like #import <AlertHandler/PublicHeader.h>

#import <AlertHandler/AlertTextFieldHandlerBridge.h>


text:
package sebagius7110.Logging;

import java.util.HashMap;

public class LoggerType {

	private static Logger logger = new Logger();

	public  HashMap<Integer, Boolean> loggerTypeEnabled = new HashMap<Integer, Boolean>();

	public  void initialiseLogger() {

		loggerTypeEnabledList();
		checkBooleans();

	}

	private  void loggerTypeEnabledList() {
		loggerTypeEnabled.put(1, true); // DEBUG
		loggerTypeEnabled.put(2, true); // INFO
		loggerTypeEnabled.put(3, false); // WARNING
		loggerTypeEnabled.put(4, true); // ERROR
		loggerTypeEnabled.put(5, true); // SEVERE
		loggerTypeEnabled.put(6, true); // CRASH
	}

	private  void checkBooleans() {

		logger.log("DEBUG Messages are set to: " + loggerTypeEnabled.get(1));
		logger.log("INFO Messages are set to: " + loggerTypeEnabled.get(2));
		logger.log("WARNING Messages are set to: " + loggerTypeEnabled.get(3));
		logger.log("SEVERE Messages are set to: " + loggerTypeEnabled.get(4));
		logger.log("CRASH Messages are set to: " + loggerTypeEnabled.get(5));

	}

}


text:
<?php

namespace Slim;

use Interop\Container\ContainerInterface;
use Interop\Container\Exception\ContainerException;
use Pimple\Container as PimpleContainer;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Slim\Exception\NotFoundException;
use Slim\Handlers\Error;
use Slim\Handlers\NotFound;
use Slim\Handlers\NotAllowed;
use Slim\Handlers\Strategies\RequestResponse;
use Slim\Http\Environment;
use Slim\Http\Headers;
use Slim\Http\Request;
use Slim\Http\Response;
use Slim\Interfaces\CallableResolverInterface;
use Slim\Interfaces\Http\EnvironmentInterface;
use Slim\Interfaces\InvocationStrategyInterface;
use Slim\Interfaces\RouterInterface;

/**
 * Slim's default DI container is Pimple.
 *
 * Slim\App expects a container that implements Interop\Container\ContainerInterface
 * with these service keys configured and ready for use:
 *
 *  - settings: an array or instance of \ArrayAccess
 *  - environment: an instance of \Slim\Interfaces\Http\EnvironmentInterface
 *  - request: an instance of \Psr\Http\Message\ServerRequestInterface
 *  - response: an instance of \Psr\Http\Message\ResponseInterface
 *  - router: an instance of \Slim\Interfaces\RouterInterface
 *  - foundHandler: an instance of \Slim\Interfaces\InvocationStrategyInterface
 *  - errorHandler: a callable with the signature: function($request, $response, $exception)
 *  - notFoundHandler: a callable with the signature: function($request, $response)
 *  - notAllowedHandler: a callable with the signature: function($request, $response, $allowedHttpMethods)
 *  - callableResolver: an instance of \Slim\Interfaces\CallableResolverInterface
 */
final class Container extends PimpleContainer implements ContainerInterface
{
    /**
     * Default settings
     *
     * @var array
     */
    private $defaultSettings = [
        'httpVersion' => '1.1',
        'responseChunkSize' => 4096,
        'outputBuffering' => 'append',
        'determineRouteBeforeAppMiddleware' => false,
    ];

    /**
     * Create new container
     *
     * @param array $values The parameters or objects.
     */
    public function __construct(array $values = [])
    {
        parent::__construct($values);

        $userSettings = isset($values['settings']) ? $values['settings'] : [];
        $this->registerDefaultServices($userSettings);
    }

    /**
     * This function registers the default services that Slim needs to work.
     *
     * All services are shared - that is, they are registered such that the
     * same instance is returned on subsequent calls.
     *
     * @param array $userSettings Associative array of application settings
     *
     * @return void
     */
    private function registerDefaultServices($userSettings)
    {
        $defaultSettings = $this->defaultSettings;

        /**
         * This service MUST return an array or an
         * instance of \ArrayAccess.
         *
         * @param Container $c
         *
         * @return array|\ArrayAccess
         */
        $this['settings'] = function ($c) use ($userSettings, $defaultSettings) {
            return array_merge($defaultSettings, $userSettings);
        };

        /**
         * This service MUST return a shared instance
         * of \Slim\Interfaces\Http\EnvironmentInterface.
         *
         * @param Container $c
         *
         * @return EnvironmentInterface
         */
        if (!isset($this['environment'])) {
            $this['environment'] = function ($c) {
                return new Environment($_SERVER);
            };
        }

        /**
         * PSR-7 Request object
         *
         * @param Container $c
         *
         * @return ServerRequestInterface
         */
        if (!isset($this['request'])) {
            $this['request'] = function ($c) {
                return Request::createFromEnvironment($c['environment']);
            };
        }

        /**
         * PSR-7 Response object
         *
         * @param Container $c
         *
         * @return ResponseInterface
         */
        if (!isset($this['response'])) {
            $this['response'] = function ($c) {
                $headers = new Headers(['Content-Type' => 'text/html']);
                $response = new Response(200, $headers);

                return $response->withProtocolVersion($c['settings']['httpVersion']);
            };
        }

        /**
         * This service MUST return a SHARED instance
         * of \Slim\Interfaces\RouterInterface.
         *
         * @param Container $c
         *
         * @return RouterInterface
         */
        if (!isset($this['router'])) {
            $this['router'] = function ($c) {
                $router = new Router();

                $uri = $c['request']->getUri();

                if (is_callable([$uri, 'getBasePath'])) {
                    $router->setBasePath($uri->getBasePath());
                }

                return $router;
            };
        }

        /**
         * This service MUST return a SHARED instance
         * of \Slim\Interfaces\InvocationStrategyInterface.
         *
         * @param Container $c
         *
         * @return InvocationStrategyInterface
         */
        if (!isset($this['foundHandler'])) {
            $this['foundHandler'] = function ($c) {
                return new RequestResponse();
            };
        }

        /**
         * This service MUST return a callable
         * that accepts three arguments:
         *
         * 1. Instance of \Psr\Http\Message\ServerRequestInterface
         * 2. Instance of \Psr\Http\Message\ResponseInterface
         * 3. Instance of \Exception
         *
         * The callable MUST return an instance of
         * \Psr\Http\Message\ResponseInterface.
         *
         * @param Container $c
         *
         * @return callable
         */
        if (!isset($this['errorHandler'])) {
            $this['errorHandler'] = function ($c) {
                return new Error();
            };
        }

        /**
         * This service MUST return a callable
         * that accepts two arguments:
         *
         * 1. Instance of \Psr\Http\Message\ServerRequestInterface
         * 2. Instance of \Psr\Http\Message\ResponseInterface
         *
         * The callable MUST return an instance of
         * \Psr\Http\Message\ResponseInterface.
         *
         * @param Container $c
         *
         * @return callable
         */
        if (!isset($this['notFoundHandler'])) {
            $this['notFoundHandler'] = function ($c) {
                return new NotFound();
            };
        }

        /**
         * This service MUST return a callable
         * that accepts three arguments:
         *
         * 1. Instance of \Psr\Http\Message\ServerRequestInterface
         * 2. Instance of \Psr\Http\Message\ResponseInterface
         * 3. Array of allowed HTTP methods
         *
         * The callable MUST return an instance of
         * \Psr\Http\Message\ResponseInterface.
         *
         * @param Container $c
         *
         * @return callable
         */
        if (!isset($this['notAllowedHandler'])) {
            $this['notAllowedHandler'] = function ($c) {
                return new NotAllowed;
            };
        }

        /**
         * Instance of \Slim\Interfaces\CallableResolverInterface
         *
         * @param Container $c
         *
         * @return CallableResolverInterface
         */
        if (!isset($this['callableResolver'])) {
            $this['callableResolver'] = function ($c) {
                return new CallableResolver($c);
            };
        }
    }

    /********************************************************************************
     * Methods to satisfy Interop\Container\ContainerInterface
     *******************************************************************************/

    /**
     * Finds an entry of the container by its identifier and returns it.
     *
     * @param string $id Identifier of the entry to look for.
     *
     * @throws NotFoundException  No entry was found for this identifier.
     * @throws ContainerException Error while retrieving the entry.
     *
     * @return mixed Entry.
     */
    public function get($id)
    {
        if (!$this->offsetExists($id)) {
            throw new NotFoundException(sprintf('Identifier "%s" is not defined.', $id));
        }
        return $this->offsetGet($id);
    }

    /**
     * Returns true if the container can return an entry for the given identifier.
     * Returns false otherwise.
     *
     * @param string $id Identifier of the entry to look for.
     *
     * @return boolean
     */
    public function has($id)
    {
        return $this->offsetExists($id);
    }
}


text:
@interface ZXSendWeiboViewController : UIViewController

@end


text:
package io.bootique.jetty.connector;

import com.fasterxml.jackson.annotation.JsonTypeName;
import io.bootique.annotation.BQConfig;
import org.eclipse.jetty.server.ConnectionFactory;
import org.eclipse.jetty.server.HttpConfiguration;
import org.eclipse.jetty.server.HttpConnectionFactory;

@BQConfig
@JsonTypeName("http")
public class HttpConnectorFactory extends ConnectorFactory {

    protected ConnectionFactory[] buildHttpConnectionFactories(HttpConfiguration httpConfig) {
        return new ConnectionFactory[]{new HttpConnectionFactory(httpConfig)};
    }
}


text:
require 'spec_helper'

describe 'referenceEntity' do
  before :all do
    module MyAPI
      module Entities
        class Something < Grape::Entity
          def self.entity_name
            'SomethingCustom'
          end

          expose :text, documentation: { type: 'string', desc: 'Content of something.' }
        end

        class Kind < Grape::Entity
          def self.entity_name
            'KindCustom'
          end

          expose :title, documentation: { type: 'string', desc: 'Title of the kind.' }
          expose :something, documentation: { type: Something, desc: 'Something interesting.' }
        end

        class Base < Grape::Entity
          def self.entity_name
            parts = to_s.split('::')

            "MyAPI::#{parts.last}"
          end

          expose :title, documentation: { type: 'string', desc: 'Title of the parent.' }
        end

        class Child < Base
          expose :child, documentation: { type: 'string', desc: 'Child property.' }
        end
      end

      class ResponseModelApi < Grape::API
        format :json
        desc 'This returns kind and something or an error',
             params: Entities::Kind.documentation.slice(:something),
             entity: Entities::Kind,
             http_codes: [
               { code: 200, message: 'OK', model: Entities::Kind }
             ]
        params do
          optional :something, desc: 'something as parameter'
        end
        get '/kind' do
          kind = OpenStruct.new text: 'kind'
          present kind, with: Entities::Kind
        end

        desc 'This returns a child entity',
             entity: Entities::Child,
             http_codes: [
               { code: 200, message: 'OK', model: Entities::Child }
             ]
        get '/child' do
          child = OpenStruct.new text: 'child'
          present child, with: Entities::Child
        end

        add_swagger_documentation # models: [MyAPI::Entities::Something, MyAPI::Entities::Kind]
      end
    end
  end

  def app
    MyAPI::ResponseModelApi
  end

  describe 'kind' do
    subject do
      get '/swagger_doc/kind'
      JSON.parse(last_response.body)
    end

    it 'should document specified models' do
      expect(subject['paths']['/kind']['get']['parameters']).to eq [{
        'in' => 'query',
        'name' => 'something',
        'description' => 'Something interesting.',
        'type' => 'SomethingCustom',
        'required' => false
      }]

      expect(subject['definitions'].keys).to include 'SomethingCustom'
      expect(subject['definitions']['SomethingCustom']).to eq(
        'type' => 'object', 'properties' => { 'text' => { 'type' => 'string', 'description' => 'Content of something.' } }
      )

      expect(subject['definitions'].keys).to include 'KindCustom'
      expect(subject['definitions']['KindCustom']).to eq(
        'type' => 'object',
        'properties' => {
          'title' => { 'type' => 'string', 'description' => 'Title of the kind.' },
          'something' => {
            '$ref' => '#/definitions/SomethingCustom',
            'description' => 'Something interesting.'
          }
        },
        'description' => 'KindCustom model'
      )
    end
  end

  describe 'child' do
    subject do
      get '/swagger_doc/child'
      JSON.parse(last_response.body)
    end

    it 'should document specified models' do
      expect(subject['definitions'].keys).to include 'MyAPI::Child'
      expect(subject['definitions']['MyAPI::Child']).to eq(
        'type' => 'object',
        'properties' => {
          'title' => { 'type' => 'string', 'description' => 'Title of the parent.' },
          'child' => { 'type' => 'string', 'description' => 'Child property.' }
        },
        'description' => 'MyAPI::Child model'
      )
    end
  end
end


text:
package poly

/**
 * `Poly-algebra` contains a collection of typeclass abstractions over common algebraic structures,
 * and provides a framework for generic math programming in Scala.
 * @author Tongfei Chen
 */
package object algebra {

  type Id[X] = X

}


text:
module Helpers::AnswersHashHelper
  # answers[:user_x][team_x][question_x] = get answer from user_x, from team_x
  # to question_x. This is a easier structure to get the answers and create the
  # connections in the tests.
  def answers_hash(users:, teams:, questions:)
    answers = {}
    users.each_with_index do |user, user_idx|
      answers["user_#{user_idx}".to_sym] = {}
      teams.each_with_index do |team, team_idx|
        answers["user_#{user_idx}".to_sym]["team_#{team_idx}".to_sym] = {}
        questions.each_with_index do |question, question_idx|
          answers["user_#{user_idx}".to_sym]["team_#{team_idx}".to_sym].merge!(
            "question_#{question_idx}": create(
              :answer, team: team, user: user, question: question
            )
          )
        end
      end
    end

    answers
  end
end


text:
class TranslatedString < String
  def initialize(str, translation_record, attribute_name)
    @translation_record = translation_record
    @attribute_name     = attribute_name
    super(str)
  end

  def in(locale)
    @translation_record.translated_attribute(@attribute_name, :locale => locale)
  end
end


text:
public interface MainInterface
{
	public Song[] getSongs(String country);
}


text:
package org.fusesource.fabric.api.jmx;

import java.util.Map;

/**
 * @author Stan Lewis
 */
public interface ClusterBootstrapManagerMBean {

    public void createCluster();

    public void createCluster(Map<String, Object> options);

}


text:
namespace MidLevelRenderer
{

//##########################################################################
//#### MLRIndexedPolyMesh with color but no lighting one texture layer  ####
//##########################################################################

class MLR_I_C_PMesh : public MLR_I_PMesh
{
	//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	// Initialization
	//
public:
	static void __stdcall InitializeClass(void);
	static void __stdcall TerminateClass(void);

	//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	// Constructors/Destructors
	//
protected:
	MLR_I_C_PMesh(ClassData* class_data, std::iostream stream, uint32_t version);
	~MLR_I_C_PMesh(void);

public:
	MLR_I_C_PMesh(ClassData* class_data = MLR_I_C_PMesh::DefaultData);

	static MLR_I_C_PMesh* Make(std::iostream stream, uint32_t version);

	void Save(std::iostream stream);

public:
	//		void Copy(MLRIndexedPolyMesh*);

#if COLOR_AS_DWORD
	virtual void SetcolourData(const uint32_t* array, size_t point_count);
	virtual void GetcolourData(uint32_t** array, size_t* point_count);
#else
	virtual void SetcolourData(const Stuff::RGBAcolour* array, size_t point_count);
	virtual void GetcolourData(Stuff::RGBAcolour** array, size_t* point_count);
#endif

	virtual void
#if COLOR_AS_DWORD
	PaintMe(const uint32_t* paintMe);
#else
	PaintMe(const Stuff::RGBAcolour* paintMe);
#endif

	virtual uint32_t TransformAndClip(
		Stuff::Matrix4D*, MLRClippingState, GOSVertexPool*, bool = false);

	virtual void TransformNoClip(Stuff::Matrix4D*, GOSVertexPool*, bool = false);

	//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	// Class Data Support
	//
public:
	static ClassData* DefaultData;

	//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	// Testing
	//
public:
	void TestInstance(void) const;

	virtual size_t GetSize(void)
	{
		// Check_Object(this);
		size_t ret = MLR_I_PMesh::GetSize();
		ret += colors.GetSize();
		return ret;
	}

protected:
#if COLOR_AS_DWORD
	std::vector<uint32_t> colors; // Base address of color list
#else
	std::vector<Stuff::RGBAcolour> colors; // Base address of color list
#endif
};

MLR_I_C_PMesh*
CreateIndexedCube_colour_NoLit(float, Stuff::RGBAcolour*, MLRState*);

MLR_I_PMesh*
CreateIndexedViewFrustrum_colour_NoLit(float near_clip, float far_clip, float left_clip,
	float right_clip, float top_clip, float bottom_clip, Stuff::RGBAcolour&, MLRState*);

MLRShape*
CreateIndexedIcosahedron_colour_NoLit(IcoInfo&, MLRState*);
} // namespace MidLevelRenderer
#endif


text:
<!DOCTYPE html>

	<link href="js/bootstrap.min.css" rel="stylesheet"type="text/css">
	<link href="css/moncss.css" rel="stylesheet"type="text/css">

	<title>Comparison of massively multiplayer online role-playing games - Engine table</title>
	<meta charset="utf-8">

Comparison of massively multiplayer online role-playing games - Engine table

			<fieldset>

					<form action="" method="post">
						<legend style="color:red;font-weight: bold;font-style:italic;text-align: center;" >Formulaire</legend>

								Fully customizable user interface :

 <input type="radio" name="FeatureFully customizable user interface" value="oui">Yes <input type="radio" name="FeatureFully customizable user interface" value = "non">No <input type="radio" name="FeatureFully customizable user interface" value = "non">Partial

								Custom UI Mods / Addons :
 <input id="0" type="text" name="Feature">

								Windowable :

 <input type="radio" name="FeatureWindowable" value="oui">Yes <input type="radio" name="FeatureWindowable" value = "non">No <input type="radio" name="FeatureWindowable" value = "non">Partial

								Game engine type :
 <input id="1" type="text" name="Feature">

								Source code available? :

 <input type="radio" name="FeatureSource code available?" value="oui">Yes <input type="radio" name="FeatureSource code available?" value = "non">No <input type="radio" name="FeatureSource code available?" value = "non">Partial

<input type="submit" class="btn btn-info" value="Ajouter un produit" />
					</form>

			</fieldset>


text:
class Show < ActiveRecord::Base
  has_many :bands, :through => :band_shows
  has_many :band_shows
  belongs_to :venue
end


text:
'use strict';

const getDetailsByZipCode = require('../index');
const chai = require('chai');
const chaiAsPromised = require('chai-as-promised');
const nock = require('nock');

const expect = chai.expect;
const VIACEP_URI = 'https://viacep.com.br';
chai.use(chaiAsPromised);
const DEFAULT_CEP_REQ = '31652130';
const DEFAULT_RESPONSE = {
  cep: '31652-130',
  logradouro: 'Rua Isabel Maria Dias',
  complemento: '',
  bairro: 'Jardim dos Comerciários (Venda Nova)',
  localidade: 'Belo Horizonte',
  uf: 'MG',
  unidade: '',
  ibge: '3106200',
  gia: ''
};

function makeDefaultNock(cep) {
  nock(VIACEP_URI)
    .get(`/ws/${cep || DEFAULT_CEP_REQ}/json`)
    .reply(200, DEFAULT_RESPONSE);
}

describe('Zip search module', () => {
  it('Should get a valid response when passing a valid zip code', (done) => {
    const zipCode = getDetailsByZipCode('31652130', true);
    expect(zipCode).to.deep.equal(DEFAULT_RESPONSE);
    done();
  }).timeout(5000);

  it('Should work when passing the sync parameter', (done) => {
    const zipCode = getDetailsByZipCode('31652130', true);
    expect(zipCode).to.deep.equal(DEFAULT_RESPONSE);
    done();
  }).timeout(5000);

  it('Should get a valid response when returning promise', () => {
    makeDefaultNock();
    return expect(getDetailsByZipCode('31652130')).to.eventually.deep.equal(DEFAULT_RESPONSE);
  });

  it('Should work when passing a zipCode with dash', () => {
    makeDefaultNock();
    return expect(getDetailsByZipCode('31652-130')).to.eventually.deep.equal(DEFAULT_RESPONSE);
  });

  it('Should work when passing a number', () => {
    makeDefaultNock();
    return expect(getDetailsByZipCode(31652130)).to.eventually.deep.equal(DEFAULT_RESPONSE);
  });

  it('Should return an error message when passing wrong parameter', () => {
    const result = getDetailsByZipCode('wrong', {sync: true});
    expect(result.hasError).to.be.true;
    expect(result.message).to.equal('The CEP should be a number or string of size 8. Please check your parameter.');
  });

  it('Should return an error message when passing wrong parameter (async)', () => {
    const result = getDetailsByZipCode('wrong').catch(err => err.message);
    return expect(result).to.eventually.equal('The CEP should be a number or string of size 8. Please check your parameter.');
  });

  it('Should handle wrong zip codes', () => {
    nock(VIACEP_URI)
      .get('/ws/123456ab/json')
      .reply(400, '
Bad Request (400)
');

    const result = getDetailsByZipCode('123456ab').catch(err => err.statusCode);
    return expect(result).to.eventually.equal(400);
  });
});


text:
package com.ibm.cds.spark.samples.config

import scala.collection.mutable.ListBuffer
import scala.reflect.ClassTag
import org.apache.kafka.clients.CommonClientConfigs
import org.apache.kafka.common.config.SslConfigs
import org.apache.kafka.common.security.JaasUtils
import scala.io.Source
import java.io.InputStream
import java.io.FileWriter
import java.io.File
import org.http4s.EntityEncoder
import org.http4s.Uri
import org.http4s.client.blaze.PooledHttp1Client
import org.http4s.Request
import org.http4s.Method
import org.http4s.Headers
import org.http4s.headers.Authorization
import org.http4s.BasicCredentials
import org.http4s.Header
import javax.net.ssl.SSLContext
import org.codehaus.jettison.json.JSONObject

/**
 * @author dtaieb
 */
class MessageHubConfig extends DemoConfig{
  lazy val kafkaOptionKeys = ListBuffer[String]()
  override def initConfigKeys(){
    config = config ++ Map[String,String](
      registerConfigKey(CommonClientConfigs.BOOTSTRAP_SERVERS_CONFIG),
      registerConfigKey(CommonClientConfigs.CLIENT_ID_CONFIG, "demo.watson.twitter.messagehub"),
      registerConfigKey("auto.offset.reset", "latest"),
      registerConfigKey("acks", "-1"),
      registerConfigKey("retries", "0"),
      registerConfigKey("batch.size", "16384"),
      registerConfigKey("linger.ms", "1"),
      registerConfigKey("buffer.memory", "33554432"),
      registerConfigKey("key.serializer", "org.apache.kafka.common.serialization.StringSerializer"),
      registerConfigKey("key.deserializer", "org.apache.kafka.common.serialization.StringDeserializer"),
      registerConfigKey(SslConfigs.SSL_PROTOCOL_CONFIG, "TLSv1.2"),
      registerConfigKey(SslConfigs.SSL_ENABLED_PROTOCOLS_CONFIG, "TLSv1.2"),
      registerConfigKey(SslConfigs.SSL_TRUSTSTORE_TYPE_CONFIG, "JKS"),
      registerConfigKey(SslConfigs.SSL_TRUSTSTORE_LOCATION_CONFIG, getDefaultSSLTrustStoreLocation),
      registerConfigKey(SslConfigs.SSL_TRUSTSTORE_PASSWORD_CONFIG, "changeit"),
      registerConfigKey(SslConfigs.SSL_ENDPOINT_IDENTIFICATION_ALGORITHM_CONFIG, "HTTPS"),
      registerConfigKey(CommonClientConfigs.SECURITY_PROTOCOL_CONFIG, "SASL_SSL" ),

      registerConfigKey(MessageHubConfig.CHECKPOINT_DIR_KEY),
      registerConfigKey(MessageHubConfig.KAFKA_TOPIC_TWEETS, "demo.tweets.watson.topic"),
      registerConfigKey(MessageHubConfig.KAFKA_USER_NAME),
      registerConfigKey(MessageHubConfig.KAFKA_USER_PASSWORD),
      registerConfigKey(MessageHubConfig.MESSAGEHUB_API_KEY),
      registerConfigKey(MessageHubConfig.MESSAGEHUB_REST_URL)
    )
  }

  private def getDefaultSSLTrustStoreLocation():String={
    val javaHome = System.getProperty("java.home") + File.separator + "lib" + File.separator + "security" + File.separator + "cacerts"
    println("default location of ssl Trust store is: " + javaHome)
    javaHome
  }

  override private[config] def registerConfigKey( key: String, default: String = null ) : (String,String) = {
    kafkaOptionKeys += key
    super.registerConfigKey(key,default)
  }

  override def validateConfiguration(ignorePrefix:String*) : Boolean = {
    val ret = super.validateConfiguration(ignorePrefix:_*)
    if ( ret ){
      //Create the jaas configuration
      MessageHubConfig.createJaasConfiguration(getConfig(MessageHubConfig.KAFKA_USER_NAME ), getConfig(MessageHubConfig.KAFKA_USER_PASSWORD) )
    }
    ret
  }

  def copyKafkaOptionKeys(other:MessageHubConfig){
    kafkaOptionKeys.foreach { key => other.setConfig(key, getConfig(key) ) }
  }

  def setValueSerializer[U]()(implicit c: ClassTag[U]){
    setConfig("value.serializer", c.runtimeClass.getName);
  }

  def setValueDeserializer[U]()(implicit c: ClassTag[U]){
    setConfig("value.deserializer", c.runtimeClass.getName);
  }

  def createTopicsIfNecessary( topics: String* ){
    val sslContext = SSLContext.getInstance("TLSv1.2")
    sslContext.init(null, null, null)
    lazy val client = PooledHttp1Client(sslContext=Option(sslContext))
    for( topic <- topics ){
      EntityEncoder[String].toEntity("{\"name\":" + JSONObject.quote( topic ) + "}" ).flatMap {
        entity =>
          val topicUri: Uri = Uri.fromString( getConfig(MessageHubConfig.MESSAGEHUB_REST_URL) + "/admin/topics" ).getOrElse( null )
          println(topicUri)
          client(
              Request(
                  method = Method.POST,
                  uri = topicUri,
                  headers = Headers(
                      Header("Content-Type", "application/json"),
                      Header("X-Auth-Token", getConfig(MessageHubConfig.MESSAGEHUB_API_KEY))
                    ),
                  body = entity.body
              )
          ).flatMap { response =>
             response.status.code match {
               case 200 | 202 => println("Successfully created topic: " + topic)
               case 422 | 403 => println("Topic already exists in the server: " + topic)
               case _ => throw new IllegalStateException("Error when trying to create topic: " + response.status.code + " Reason: " + response.status.reason)
             }
             response.as[String]
          }
      }.run
    }
  }
}

object MessageHubConfig{
  final val CHECKPOINT_DIR_KEY = DemoConfig.CHECKPOINT_DIR_KEY
  final val KAFKA_TOPIC_TWEETS = "kafka.topic.tweet"    //Key for name of the kafka topic holding used for publishing the tweets
  final val KAFKA_USER_NAME = "kafka.user.name"
  final val KAFKA_USER_PASSWORD = "kafka.user.password"

  final val MESSAGEHUB_API_KEY = "api_key"
  final val MESSAGEHUB_REST_URL = "kafka_rest_url"

  private def fixPath(path: String):String = {
    path.replaceAll("\\ / : * ? \" < > |,", "_")
  }

  def createJaasConfiguration( userName: String, password: String){
    //Create the jaas configuration
      var is:InputStream = null
      try{
        val packageName = MessageHubConfig.getClass.getPackage.getName.replace('.', File.separatorChar)
        is = MessageHubConfig.getClass.getClassLoader.getResourceAsStream(packageName + "/jaas.conf");
        val confString = Source.fromInputStream( is ).mkString
          .replace( "$USERNAME", userName)
          .replace( "$PASSWORD", password )

        val confDir= new File( System.getProperty("java.io.tmpdir") + File.separator +
            fixPath( userName ) )
        confDir.mkdirs
        val confFile = new File( confDir, "jaas.conf");
        val fw = new FileWriter( confFile );
        fw.write( confString )
        fw.close

        //Set the jaas login config property
        println("Registering JaasConfiguration: " + confFile.getAbsolutePath)
        System.setProperty(JaasUtils.JAVA_LOGIN_CONFIG_PARAM, confFile.getAbsolutePath )
      }catch{
        case e:Throwable => {
          e.printStackTrace
          throw e
        }
      }finally{
        if ( is != null ) is.close
      }
  }
}


text:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!--

  Copyright 2003 - 2015 The eFaps Team

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.

-->
<ui-form xmlns="http://www.efaps.org/xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.efaps.org/xsd http://www.efaps.org/xsd/eFaps_1.0.xsd">
    <uuid>45787306-82ee-4f9a-89e1-30078cec03c2</uuid>
    <file-application>eFapsApp-Sales</file-application>
    <definition>
        <version-expression>(version==latest)</version-expression>
        <profiles>
            <profile name="eFaps"/>
        </profiles>
        <name>Sales_AccountPettyCashForm</name>
        <field name="name">

            <property name="ModeCreate">EDITABLE</property>
            <property name="ModeEdit">EDITABLE</property>
            <property name="ModeSearch">EDITABLE</property>
            <property name="Attribute">Name</property>
            <property name="Required">true</property>
        </field>
        <field name="description">

            <property name="ModeCreate">EDITABLE</property>
            <property name="ModeEdit">EDITABLE</property>
            <property name="ModeSearch">EDITABLE</property>
            <property name="Attribute">Description</property>
            <property name="Required">true</property>
        </field>
        <field name="currencyLink">
            <property name="ModeCreate">EDITABLE</property>
            <property name="ModeEdit">EDITABLE</property>
            <property name="ModeView">NONE</property>
            <property name="Attribute">CurrencyLink</property>
            <property name="Required">true</property>
        </field>
        <field name="currencyLink4View">
            <property name="ModeEdit">NONE</property>
            <property name="Select">linkto[CurrencyLink].attribute[Name]</property>
            <property name="Required">true</property>
            <property name="Label">Sales_AccountAbstract/CurrencyLink.Label</property>
        </field>
        <field name="amount">

            <property name="ModeCreate">EDITABLE</property>
            <property name="ModeEdit">EDITABLE</property>
            <property name="Attribute">AmountAbstract</property>
        </field>
        <field name="amountCurrent">

            <property name="ModeEdit">NONE</property>
            <property name="ModeView">READONLY</property>
            <property name="ModeCreate">NONE</property>
            <property name="Label">Sales_AccountAbstractForm.amountCurrent.Label</property>
            <property name="UIProvider">org.efaps.admin.datamodel.ui.StringUI</property>
            <trigger event="UI_FIELD_VALUE"
                method="getAmountCurrentFieldValueUI"
                name="Sales_AccountAbstractForm.amountCurrent.UI_FIELD_VALUE"
                program="org.efaps.esjp.sales.Account">
            </trigger>
        </field>
        <field name="status">
            <property name="Attribute">Status</property>
        </field>
    </definition>
    <definition>
        <version-expression>(version==latest)</version-expression>
        <profiles>
            <profile name="projects"/>
        </profiles>
        <name>Sales_AccountPettyCashForm</name>
        <field name="project">
            <property name="Label">Sales_AccountPettyCashForm.project.Label</property>
            <property name="ModeCreate">EDITABLE</property>
            <property name="ModeEdit">NONE</property>
            <property name="ModeView">NONE</property>
            <property name="Width">60</property>
            <property name="UIProvider">org.efaps.admin.datamodel.ui.StringUI</property>
            <trigger program="org.efaps.esjp.projects.Project"
                method="autoComplete4Project"
                name="Sales_AccountPettyCashForm.project.UI_FIELD_AUTOCOMPLETE"
                event="UI_FIELD_AUTOCOMPLETE">
                <property name="StatusGroup">Projects_ProjectServiceStatus</property>
                <property name="Status">Closed</property>
                <property name="MaxChoiceLength">155</property>
            </trigger>
        </field>
        <field name="project4View">
            <property name="SelectAlternateOID">linkfrom[Projects_ProjectService2PettyCash#ToLink].linkto[FromLink].oid</property>
            <property name="Phrase">$<linkfrom[Projects_ProjectService2PettyCash#ToLink].linkto[FromLink].attribute[Name]> - $<linkfrom[Projects_ProjectService2PettyCash#ToLink].linkto[FromLink].attribute[Description]></property>
            <property name="HRef">${COMMONURL}/MenuTree.jsp</property>
            <property name="Label">Sales_AccountPettyCashForm.project.Label</property>
            <property name="ModeCreate">NONE</property>
            <property name="ModeEdit">NONE</property>
            <property name="ModeView">READONLY</property>
            <property name="UIProvider">org.efaps.admin.datamodel.ui.StringUI</property>
            <property name="Width">50</property>
        </field>
        <field name="name">

            <property name="ModeCreate">EDITABLE</property>
            <property name="ModeEdit">EDITABLE</property>
            <property name="ModeSearch">EDITABLE</property>
            <property name="Attribute">Name</property>
            <property name="Required">true</property>
        </field>
        <field name="description">

            <property name="ModeCreate">EDITABLE</property>
            <property name="ModeEdit">EDITABLE</property>
            <property name="ModeSearch">EDITABLE</property>
            <property name="Attribute">Description</property>
            <property name="Required">true</property>
        </field>
        <field name="currencyLink">
            <property name="ModeCreate">EDITABLE</property>
            <property name="ModeEdit">EDITABLE</property>
            <property name="ModeView">NONE</property>
            <property name="Attribute">CurrencyLink</property>
            <property name="Required">true</property>
        </field>
        <field name="currencyLink4View">
            <property name="ModeEdit">NONE</property>
            <property name="Select">linkto[CurrencyLink].attribute[Name]</property>
            <property name="Required">true</property>
            <property name="Label">Sales_AccountAbstract/CurrencyLink.Label</property>
        </field>
        <field name="amount">

            <property name="ModeCreate">EDITABLE</property>
            <property name="ModeEdit">EDITABLE</property>
            <property name="Attribute">AmountAbstract</property>
        </field>
        <field name="amountCurrent">

            <property name="ModeEdit">NONE</property>
            <property name="ModeView">READONLY</property>
            <property name="ModeCreate">NONE</property>
            <property name="Label">Sales_AccountAbstractForm.amountCurrent.Label</property>
            <property name="UIProvider">org.efaps.admin.datamodel.ui.StringUI</property>
            <trigger event="UI_FIELD_VALUE"
                method="getAmountCurrentFieldValueUI"
                name="Sales_AccountPettyCashForm.amountCurrent.UI_FIELD_VALUE"
                program="org.efaps.esjp.sales.Account">
            </trigger>
        </field>
         <field name="status">
            <property name="Attribute">Status</property>
        </field>
    </definition>
</ui-form>


text:
@protocol IDEDataSourceReloadable <NSObject>
- (void)reloadData;
@end


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Implier.FIXApplication;
using Implier.Graph;
using Implier.SpreadMatrix;
using QuickFix;
using Message = QuickFix.Message;

namespace Implier.PureArbitrage
{
    internal class OrderController : DisposableBaseObject
    {
        #region Fields
        Dictionary<string, Order> orders = new Dictionary<string, Order>();
        private static OrderController instance = null;
        #endregion

        #region Properties
        public static OrderController Instance
        {
            get { return instance ?? (instance = new OrderController()); }
        }

        public IEnumerable<Order> Orders
        {
            get
            {
                lock (LockObject)
                {
                    return orders.Values.ToList();
                }
            }
        }
        #endregion

        #region Constructor
        protected OrderController() : base() { }
        #endregion

        #region Methods
        public void Register(Order order)
        {
            lock (LockObject)
            {
                if(!orders.ContainsKey(order.ClOrdID))
                    orders.Add(order.ClOrdID, order);
            }
        }

        public void UnRegister(Order order)
        {
            lock (LockObject)
            {
                if (orders.ContainsKey(order.ClOrdID))
                    orders.Remove(order.ClOrdID);
            }
        }

        public void UpdateOrderStatus(QuickFix42.ExecutionReport executionReport)
        {
            lock (LockObject)
            {
                // ClOrdID is not presented when order was changed outside of Fix Adapter
                if (!executionReport.isSetClOrdID())
                    return;

                String ClOrdID = executionReport.getClOrdID().getValue();

                if(orders.ContainsKey(ClOrdID))
                {
                    Order order = orders[ClOrdID];

                    switch(executionReport.getOrdStatus().getValue())
                    {
                        case OrdStatus.NEW:
                            order.OrderStatus = OrderStatus.New;
                            break;
                        case OrdStatus.PARTIALLY_FILLED:
                            order.OrderStatus = OrderStatus.PartiallyFilled;
                            break;
                        case OrdStatus.FILLED:
                            order.OrderStatus = OrderStatus.Filled;
                            break;
                        case OrdStatus.CANCELED:
                            order.OrderStatus = OrderStatus.Canceled;
                            break;
                        case OrdStatus.REJECTED:
                            order.OrderStatus = OrderStatus.Rejected;
                            break;
                        default:
                            throw new Exception("Undefined order state" + executionReport.getOrdStatus().getValue());

                    }
                    order.AddExecutionReport(executionReport);
                }
            }
        }

        public void RequestOrders(IEnumerable<Order> orderList)
        {
            lock (LockObject)
            {
                FixApplication.Current.RequestOrders(orderList.Select(order => order.OrderMessage).ToList());
            }
        }

        protected override void DoDispose()
        {
            orders.Clear();
            //throw new NotImplementedException();
        }
        #endregion
    }

    internal enum OrderStatus
    {
        Init,
        Sending,
        New,
        PartiallyFilled,
        Filled,
        Canceled,
        Replaced,
        PendingCancel,
        Rejected,
        Restated
    }

    internal partial class Order : DisposableBaseObject
    {
        #region Fields
        SecurityEntry weakCopy;
        MDEntryGroup currentMDGroup;
        List<QuickFix42.ExecutionReport> executionReports = new List<QuickFix42.ExecutionReport>();
        OrderStatus orderStatus = OrderStatus.Init;
        #endregion

        #region Properties
        public int ExecutionReportCount
        {
            get
            {
                lock (LockObject)
                {
                    return executionReports.Count();
                }
            }
        }

        public OrderStatus OrderStatus
        {
            get
            {
                lock (LockObject)
                {
                    return orderStatus;
                }
            }
            set
            {
                lock (LockObject)
                {
                    orderStatus = value;
                }
            }
        }

        public Message OrderMessage { get; private set; }
        public string ClOrdID { get { return ((QuickFix42.NewOrderSingle)OrderMessage).getClOrdID().getValue(); } }
        #endregion

        #region Constructor
        public Order(IProposal proposal, double quantity)
        {
            int propIndex = -1;
            SecurityEntry ownerEntry = ((MDEntryGroup) proposal).OwnerEntry;
            propIndex = ownerEntry.GetGroupIndex((MDEntryGroup)proposal);

            weakCopy = ((Proposal) proposal).OwnerEntry.WeakClone();
            currentMDGroup = weakCopy.GetGroup((uint) propIndex);

            OrderMessage = FixApplication.Current.NewOrder(proposal, quantity);
        }

        public Order(MDEntryGroup entryGroup, double quantity)
        {
            int propIndex = -1;
            SecurityEntry ownerEntry = entryGroup.OwnerEntry;
            propIndex = ownerEntry.GetGroupIndex(entryGroup);

            weakCopy = entryGroup.OwnerEntry.WeakClone();
            currentMDGroup = weakCopy.GetGroup((uint)propIndex);

            OrderMessage = FixApplication.Current.NewOrder(entryGroup, quantity);
        }

        #endregion

        #region Methods
        public QuickFix42.ExecutionReport GetExecutionReport(int index)
        {
            lock (LockObject)
            {
                return executionReports[index];
            }
        }

        public void AddExecutionReport(QuickFix42.ExecutionReport executionReport)
        {
            lock (LockObject)
            {
                executionReports.Add(executionReport);
            }
        }

        protected override void DoDispose()
        {
            weakCopy.Dispose();
            executionReports.Clear();
        }
        #endregion
    }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content">

    <ImageView
        android:id="@+id/item_image_view"
        android:layout_width="50dp"
        android:layout_height="50dp"
        android:layout_alignParentTop="true"
        android:layout_centerHorizontal="true"
        android:src="@android:drawable/ic_menu_camera" />

    <TextView
        android:id="@+id/item_text_view"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_below="@id/item_image_view"
        android:layout_centerHorizontal="true"
        android:textSize="17sp"
        android:text="PIC"
        android:textColor="@android:color/white" />
</RelativeLayout>


text:
This covers the following reference assemblies:

* System.Threading
* System.Threading.Overlapped
* System.Threading.Tasks
* System.Threading.Thread
* System.Threading.ThreadPool
* System.Threading.Timer

```diff
---\\scratch2\scratch\safern\RefAssembliesNullable\System.Threading\before
+++\\scratch2\scratch\safern\RefAssembliesNullable\System.Threading\after
 namespace System {
  public sealed class LocalDataStoreSlot {
    ~LocalDataStoreSlot();
  }
  public class OperationCanceledException : SystemException {
    public OperationCanceledException();
    protected OperationCanceledException(SerializationInfo info, StreamingContext context);
    public OperationCanceledException(string? message);
    public OperationCanceledException(string? message, Exception? innerException);
    public OperationCanceledException(string? message, Exception? innerException, CancellationToken token);
    public OperationCanceledException(string? message, CancellationToken token);
    public OperationCanceledException(CancellationToken token);
    public CancellationToken CancellationToken { get; }
  }
 }
 namespace System.Runtime.CompilerServices {
  public struct AsyncIteratorMethodBuilder {
    public void AwaitOnCompleted<TAwaiter, TStateMachine>(ref TAwaiter awaiter, ref TStateMachine stateMachine) where TAwaiter : INotifyCompletion where TStateMachine : IAsyncStateMachine;
    public void AwaitUnsafeOnCompleted<TAwaiter, TStateMachine>(ref TAwaiter awaiter, ref TStateMachine stateMachine) where TAwaiter : ICriticalNotifyCompletion where TStateMachine : IAsyncStateMachine;
    public void Complete();
    public static AsyncIteratorMethodBuilder Create();
    public void MoveNext<TStateMachine>(ref TStateMachine stateMachine) where TStateMachine : IAsyncStateMachine;
  }
  public struct AsyncTaskMethodBuilder {
    public Task Task { get; }
    public void AwaitOnCompleted<TAwaiter, TStateMachine>(ref TAwaiter awaiter, ref TStateMachine stateMachine) where TAwaiter : INotifyCompletion where TStateMachine : IAsyncStateMachine;
    public void AwaitUnsafeOnCompleted<TAwaiter, TStateMachine>(ref TAwaiter awaiter, ref TStateMachine stateMachine) where TAwaiter : ICriticalNotifyCompletion where TStateMachine : IAsyncStateMachine;
    public static AsyncTaskMethodBuilder Create();
    public void SetException(Exception exception);
    public void SetResult();
    public void SetStateMachine(IAsyncStateMachine stateMachine);
    public void Start<TStateMachine>(ref TStateMachine stateMachine) where TStateMachine : IAsyncStateMachine;
  }
  public struct AsyncTaskMethodBuilder<TResult> {
    public Task<TResult> Task { get; }
    public void AwaitOnCompleted<TAwaiter, TStateMachine>(ref TAwaiter awaiter, ref TStateMachine stateMachine) where TAwaiter : INotifyCompletion where TStateMachine : IAsyncStateMachine;
    public void AwaitUnsafeOnCompleted<TAwaiter, TStateMachine>(ref TAwaiter awaiter, ref TStateMachine stateMachine) where TAwaiter : ICriticalNotifyCompletion where TStateMachine : IAsyncStateMachine;
    public static AsyncTaskMethodBuilder<TResult> Create();
    public void SetException(Exception exception);
    public void SetResult(TResult result);
    public void SetStateMachine(IAsyncStateMachine stateMachine);
    public void Start<TStateMachine>(ref TStateMachine stateMachine) where TStateMachine : IAsyncStateMachine;
  }
  public struct AsyncVoidMethodBuilder {
    public void AwaitOnCompleted<TAwaiter, TStateMachine>(ref TAwaiter awaiter, ref TStateMachine stateMachine) where TAwaiter : INotifyCompletion where TStateMachine : IAsyncStateMachine;
    public void AwaitUnsafeOnCompleted<TAwaiter, TStateMachine>(ref TAwaiter awaiter, ref TStateMachine stateMachine) where TAwaiter : ICriticalNotifyCompletion where TStateMachine : IAsyncStateMachine;
    public static AsyncVoidMethodBuilder Create();
    public void SetException(Exception exception);
    public void SetResult();
    public void SetStateMachine(IAsyncStateMachine stateMachine);
    public void Start<TStateMachine>(ref TStateMachine stateMachine) where TStateMachine : IAsyncStateMachine;
  }
  public readonly struct ConfiguredAsyncDisposable {
    public ConfiguredValueTaskAwaitable DisposeAsync();
  }
  public readonly struct ConfiguredCancelableAsyncEnumerable<T> {
    public ConfiguredCancelableAsyncEnumerable<T> ConfigureAwait(bool continueOnCapturedContext);
    public ConfiguredCancelableAsyncEnumerable<T>.Enumerator GetAsyncEnumerator();
    public ConfiguredCancelableAsyncEnumerable<T> WithCancellation(CancellationToken cancellationToken);
    public readonly struct Enumerator {
      public T Current { get; }
      public ConfiguredValueTaskAwaitable DisposeAsync();
      public ConfiguredValueTaskAwaitable<bool> MoveNextAsync();
    }
  }
 }
 namespace System.Threading {
  public class AbandonedMutexException : SystemException {
    public AbandonedMutexException();
    public AbandonedMutexException(int location, WaitHandle? handle);
    protected AbandonedMutexException(SerializationInfo info, StreamingContext context);
    public AbandonedMutexException(string? message);
    public AbandonedMutexException(string? message, Exception? inner);
    public AbandonedMutexException(string? message, Exception? inner, int location, WaitHandle? handle);
    public AbandonedMutexException(string? message, int location, WaitHandle? handle);
    public Mutex? Mutex { get; }
    public int MutexIndex { get; }
  }
  public enum ApartmentState {
    MTA = 1,
    STA = 0,
    Unknown = 2,
  }
  public struct AsyncFlowControl : IDisposable {
    public void Dispose();
    public override bool Equals(object? obj);
    public bool Equals(AsyncFlowControl obj);
    public override int GetHashCode();
    public static bool operator ==(AsyncFlowControl a, AsyncFlowControl b);
    public static bool operator !=(AsyncFlowControl a, AsyncFlowControl b);
    public void Undo();
  }
  public sealed class AsyncLocal<T> {
    public AsyncLocal();
    public AsyncLocal(Action<AsyncLocalValueChangedArgs<T>>? valueChangedHandler);
    public T Value { get; set; }
  }
  public readonly struct AsyncLocalValueChangedArgs<T> {
    public T CurrentValue { get; }
    public T PreviousValue { get; }
    public bool ThreadContextChanged { get; }
  }
  public sealed class AutoResetEvent : EventWaitHandle {
    public AutoResetEvent(bool initialState);
  }
  public class Barrier : IDisposable {
    public Barrier(int participantCount);
    public Barrier(int participantCount, Action<Barrier>? postPhaseAction);
    public long CurrentPhaseNumber { get; }
    public int ParticipantCount { get; }
    public int ParticipantsRemaining { get; }
    public long AddParticipant();
    public long AddParticipants(int participantCount);
    public void Dispose();
    protected virtual void Dispose(bool disposing);
    public void RemoveParticipant();
    public void RemoveParticipants(int participantCount);
    public void SignalAndWait();
    public bool SignalAndWait(int millisecondsTimeout);
    public bool SignalAndWait(int millisecondsTimeout, CancellationToken cancellationToken);
    public void SignalAndWait(CancellationToken cancellationToken);
    public bool SignalAndWait(TimeSpan timeout);
    public bool SignalAndWait(TimeSpan timeout, CancellationToken cancellationToken);
  }
  public class BarrierPostPhaseException : Exception {
    public BarrierPostPhaseException();
    public BarrierPostPhaseException(Exception? innerException);
    protected BarrierPostPhaseException(SerializationInfo info, StreamingContext context);
    public BarrierPostPhaseException(string? message);
    public BarrierPostPhaseException(string? message, Exception? innerException);
  }
  public class CancellationTokenSource : IDisposable {
    public CancellationTokenSource();
    public CancellationTokenSource(int millisecondsDelay);
    public CancellationTokenSource(TimeSpan delay);
    public bool IsCancellationRequested { get; }
    public CancellationToken Token { get; }
    public void Cancel();
    public void Cancel(bool throwOnFirstException);
    public void CancelAfter(int millisecondsDelay);
    public void CancelAfter(TimeSpan delay);
    public static CancellationTokenSource CreateLinkedTokenSource(CancellationToken token1, CancellationToken token2);
    public static CancellationTokenSource CreateLinkedTokenSource(params CancellationToken[] tokens);
    public void Dispose();
    protected virtual void Dispose(bool disposing);
  }
  public sealed class CompressedStack : ISerializable {
    public static CompressedStack Capture();
    public CompressedStack CreateCopy();
    public static CompressedStack GetCompressedStack();
    public void GetObjectData(SerializationInfo info, StreamingContext context);
    public static void Run(CompressedStack compressedStack, ContextCallback callback, object? state);
  }
  public delegate void ContextCallback(object? state);
  public class CountdownEvent : IDisposable {
    public CountdownEvent(int initialCount);
    public int CurrentCount { get; }
    public int InitialCount { get; }
    public bool IsSet { get; }
    public WaitHandle WaitHandle { get; }
    public void AddCount();
    public void AddCount(int signalCount);
    public void Dispose();
    protected virtual void Dispose(bool disposing);
    public void Reset();
    public void Reset(int count);
    public bool Signal();
    public bool Signal(int signalCount);
    public bool TryAddCount();
    public bool TryAddCount(int signalCount);
    public void Wait();
    public bool Wait(int millisecondsTimeout);
    public bool Wait(int millisecondsTimeout, CancellationToken cancellationToken);
    public void Wait(CancellationToken cancellationToken);
    public bool Wait(TimeSpan timeout);
    public bool Wait(TimeSpan timeout, CancellationToken cancellationToken);
  }
  public enum EventResetMode {
    AutoReset = 0,
    ManualReset = 1,
  }
  public class EventWaitHandle : WaitHandle {
    public EventWaitHandle(bool initialState, EventResetMode mode);
    public EventWaitHandle(bool initialState, EventResetMode mode, string? name);
    public EventWaitHandle(bool initialState, EventResetMode mode, string? name, out bool createdNew);
    public static EventWaitHandle OpenExisting(string name);
    public bool Reset();
    public bool Set();
    public static bool TryOpenExisting(string name, out EventWaitHandle? result);
  }
  public sealed class ExecutionContext : IDisposable, ISerializable {
    public static ExecutionContext? Capture();
    public ExecutionContext CreateCopy();
    public void Dispose();
    public void GetObjectData(SerializationInfo info, StreamingContext context);
    public static bool IsFlowSuppressed();
    public static void RestoreFlow();
    public static void Run(ExecutionContext executionContext, ContextCallback callback, object? state);
    public static AsyncFlowControl SuppressFlow();
  }
  public class HostExecutionContext : IDisposable {
    public HostExecutionContext();
    public HostExecutionContext(object? state);
    protected internal object? State { get; set; }
    public virtual HostExecutionContext CreateCopy();
    public void Dispose();
    public virtual void Dispose(bool disposing);
  }
  public class HostExecutionContextManager {
    public HostExecutionContextManager();
    public virtual HostExecutionContext? Capture();
    public virtual void Revert(object previousState);
    public virtual object SetHostExecutionContext(HostExecutionContext hostExecutionContext);
  }
  public static class Interlocked {
    public static int Add(ref int location1, int value);
    public static long Add(ref long location1, long value);
    public static double CompareExchange(ref double location1, double value, double comparand);
    public static int CompareExchange(ref int location1, int value, int comparand);
    public static long CompareExchange(ref long location1, long value, long comparand);
    public static IntPtr CompareExchange(ref IntPtr location1, IntPtr value, IntPtr comparand);
    public static object? CompareExchange(ref object? location1, object? value, object? comparand);
    public static float CompareExchange(ref float location1, float value, float comparand);
    public static T CompareExchange<T>(ref T location1, T value, T comparand) where T : class?;
    public static int Decrement(ref int location);
    public static long Decrement(ref long location);
    public static double Exchange(ref double location1, double value);
    public static int Exchange(ref int location1, int value);
    public static long Exchange(ref long location1, long value);
    public static IntPtr Exchange(ref IntPtr location1, IntPtr value);
    public static object? Exchange(ref object? location1, object? value);
    public static float Exchange(ref float location1, float value);
    public static T Exchange<T>(ref T location1, T value) where T : class?;
    public static int Increment(ref int location);
    public static long Increment(ref long location);
    public static void MemoryBarrier();
    public static void MemoryBarrierProcessWide();
    public static long Read(ref long location);
  }
  public unsafe delegate void IOCompletionCallback(uint errorCode, uint numBytes, NativeOverlapped* pOVERLAP);
  public interface IThreadPoolWorkItem {
    void Execute();
  }
  public static class LazyInitializer {
    public static T EnsureInitialized<T>(ref T target) where T : class;
    public static T EnsureInitialized<T>(ref T target, ref bool initialized, ref object? syncLock);
    public static T EnsureInitialized<T>(ref T target, ref bool initialized, ref object? syncLock, Func<T> valueFactory);
    public static T EnsureInitialized<T>(ref T target, Func<T> valueFactory) where T : class;
    public static T EnsureInitialized<T>(ref T target, ref object? syncLock, Func<T> valueFactory) where T : class;
  }
  public struct LockCookie {
    public override bool Equals(object? obj);
    public bool Equals(LockCookie obj);
    public override int GetHashCode();
    public static bool operator ==(LockCookie a, LockCookie b);
    public static bool operator !=(LockCookie a, LockCookie b);
  }
  public class LockRecursionException : Exception {
    public LockRecursionException();
    protected LockRecursionException(SerializationInfo info, StreamingContext context);
    public LockRecursionException(string? message);
    public LockRecursionException(string? message, Exception? innerException);
  }
  public enum LockRecursionPolicy {
    NoRecursion = 0,
    SupportsRecursion = 1,
  }
  public sealed class ManualResetEvent : EventWaitHandle {
    public ManualResetEvent(bool initialState);
  }
  public class ManualResetEventSlim : IDisposable {
    public ManualResetEventSlim();
    public ManualResetEventSlim(bool initialState);
    public ManualResetEventSlim(bool initialState, int spinCount);
    public bool IsSet { get; }
    public int SpinCount { get; }
    public WaitHandle WaitHandle { get; }
    public void Dispose();
    protected virtual void Dispose(bool disposing);
    public void Reset();
    public void Set();
    public void Wait();
    public bool Wait(int millisecondsTimeout);
    public bool Wait(int millisecondsTimeout, CancellationToken cancellationToken);
    public void Wait(CancellationToken cancellationToken);
    public bool Wait(TimeSpan timeout);
    public bool Wait(TimeSpan timeout, CancellationToken cancellationToken);
  }
  public static class Monitor {
    public static long LockContentionCount { get; }
    public static void Enter(object obj);
    public static void Enter(object obj, ref bool lockTaken);
    public static void Exit(object obj);
    public static bool IsEntered(object obj);
    public static void Pulse(object obj);
    public static void PulseAll(object obj);
    public static bool TryEnter(object obj);
    public static void TryEnter(object obj, ref bool lockTaken);
    public static bool TryEnter(object obj, int millisecondsTimeout);
    public static void TryEnter(object obj, int millisecondsTimeout, ref bool lockTaken);
    public static bool TryEnter(object obj, TimeSpan timeout);
    public static void TryEnter(object obj, TimeSpan timeout, ref bool lockTaken);
    public static bool Wait(object obj);
    public static bool Wait(object obj, int millisecondsTimeout);
    public static bool Wait(object obj, int millisecondsTimeout, bool exitContext);
    public static bool Wait(object obj, TimeSpan timeout);
    public static bool Wait(object obj, TimeSpan timeout, bool exitContext);
  }
  public sealed class Mutex : WaitHandle {
    public Mutex();
    public Mutex(bool initiallyOwned);
    public Mutex(bool initiallyOwned, string? name);
    public Mutex(bool initiallyOwned, string? name, out bool createdNew);
    public static Mutex OpenExisting(string name);
    public void ReleaseMutex();
    public static bool TryOpenExisting(string name, out Mutex? result);
  }
  public struct NativeOverlapped {
    public int OffsetHigh;
    public int OffsetLow;
    public IntPtr EventHandle;
    public IntPtr InternalHigh;
    public IntPtr InternalLow;
  }
  public class Overlapped {
    public Overlapped();
    public Overlapped(int offsetLo, int offsetHi, int hEvent, IAsyncResult ar);
    public Overlapped(int offsetLo, int offsetHi, IntPtr hEvent, IAsyncResult ar);
    public IAsyncResult? AsyncResult { get; set; }
    public int EventHandle { get; set; }
    public IntPtr EventHandleIntPtr { get; set; }
    public int OffsetHigh { get; set; }
    public int OffsetLow { get; set; }
    public unsafe static void Free(NativeOverlapped* nativeOverlappedPtr);
    public unsafe NativeOverlapped* Pack(IOCompletionCallback? iocb);
    public unsafe NativeOverlapped* Pack(IOCompletionCallback? iocb, object? userData);
    public unsafe static Overlapped Unpack(NativeOverlapped* nativeOverlappedPtr);
    public unsafe NativeOverlapped* UnsafePack(IOCompletionCallback? iocb);
    public unsafe NativeOverlapped* UnsafePack(IOCompletionCallback? iocb, object? userData);
  }
  public delegate void ParameterizedThreadStart(object? obj);
  public sealed class PreAllocatedOverlapped : IDisposable {
    public PreAllocatedOverlapped(IOCompletionCallback callback, object? state, object? pinData);
    public void Dispose();
    ~PreAllocatedOverlapped();
  }
  public sealed class ReaderWriterLock : CriticalFinalizerObject {
    public ReaderWriterLock();
    public bool IsReaderLockHeld { get; }
    public bool IsWriterLockHeld { get; }
    public int WriterSeqNum { get; }
    public void AcquireReaderLock(int millisecondsTimeout);
    public void AcquireReaderLock(TimeSpan timeout);
    public void AcquireWriterLock(int millisecondsTimeout);
    public void AcquireWriterLock(TimeSpan timeout);
    public bool AnyWritersSince(int seqNum);
    public void DowngradeFromWriterLock(ref LockCookie lockCookie);
    public LockCookie ReleaseLock();
    public void ReleaseReaderLock();
    public void ReleaseWriterLock();
    public void RestoreLock(ref LockCookie lockCookie);
    public LockCookie UpgradeToWriterLock(int millisecondsTimeout);
    public LockCookie UpgradeToWriterLock(TimeSpan timeout);
  }
  public class ReaderWriterLockSlim : IDisposable {
    public ReaderWriterLockSlim();
    public ReaderWriterLockSlim(LockRecursionPolicy recursionPolicy);
    public int CurrentReadCount { get; }
    public bool IsReadLockHeld { get; }
    public bool IsUpgradeableReadLockHeld { get; }
    public bool IsWriteLockHeld { get; }
    public LockRecursionPolicy RecursionPolicy { get; }
    public int RecursiveReadCount { get; }
    public int RecursiveUpgradeCount { get; }
    public int RecursiveWriteCount { get; }
    public int WaitingReadCount { get; }
    public int WaitingUpgradeCount { get; }
    public int WaitingWriteCount { get; }
    public void Dispose();
    public void EnterReadLock();
    public void EnterUpgradeableReadLock();
    public void EnterWriteLock();
    public void ExitReadLock();
    public void ExitUpgradeableReadLock();
    public void ExitWriteLock();
    public bool TryEnterReadLock(int millisecondsTimeout);
    public bool TryEnterReadLock(TimeSpan timeout);
    public bool TryEnterUpgradeableReadLock(int millisecondsTimeout);
    public bool TryEnterUpgradeableReadLock(TimeSpan timeout);
    public bool TryEnterWriteLock(int millisecondsTimeout);
    public bool TryEnterWriteLock(TimeSpan timeout);
  }
  public sealed class RegisteredWaitHandle : MarshalByRefObject {
    public bool Unregister(WaitHandle? waitObject);
  }
  public sealed class Semaphore : WaitHandle {
    public Semaphore(int initialCount, int maximumCount);
    public Semaphore(int initialCount, int maximumCount, string? name);
    public Semaphore(int initialCount, int maximumCount, string? name, out bool createdNew);
    public static Semaphore OpenExisting(string name);
    public int Release();
    public int Release(int releaseCount);
    public static bool TryOpenExisting(string name, out Semaphore? result);
  }
  public class SemaphoreFullException : SystemException {
    public SemaphoreFullException();
    protected SemaphoreFullException(SerializationInfo info, StreamingContext context);
    public SemaphoreFullException(string? message);
    public SemaphoreFullException(string? message, Exception? innerException);
  }
  public class SemaphoreSlim : IDisposable {
    public SemaphoreSlim(int initialCount);
    public SemaphoreSlim(int initialCount, int maxCount);
    public WaitHandle AvailableWaitHandle { get; }
    public int CurrentCount { get; }
    public void Dispose();
    protected virtual void Dispose(bool disposing);
    public int Release();
    public int Release(int releaseCount);
    public void Wait();
    public bool Wait(int millisecondsTimeout);
    public bool Wait(int millisecondsTimeout, CancellationToken cancellationToken);
    public void Wait(CancellationToken cancellationToken);
    public bool Wait(TimeSpan timeout);
    public bool Wait(TimeSpan timeout, CancellationToken cancellationToken);
    public Task WaitAsync();
    public Task<bool> WaitAsync(int millisecondsTimeout);
    public Task<bool> WaitAsync(int millisecondsTimeout, CancellationToken cancellationToken);
    public Task WaitAsync(CancellationToken cancellationToken);
    public Task<bool> WaitAsync(TimeSpan timeout);
    public Task<bool> WaitAsync(TimeSpan timeout, CancellationToken cancellationToken);
  }
  public delegate void SendOrPostCallback(object? state);
  public struct SpinLock {
    public SpinLock(bool enableThreadOwnerTracking);
    public bool IsHeld { get; }
    public bool IsHeldByCurrentThread { get; }
    public bool IsThreadOwnerTrackingEnabled { get; }
    public void Enter(ref bool lockTaken);
    public void Exit();
    public void Exit(bool useMemoryBarrier);
    public void TryEnter(ref bool lockTaken);
    public void TryEnter(int millisecondsTimeout, ref bool lockTaken);
    public void TryEnter(TimeSpan timeout, ref bool lockTaken);
  }
  public struct SpinWait {
    public int Count { get; }
    public bool NextSpinWillYield { get; }
    public void Reset();
    public void SpinOnce();
    public void SpinOnce(int sleep1Threshold);
    public static void SpinUntil(Func<bool> condition);
    public static bool SpinUntil(Func<bool> condition, int millisecondsTimeout);
    public static bool SpinUntil(Func<bool> condition, TimeSpan timeout);
  }
  public class SynchronizationContext {
    public SynchronizationContext();
    public static SynchronizationContext? Current { get; }
    public virtual SynchronizationContext CreateCopy();
    public bool IsWaitNotificationRequired();
    public virtual void OperationCompleted();
    public virtual void OperationStarted();
    public virtual void Post(SendOrPostCallback d, object? state);
    public virtual void Send(SendOrPostCallback d, object? state);
    public static void SetSynchronizationContext(SynchronizationContext? syncContext);
    protected void SetWaitNotificationRequired();
    public virtual int Wait(IntPtr[] waitHandles, bool waitAll, int millisecondsTimeout);
    protected static int WaitHelper(IntPtr[] waitHandles, bool waitAll, int millisecondsTimeout);
  }
  public class SynchronizationLockException : SystemException {
    public SynchronizationLockException();
    protected SynchronizationLockException(SerializationInfo info, StreamingContext context);
    public SynchronizationLockException(string? message);
    public SynchronizationLockException(string? message, Exception? innerException);
  }
  public sealed class Thread : CriticalFinalizerObject {
    public Thread(ParameterizedThreadStart start);
    public Thread(ParameterizedThreadStart start, int maxStackSize);
    public Thread(ThreadStart start);
    public Thread(ThreadStart start, int maxStackSize);
    public ApartmentState ApartmentState { get; set; }
    public CultureInfo CurrentCulture { get; set; }
    public static IPrincipal? CurrentPrincipal { get; set; }
    public static Thread CurrentThread { get; }
    public CultureInfo CurrentUICulture { get; set; }
    public ExecutionContext? ExecutionContext { get; }
    public bool IsAlive { get; }
    public bool IsBackground { get; set; }
    public bool IsThreadPoolThread { get; }
    public int ManagedThreadId { get; }
    public string? Name { get; set; }
    public ThreadPriority Priority { get; set; }
    public ThreadState ThreadState { get; }
    public void Abort();
    public void Abort(object? stateInfo);
    public static LocalDataStoreSlot AllocateDataSlot();
    public static LocalDataStoreSlot AllocateNamedDataSlot(string name);
    public static void BeginCriticalRegion();
    public static void BeginThreadAffinity();
    public void DisableComObjectEagerCleanup();
    public static void EndCriticalRegion();
    public static void EndThreadAffinity();
    ~Thread();
    public static void FreeNamedDataSlot(string name);
    public ApartmentState GetApartmentState();
    public CompressedStack GetCompressedStack();
    public static int GetCurrentProcessorId();
    public static object? GetData(LocalDataStoreSlot slot);
    public static AppDomain GetDomain();
    public static int GetDomainID();
    public override int GetHashCode();
    public static LocalDataStoreSlot GetNamedDataSlot(string name);
    public void Interrupt();
    public void Join();
    public bool Join(int millisecondsTimeout);
    public bool Join(TimeSpan timeout);
    public static void MemoryBarrier();
    public static void ResetAbort();
    public void Resume();
    public void SetApartmentState(ApartmentState state);
    public void SetCompressedStack(CompressedStack stack);
    public static void SetData(LocalDataStoreSlot slot, object? data);
    public static void Sleep(int millisecondsTimeout);
    public static void Sleep(TimeSpan timeout);
    public static void SpinWait(int iterations);
    public void Start();
    public void Start(object? parameter);
    public void Suspend();
    public bool TrySetApartmentState(ApartmentState state);
    public static byte VolatileRead(ref byte address);
    public static double VolatileRead(ref double address);
    public static short VolatileRead(ref short address);
    public static int VolatileRead(ref int address);
    public static long VolatileRead(ref long address);
    public static IntPtr VolatileRead(ref IntPtr address);
    public static object? VolatileRead(ref object? address);
    public static sbyte VolatileRead(ref sbyte address);
    public static float VolatileRead(ref float address);
    public static ushort VolatileRead(ref ushort address);
    public static uint VolatileRead(ref uint address);
    public static ulong VolatileRead(ref ulong address);
    public static UIntPtr VolatileRead(ref UIntPtr address);
    public static void VolatileWrite(ref byte address, byte value);
    public static void VolatileWrite(ref double address, double value);
    public static void VolatileWrite(ref short address, short value);
    public static void VolatileWrite(ref int address, int value);
    public static void VolatileWrite(ref long address, long value);
    public static void VolatileWrite(ref IntPtr address, IntPtr value);
    public static void VolatileWrite(ref object? address, object? value);
    public static void VolatileWrite(ref sbyte address, sbyte value);
    public static void VolatileWrite(ref float address, float value);
    public static void VolatileWrite(ref ushort address, ushort value);
    public static void VolatileWrite(ref uint address, uint value);
    public static void VolatileWrite(ref ulong address, ulong value);
    public static void VolatileWrite(ref UIntPtr address, UIntPtr value);
    public static bool Yield();
  }
  public sealed class ThreadAbortException : SystemException {
    public object? ExceptionState { get; }
  }
  public class ThreadExceptionEventArgs : EventArgs {
    public ThreadExceptionEventArgs(Exception t);
    public Exception Exception { get; }
  }
  public delegate void ThreadExceptionEventHandler(object sender, ThreadExceptionEventArgs e);
  public class ThreadInterruptedException : SystemException {
    public ThreadInterruptedException();
    protected ThreadInterruptedException(SerializationInfo info, StreamingContext context);
    public ThreadInterruptedException(string? message);
    public ThreadInterruptedException(string? message, Exception? innerException);
  }
  public class ThreadLocal<T> : IDisposable {
    public ThreadLocal();
    public ThreadLocal(bool trackAllValues);
    public ThreadLocal(Func<T> valueFactory);
    public ThreadLocal(Func<T> valueFactory, bool trackAllValues);
    public bool IsValueCreated { get; }
    public T Value { get; set; }
    public IList<T> Values { get; }
    public void Dispose();
    protected virtual void Dispose(bool disposing);
    ~ThreadLocal();
    public override string? ToString();
  }
  public static class ThreadPool {
    public static long CompletedWorkItemCount { get; }
    public static long PendingWorkItemCount { get; }
    public static int ThreadCount { get; }
    public static bool BindHandle(IntPtr osHandle);
    public static bool BindHandle(SafeHandle osHandle);
    public static void GetAvailableThreads(out int workerThreads, out int completionPortThreads);
    public static void GetMaxThreads(out int workerThreads, out int completionPortThreads);
    public static void GetMinThreads(out int workerThreads, out int completionPortThreads);
    public static bool QueueUserWorkItem(WaitCallback callBack);
    public static bool QueueUserWorkItem(WaitCallback callBack, object? state);
    public static bool QueueUserWorkItem<TState>(Action<TState> callBack, TState state, bool preferLocal);
    public static RegisteredWaitHandle RegisterWaitForSingleObject(WaitHandle waitObject, WaitOrTimerCallback callBack, object? state, int millisecondsTimeOutInterval, bool executeOnlyOnce);
    public static RegisteredWaitHandle RegisterWaitForSingleObject(WaitHandle waitObject, WaitOrTimerCallback callBack, object? state, long millisecondsTimeOutInterval, bool executeOnlyOnce);
    public static RegisteredWaitHandle RegisterWaitForSingleObject(WaitHandle waitObject, WaitOrTimerCallback callBack, object? state, TimeSpan timeout, bool executeOnlyOnce);
    public static RegisteredWaitHandle RegisterWaitForSingleObject(WaitHandle waitObject, WaitOrTimerCallback callBack, object? state, uint millisecondsTimeOutInterval, bool executeOnlyOnce);
    public static bool SetMaxThreads(int workerThreads, int completionPortThreads);
    public static bool SetMinThreads(int workerThreads, int completionPortThreads);
    public unsafe static bool UnsafeQueueNativeOverlapped(NativeOverlapped* overlapped);
    public static bool UnsafeQueueUserWorkItem(IThreadPoolWorkItem callBack, bool preferLocal);
    public static bool UnsafeQueueUserWorkItem(WaitCallback callBack, object? state);
    public static bool UnsafeQueueUserWorkItem<TState>(Action<TState> callBack, TState state, bool preferLocal);
    public static RegisteredWaitHandle UnsafeRegisterWaitForSingleObject(WaitHandle waitObject, WaitOrTimerCallback callBack, object? state, int millisecondsTimeOutInterval, bool executeOnlyOnce);
    public static RegisteredWaitHandle UnsafeRegisterWaitForSingleObject(WaitHandle waitObject, WaitOrTimerCallback callBack, object? state, long millisecondsTimeOutInterval, bool executeOnlyOnce);
    public static RegisteredWaitHandle UnsafeRegisterWaitForSingleObject(WaitHandle waitObject, WaitOrTimerCallback callBack, object? state, TimeSpan timeout, bool executeOnlyOnce);
    public static RegisteredWaitHandle UnsafeRegisterWaitForSingleObject(WaitHandle waitObject, WaitOrTimerCallback callBack, object? state, uint millisecondsTimeOutInterval, bool executeOnlyOnce);
  }
  public sealed class ThreadPoolBoundHandle : IDisposable {
    public SafeHandle Handle { get; }
    public unsafe NativeOverlapped* AllocateNativeOverlapped(IOCompletionCallback callback, object? state, object? pinData);
    public unsafe NativeOverlapped* AllocateNativeOverlapped(PreAllocatedOverlapped preAllocated);
    public static ThreadPoolBoundHandle BindHandle(SafeHandle handle);
    public void Dispose();
    public unsafe void FreeNativeOverlapped(NativeOverlapped* overlapped);
    public unsafe static object? GetNativeOverlappedState(NativeOverlapped* overlapped);
  }
  public enum ThreadPriority {
    AboveNormal = 3,
    BelowNormal = 1,
    Highest = 4,
    Lowest = 0,
    Normal = 2,
  }
  public delegate void ThreadStart();
  public sealed class ThreadStartException : SystemException {
  }
  public enum ThreadState {
    Aborted = 256,
    AbortRequested = 128,
    Background = 4,
    Running = 0,
    Stopped = 16,
    StopRequested = 1,
    Suspended = 64,
    SuspendRequested = 2,
    Unstarted = 8,
    WaitSleepJoin = 32,
  }
  public class ThreadStateException : SystemException {
    public ThreadStateException();
    protected ThreadStateException(SerializationInfo info, StreamingContext context);
    public ThreadStateException(string? message);
    public ThreadStateException(string? message, Exception? innerException);
  }
  public sealed class Timer : MarshalByRefObject, IAsyncDisposable, IDisposable {
    public Timer(TimerCallback callback);
    public Timer(TimerCallback callback, object? state, int dueTime, int period);
    public Timer(TimerCallback callback, object? state, long dueTime, long period);
    public Timer(TimerCallback callback, object? state, TimeSpan dueTime, TimeSpan period);
    public Timer(TimerCallback callback, object? state, uint dueTime, uint period);
    public bool Change(int dueTime, int period);
    public bool Change(long dueTime, long period);
    public bool Change(TimeSpan dueTime, TimeSpan period);
    public bool Change(uint dueTime, uint period);
    public void Dispose();
    public bool Dispose(WaitHandle notifyObject);
    public ValueTask DisposeAsync();
  }
  public delegate void TimerCallback(object? state);
  public static class Volatile {
    public static bool Read(ref bool location);
    public static byte Read(ref byte location);
    public static double Read(ref double location);
    public static short Read(ref short location);
    public static int Read(ref int location);
    public static long Read(ref long location);
    public static IntPtr Read(ref IntPtr location);
    public static sbyte Read(ref sbyte location);
    public static float Read(ref float location);
    public static ushort Read(ref ushort location);
    public static uint Read(ref uint location);
    public static ulong Read(ref ulong location);
    public static UIntPtr Read(ref UIntPtr location);
    public static T Read<T>(ref T location) where T : class?;
    public static void Write(ref bool location, bool value);
    public static void Write(ref byte location, byte value);
    public static void Write(ref double location, double value);
    public static void Write(ref short location, short value);
    public static void Write(ref int location, int value);
    public static void Write(ref long location, long value);
    public static void Write(ref IntPtr location, IntPtr value);
    public static void Write(ref sbyte location, sbyte value);
    public static void Write(ref float location, float value);
    public static void Write(ref ushort location, ushort value);
    public static void Write(ref uint location, uint value);
    public static void Write(ref ulong location, ulong value);
    public static void Write(ref UIntPtr location, UIntPtr value);
    public static void Write<T>(ref T location, T value) where T : class?;
  }
  public delegate void WaitCallback(object? state);
  public class WaitHandleCannotBeOpenedException : ApplicationException {
    public WaitHandleCannotBeOpenedException();
    protected WaitHandleCannotBeOpenedException(SerializationInfo info, StreamingContext context);
    public WaitHandleCannotBeOpenedException(string? message);
    public WaitHandleCannotBeOpenedException(string? message, Exception? innerException);
  }
  public delegate void WaitOrTimerCallback(object? state, bool timedOut);
 }
 namespace System.Threading.Tasks {
  public class ConcurrentExclusiveSchedulerPair {
    public ConcurrentExclusiveSchedulerPair();
    public ConcurrentExclusiveSchedulerPair(TaskScheduler taskScheduler);
    public ConcurrentExclusiveSchedulerPair(TaskScheduler taskScheduler, int maxConcurrencyLevel);
    public ConcurrentExclusiveSchedulerPair(TaskScheduler taskScheduler, int maxConcurrencyLevel, int maxItemsPerTask);
    public Task Completion { get; }
    public TaskScheduler ConcurrentScheduler { get; }
    public TaskScheduler ExclusiveScheduler { get; }
    public void Complete();
  }
  public static class TaskAsyncEnumerableExtensions {
    public static ConfiguredAsyncDisposable ConfigureAwait(this IAsyncDisposable source, bool continueOnCapturedContext);
    public static ConfiguredCancelableAsyncEnumerable<T> ConfigureAwait<T>(this IAsyncEnumerable<T> source, bool continueOnCapturedContext);
    public static ConfiguredCancelableAsyncEnumerable<T> WithCancellation<T>(this IAsyncEnumerable<T> source, CancellationToken cancellationToken);
  }
  public class TaskCanceledException : OperationCanceledException {
    public TaskCanceledException();
    protected TaskCanceledException(SerializationInfo info, StreamingContext context);
    public TaskCanceledException(string? message);
    public TaskCanceledException(string? message, Exception? innerException);
    public TaskCanceledException(string? message, Exception? innerException, CancellationToken token);
    public TaskCanceledException(Task? task);
    public Task? Task { get; }
  }
  public class TaskCompletionSource<TResult> {
    public TaskCompletionSource();
    public TaskCompletionSource(object? state);
    public TaskCompletionSource(object? state, TaskCreationOptions creationOptions);
    public TaskCompletionSource(TaskCreationOptions creationOptions);
    public Task<TResult> Task { get; }
    public void SetCanceled();
    public void SetException(IEnumerable<Exception> exceptions);
    public void SetException(Exception exception);
    public void SetResult(TResult result);
    public bool TrySetCanceled();
    public bool TrySetCanceled(CancellationToken cancellationToken);
    public bool TrySetException(IEnumerable<Exception> exceptions);
    public bool TrySetException(Exception exception);
    public bool TrySetResult(TResult result);
  }
  public static class TaskExtensions {
    public static Task Unwrap(this Task<Task> task);
    public static Task<TResult> Unwrap<TResult>(this Task<Task<TResult>> task);
  }
  public class TaskSchedulerException : Exception {
    public TaskSchedulerException();
    public TaskSchedulerException(Exception? innerException);
    protected TaskSchedulerException(SerializationInfo info, StreamingContext context);
    public TaskSchedulerException(string? message);
    public TaskSchedulerException(string? message, Exception? innerException);
  }
 }
```