branch_name
stringclasses 15
values | target
stringlengths 26
10.3M
| directory_id
stringlengths 40
40
| languages
sequencelengths 1
9
| num_files
int64 1
1.47k
| repo_language
stringclasses 34
values | repo_name
stringlengths 6
91
| revision_id
stringlengths 40
40
| snapshot_id
stringlengths 40
40
| input
stringclasses 1
value |
---|---|---|---|---|---|---|---|---|---|
refs/heads/master | <repo_name>skgadag1/ChessBoardChallenge<file_sep>/ChessBoradChallenge/src/service/GameOperationsService.java
package service;
import domain.ChessBoard;
import exceptionHandler.InvalidMoveException;
import exceptionHandler.InvalidPawnException;
public interface GameOperationsService {
/*This method draws the chess board on to the console*/
public ChessBoard drawChessBoard(String src, String dest);
/*This method helps 'drawChessBoard()' method to place pawns in appropriate position*/
public ChessBoard arrangPieces(String initColor);
/*This method refresh the chess board representation each time the move is made*/
public ChessBoard refreshChessBoard(String src, String dest) ;
/*This method helps 'refreshChessBoard()' method to refresh the board depending on the players move*/
public ChessBoard makeMove(String src, String dest, int playerNo) throws InvalidMoveException;
/*This method validates the pawn name entered by the player*/
public void validatePawn(String src, String dest, Character player) throws InvalidPawnException;
/*This method validates the move made by the player*/
public ChessBoard validateMove(String pawn, String dest, Character player) throws InvalidMoveException;
}
<file_sep>/ChessBoradChallenge/src/constants/Constants.java
package constants;
public class Constants {
public static final String ALL_DRIECTION="ALL_DRIECTION";
public static final String DIAGONAL="DIAGONAL";
public static final String DIAGONAL_WHITE="DIAGONAL_WHITE";
public static final String DIAGONAL_BLACK="DIAGONAL_BLACK";
public static final String VERTICAL="VERTICAL";
public static final String HORIZONTAL="HORIZONTAL";
public static final String HV_DIRECTION="HV_DIRECTION";
public static final String L_SHAPE="L_SHAPE";
public static final String ONE_STEP="ONE_STEP";
public static final String ONE_STEP_FORWARD="ONE_STEP_FORWARD";
public static final String ONE_STEP_DIAGONAL="ONE_STEP_DIAGONAL";
public static final String AQUIRE_PAWN="AQUIRE_PAWN";
public static final String WHITE="WHITE";
public static final String BLACK="BLACK";
}
<file_sep>/ChessBoradChallenge/src/service/GameOperationsServiceImpl.java
package service;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map.Entry;
import java.util.stream.Collectors;
import java.util.Set;
import constants.Constants;
import domain.ChessBoard;
import domain.Player;
import exceptionHandler.InvalidMoveException;
import exceptionHandler.InvalidPawnException;
public class GameOperationsServiceImpl implements GameOperationsService{
private static ChessBoard chessBoard=new ChessBoard();
private static List<Player> players=new ArrayList<Player>();
private PawnMoveService pawnMoveService=new PawnMoveServiceImpl(chessBoard, players);
private String s;
boolean isWFirstMove=true, isBFirstMove=true;
/*This method draws the chess board on to the console*/
@Override
public ChessBoard drawChessBoard(String src, String dest) {
String key="";
for(Integer i=0; i<9; i++) {
for(Integer j=0; j<9; j++) {
key=i.toString()+j.toString();
if(i==0&&j==0) {
s=" \t\t";
System.out.print(s);
}else if(i==0&&j<9&&j!=0) {
s=" "+j+"\t ";
System.out.print(s);
}else if(i>0&&i<9&&j==0) {
s=" "+i+"\t\t";
System.out.print(s);
}else {
if(i%2!=0) {
if(j%2!=0) {
s=" O\t ";
}
else {
s=" *\t ";
}
}else if(i%2==0) {
if(j%2==0) {
s=" O\t ";
}
else {
s=" *\t ";
}
}
if(GameOperationsServiceImpl.chessBoard.getBlackChessMen().containsKey(key)) {
s=" "+GameOperationsServiceImpl.chessBoard.getBlackChessMen().get(key)+"\t ";
}else if(GameOperationsServiceImpl.chessBoard.getWhiteChessMen().containsKey(key)) {
s=" "+GameOperationsServiceImpl.chessBoard.getWhiteChessMen().get(key)+"\t ";
}
System.out.print(s);
}
}
if(i==0)
System.out.println("\n\n\t\t Pawns Won "+GameOperationsServiceImpl.players.get(0).getPawnsWon()+"\n\t\t "+GameOperationsServiceImpl.players.get(0).getName()+"\t\t\t\t\t\t["+(!GameOperationsServiceImpl.players.get(0).getPieceChosen().equals(Constants.WHITE)?Constants.BLACK:Constants.WHITE)+"]\n\t\t -------------------------------------------------------------\n");
if(i==8)
System.out.println("\n\n\t\t -------------------------------------------------------------\n\t\t "+GameOperationsServiceImpl.players.get(1).getName()+"\t\t\t\t\t\t["+(!GameOperationsServiceImpl.players.get(1).getPieceChosen().equals(Constants.WHITE)?Constants.BLACK:Constants.WHITE)+"]\n\t\t Pawns Won "+GameOperationsServiceImpl.players.get(1).getPawnsWon()+"\n");
else if(i!=0)
System.out.println("\n\n");
}
if(!src.isEmpty())
System.out.println("[Last Move: "+src+" -> "+dest+"]");
if((GameOperationsServiceImpl.players.get(0).getPawnsWon().contains("k")||GameOperationsServiceImpl.players.get(0).getPawnsWon().contains("K"))||(GameOperationsServiceImpl.players.get(1).getPawnsWon().contains("k")||GameOperationsServiceImpl.players.get(1).getPawnsWon().contains("K"))) {
System.exit(0);
}
return GameOperationsServiceImpl.chessBoard;
}
/*This method helps 'drawChessBoard()' method to place pawns in appropriate position*/
@Override
public ChessBoard arrangPieces(String initColor) {
GameOperationsServiceImpl.players.add(new Player("Player-1", initColor, null,new ArrayList<String>()));
GameOperationsServiceImpl.players.add(new Player("Player-2", initColor.equals(Constants.WHITE)?Constants.BLACK:Constants.WHITE, null,new ArrayList<String>()));
boolean isWhite=(initColor.equals(Constants.WHITE)?true:false);
String src="";
HashMap<String, String> whiteChessMen=new HashMap<String, String>();
HashMap<String, String> blackChessMen=new HashMap<String, String>();
for(Integer i=1; i<=8; i++) {
for(Integer j=1; j<=8; j++) {
src=((i==1||i==8)?i.toString()+j.toString():i.toString());
switch(src) {
case "11": if(isWhite)
whiteChessMen.put(src,"R1");
else
blackChessMen.put(src,"r1");
continue;
case "12": if(isWhite)
whiteChessMen.put(src,"N1");
else
blackChessMen.put(src,"n1");
continue;
case "13": if(isWhite)
whiteChessMen.put(src,"B1");
else
blackChessMen.put(src,"b1");
continue;
case "14": if(isWhite)
whiteChessMen.put(src,"Q");
else
blackChessMen.put(src,"q");
continue;
case "15": if(isWhite)
whiteChessMen.put(src,"K");
else
blackChessMen.put(src,"k");
continue;
case "16": if(isWhite)
whiteChessMen.put(src,"B2");
else
blackChessMen.put(src,"b2");
continue;
case "17": if(isWhite)
whiteChessMen.put(src,"N2");
else
blackChessMen.put(src,"n2");
continue;
case "18": if(isWhite)
whiteChessMen.put(src,"R2");
else
blackChessMen.put(src,"r2");
continue;
case "2": if(isWhite)
whiteChessMen.put(src+j,"x"+j);
else
blackChessMen.put(src+j,"y"+j);
continue;
case "7": if(isWhite)
blackChessMen.put(src+j,"y"+j);
else
whiteChessMen.put(src+j,"x"+j);
continue;
case "81": if(isWhite)
blackChessMen.put(src,"r1");
else
whiteChessMen.put(src,"R1");
continue;
case "82": if(isWhite)
blackChessMen.put(src,"n1");
else
whiteChessMen.put(src,"N1");
continue;
case "83": if(isWhite)
blackChessMen.put(src,"b1");
else
whiteChessMen.put(src,"B1");
continue;
case "84": if(isWhite)
blackChessMen.put(src,"q");
else
whiteChessMen.put(src,"Q");
continue;
case "85": if(isWhite)
blackChessMen.put(src,"k");
else
whiteChessMen.put(src,"K");
continue;
case "86": if(isWhite)
blackChessMen.put(src,"b2");
else
whiteChessMen.put(src,"B2");
continue;
case "87": if(isWhite)
blackChessMen.put(src,"n2");
else
whiteChessMen.put(src,"N2");
continue;
case "88": if(isWhite)
blackChessMen.put(src,"r2");
else
whiteChessMen.put(src,"R2");
continue;
default: continue;
}
}
if(i==2) {
// color1=color2;
i=6;
}
}
GameOperationsServiceImpl.chessBoard.setBlackChessMen(blackChessMen);
GameOperationsServiceImpl.chessBoard.setWhiteChessMen(whiteChessMen);
return this.drawChessBoard("", "");
}
/*This method refresh the chess board representation each time the move is made*/
@Override
public ChessBoard refreshChessBoard(String src, String dest) {
return this.drawChessBoard(src, dest);
}
/*This method helps 'refreshChessBoard()' method to refresh the board depending on the players move*/
@Override
public ChessBoard makeMove(String pawn, String dest, int playerNo) throws InvalidMoveException {
String src="";
Set<Entry<String, String>> entrySet=null;
if(GameOperationsServiceImpl.players.get(playerNo).getPieceChosen().equals(Constants.BLACK))
entrySet=GameOperationsServiceImpl.chessBoard.getBlackChessMen().entrySet();
else
entrySet=GameOperationsServiceImpl.chessBoard.getWhiteChessMen().entrySet();
String aquiredPawn=this.acquirePawn(playerNo, dest);
if(!aquiredPawn.isEmpty())
System.out.println("Bingo! you just aquired a pawn ["+aquiredPawn+"]\n");
for(Entry<String, String> entry : entrySet) {
if(entry.getValue().equals(pawn)) {
pawn=entry.getValue();
src=entry.getKey();
if(src.equals(dest)) {
throw new InvalidMoveException("Can't dest the piece to the same house!\nPlease dest the pawn to appropriate cell to Win the match!\n");
}
if(GameOperationsServiceImpl.players.get(playerNo).getPieceChosen().equals(Constants.BLACK)) {
GameOperationsServiceImpl.chessBoard.getBlackChessMen().remove(src);
GameOperationsServiceImpl.chessBoard.getBlackChessMen().put(dest, pawn);
}
else if(GameOperationsServiceImpl.players.get(playerNo).getPieceChosen().equals(Constants.WHITE)) {
GameOperationsServiceImpl.chessBoard.getWhiteChessMen().remove(src);
GameOperationsServiceImpl.chessBoard.getWhiteChessMen().put(dest, pawn);
}
break;
}else {
continue;
}
}
return this.refreshChessBoard(pawn, dest);
}
/*This method validates the pawn name entered by the player*/
@Override
public void validatePawn(String src, String dest, Character player) throws InvalidPawnException{
int playerNo=Integer.parseInt(player.toString())-1;
boolean isValidPawn=false;
Set<Entry<String, String>> entrySet=null;
if(GameOperationsServiceImpl.players.get(playerNo).getPieceChosen().equals(Constants.BLACK))
entrySet=GameOperationsServiceImpl.chessBoard.getBlackChessMen().entrySet();
else
entrySet=GameOperationsServiceImpl.chessBoard.getWhiteChessMen().entrySet();
for(Entry<String, String> entry : entrySet) {
if(entry.getValue().equals(src)) {
isValidPawn=true;
break;
}else {
continue;
}
}
if(isValidPawn)
return;
else
throw new InvalidPawnException("The Pawn-"+src+" either doesn't belong to you or doesn't exist!\nPlease pick the valid Pawn!");
}
/*This method simulates acquiring the pawn*/
private String acquirePawn(int playerNo, String dest) {
String pawn="";
if(GameOperationsServiceImpl.players.get(playerNo).getPieceChosen().equals(Constants.BLACK)&&GameOperationsServiceImpl.chessBoard.getWhiteChessMen().containsKey(dest)) {
GameOperationsServiceImpl.players.get(playerNo).getPawnsWon().add(GameOperationsServiceImpl.chessBoard.getWhiteChessMen().get(dest));
pawn=GameOperationsServiceImpl.chessBoard.getWhiteChessMen().get(dest);
if(pawn.equals("K")) {
System.out.println("Congratulations "+GameOperationsServiceImpl.players.get(playerNo).getName()+"! You Win!");
// System.exit(0);
}
GameOperationsServiceImpl.chessBoard.getWhiteChessMen().remove(dest);
}else if(GameOperationsServiceImpl.players.get(playerNo).getPieceChosen().equals(Constants.WHITE)&&GameOperationsServiceImpl.chessBoard.getBlackChessMen().containsKey(dest)) {
GameOperationsServiceImpl.players.get(playerNo).getPawnsWon().add(GameOperationsServiceImpl.chessBoard.getBlackChessMen().get(dest));
pawn=GameOperationsServiceImpl.chessBoard.getBlackChessMen().get(dest);
if(pawn.equals("k")) {
System.out.println("Congratulations "+GameOperationsServiceImpl.players.get(playerNo).getName()+"! You Win!");
// System.exit(0);
}
GameOperationsServiceImpl.chessBoard.getBlackChessMen().remove(dest);
}
return pawn;
}
/*This method validates the move made by the player*/
@Override
public ChessBoard validateMove(String pawn, String dest, Character player) throws InvalidMoveException {
if(!dest.matches("([1-8][1-8])")) {
throw new InvalidMoveException("Can't interpret the dest!");
}
String src="";
boolean isFirstMove=false;
int playerNo=Integer.parseInt(player.toString())-1;
Set<Entry<String, String>> entrySet=null;
if(GameOperationsServiceImpl.players.get(playerNo).getPieceChosen().equals(Constants.BLACK))
entrySet=GameOperationsServiceImpl.chessBoard.getBlackChessMen().entrySet();
else
entrySet=GameOperationsServiceImpl.chessBoard.getWhiteChessMen().entrySet();
for(Entry<String, String> entry : entrySet) {
if(entry.getValue().equals(pawn)) {
pawn=entry.getValue();
src=entry.getKey();
break;
}else {
continue;
}
}
/*Condition to check whether the pawn is a 'Rook'*/
if(pawn.matches("([rR][1-2])")) {
if(this.pawnMoveService.moveInHVDirection(pawn,src, dest,playerNo,false)) {
return this.makeMove(pawn, dest,playerNo);
}else {
throw new InvalidMoveException("Invalid Move to 'cell-"+dest+"'! Move violates restrictions imposed on 'Rook'!\n");
}
/*Condition to check whether the pawn is a 'Knight'*/
}else if(pawn.matches("([nN][1-2])")) {
if(this.pawnMoveService.moveInLShape(pawn,src, dest,playerNo)) {
return this.makeMove(pawn, dest,playerNo);
}else {
throw new InvalidMoveException("Invalid Move to 'cell-"+dest+"'! Move violates restrictions imposed on 'Knight'!\n");
}
/*Condition to check whether the pawn is a 'Queen' or 'King'*/
}else if(pawn.matches("([qQkK])")) {
boolean isKing=pawn.matches("([kK])")?true:false;
Character vp=src.charAt(0), vm=dest.charAt(0), hp=src.charAt(1), hm=dest.charAt(1);
int row1=Integer.parseInt(vp.toString());
int row2=Integer.parseInt(vm.toString());
int col1=Integer.parseInt(hp.toString());
int col2=Integer.parseInt(hm.toString());
if(row1==row2||col1==col2) {
if(this.pawnMoveService.moveInHVDirection(pawn,src, dest,playerNo,isKing)) {
return this.makeMove(pawn, dest,playerNo);
}else {
throw new InvalidMoveException("Invalid Move to 'cell-"+dest+"'! Move violates restrictions imposed on 'Queen'!\n");
}
}else {
if(this.pawnMoveService.moveDiagonally(pawn,src, dest, playerNo,isKing)) {
return this.makeMove(pawn, dest,playerNo);
}else {
throw new InvalidMoveException("Invalid Move to 'cell-"+dest+"'! Move violates restrictions imposed on 'Queen'!\n");
}
}
/*Condition to check whether the pawn is a 'Bishop'*/
}else if(pawn.matches("([bB][1-2])")) {
if(this.pawnMoveService.moveDiagonally(pawn,src, dest, playerNo,false)) {
return this.makeMove(pawn, dest,playerNo);
}else {
throw new InvalidMoveException("Invalid Move to 'cell-"+dest+"'! Move violates restrictions imposed on 'Bishop'!\n");
}
/*Condition to check whether the pawn is a 'Pawn'*/
}else if(pawn.matches("([xXyY][1-8])")) {
if(GameOperationsServiceImpl.players.get(playerNo).getPieceChosen().equals(Constants.BLACK)&&this.isBFirstMove) {
entrySet=GameOperationsServiceImpl.chessBoard.getBlackChessMen().entrySet().stream().filter(x->x.getValue().startsWith("y")).collect(Collectors.toSet());
Character c1,c2;
for(Entry<String, String> entry : entrySet) {
c1=entry.getValue().charAt(1);
c2=entry.getKey().charAt(1);
if(c1==c2) {
continue;
}else {
this.isBFirstMove=false;
break;
}
}
}else if(GameOperationsServiceImpl.players.get(playerNo).getPieceChosen().equals(Constants.WHITE)&&this.isWFirstMove) {
entrySet=GameOperationsServiceImpl.chessBoard.getWhiteChessMen().entrySet().stream().filter(x->x.getValue().startsWith("x")).collect(Collectors.toSet());
Character c1,c2;
for(Entry<String, String> entry : entrySet) {
c1=entry.getValue().charAt(1);
c2=entry.getKey().charAt(1);
if(c1==c2) {
continue;
}else {
this.isWFirstMove=false;
break;
}
}
}
isFirstMove=(this.isWFirstMove?this.isWFirstMove:(this.isBFirstMove?this.isBFirstMove:false));
if(this.pawnMoveService.moveOneSquareForward(pawn,src, dest,playerNo,isFirstMove)) {
this.isBFirstMove=GameOperationsServiceImpl.players.get(playerNo).getPieceChosen().equals(Constants.BLACK)?false:this.isBFirstMove;
this.isWFirstMove=GameOperationsServiceImpl.players.get(playerNo).getPieceChosen().equals(Constants.WHITE)?false:this.isWFirstMove;
return this.makeMove(pawn, dest,playerNo);
}else {
throw new InvalidMoveException("Invalid Move to 'cell-"+dest+"'! Move violates restrictions imposed on 'Pawn'!\n");
}
}else {
throw new InvalidMoveException("Can't interpret the dest!");
}
}
}
<file_sep>/README.md
# ChessBoardChallenge
This repository contains Java program to simulate the game of chess, which can be played using console/command line by 2 players.
Environment Setup to run java
-------------------------------
1. Download JDK 1.8 (https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html)
2. Install the JDK on your machine (installing in 'C:\Program Files\' folder is recommended)
3. Add below 2 environment variables
Variable Name : JAVA_HOME
Variable Value : C:\Program Files\Java\jdk1.8.0_31
Variable Name : PATH
Variable Value : %JAVA_HOME%\bin
Environment Setup to run Unit test using JUnit4
-------------------------------------------------
1. Download JUnit4 (https://search.maven.org/remotecontent?filepath=junit/junit/4.13-beta-3/junit-4.13-beta-3.jar)
2. Copy/Move the downloaded jar to 'C:\Program Files\JUnit'
3. Add below 2 environment variables
Variable Name : JUNIT_HOME
Variable Value : C:\Program Files\JUnit
Variable Name : CLASSPATH
Variable Value : %CLASSPATH%;%JUNIT_HOME%\junit-4.13-beta-3.jar;.;
Steps to run the program
--------------------------
1. Open the project 'ChessBoardChallenge' in an IDE such Eclipse, IntelliJ, etc.
2. Right click on the /ChessBoradChallenge/src/StartTheGame.java -> Run As -> Java Application
3. Once the application is run, a set of instructions will be given.
4. Follow the instructions for better experience.
Steps to run the Unit tests
--------------------------
1. Open the project 'ChessBoardChallenge' in an IDE such Eclipse, IntelliJ, etc.
2. Right click on the /ChessBoradChallenge/src/test/TestRunner.java -> Run As -> Java Application
3. The above file will start executing unit test cases one by one with the dealy of 1.5 sec.
***Note: When application/test is run, maximize the console so that chess board representation can be seen better.
Following are the instructions and guide lines to play chess using command line
---------------------------------------------------------------------------------
1. This is a standard 8x8 Chess Board representation with following notations used:
-> '*' -> a black square/cell
-> 'O' -> a white square/cell
-> 'R' -> white Rook & 'r' -> black Rook
-> 'N' -> white Knight & 'n' -> black Knight
-> 'B' -> white Bishop & 'b' -> black Bishop
-> 'Q' -> white Queen & 'q' -> black Queen
-> 'K' -> white King & 'k' -> black King
-> 'x' -> white Pawn & 'y' -> black Pawn
2. To move the pawn enter the 'pawn name' as shown in the representation and
enter the square no. where you wnat the pawn to be moved
In the below example given, 'move' is combination of 'Row no.'(3) and 'Col no.'(6)
ex: pawn: N2
move:36
3. Apart from the above notations, rest of the notations used are self-explanatory
***Note: This is game is designed according to rules and standards of real world Chess, so always try to make valid moves,
you will end up getting exceptions otherwise!





| bc80f3c8c99640dcc7969cb6a973a24aa902b50f | [
"Markdown",
"Java"
] | 4 | Java | skgadag1/ChessBoardChallenge | 982dd5fcfa475313c2c3cce336772e3ff9aea13d | 39f3e49e18e5d4fe78f4891a7839edc6e576d5af | |
refs/heads/main | <repo_name>olegsemi9i/yii2-test.loc<file_sep>/frontend/models/Message.php
<?php
namespace frontend\models;
use Yii;
/**
* This is the model class for table "message".
*
* @property int $id
* @property int $author_id
* @property string $text
* @property string|null $date_add
*
* @property Author $author
*/
class Message extends \yii\db\ActiveRecord
{
/**
* {@inheritdoc}
*/
public static function tableName()
{
return 'message';
}
/**
* {@inheritdoc}
*/
public function rules()
{
return [
[['author_id', 'text'], 'required'],
[['author_id'], 'integer'],
[['text'], 'string'],
[['date_add'], 'safe'],
[['author_id'], 'exist', 'skipOnError' => true, 'targetClass' => Author::className(), 'targetAttribute' => ['author_id' => 'id']],
];
}
/**
* {@inheritdoc}
*/
public function attributeLabels()
{
return [
'id' => 'ID',
'author_id' => 'Author ID',
'text' => 'Text',
'date_add' => 'Date Add',
];
}
/**
* Gets query for [[Author]].
*
* @return \yii\db\ActiveQuery
*/
public function getAuthor()
{
return $this->hasOne(Author::className(), ['id' => 'author_id']);
}
public function beforeSave($insert)
{
if (parent::beforeSave($insert)) {
if ($this->isNewRecord)
$this->date_add = date("Y-m-d H:i:s");
return true;
}
return false;
}
}<file_sep>/frontend/models/Author.php
<?php
namespace frontend\models;
use Yii;
use yii\web\UploadedFile;
/**
* This is the model class for table "author".
*
* @property int $id
* @property string|null $heading
* @property string|null $name
* @property string|null $text
* @property string|null $date_add
* @property string|null $img
*
* @property Message[] $messages
*/
class Author extends \yii\db\ActiveRecord
{
public $file;
public $path = 'uploads';
/**
* {@inheritdoc}
*/
public static function tableName()
{
return 'author';
}
/**
* {@inheritdoc}
*/
public function rules()
{
return [
[['text'], 'string'],
[['date_add'], 'safe'],
[['heading', 'img'], 'string', 'max' => 255],
[['name'], 'string', 'max' => 100],
[['heading', 'name', 'text'], 'required', 'message' => 'Не может быть пустым'],
[['file'], 'file', 'extensions' => 'png, jpg'],
];
}
/**
* {@inheritdoc}
*/
public function attributeLabels()
{
return [
'id' => 'ID',
'heading' => 'Заголовок',
'name' => 'Имя',
'text' => 'Текст',
'date_add' => 'Дата создания',
'img' => 'Картинка',
];
}
/**
* Gets query for [[Messages]].
*
* @return \yii\db\ActiveQuery
*/
public function getMessages()
{
return $this->hasMany(Message::className(), ['author_id' => 'id'])->orderBy('id DESC');;
}
public function beforeSave($insert)
{
if (parent::beforeSave($insert)) {
if ($this->isNewRecord)
$this->date_add = date("Y-m-d H:i:s");
return true;
}
return false;
}
public function beforeDelete()
{
foreach ($this->messages as $child) {
$child->delete();
}
return parent::beforeDelete();
}
public function upload()
{
if($this->file){
$name = $this->file->baseName.'.'.$this->file->extension;
$this->file->saveAs($this->path.'/'.$name, false);
$this->img = $name;
}
}
public function getImageurl()
{
return \Yii::$app->request->BaseUrl.'/'.$this->path.'/'.$this->img;
}
}<file_sep>/frontend/views/site/_messages.php
<?
if($messages){
foreach($messages as $message){
echo $message->text.'</br>';
}
}
?> | 0a076570dcd5a71f8703f6894b1317e4121cc3e5 | [
"PHP"
] | 3 | PHP | olegsemi9i/yii2-test.loc | 5291411a5f2d8839dada0fc57c5715b796b056ce | 05509a17e40b9fe4b28677365048d3505385b3dd | |
refs/heads/master | <file_sep># Eis企业自动化巡检助手
Eis是基于python+tkinter+netmiko开发的企业自动化巡检助手,支持单设备、多设备巡检,支持多厂商,自定义巡检命令等,后续将陆续更新一键生成巡检报告、ip地址计算、根据设备报错类型尝试修复等功能,喜欢就点个免费的star吧
<file_sep>"""
@create by PyCharm
@author : 西藏恰成信息工程有限公司
@filename : eis.py
@create_time : 2021-05-21
@contact : TEL:0891-6579668 PHONE:18076986378 WECHART&QQ:1032601165
"""
import tkinter as tk
from netmiko import ConnectHandler, SSHDetect
import os
import re
from tkinter.filedialog import askopenfilename
import tkinter.messagebox
class Eis(object):
def __init__(self):
# if True:
# Login()
# return
self.msg = tkinter.messagebox
self.window = tk.Tk()
self.window.title('雅合博网络设备自动化巡检系统')
self.window.iconbitmap('.\\common/logo.ico')
self.window.resizable(0, 0)
self.set_window_center(800, 800)
self.window.update()
# 多设备文件路径
self.filepath = tk.StringVar(value='请选择保存有设备IP、用户名及密码的文本文档')
# 单设备巡检IP
self.danip = tk.StringVar(value='请输入设备IP地址')
# 单设备巡检用户名
self.username = tk.StringVar(value='请输入用户名')
# 单设备巡检密码
self.password = tk.StringVar(value='请输入密码')
# 单设备巡检设备类型
self.shebei = tk.StringVar(value='请输入设备类型,不支持中文,或删除这段话后留空。')
tk.Entry(self.window, textvariable=self.filepath, width=80).place(x=100, y=15)
tk.Label(self.window, text='多设备巡检:').place(x=10, y=15)
# 信息显示框
self.text = tk.Text(self.window, height=34, width=120, bg='blue', fg='white', padx=20, pady=20)
self.text.place(x=0, y=320)
# 文件选择按钮
tk.Button(self.window, text='选择文件', width=10, height=1, command=self.select_path).place(x=690, y=10)
# 多设备巡检开始按钮
tk.Button(self.window, text='立即巡检', width=20, height=1, command=self.check).place(x=300, y=50)
tk.Label(self.window, text='单设备巡检:').place(x=10, y=120)
# 单设备IP输入框
tk.Entry(self.window, textvariable=self.danip, width=50).place(x=200, y=120)
# 单设备用户名输入框
tk.Entry(self.window, textvariable=self.username, width=50).place(x=200, y=160)
# 单设备密码输入框
tk.Entry(self.window, textvariable=self.password, width=50).place(x=200, y=200)
# 单设备类型输入框
tk.Entry(self.window, textvariable=self.shebei, width=50).place(x=200, y=240)
# 单设备巡检按钮
tk.Button(self.window, text='立即巡检', width=20, height=1, command=self.inspection).place(x=300, y=280)
# 清空控制台按钮
tk.Button(self.window, text='清空控制台', width=10, height=1, command=self.clear_console).place(x=680, y=740)
self.window.mainloop()
# 消息提示
def alert_info(self, title, msg):
self.msg.showinfo(title, msg)
# 错误提示
def alert_error(self, title, msg):
self.msg.showerror(title, msg)
# 警告提示
def alert_warn(self, title, msg):
self.msg.showwarning(title, msg)
# 窗口居中弹出
def set_window_center(self, curwidth, curheight):
if not curwidth:
curwidth = self.window.winfo_width()
if not curheight:
curheight = self.window.winfo_height()
# 获取屏幕宽度和高度
scn_w, scn_h = self.window.maxsize()
# 计算中心坐标
cen_x = (scn_w - curwidth) / 2
cen_y = (scn_h - curheight) / 2
# 设置窗口初始大小和位置
size_xy = '%dx%d+%d+%d' % (curwidth, curheight, cen_x, cen_y)
self.window.geometry(size_xy)
# 设备文件选择
def select_path(self):
path = askopenfilename(title='请选择设备文件', filetypes=[('TXT', '*.txt')])
self.filepath.set(path)
# 多设备巡检
def check(self):
path = self.filepath.get()
if path == '请选择保存有设备IP、用户名及密码的文本文档' or path == '':
tkinter.messagebox.showerror('错误', '请选择设备文件!!')
return
with open(path, encoding='utf-8') as device_list:
device = device_list.readlines()
for line in device:
line = line.strip("\n")
ipaddr = line.split(",")[0]
user = line.split(",")[1]
pwd = line.split(",")[2]
device_type = line.split(",")[3]
if device_type == '':
self.text.insert('insert', '正在判断设备类型\n\n')
self.text.update()
self.text.see(tk.END)
device_type = self.detect_device(ip=ipaddr, user=user, pwd=pwd) # 自动发现设备类型
self.text.insert('insert', '设备类型为:' + device_type + '\n\n')
self.text.update()
self.text.see(tk.END)
self._connect(device_type=device_type, ip=ipaddr, user=user, pwd=pwd)
self.text.insert('insert', '巡检完毕\n\n')
self.text.update()
self.text.see(tk.END)
self.alert_info(title='巡检完毕', msg='大功告成,人生苦短,我用Python!')
# 单设备巡检
def inspection(self):
ip = self.danip.get()
user = self.username.get()
pwd = self.password.get()
device_type = self.shebei.get()
if ip == '请输入设备IP地址' or ip == '':
self.alert_error(title='错误', msg='请输入IP地址!!')
return
elif user == '请输入用户' or user == '':
self.alert_error(title='错误', msg='请输入ssh用户名!!')
return
elif pwd == '请输入密码' or pwd == '':
self.alert_error(title='错误', msg='请输入ssh用户密码!!')
return
elif device_type == '请输入设备类型,不支持中文,或删除这段话后留空。':
self.alert_error(title='错误', msg='请输入正确的设备类型或留空')
return
elif device_type == '':
self.text.insert('insert', '正在判断设备类型\n\n')
self.text.update()
self.text.see(tk.END)
device_type = self.detect_device(ip=ip, user=user, pwd=pwd) # 自动发现设备类型
self.text.insert('insert', '设备类型为:' + device_type + '\n\n')
self.text.update()
self.text.see(tk.END)
# 执行操作
self._connect(device_type=device_type, ip=ip, user=user, pwd=pwd)
self.text.insert('insert', '巡检完毕\n\n')
self.text.update()
self.text.see(tk.END)
self.alert_info(title='巡检完毕', msg='大功告成,人生苦短,我用Python!')
# 清空控制台
def clear_console(self):
self.text.delete('1.0', 'end')
# 设备自动发现
def detect_device(self, ip, user, pwd):
device = {
'device_type': 'autodetect',
'host': ip,
'username': user,
'password': pwd
}
_detect = SSHDetect(**device)
device_type = _detect.autodetect()
return device_type
# ssh连接并执行命令
def _connect(self, device_type, ip, user, pwd):
device = { # 连接信息
'device_type': device_type,
'ip': ip,
'username': user,
'password': pwd,
}
# 判断ip是否合法
if not re.match(r"^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$",
device['ip']):
self.alert_error(title='错误', msg='IP地址不合法:' + ip)
return
# 判断设备类型是否存在
if not self.type_check(device_type=device['device_type']):
self.alert_error(title='错误', msg='设备类型不支持,请检查后重试')
return
# 根据设备类型加载命令文件
command_files = 'command/' + device_type + '.txt'
self.text.insert('insert', '正在连接:' + ip + '\n\n')
self.text.update()
self.text.see(tk.END)
# 连接设备
try:
connect = ConnectHandler(**device)
connect.enable()
with open(command_files, encoding='utf-8') as command_file:
command_list = command_file.readlines()
command_file.close()
# 循环执行命令
for command in command_list:
line = command.strip("\n")
# 字符串分片,提取命令
command = line.split(":")[0]
# 字符串分片提取备注
vendor = line.split(':')[1]
self.text.insert('insert', '正在' + vendor + '\n')
self.text.update()
self.text.see(tk.END)
# 获取设备返回信息
output = connect.send_command(command, strip_command=False, strip_prompt=False)
if re.search('found at|detected at', output):
self.text.insert('insert', '命令"' + command + '"执行失败\n\n')
continue
self.text.insert('insert', '正在保存文件\n')
self.text.update()
self.text.see(tk.END)
logpath = 'inspection/' + device_type + '/' + ip
# 判断路径是否存在
if not os.path.exists(logpath):
os.makedirs(logpath) # 如果不存在则创建相关目录
# 将设备返回信息写入文件内
f = open('inspection/' + device_type + '/' + ip + '/' + vendor + '.txt', 'w')
f.write(output)
f.close()
self.text.insert('insert', '文件保存成功\n\n')
self.text.update()
self.text.see(tk.END)
connect.disconnect()
except:
self.text.insert('insert', ip + '连接失败,请检查ip、用户名及密码是否正确\n\n')
# 判断设备类型
def type_check(self, device_type):
with open('common/device_type.txt') as f:
data = f.read().splitlines()
f.close()
# print(data)
if device_type in data:
return True
else:
return False
if __name__ == '__main__':
Eis()
| ad5176a1fecb0cdd568f99fc1bb155a42760edd3 | [
"Markdown",
"Python"
] | 2 | Markdown | xuwee/Eis | a011c87da9b3f7989ecd138afd22e590eaae5a35 | 75100e3325c21069aa137cf3d7e69bd9de22e3ac | |
refs/heads/main | <repo_name>GetaPradanaDitra/WP2_perpus_GetaPd<file_sep>/registrasi.php
<div class="container">
<div class="row justify-content-center">
<div class="col-lg-7">
<div class="card o-hidden border-0 shadow-lg my-5">
<div class="card-body p-0">
<div class="row">
<div class="col-lg">
<div class="p-5">
<div class="text-center">
<h1 class="h4 text-gray-900 mb-4">Daftar Menjadi Member!</h1>
</div>
<?= $this->session->flashdata('pesan'); ?>
<form action="<?= base_url('autentifikasi/registrasi'); ?>" class="user" method="post">
<div class="form-group">
<input type="text" class="form-control form-control-user" id="nama" name="nama" placeholder="Nama Lengkap" value="<?= set_value('nama'); ?>">
<?= form_error('nama', '<small class="text-danger pl-3">', '</small>'); ?>
</div>
<div class="form-group">
<input type="text" class="form-control form-control-user" value="<?= set_value('email'); ?>" id="email" placeholder="Masukkan Alamat Email" name="email">
<?= form_error('email', '<small class="text-danger pl-3">', '</small>'); ?>
</div>
<div class="form-group">
<input type="<PASSWORD>" class="form-control form-control-user" id="password1" placeholder="<PASSWORD>" name="<PASSWORD>1">
<?= form_error('password', '<small class="text-danger pl-3>', '</small>'); ?>
</div>
<div class="form-group">
<input type="<PASSWORD>" class="form-control form-control-user" id="password2" placeholder="<PASSWORD>" name="password2">
<?= form_error('password', '<small class="text-danger pl-3>', '</small>'); ?>
</div>
<button type="submit" class="btn btn-primary btn-user btn-block">Daftar Menjadi Member</button>
</form>
<hr>
<div class="text-center">
<a href="<?= base_url('autentifikasi/lupaPassword'); ?>" class="small">Lupa Password</a>
</div>
<div class="text-center">
Sudah menjadi member?
<a href="<?= base_url('autentifikasi'); ?>" class="small">Login!!</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div> | 8c73239a0d0ddcee5deb0fd383be31f32d99643e | [
"PHP"
] | 1 | PHP | GetaPradanaDitra/WP2_perpus_GetaPd | 1d0cffa738c4759d30dace044744d2fd8cb8106b | 006bf2af1a956bd280b7412994e2d58fbf3c301a | |
refs/heads/main | <file_sep>appnope==0.1.2
backcall==0.2.0
click==8.0.1
cycler==0.10.0
debugpy==1.4.3
decorator==5.1.0
entrypoints==0.3
Flask==2.0.1
gunicorn==20.1.0
ipykernel==6.4.1
ipython==7.27.0
ipython-genutils==0.2.0
itsdangerous==2.0.1
jedi==0.18.0
Jinja2==3.0.1
joblib==1.0.1
jupyter-client==7.0.3
jupyter-core==4.8.1
kiwisolver==1.3.2
MarkupSafe==2.0.1
matplotlib==3.4.3
matplotlib-inline==0.1.3
nest-asyncio==1.5.1
numpy==1.21.2
pandas==1.3.3
parso==0.8.2
pexpect==4.8.0
pickleshare==0.7.5
Pillow==8.3.2
prompt-toolkit==3.0.20
ptyprocess==0.7.0
Pygments==2.10.0
pyparsing==2.4.7
python-dateutil==2.8.2
pytz==2021.1
pyzmq==22.3.0
scikit-learn==0.24.2
scipy==1.7.1
seaborn==0.11.2
six==1.16.0
sklearn==0.0
threadpoolctl==2.2.0
tornado==6.1
traitlets==5.1.0
wcwidth==0.2.5
Werkzeug==2.0.1
xgboost==1.4.2
<file_sep>import pandas as pd
import pickle
from collections import defaultdict
import numpy as np
from setting import WoECat, WoENom
#format output
# {
# "model":"german-credit-risk",
# "version": "1.0.0",
# "score_proba":{result}
#
# }
# raw_input ={"person_home_ownership": "MORTGAGE",
# "loan_intent": "DEBTCONSOLIDATION",
# "loan_grade": "C",
# "cb_person_default_on_file": "N",
# "person_age": 29,
# "person_income": 95000,
# "person_emp_length": 4.0,
# "loan_int_rate": 13.72,
# "loan_percent_income": 0.03,
# "cb_person_cred_hist_length": 9,
# "loan_amnt": 2400}
features_list =["person_home_ownership",
"loan_intent",
"loan_grade",
"cb_person_default_on_file",
"person_age",
"person_income",
"person_emp_length",
"loan_int_rate",
"loan_percent_income",
"cb_person_cred_hist_length",
"loan_amnt"]
class CustomUnpickler(pickle.Unpickler):
def find_class(self, module, name):
try:
return super().find_class(__name__, name)
except AttributeError:
return super().find_class(module, name)
preprocess = CustomUnpickler(open("trained_model/FE-WOE-1.0.0.pkl", "rb")).load()
# with open("trained_model/FE-WOE-1.0.0.pkl", "rb") as f_in: #A
# preprocess= pickle.load(f_in) #B
model = CustomUnpickler(open("trained_model/M-XGB-1.0.0.pkl", "rb")).load()
def formating_data(raw_input):
# pandas dataframe
# urutan colomn
raw_input = pd.DataFrame.from_dict(raw_input, orient="index").T.replace({
None: np.nan,
"null":np.nan,
"" : np.nan
})
features = features_list
return raw_input[features]
def preprocess_data(raw_input):
"""
acct dictionary format input
return pandas / numpy with the same format as development
"""
# validate data
X = preprocess.transform(raw_input)
return X
def predict_data(data):
# load model
# input dict
# preprocess preprocess_data
# return final predictions
data = formating_data(data)
data = preprocess_data(data)
result = model.predict_proba(data)[:,1]
return round(result[0],6)
# if __name__ == "__main__":
# # print(y)
#
# result = predict_data(raw_input)
# # print(type(result))
# print(result)
# # assert score_proba == result
<file_sep>## Heroku Deployment Access
[Credit_Risk_Exercise](https://credit-score-exercise.herokuapp.com/)
# Credit Risk Exercise
using `credit_risk_dataset.csv` file available under `notebooks/`
The dataset is composed by `32581` rows (observations) and `12` columns (variables).
- `person_age` : is the age of the person at the time of the loan.
- `person_income`: is the yearly income of the person at the time of the loan.
- `person_home_ownership`: is the type of ownership of the home.
- `person_emp_length`: is the amount of time in years that person is employed.
- `loan_intent`: is the aim of the loan.
- `loan_grade`: is a classification system that involves assigning a quality score to a loan based on a borrower's credit history, quality of the collateral, and the likelihood of repayment of the principal and interest.
- `loan_amnt`: is the dimension of the loan taken.
- `loan_int_rate`: is the interest paid for the loan.
- `loan_status`: is a dummy variable where 1 is default, 0 is not default.
- `loan_percent_income`: is the ratio between the loan taken and the annual income.
- `cb_person_default_on_file`: answers whether the person has defaulted before.
- `cb_person_cred_hist_length`: represents the number of years of personal history since the first loan taken from that person.
## How to Use
1. To use locally install all the requirements from file `requirements.txt`, using `pip install -r requirements.txt`
2. Run `app.py` to run python webserver and the application
3. Open `127.0.0.1:3000`
## Model Deployment
### Handling Missing Value
- There 2 feature that have a missing value `person_emp_length` contains 2.75% NaN and `loan_int_rate` contains 9.56% NaN
- We create a new feature `person_emp_length_nan` and `loan_int_rate_nan` and fill nan values with median, the old feature that has nan values still exist in dataframe
- Model will try to use all the features that have Nan or not and compare each result
### Handling Outlier value
- The outlier will be handled by using Weight of Evidence (WOE)
- The old features and WOE features will be in the different models and the result will be compared.
### Model Evaluation
| Model || Train || Valid|| Holdout Sample|
| --- | --- | --- |--- | --- | --- | --- |
||Accuracy |AUC |Accuracy| AUC| Accuracy| AUC|
|XGB OPT WOE CAT |0.941270| 0.869816| 0.938476| 0.865756| 0.933045| 0.852295|
|XGB OPT DUMMY |0.940257| 0.868141| 0.933076| 0.855592| 0.931348 |0.851468|
|RFR OPT WOE CAT| 0.914364 |0.813566 |0.914947 |0.814282| 0.913453| 0.809761|
|XGB OPT WOE |0.892136 |0.780135| 0.875796| 0.749947| 0.886301| 0.767530|
|LogReg WOE OPT |0.846280 |0.710719| 0.840694| 0.697469| 0.848504| 0.710803|
|RFR OPT WOE |0.856743| 0.688594| 0.850723| 0.671920| 0.857143| 0.684250|
|LogReg OPT WOE CAT |0.815902| 0.601540| 0.812343| 0.595295| 0.820734| 0.606344|
### Pipeline
- Using Model XGBoost and Weight of Evidence in categorical features
- Create a WOE in the pipeline for preprocessing
- Create an XGBmodel in pipeline to predict new data
## Guidance
### Example Input and Output Format
- This example if you want input data using `postman`
- This input need to be post under this endpoint:
`127.0.0.1:3000/pred` or `https://credit-score-exercise.herokuapp.com/pred`
#### Headers
- `Content-Type : application/json`
#### Body
- This input using `POST` method, with arguments:
|Field| Description| Value|
| --- | --- | --- |
|person_home_ownership |Home ownership. |'RENT', 'MORTGAGE', 'OWN', or 'OTHER'|
|loan_intent |Loan intent.| 'PERSONAL', 'EDUCATION', 'MEDICAL', 'VENTURE', 'HOMEIMPROVEMENT', or 'DEBTCONSOLIDATION'|
|loan_grade| Loan grade.| 'A', 'B', 'C, 'D', 'E', 'F', or 'G'|
|cb_person_default_on_file |Historical default.| 'Y', or 'N'|
|person_age |Age. |Integer|
|person_income |Annual Income.| Integer|
|person_emp_length| Employment length (in years) |Integer|
|loan_int_rate| Interest rate. |Float|
|loan_percent_income |Percent income.| Float (0.001 - 1.000)|
|cb_person_cred_hist_length |Credit history length. |Integer|
|loan_amnt| Loan amount.| Integer|
#### Example JSON Input
```json
{"person_home_ownership": "MORTGAGE",
"loan_intent": "DEBTCONSOLIDATION",
"loan_grade": "C",
"cb_person_default_on_file": "N",
"person_age": 29,
"person_income": 95000,
"person_emp_length": 4.0,
"loan_int_rate": 13.72,
"loan_percent_income": 0.03,
"cb_person_cred_hist_length": 9,
"loan_amnt": 2400}
```
- After sending the input through postman, python `app.py` will return predicted data
#### Output
|Field| Description|
| --- | --- |
|model |Machine learning model.|
|score_proba |Probability estimates.|
|version| Model version.|
#### Example JSON Output
```json
{
"model":"credit_risk_exercise",
"score_proba":"0.059884",
"version": "1.0.0"
}
```
- HTTP Method using GET and POST from flask API
<file_sep>from sklearn.base import BaseEstimator, TransformerMixin
import numpy as np
class WoECat(BaseEstimator, TransformerMixin):
def __init__(self, feature_name):
self.feature_name = feature_name
def fit(self, X, y = None):
return self
def transform(self, X, y = None):
X_ = X.copy() # creating a copy to avoid changes to original dataset
for i in self.feature_name:
if i == 'person_home_ownership':
X_[f'{i}_WOE'] = np.where(X_[i].isin(['MORTAGE']), -0.682,
np.where(X_[i].isin(['OTHER']), 0.468,
np.where(X_[i].isin(['OWN']), -1.24,
np.where(X_[i].isin(['RENT']), 0.502, 0))))
elif i == 'loan_intent':
X_[f'{i}_WOE'] = np.where(X_[i].isin(['DEBTCONSOLIDATION']), 0.360,
np.where(X_[i].isin(['EDUCATION']), -0.293,
np.where(X_[i].isin(['HOMEIMPROVEMENT']), 0.2355,
np.where(X_[i].isin(['MEDICAL']), 0.267,
np.where(X_[i].isin(['PERSONAL']), -0.117,
np.where(X_[i].isin(['VENTURE']), -0.472,0))))))
elif i == 'loan_grade':
X_[f'{i}_WOE'] = np.where(X_[i].isin(['A']), -0.925,
np.where(X_[i].isin(['B']), -0.361,
np.where(X_[i].isin(['C']), -0.064,
np.where(X_[i].isin(['D']), 1.64,
np.where(X_[i].isin(['E']), 1.87,
np.where(X_[i].isin(['F']), 2.14,
np.where(X_[i].isin(['G']), 5.41,0)))))))
elif i == 'cb_person_default_on_file':
X_[f'{i}_WOE'] = np.where(X_[i].isin(['N']), -0.213,
np.where(X_[i].isin(['Y']), -0.778, 0))
X_ = X_.drop(self.feature_name, axis=1)
# display(X_)
return X_
class WoENom(BaseEstimator, TransformerMixin):
def __init__(self):
pass
def fit(self, X, y = None):
return self
def transform(self, X, y = None):
X_ = X.copy() # creating a copy to avoid changes to original dataset
#do nothing
# display(X_)
return X_
<file_sep>from flask import Flask, jsonify, json, request, render_template
from logging import debug
app = Flask(__name__)
import pickle
from predict import predict_data
users = []
@app.route('/', methods=['GET', 'POST'])
def hello():
return render_template("index.html")
@app.route("/pred", methods=['POST','GET'])
def make_predictions():
if request.method == 'POST':
data = request.get_json()
# print(data)
result = predict_data(data)
result = {
'model':'credit_risk_exercise',
"version": '1.0.0',
"score_proba":str(result)
}
print(result)
return jsonify(result)
@app.route('/result', methods=['POST','GET'])
def result_pred():
data = {}
data["person_home_ownership"] = request.form.get("Home_Ownership")
data["loan_intent"] = request.form.get("loan_intent")
data["loan_grade"] = request.form.get("loan_grade")
data["cb_person_default_on_file"] = request.form.get("Historical_default")
data["person_age"] = request.form.get("Age")
data["person_income"] = request.form.get("Annual_Income")
data["person_emp_length"] = request.form.get("EmploymentLength")
data["loan_int_rate"] = request.form.get("Interest_rate")
data["loan_percent_income"] = request.form.get("PercentIncome")
data["cb_person_cred_hist_length"] = request.form.get("CreditHistoryLength")
data["loan_amnt"] = request.form.get("LoanAmount")
print(data)
result = predict_data(data)
hasil = {
'model':'credit_risk_exercise',
"version": '1.0.0',
"score_proba":str(result)
}
print(hasil)
prediction = str(result)
return render_template('result.html', name=prediction)
if __name__ == '__main__':
app.run(port=3000, debug=False)
<file_sep>from flask import Flask, jsonify, json, request, render_template
from logging import debug
app = Flask(__name__)
import pickle
from predict import predict_data
users = []
@app.route('/', methods=['GET', 'POST'])
def hello():
return render_template("index.html")
@app.route("/pred", methods=['POST','GET'])
def make_predictions():
if request.method == 'POST':
data = request.get_json()
# print(data)
result = predict_data(data)
result = {
'model':'german-credit-risk',
"version": '1.0.0',
"score_proba":result[0]
}
print(result)
return jsonify(result)
@app.route('/result', methods=['POST','GET'])
def result_pred():
data = {}
data["Age"] = request.form.get("Age")
data["Sex"] = request.form.get("Sex")
data["Job"] = request.form.get("Job")
data["Housing"] = request.form.get("Housing")
data["Saving accounts"] = request.form.get("saving_account")
data["Checking account"] = request.form.get("checking_account")
data["Credit amount"] = request.form.get("credit_amount")
data["Duration"] = request.form.get("duration")
data["Purpose"] = request.form.get("purpose")
result = predict_data(data)
hasil = {
'model':'german-credit-risk',
"version": '1.0.0',
"score_proba":result[0]
}
print(hasil)
prediction = str(round(list(result)[0], 3))
return render_template('result.html', name=prediction)
if __name__ == '__main__':
app.run(port=3000, debug=False)
| 986b40af9ce00fbb69f416c6cfe11589b249273a | [
"Markdown",
"Python",
"Text"
] | 6 | Text | rull13/credit_score_exercise | d54c68127b79ffca47df49b03a5bf6b21e3f2b1e | dcdaa9d92a8e7e80fbacd267ad643afdf24a22a7 | |
refs/heads/master | <repo_name>JayaprakashRavindran/jhipster-sample-app-monolith<file_sep>/src/main/webapp/app/app.module.ts
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import './vendor';
import { JHipsterSampleAppMonolithSharedModule } from 'app/shared/shared.module';
import { JHipsterSampleAppMonolithCoreModule } from 'app/core/core.module';
import { JHipsterSampleAppMonolithAppRoutingModule } from './app-routing.module';
import { JHipsterSampleAppMonolithHomeModule } from './home/home.module';
import { JHipsterSampleAppMonolithEntityModule } from './entities/entity.module';
// jhipster-needle-angular-add-module-import JHipster will add new module here
import { MainComponent } from './layouts/main/main.component';
import { NavbarComponent } from './layouts/navbar/navbar.component';
import { FooterComponent } from './layouts/footer/footer.component';
import { PageRibbonComponent } from './layouts/profiles/page-ribbon.component';
import { ActiveMenuDirective } from './layouts/navbar/active-menu.directive';
import { ErrorComponent } from './layouts/error/error.component';
@NgModule({
imports: [
BrowserModule,
JHipsterSampleAppMonolithSharedModule,
JHipsterSampleAppMonolithCoreModule,
JHipsterSampleAppMonolithHomeModule,
// jhipster-needle-angular-add-module JHipster will add new module here
JHipsterSampleAppMonolithEntityModule,
JHipsterSampleAppMonolithAppRoutingModule
],
declarations: [MainComponent, NavbarComponent, ErrorComponent, PageRibbonComponent, ActiveMenuDirective, FooterComponent],
bootstrap: [MainComponent]
})
export class JHipsterSampleAppMonolithAppModule {}
<file_sep>/src/main/java/com/jp/jhipster/monolith/config/dbmigrations/package-info.java
/**
* MongoDB database migrations using MongoBee.
*/
package com.jp.jhipster.monolith.config.dbmigrations;
| a2679a7f8c7ab85134718a0933802e41aaa64bf1 | [
"Java",
"TypeScript"
] | 2 | TypeScript | JayaprakashRavindran/jhipster-sample-app-monolith | 4c2e32e3091f81b8ca31e73419e10821d4fab354 | f49a873a148bbe39e2d1fb9fca658200796d8e5c | |
refs/heads/master | <file_sep>import java.util.Scanner;
public class MainOperations extends SearchVowel {
void disp() {
System.out.println("********VOWEL SEARCH FROM KEYWORD*********");
System.out.println("Input word to Match For vowel");
Scanner inputData = new Scanner(System.in);
System.out.println(inputData);
}
public static void main(String args[]) {
MainOperations obj = new MainOperations();
obj.disp();
}
}
<file_sep>import java.util.*;
public class MeAndYou {
public static void main(String args[]) {
String me;
Scanner obj = new Scanner(System.in);
System.out.println("We Are........:");
me = obj.nextLine();
System.out.println("Biki & Bini "+me);
}
}
<file_sep># PraticeJavaPrograms
Here is the list of java pratice programs for beginners.
<file_sep>
public class DoWhileLopp {
public static void main(String args[]) {
int n = 10;
do {
System.out.println("Hello");
n--;
}while(n > 0);
}
}
<file_sep>import java.util.*;
public class PerimeterOfRectangle {
public static void main(String args[]) {
double periOfRect, heightOfRect, widthOfRect;
Scanner obj = new Scanner(System.in);
System.out.println("****PERIMETER****");
System.out.println("Enter height Of Rectangle :");
heightOfRect = obj.nextDouble();
System.out.println("Enter Widht of Rectangle :");
widthOfRect = obj.nextDouble();
periOfRect = 2*(heightOfRect+widthOfRect);
System.out.print("Perimeter Of Rectangle is :"+periOfRect);
}
}
<file_sep>
public class Test1 {
public static void main(String args[]) {
int m = 7;
int n = 0;
m = ++n;
m = ++n;
m = ++n;
System.out.println(m);
}
}
<file_sep>class Calc {
int num1;
int num2;
int result;
void operation() {
result = num1+num2;
}
}
public class ClassProg2 {
public static void main(String args[]) {
Calc obj = new Calc(); //knows something and does something
obj.num1 = 10;
obj.num2 = 20;
obj.operation();
System.out.println("The sum is :"+obj.result);
}
}
<file_sep>import java.util.*;
public class NaturalNumber {
public static void main(String args[]) {
int i,n;
Scanner obj = new Scanner(System.in);
System.out.println("Enter Number Range :");
n = obj.nextInt();
for(i=1;i<=n;i++) {
System.out.println("Natural Numbers are :"+i);
}
}
}<file_sep>import java.util.*;
public class AreaOfRectangle {
public static void main(String args[]) {
Scanner obj = new Scanner(System.in);
double areaOfRect, heightOfRect, widthOfRect;
System.out.println("******Area of Rectangle*******");
System.out.println("Enter HeightOF the RectaNgle :");
heightOfRect = obj.nextDouble();
System.out.println("Enter WidthOf the RectaNgle :");
widthOfRect = obj.nextDouble();
areaOfRect = heightOfRect * widthOfRect;
System.out.println("Area of the Rectangle is :"+areaOfRect);
}
}
<file_sep>import java.util.*;
public class SwitchCase {
public static void main(String args[]) {
// int num;
String words;
Scanner obj = new Scanner(System.in);
System.out.println("Input the Numbers upto 5 :");
// num = obj.nextInt();
words = obj.next();
switch(words)
{
// case 1:
// System.out.println("One");
// break;
// case 2:
// System.out.println("Two");
// break;
// case 3:
// System.out.println("Three");
// break;
// case 4:
// System.out.println("Five");
// break;
// case 5:
// System.out.println("Six");
// break;
case "abc":
System.out.println("One");
break;
case "def":
System.out.println("Two");
break;
case "ghi":
System.out.println("Three");
break;
case "jkl":
System.out.println("Four");
break;
case "mno":
System.out.println("Five");
break;
case "pqr":
System.out.println("One");
break;
default:
System.out.println("Does not exist");
}
}
}
<file_sep>public class LocalVaribale {
//Global variable
static int a = 10;
static int b = 40;
static int c;
static void Test() {
c = a+b;
System.out.println(c);
}
public static void main(String args[]) {
// int a = 10;
// int b = 20;
// int c = a+b;
Test();
}
}
<file_sep>
public class TernaryOperator {
//Ternary Operator
// ?: -> expr1:expr2
public static void main(String args[]) {
int i = 6;
int j = 8;
// Without ternary operator
// if(i>j)
// j=1;
// else
// j=2;
j = i>j?5:6;
System.out.println(j);
}
}
<file_sep>import java.util.*;
public class Calculator {
public static void main(String args[]) {
double firstnum;
double secondnum;
Scanner obj = new Scanner(System.in);
System.out.println("*******CALCULATOR*********");
System.out.println("Enter First Number :");
firstnum = obj.nextDouble();
System.out.println("Enter Second Number :");
secondnum = obj.nextDouble();
System.out.println("Select Your Operation :");
System.out.println("Addition-a: Substraction-b: Multiplication-c Division-d");
char ch = obj.next().charAt(0);
switch(ch) {
case 'a':
System.out.println("Addition of Number is :"+(firstnum+secondnum));
break;
case 'b':
System.out.println("Substraction of Number is :"+(firstnum-secondnum));
break;
case 'c':
System.out.println("Multiplication of Number is :"+(firstnum*secondnum));
break;
case 'd':
System.out.println("Division of Number is :"+(firstnum/secondnum));
break;
default:
System.out.println("You have choose invalid operator :");
break;
}
}
}
<file_sep>class Demo {
int num1;
int num2;
String operation;
public Demo( ) {
int num1 = 0;
int num2 = 0;
operation = "Arun";
}
public Demo(int i) {
int num1 = i;
int num2 = 0;
operation = "Nothing";
}
public Demo(int i, int j) {
int num1 = i;
int num2 = j;
operation = "Nothing";
}
public Demo(int i, int j, String op) {
int num1 = i;
int num2 = j;
operation = op;
}
}
public class ConstructorOverloading {
public static void main (String args[]) {
Demo obj = new Demo(2,3,"Arun");
}
}
<file_sep>import java.util.*;
public class ForLoop {
public static void main(String args[]) {
// For Loop
int a;
Scanner obj = new Scanner(System.in);
System.out.println();
for(a=1; a<=10; a++) {
System.out.println("HARI");
}
}
}
<file_sep>import java.util.*;
public class CountNumberOfDigits {
public static void main(String args[]){
int num, count=0;
System.out.println("Ener number :");
Scanner obj = new Scanner(System.in);
num = obj.nextInt();
while(num > 0) {
num = num / 10;
count = count + 1;
}
System.out.println(count);
}
}
<file_sep>import java.util.*;
class StudentDetail{
String name;
String branch;
String sem;
void DisplayOperation () {
Scanner input = new Scanner(System.in);
System.out.println("Enter Student Name :");
name = input.nextLine();
System.out.println("Enter Student Branch :");
branch = input.nextLine();
System.out.println("Enter Student Semester :");
sem = input.nextLine();
}
}
public class ClassProg3 {
public static void main(String args[]) {
StudentDetail obj = new StudentDetail();
obj.DisplayOperation();
System.out.println("Student Name is :"+obj.name);
System.out.println("Studet Branch is :"+obj.branch);
System.out.println("Student Sem is :"+obj.sem);
}
}
<file_sep>import java.util.*;
public class Addition {
public static void main(String args[]) {
int a,b,c;
Scanner obj = new Scanner(System.in);
System.out.println("Enter First Number :");
a = obj.nextInt();
System.out.println("Enter Second Number :");
b = obj.nextInt();
c = a+b;
System.out.println("The additon of number is :"+c);
}
}
<file_sep>import java.util.*;
public class Prog2 {
public static void main(String args[]) {
Scanner obj = new Scanner(System.in);
int marks;
System.out.println("Enter the The marks of The student :");
marks = obj.nextInt();
marks = 600;
if (marks <= 600) {
System.out.println("Your Score is not good..!!!");
}
}
}
<file_sep>
public class OperatorDemo {
/*
* Arithmatics Operations
* Addition
* Substraction
* Multiplication
* division
* modulous
*/
public static void main(String args[])
{
int a=6, b=4;
int a1 = a+b;
int a2 = a-b;
int a3 = a*b;
double a4 = (double)a/b;
int a5 = a%b;
// using short hand operator
int m=6;
int n=7;
m=++n;
System.out.println(m);
// System.out.println(n);
// n += m;
// System.out.println(n);
// n+=3;
// System.out.println(n);
// n++;
// n--;
// ++n;
// --n;
// System.out.println(n);
// System.out.println(n);
// System.out.println(n);
// System.out.println(n);
// System.out.println(a1);
// System.out.println(a2);
// System.out.println(a3);
// System.out.println(a4);
// System.out.println(a2);
// System.out.println(a5);
}
}
<file_sep>
public class SearchVowel {
String vowel;
String storedData;
String inputData;
}
| 2077986725806063923999b5790f661923777dc7 | [
"Markdown",
"Java"
] | 21 | Java | arunkumarjena/PraticeJavaPrograms | 0484da959574ebb6d0ec30d6c98cd538c88643c1 | 1edf970c0dd372e91ae9c86cd85275268862ee96 | |
refs/heads/master | <file_sep><?php
session_start();
$email = filter_has_var(INPUT_POST, 'email') ? $_POST['email']: null; //grabs the username from the request stream
$password = filter_has_var(INPUT_POST, 'password') ? $_POST['password']: null;
//grabs the password from the request stream
if(empty(trim($email))) { //checks to see if username is empty or if there is white space after what is entered, for validation.
$errors[] = "<p>Please enter your email</p>\n
<a href='../../login.php'>Go Back</a>"; //errors variable array for error messages.
} elseif (strlen($email) < 6 OR strlen($email) > 30) {
//checks string length of username, if less than six characters or greater than 30, then send error to screen.
$errors[] = "Emails must include between 6 and 30 characters";
}
if(empty(trim($password))) {
//checks to see if password is empty or if there is white space after what is entered, for validation.
$errors[] = "<p>Please enter your password</p>\n
<a href='../../login.php'>Go Back</a>"; //errors variable array for error messages.
//tells user to go back and enter password
} elseif (strlen($password) < 1 OR strlen($password) > 30) {
//checks string length of password, if less than six characters or greater than 30, then send error to screen.
$errors[] = "Passwords must include between 6 and 30 characters";
}
if (!empty($errors)) { //if the errors variable is empty
foreach ($errors as $currentError) {
echo $currentError; //store message in variable and display on the screen
}
} else { //else execute login process
$email = filter_var($email, FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES);
$password = filter_var($password, FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES);
include '../db.conn.php'; // make db connection
/* Query the users database table to get the password hash for the username entered by the user in the logon form */
$sql = "SELECT password FROM user WHERE email = ?";
$stmt = mysqli_prepare($conn, $sql); // prepare the sql statement
/* Bind the $username entered by the user to the prepared statement. Note the “s” part indicates the data type used – in this case a string */
mysqli_stmt_bind_param($stmt, "s", $email);
mysqli_stmt_execute($stmt); // execute the query
/* Get the password hash from the query results for the given username and store it in the variable indicated */
mysqli_stmt_bind_result($stmt, $passwordHash);
/* Check if a record was returned by the query. If yes, then there was a username matching what was entered in the logon form and we can now test to see if the password entered in the logon form is the same as the stored (correct) one in the database. */
if (mysqli_stmt_fetch($stmt)) {
if (password_verify($password, $passwordHash)) {
header('Location: ../../index.php');
}
} else {
echo "<p>Sorry your email or password is incorrect. Please try again.</p> <a href='../../login.php'>Go Back</a>";
}
mysqli_stmt_close($stmt);
mysqli_close($conn);
}
<file_sep><!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Cohort - Profile</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<!--Links to external Librarys such as JQuery movile, material icons and CSS -->
<link rel="stylesheet" href="//code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css" />
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<link rel="stylesheet" href="resources/assets/css/app.css">
</head>
<body>
<div id="home" data-role="page">
<?php include "header.php" ?>
<div class="profile-wrapper">
<div class="back-to-home">
<a href="routes.php"><i class="material-icons">arrow_back</i><p>Back to Home</p></a>
</div>
<div class="user-details">
<div class="user-details-left">
<img src="resources/assets/img/default-user.png" alt="Profile Picture">
</div>
<div class="user-details-right">
<div class="profile-username">
<h1><NAME></h1>
</div>
<div class="profile-rating">
<p>ratinggoeshere</p>
<img src="resources/assets/img/beginner.png" alt="Skill Level">
</div>
</div>
</div>
<a href="messages.php" class="send">Send a Message</a>
<div class="profile-about">
<h2>About Me</h2>
<p>Curabitur blandit tempus porttitor. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.</p>
</div>
<div class="events-hosted">
<h2>Events Hosted by John</h2>
</div>
</div>
</div>
</body>
</html>
<file_sep><?php
$conn = mysqli_connect('localhost','USERNAME','PASSWORD','USERNAME');
if (mysqli_connect_errno()) {
echo "<p>Connection failed:".mysqli_connect_error()."</p>\n";
mysqli_close($conn);
}
mysqli_set_charset($conn,"utf8");
<file_sep><!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Cohort - Messages</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<!--Links to external Librarys such as JQuery movile, material icons and CSS -->
<link rel="stylesheet" href="//code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css" />
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<link rel="stylesheet" href="resources/assets/css/app.css">
</head>
<body>
<div id="home" data-role="page">
<?php include 'header.php'; ?>
<div class="messages-wrapper">
<h1>Conversations</h1>
<div class="conversation-wrapper">
<div class="conversation">
<img src="resources/assets/img/default-user.png" alt="Profile">
<div class="conversation-user">
<p><NAME></p>
</div>
<i class="material-icons">more_horiz</i>
</div>
<div class="conversation">
<img src="resources/assets/img/default-user.png" alt="Profile">
<div class="conversation-user">
<p><NAME></p>
</div>
<i class="material-icons">more_horiz</i>
</div>
</div>
</div>
</div>
</body>
</html>
<file_sep>$( document ).ready(function() {
//var divID = $('body').attr("id");
/*if (divID.attr("id") === "home") {
$("li").css("opacity", "1");
}*/
$('.tablinks').click(function() {
$('.tablinks').toggleClass('active');
});
$('.more-info').click(function() {
$("html, body").animate({ scrollTop: $('#more-event-info').offset().top }, 1000);
return false;
});
$('.next-two').click(function() {
$(".stage.one").css("display","none");
$(".stage.two").css("display","block");
$(".progress.one").css("opacity",".5");
$(".progress.two").css("opacity","1");
});
$('.prev-one').click(function() {
$(".stage.one").css("display","block");
$(".stage.two").css("display","none");
$(".progress.one").css("opacity","1");
$(".progress.two").css("opacity",".5");
$(".progress.three").css("opacity",".3");
$(".progress.four").css("opacity",".2");
});
$('.next-three').click(function() {
$(".stage.two").css("display","none");
$(".stage.three").css("display","block");
$(".progress.one").css("opacity",".3");
$(".progress.two").css("opacity",".5");
$(".progress.three").css("opacity","1");
});
$('.prev-two').click(function() {
$(".stage.two").css("display","block");
$(".stage.three").css("display","none");
$(".progress.one").css("opacity",".5");
$(".progress.two").css("opacity","1");
$(".progress.three").css("opacity",".3");
$(".progress.four").css("opacity",".2");
});
$('.next-four').click(function() {
$(".stage.three").css("display","none");
$(".stage.four").css("display","block");
$(".progress.one").css("opacity",".2");
$(".progress.two").css("opacity",".3");
$(".progress.three").css("opacity",".5");
$(".progress.four").css("opacity","1");
});
$('.prev-three').click(function() {
$(".stage.three").css("display","block");
$(".stage.four").css("display","none");
$(".progress.one").css("opacity",".2");
$(".progress.two").css("opacity",".3");
$(".progress.three").css("opacity","1");
$(".progress.four").css("opacity",".5");
});
});
<file_sep><!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Cohort - Routes</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<!--Links to external Librarys such as JQuery movile, material icons and CSS -->
<link rel="stylesheet" href="//code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css" />
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<link rel="stylesheet" href="resources/assets/css/app.css">
</head>
<body>
<div id="home" data-role="page">
<?php include 'header.php'; ?>
<div class="details-wrapper">
<div class="back-to-home">
<a href="routes.php"><i class="material-icons">arrow_back</i><p>Back to Home</p></a>
</div>
<div class="route-details-content">
<div class="route-host">
<p>Route Created By: <a href="profile.php"><NAME></a></p>
<p>ratingsgohere</p>
</div>
<img src="resources/assets/img/route.png" alt="Event Route">
<div class="route-details-wrapper">
<img src="resources/assets/img/distance.png" alt="Terrain"> 5 KM
<i class="material-icons">timer</i> 23 MIN
<img src="resources/assets/img/road.png" alt="Terrain"> ROAD
<img src="resources/assets/img/beginner.png" alt="Skill Level">
</div>
<a href="create-from-route.php" class="create-from-route">CREATE EVENT FROM ROUTE</a>
</div>
</div>
</div>
</body>
</html>
<file_sep><?php
//retreive each field input in to create event form
$title = filter_has_var(INPUT_POST, 'title') ? $_POST['title']: null;
$date = filter_has_var(INPUT_POST, 'date') ? $_POST['date']: null;
$time = filter_has_var(INPUT_POST, 'time') ? $_POST['time']: null;
$meeting = filter_has_var(INPUT_POST, 'meeting') ? $_POST['meeting']: null;
$attendingNo = filter_has_var(INPUT_POST, 'attendingNo') ? $_POST['attendingNo']: null;
$distance = filter_has_var(INPUT_POST, 'distance') ? $_POST['distance']: null;
$unitofM = filter_has_var(INPUT_POST, 'unitofM') ? $_POST['unitofM']: null;
$duration = filter_has_var(INPUT_POST, 'duration') ? $_POST['duration']: null;
$terrain = filter_has_var(INPUT_POST, 'terrain') ? $_POST['terrain']: null;
$skillLevel = filter_has_var(INPUT_POST, 'skillLevel') ? $_POST['skillLevel']: null;
$description = filter_has_var(INPUT_POST, 'description') ? $_POST['description']: null;
if(empty(trim($title))) { //checks to see if field is empty or if there is white space after what is entered, for validation.
$errors[] = "<p>Please enter an event title!</p>\n
<a href='/create-event.php'>Go Back</a>"; //errors variable array for error messages.
}
if(empty(trim($date))) { //checks to see if field is empty or if there is white space after what is entered, for validation.
$errors[] = "<p>Please enter an event start date!</p>\n
<a href='/create-event.php'>Go Back</a>"; //errors variable array for error messages.
}
if(empty(trim($time))) { //checks to see if field is empty or if there is white space after what is entered, for validation.
$errors[] = "<p>Please enter an event start time!</p>\n
<a href='/create-event.php'>Go Back</a>"; //errors variable array for error messages.
}
if(empty(trim($meeting))) { //checks to see if field is empty or if there is white space after what is entered, for validation.
$errors[] = "<p>Please enter a meeting point for the event!</p>\n
<a href='/create-event.php'>Go Back</a>"; //errors variable array for error messages.
}
if(empty(trim($distance))) { //checks to see if field is empty or if there is white space after what is entered, for validation.
$errors[] = "<p>Please enter the distance of the route!</p>\n
<a href='/create-event.php'>Go Back</a>"; //errors variable array for error messages.
}
if(empty(trim($duration))) { //checks to see if field is empty or if there is white space after what is entered, for validation.
$errors[] = "<p>Please enter the duration of the route!</p>\n
<a href='/create-event.php'>Go Back</a>"; //errors variable array for error messages.
}
if(empty(trim($skillLevel))) { //checks to see if field is empty or if there is white space after what is entered, for validation.
$errors[] = "<p>Please select a skill level!</p>\n
<a href='/create-event.php'>Go Back</a>"; //errors variable array for error messages.
}
if (!empty($errors)) { //if the errors variable is empty
foreach ($errors as $currentError) {
echo $currentError; //store field in variable and display on the screen
}
} else {
$title = filter_var($title, FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES);
$date = filter_var($date, FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES);
$time = filter_var($time, FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES);
$meeting = filter_var($meeting, FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES);
$attendingNo = filter_var($attendingNo, FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES);
$distance = filter_var($distance, FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES);
$unitofM = filter_var($unitofM, FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES);
$duration = filter_var($duration, FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES);
$terrain = filter_var($terrain, FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES);
$skillLevel = filter_var($skillLevel, FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES);
$description = filter_var($description, FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES);
include '../db.conn.php'; // make db connection
$sqlCreate = "INSERT INTO event (hostID,routeID,title,eventDate,eventTime,meetingPoint,attending,distance,unitOfM,duration,terrain,skillLevel,description,location) VALUES (1,1,?,?,?,?,?,?,?,?,?,?,?,'newcastle')";
$sqlCreateEvent = mysqli_prepare($conn, $sqlCreate);
mysqli_stmt_bind_param($sqlCreateEvent,"ssssiisisis",$title,$date,$time,$meeting,$attendingNo,$distance,$unitofM,$duration,$terrain,$skillLevel,$description);
mysqli_stmt_execute($sqlCreateEvent);
mysqli_stmt_close($sqlCreateEvent);
mysqli_close($conn);
header('Location: ../../index.php');
}
?>
<file_sep><?php
$email = filter_has_var(INPUT_POST, 'email') ? $_POST['email']: null;
$password = filter_has_var(INPUT_POST, 'password') ? $_POST['password']: null;
$forename = filter_has_var(INPUT_POST, 'forename') ? $_POST['forename']: null;
$surname = filter_has_var(INPUT_POST, 'surname') ? $_POST['surname']: null;
$dob = filter_has_var(INPUT_POST, 'dob') ? $_POST['dob']: null;
$skillLevel = filter_has_var(INPUT_POST, 'skillLevel') ? $_POST['skillLevel']: null;
$errors = array();
if(empty(trim($email))) {
$errors[] = "<p>Please enter an email address</p>\n";
}
if(empty(trim($password))) {
$errors[] = "<p>Please enter a password</p>\n";
}
if(empty(trim($forename))) {
$errors[] = "<p>Please enter your forename</p>\n";
}
if(empty(trim($surname))) {
$errors[] = "<p>Please enter your surnamel</p>\n";
}
if(empty(trim($dob))) {
$errors[] = "<p>Please enter your date of birth!</p>\n";
}
if(empty(trim($skillLevel))) {
$errors[] = "<p>Please select a skill level!</p>\n";
}
if (!empty($errors)) {
foreach ($errors as $currentError) {
echo $currentError;
}
} else {
include '../db.conn.php'; // make db connection
$passwordHash = password_hash($password, PASSWORD_BCRYPT);
$sqlRegister = "INSERT INTO user (email, password, forename, surname, dob, skillLevel) VALUES (?, ?, ?, ?, ?, ?)";
$sqlProcess = mysqli_prepare($conn, $sqlRegister);
mysqli_stmt_bind_param($sqlProcess,"sssssi", $email, $passwordHash, $forename, $surname, $dob, $skillLevel);
mysqli_stmt_execute($sqlProcess);
mysqli_stmt_close($sqlProcess);
mysqli_close($conn);
header('Location: ../../location-access.php');
}
<file_sep><!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Cohort - Events</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<!--Links to external Librarys such as JQuery movile, material icons and CSS -->
<link rel="stylesheet" href="//code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css" />
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<link rel="stylesheet" href="resources/assets/css/app.css">
<script type="text/javascript">
window.onload = function() {
var startPos;
var geoSuccess = function(position) {
startPos = position;
document.getElementById('startLat').innerHTML = startPos.coords.latitude;
document.getElementById('startLon').innerHTML = startPos.coords.longitude;
};
navigator.geolocation.getCurrentPosition(geoSuccess);
console.log(geoSuccess);
};
</script>
</head>
<body id="home">
<!--?php
include 'app/db.conn.php';
?-->
<div id="home" data-role="page">
<?php include "header.php" ?> <!-- include external php file, no need to repeat code -->
<!-- content -->
<div data-role="content" id="events-wrapper" data-position-true>
<div class="filter-wrapper">
<div class="filter-wrapper-left">
<p>Runs Located in:</p>
<a href="#"><h3>Newcastle</h3></a> <!--will be changed dynamically depending on location-->
</div>
<div class="filter-wrapper-right">
<i class="material-icons">filter_list</i>
</div>
</div>
<!--?php
$sql = "SELECT *
FROM event e
INNER JOIN host h
ON e.hostID = h.hostID
INNER JOIN user u
ON h.userID = u.userID
WHERE location = 'newcastle'";
$sqlEvent = mysqli_query($conn, $sql) or die(mysqli_error($conn)); //makes a connection to the database, if not kills connection, displays error
if (mysqli_num_rows($sqlEvent) > 0) {
while ($row = mysqli_fetch_assoc($sqlEvent)) { //fetches information
$eventID = htmlspecialchars($row["eventID"]); //places attributes in to rows to be displayed
$title = htmlspecialchars($row["title"]);
$distance = htmlspecialchars($row["distance"]);
$unit = htmlspecialchars($row["unitOfM"]);
$duration = htmlspecialchars($row["duration"]);
$terrain = htmlspecialchars($row["terrain"]);
$skillLevel = htmlspecialchars($row["skillLevel"]);
$host = htmlspecialchars($row["hostID"]);
$forename = htmlspecialchars($row["forename"]);
$surname = htmlspecialchars($row["surname"]);
echo "<div id=\"$eventID\" class=\"event\">\n";
echo "\t<div class=\"event-left\">\n";
echo "\t\t<img src=\"resources/assets/img/event-img-eg.jpg\" alt=\"Event Image\"; class=\"event-img\">\n";
echo "\t</div>\n";
echo "\t<div class=\"event-right\">\n";
echo "\t\t<div class=\"event-right-top\">\n";
echo "\t\t\t<a href=\"event-details.php\"><h4>$title</h4></a>\n";
echo "\t\t</div>\n";
echo "\t\t<div class=\"event-right-center\">\n";
echo "\t\t\t<p>Host: <a href=\"profile.php\">$forename $surname</a></p>\n";
echo "\t\t\t<div class=\"rating-wrapper\">\n";
echo "\t\t\t\tratinggoeshere\n";
echo "\t\t\t</div>\n";
echo "\t\t</div>\n";
echo "\t\t<div class=\"event-right-bottom\">\n";
echo "\t\t\t<div class=\"event-details\">\n";
echo "\t\t\t\t<img src=\"resources/assets/img/distance.png\" alt=\"Distance\">$distance $unit\n";
echo "\t\t\t\t<i class=\"material-icons\">timer</i>$duration\n";
echo "\t\t\t\t<img src=\"resources/assets/img/road.png\" alt=\"Terrain\">$terrain\n";
echo "\t\t\t</div>\n";
if ($skillLevel === "1") {
echo "\t\t\t<img src=\"resources/assets/img/beginner.png\" alt=\"Beginner\">\n";
} elseif ($skillLevel === "2") {
echo "\t\t\t<img src=\"resources/assets/img/intermediate.png\" alt=\"Intermediate\">\n";
} elseif ($skillLevel === "3") {
echo "\t\t\t<img src=\"resources/assets/img/advanced.png\" alt=\"Advanced\">\n";
}
echo "\t\t</div>\n";
echo "\t</div>\n";
echo "</div>\n";
}
} else {
echo "error";
}
mysqli_free_result($sqlEvent); //free's up space and kills connection
//mysqli_close($conn);
?-->
<div class="event">
<div class="event-left">
<img src="resources/assets/img/event-img-eg.jpg" alt="Event Image" class="event-img">
</div>
<div class="event-right">
<div class="event-right-top">
<a href="event-details.php"><h4>Running title</h4></a>
</div>
<div class="event-right-center">
<p>Host: <a href="profile.php"><NAME></a></p>
<div class="rating-wrapper">
ratinggoeshere
</div>
</div>
<div class="event-right-bottom">
<div class="event-details">
<img src="resources/assets/img/distance.png" alt="Terrain"> 5 KM
<i class="material-icons">timer</i> 23 MIN
<img src="resources/assets/img/road.png" alt="Terrain"> ROAD
</div>
<img src="resources/assets/img/beginner.png" alt="Skill Level">
</div>
</div>
</div>
<div class="event">
<div class="event-left">
<img src="resources/assets/img/event-img-eg.jpg" alt="Event Image" class="event-img">
</div>
<div class="event-right">
<div class="event-right-top">
<a href="event-details.php"><h4>Running title</h4></a>
</div>
<div class="event-right-center">
<p>Host: <a href="profile.php"><NAME></a></p>
<div class="rating-wrapper">
ratinggoeshere
</div>
</div>
<div class="event-right-bottom">
<div class="event-details">
<img src="resources/assets/img/distance.png" alt="Terrain"> 5 KM
<i class="material-icons">timer</i> 23 MIN
<img src="resources/assets/img/road.png" alt="Terrain"> ROAD
</div>
<img src="resources/assets/img/intermediate.png" alt="Skill Level">
</div>
</div>
</div>
<div class="event">
<div class="event-left">
<img src="resources/assets/img/event-img-eg.jpg" alt="Event Image" class="event-img">
</div>
<div class="event-right">
<div class="event-right-top">
<a href="event-details.php"><h4>Running title</h4></a>
</div>
<div class="event-right-center">
<p>Host: <a href="profile.php"><NAME></a></p>
<div class="rating-wrapper">
ratinggoeshere
</div>
</div>
<div class="event-right-bottom">
<div class="event-details">
<img src="resources/assets/img/distance.png" alt="Terrain"> 5 KM
<i class="material-icons">timer</i> 23 MIN
<img src="resources/assets/img/road.png" alt="Terrain"> ROAD
</div>
<img src="resources/assets/img/advanced.png" alt="Skill Level">
</div>
</div>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.0/jquery.min.js"></script>
<script src="./resources/assets/js/function.js"></script>
</body>
</html>
<file_sep># ************************************************************
# Sequel Pro SQL dump
# Version 4541
#
# http://www.sequelpro.com/
# https://github.com/sequelpro/sequelpro
#
# Host: localhost (MySQL 5.6.28)
# Database: cohort
# Generation Time: 2017-04-17 10:02:53 +0000
# ************************************************************
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
# Dump of table attending
# ------------------------------------------------------------
DROP TABLE IF EXISTS `attending`;
CREATE TABLE `attending` (
`attendingID` int(11) unsigned NOT NULL AUTO_INCREMENT,
`eventID` int(11) NOT NULL,
`userID` int(11) NOT NULL,
`hostID` int(11) NOT NULL,
`attendingTime` datetime NOT NULL,
PRIMARY KEY (`attendingID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
# Dump of table conversations
# ------------------------------------------------------------
DROP TABLE IF EXISTS `conversations`;
CREATE TABLE `conversations` (
`conversationID` int(11) unsigned NOT NULL AUTO_INCREMENT,
`senderID` int(11) NOT NULL,
`recipientID` int(11) NOT NULL,
`conversationTime` datetime DEFAULT NULL,
PRIMARY KEY (`conversationID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
# Dump of table event
# ------------------------------------------------------------
DROP TABLE IF EXISTS `event`;
CREATE TABLE `event` (
`eventID` int(11) unsigned NOT NULL AUTO_INCREMENT,
`hostID` int(11) NOT NULL,
`routeID` int(11) NOT NULL,
`title` varchar(100) NOT NULL DEFAULT '',
`eventDate` date NOT NULL,
`terrain` varchar(20) NOT NULL DEFAULT '',
`distance` int(4) NOT NULL,
`unitOfM` varchar(2) NOT NULL DEFAULT '',
`skillLevel` int(2) NOT NULL,
`description` text,
`meetingPoint` varchar(250) DEFAULT NULL,
`attending` int(100) DEFAULT NULL,
`location` varchar(200) NOT NULL DEFAULT '',
`duration` time NOT NULL,
`eventTime` time NOT NULL,
PRIMARY KEY (`eventID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
LOCK TABLES `event` WRITE;
/*!40000 ALTER TABLE `event` DISABLE KEYS */;
INSERT INTO `event` (`eventID`, `hostID`, `routeID`, `title`, `eventDate`, `terrain`, `distance`, `unitOfM`, `skillLevel`, `description`, `meetingPoint`, `attending`, `location`, `duration`, `eventTime`)
VALUES
(20,1,1,'Running Test','2017-04-15','road',2,'km',3,'lol','At the shop',2,'newcastle','22:22:22','16:07:00'),
(21,1,1,'Running Event','2017-04-21','road',2,'km',1,'hello','Habita',2,'newcastle','00:25:00','12:30:00');
/*!40000 ALTER TABLE `event` ENABLE KEYS */;
UNLOCK TABLES;
# Dump of table eventRating
# ------------------------------------------------------------
DROP TABLE IF EXISTS `eventRating`;
CREATE TABLE `eventRating` (
`eRatingID` int(11) unsigned NOT NULL AUTO_INCREMENT,
`eventID` int(11) NOT NULL,
`eRatingTime` datetime NOT NULL,
`eRating` int(11) NOT NULL,
`eFeedback` text,
PRIMARY KEY (`eRatingID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
# Dump of table host
# ------------------------------------------------------------
DROP TABLE IF EXISTS `host`;
CREATE TABLE `host` (
`hostID` int(11) unsigned NOT NULL AUTO_INCREMENT,
`userID` int(11) NOT NULL,
PRIMARY KEY (`hostID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
LOCK TABLES `host` WRITE;
/*!40000 ALTER TABLE `host` DISABLE KEYS */;
INSERT INTO `host` (`hostID`, `userID`)
VALUES
(1,5);
/*!40000 ALTER TABLE `host` ENABLE KEYS */;
UNLOCK TABLES;
# Dump of table hostRating
# ------------------------------------------------------------
DROP TABLE IF EXISTS `hostRating`;
CREATE TABLE `hostRating` (
`hRatingID` int(11) unsigned NOT NULL AUTO_INCREMENT,
`hostID` int(11) NOT NULL,
`ratingTime` datetime NOT NULL,
`hRating` int(11) NOT NULL,
`hFeedback` text,
PRIMARY KEY (`hRatingID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
# Dump of table messages
# ------------------------------------------------------------
DROP TABLE IF EXISTS `messages`;
CREATE TABLE `messages` (
`messageID` int(11) unsigned NOT NULL AUTO_INCREMENT,
`recipientID` int(11) NOT NULL,
`senderID` int(11) NOT NULL,
`message` text NOT NULL,
`timeSent` time NOT NULL,
`conversationID` int(11) NOT NULL,
PRIMARY KEY (`messageID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
# Dump of table notifications
# ------------------------------------------------------------
DROP TABLE IF EXISTS `notifications`;
CREATE TABLE `notifications` (
`notificationID` int(11) unsigned NOT NULL AUTO_INCREMENT,
`userID` int(11) NOT NULL,
`notifyType` int(10) NOT NULL,
`notifyTime` datetime NOT NULL,
PRIMARY KEY (`notificationID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
# Dump of table route
# ------------------------------------------------------------
DROP TABLE IF EXISTS `route`;
CREATE TABLE `route` (
`routeID` int(11) unsigned NOT NULL AUTO_INCREMENT,
`hostID` int(11) NOT NULL,
`route` varchar(50) NOT NULL DEFAULT '',
`media` varchar(50) DEFAULT '',
PRIMARY KEY (`routeID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
LOCK TABLES `route` WRITE;
/*!40000 ALTER TABLE `route` DISABLE KEYS */;
INSERT INTO `route` (`routeID`, `hostID`, `route`, `media`)
VALUES
(1,1,'','');
/*!40000 ALTER TABLE `route` ENABLE KEYS */;
UNLOCK TABLES;
# Dump of table routeRating
# ------------------------------------------------------------
DROP TABLE IF EXISTS `routeRating`;
CREATE TABLE `routeRating` (
`rRatingID` int(11) unsigned NOT NULL AUTO_INCREMENT,
`routeID` int(11) NOT NULL,
`rRatingTime` datetime NOT NULL,
`rRating` int(11) NOT NULL,
`rFeeback` text,
PRIMARY KEY (`rRatingID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
# Dump of table user
# ------------------------------------------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
`userID` int(11) unsigned NOT NULL AUTO_INCREMENT,
`forename` varchar(20) NOT NULL DEFAULT '',
`surname` varchar(50) NOT NULL DEFAULT '',
`dob` date NOT NULL,
`email` varchar(20) NOT NULL DEFAULT '',
`password` varchar(20) NOT NULL DEFAULT '',
`description` text,
`skillLevel` int(2) NOT NULL,
PRIMARY KEY (`userID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
LOCK TABLES `user` WRITE;
/*!40000 ALTER TABLE `user` DISABLE KEYS */;
INSERT INTO `user` (`userID`, `forename`, `surname`, `dob`, `email`, `password`, `description`, `skillLevel`)
VALUES
(5,'test','test','2222-02-22','<EMAIL>','$2y$10$dtGbZ.WQcTkal',NULL,1),
(6,'Sam','Towel','1996-06-21','<EMAIL>','$2y$10$Uk3VluTxFbStc',NULL,2);
/*!40000 ALTER TABLE `user` ENABLE KEYS */;
UNLOCK TABLES;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
<file_sep><!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Cohort - EVENT NAME GOES HERE</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<!--Links to external Librarys such as JQuery movile, material icons and CSS -->
<link rel="stylesheet" href="//code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css" />
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<link rel="stylesheet" href="resources/assets/css/app.css">
</head>
<body>
<div id="home" data-role="page">
<?php include "header.php" ?>
<div class="event-details-wrapper">
<div class="back-to-home">
<a href="index.php"><i class="material-icons">arrow_back</i><p>Back to Home</p></a>
</div>
<div class="details-content">
<div class="details-top-content">
<h2>Running Title</h2>
<div class="details-top-host">
<p>Host: <a href="profile.php"><NAME></a></p> <p>ratinggoeshere</p>
</div>
<div class="details-top-host">
<p><strong>Date:</strong> 21/01/2001</p> <p><strong>Time:</strong> 17:30</p>
</div>
</div>
<img src="resources/assets/img/route.png" alt="Event Route">
<div class="route-details-wrapper">
<img src="resources/assets/img/distance.png" alt="Distance"> 5 KM
<i class="material-icons">timer</i> 23 MIN
<img src="resources/assets/img/road.png" alt="Terrain"> ROAD
<img src="resources/assets/img/beginner.png" alt="Skill Level">
</div>
<a href="#more-event-info"><div class="more-info">
<p>More Info</p>
<i class="material-icons">keyboard_arrow_down</i>
</div></a>
</div>
</div>
<div id="more-event-info">
<div class="attending">
<p>3 people are attending, 5 people have bookmarked this event!</p>
<div class="option-wrapper">
<a href="#" class="attending">LET'S GO!</a>
</div>
</div>
<div class="description">
<h3>Description</h3>
<p>Donec sed odio dui. Donec sed odio dui. Nullam quis risus eget urna mollis ornare vel eu leo. Sed posuere consectetur est at lobortis. Aenean lacinia bibendum nulla sed consectetur.</p>
</div>
<div class="comment-section">
<h3>Comments</h3>
<p>Any questions for the host about the event?<br>Fire away.</p>
<form class="send-comment" action="commentprocess.php" method="post">
<textarea class="message-box" name="message" cols="40" rows="5" placeholder="Type a message..."></textarea>
<input type="submit" name="send" value="">
</form>
<div class="comment">
<div class="comment-top">
<img src="resources/assets/img/default-user.png" alt="Profile">
<a href="profile.php"><h4><NAME></h4></a>
<p>01/01/01 01:01:01</p>
</div>
<p>Cras mattis consectetur purus sit amet fermentum. Vestibulum id ligula porta felis euismod semper.</p>
</div>
<div class="comment">
<div class="comment-top">
<img src="resources/assets/img/default-user.png" alt="Profile">
<a href="profile.php"><h4><NAME></h4></a>
<p>01/01/01 01:01:01</p>
</div>
<p>Cras mattis consectetur purus sit amet fermentum. Vestibulum id ligula porta felis euismod semper.</p>
</div>
</div>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.0/jquery.min.js"></script>
<script src="./resources/assets/js/function.js"></script>
</body>
</html>
<file_sep><!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Cohort - Account</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<!--Links to external Librarys such as JQuery movile, material icons and CSS -->
<link rel="stylesheet" href="//code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css" />
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<link rel="stylesheet" href="resources/assets/css/app.css">
</head>
<body>
<div id="home" data-role="page">
<?php include 'header.php'; ?>
<div class="account-wrapper">
<h1>My Account</h1>
<p>View your profile, events and settings!</p>
<div class="account-settings">
<a href="profile.php"><div class="settings-option-wrapper">
<p>View your Profile</p>
<i class="material-icons">arrow_back</i>
</div></a>
<a href="attending.php"><div class="settings-option-wrapper">
<p>Attending Events</p>
<i class="material-icons">arrow_back</i>
</div></a>
</div>
<h2>System Settings</h2>
<div class="system-settings">
<a href="account-settings.php"><div class="settings-option-wrapper">
<p>Account Settings</p>
<i class="material-icons">arrow_back</i>
</div></a>
<a href="system-settings"><div class="settings-option-wrapper">
<p>System Settings</p>
<i class="material-icons">arrow_back</i>
</div></a>
<a href="terms.php"><div class="settings-option-wrapper">
<p>Terms & Conditions</p>
<i class="material-icons">arrow_back</i>
</div></a>
<a href="privacy.php"><div class="settings-option-wrapper">
<p>Privacy Policy</p>
<i class="material-icons">arrow_back</i>
</div></a>
</div>
<a href="landing.php" class="signout">Sign out of Cohort</a>
</div>
</div>
</body>
</html>
<file_sep><!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Cohort - Routes</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<!--Links to external Librarys such as JQuery movile, material icons and CSS -->
<link rel="stylesheet" href="//code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css" />
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<link rel="stylesheet" href="resources/assets/css/app.css">
</head>
<body>
<div id="home" data-role="page">
<?php include 'header.php'; ?>
<div class="route-wrapper">
<h1>Recommended Routes in Your Area </h1>
<div class="ui-grid-a">
<div class="ui-block-a">
<a href="route-details.php"><img src="resources/assets/img/route.png" alt="route"></a>
<div class="route-details-wrapper">
<p>ratingsgohere</p>
<img src="resources/assets/img/beginner.png" alt="Skill Level" class="skill">
</div>
<p>Created by: <a href="profile.php"><NAME></a></p>
</div>
<div class="ui-block-b">
<a href="route-details.php"><img src="resources/assets/img/route.png" alt="route"></a>
<div class="route-details-wrapper">
<p>ratingsgohere</p>
<img src="resources/assets/img/beginner.png" alt="Skill Level" class="skill">
</div>
<p>Created by: <a href="profile.php"><NAME></a></p>
</div>
<div class="ui-block-a">
<a href="route-details.php"><img src="resources/assets/img/route.png" alt="route"></a>
<div class="route-details-wrapper">
<p>ratingsgohere</p>
<img src="resources/assets/img/beginner.png" alt="Skill Level" class="skill">
</div>
<p>Created by: <a href="profile.php"><NAME></a></p>
</div>
<div class="ui-block-b">
<a href="route-details.php"><img src="resources/assets/img/route.png" alt="route"></a>
<div class="route-details-wrapper">
<p>ratingsgohere</p>
<img src="resources/assets/img/beginner.png" alt="Skill Level" class="skill">
</div>
<p>Created by: <a href="profile.php"><NAME></a></p>
</div>
</div>
</div>
</div>
</body>
</html>
| ddd00be3e12deb0ae509e203a2c7ee5f0ebaad70 | [
"JavaScript",
"SQL",
"PHP"
] | 13 | PHP | sdtowle/personal | eab151a100698de7132a7cbedddb20942b1354dd | d6e9d53206f815ded77bc31f37ccadff579a7557 | |
refs/heads/master | <file_sep>require_relative '../models/address_book'
#Pulling all of the values from models/address_book.rb!
class MenuController
attr_accessor :address_book
def initialize
@address_book = AddressBook.new
#haven't seen this before, but it makes sense.
#You reference the creation of a new AddressBook entry with an instance variable that can be used thoughout this program!
end
def main_menu #This shows the total number of entries that are listed
puts "Main Menu - #{@address_book.entries.size} entries"
puts "1 - View all entries"
puts "2 - Create an Entry"
puts "3 - Search for an Entry"
puts "4 - Import entries from CSV"
puts "5 - View Entry Number"
puts "6 - Delete all entries"
puts "7 - Dip out (Exit)"
print "Enter your selection:"
selection = gets.to_i
# Case Statement! Solid refresher. Each choice has a seperate route.
# So think of Case Statements as a a signpost. Each route you take has different conditions
case selection
when 1
system "clear"
view_all_entries
main_menu
when 2
system "clear"
create_entry
main_menu
when 3
system "clear"
search_entries
main_menu
when 4
system "clear"
read_csv
main_menu
when 5
system "clear"
p "Please specify the entry number:"
# First we have to convert the entry to an integer because it defaults as a string
number = gets.chomp.to_i
# This was the tricky part! remember the entries is an Array.
#So we can just reference the place of the array that the entry is at.
entry = @address_book.entries[number]
# if entry converts to a boolean––if it's true than...
if entry
puts entry
else
puts "no entry at this index"
end
# This was a simple version of doing it in a very complicated way.
# Try to stay as DRY as you can. Remember the Root of the code that you're referencing
# h = {}
# @address_book.entries.each do |entry|
# h << :index entry
# index += 1
# if number == index
# puts entry
# end
# end
main_menu
# Yup, main_menu is a break. Because with Case Statements, they will run until you tell them to stop!
when 6
p "Are you sure? People will actually die. (yes/no)"
joker = gets.chomp
if joker == "yes"
here_we_go
system "clear"
main_menu
else
system "clear"
main_menu
end
when 7
puts "Peace, dog."
exit(0)
# exit(0) signals that the program is ending without an error
else
# Saftey net! This is incase the user messes up. it tells them to fix it and send them back to the main_menu
# system "clear" is the key here. it clears the screen again so that the menu can be displayed on a blank slate
system "clear"
puts "Dude, I can't undertand you. Pick a freaking number"
main_menu
end
end
# The methods that are referenced in the menu.
# I could move them, but its prob better to keep them bundled with the menu. Readability!
def view_all_entries
@address_book.entries.each do |entry|
system 'clear'
puts entry.to_s
entry_submenu(entry)
end
system "clear"
puts "End of Entries"
end
def create_entry
system "clear"
puts "New AddressBloc Entry"
# These variable are able to plug directly into the add_entry method as arguments.
# It's like reversing the argument flow, but it totally makes sense.
print "name:"
name = gets.chomp
print "phone number:"
phone_number = gets.chomp
print "email:"
email = gets.chomp
@address_book.add_entry(name, phone_number, email)
system "clear"
puts "Got it! Thanks for your contribution."
end
def search_entries
p "search by name:"
name = gets.chomp
match = @address_book.binary_search(name)
system "clear"
if match
puts match.to_s
search_submenu(match)
else
puts "no match found for #{name}"
end
end
def read_csv
#1
p "Enter CSV File to import:"
file_name = gets.chomp
if file_name.empty?
system "clear"
puts "No CSV File to read"
main_menu
end
begin
entry_count = @address_book.import_from_csv(file_name).count
system "clear"
puts "#{entry_count} new entries added from #{file_name}"
rescue
puts "#{file_name} is not a valid CSV file, please enter the name of a valid CSV file"
read_csv
end
end
def delete_entry
@address_book.entries.delete(entry)
puts "#{entry.name} has been deleted"
end
def edit_entry(entry)
p "Updated Name:"
name = gets.chomp
p "Updated Phone number:"
phone_number = gets.chomp
p "Updated Email:"
email = gets.chomp
entry.name = name if !name.empty?
entry.phone_number = phone_number if !phone_number.empty?
entry.email = email if !email.empty?
system "clear"
puts "updated entry:"
puts entry
end
def here_we_go
@address_book.entries.clear
end
def entry_submenu(entry)
puts "n - next entry"
puts "d - delete entry"
puts "e - edit this entry"
puts "m - return to main menu"
selection = gets.chomp
case selection
when "n"
when "d"
delete_entry(entry)
when "e"
edit_entry(entry)
entry_submenu(entry)
when "m"
system "clear"
main_menu
else
system "clear"
puts "Sorry, #{selection} is wrong. Please the options given"
entry_submenu(entry)
end
end
def search_submenu(entry)
puts "/nd - delete entry"
puts "e - edit this entry"
puts "m - return to the main menu"
selection = gets.chomp
case selection
when "d"
system "clear"
delete_entry(entry)
main_menu
when "e"
edit_entry(entry)
system "clear"
main_menu
when "m"
system "clear"
main_menu
else
system "clear"
puts "#{selection} is not a valid input"
puts entry.to_s
search_submenu(entry)
end
end
end
<file_sep>require_relative 'entry'
require "csv"
class AddressBook
attr_accessor :entries
def initialize
@entries = []
end
def remove_entry(name, phone_number, email)
delete_entry = nil
@entries.each do |x|
if name == x.name && phone_number == x.phone_number && email == x.email
delete_entry = x
end
end
@entries.delete(delete_entry)
end
def add_entry(name, phone_number, email)
index = 0
@entries.each do |entry|
if name < entry.name
break
end
index += 1
end
@entries.insert(index, Entry.new(name, phone_number, email))
end
#7
def import_from_csv(file)
csv_text = File.read(file)
csv = CSV.parse(csv_text, headers: true, skip_blanks: true)
#8
csv.each do |row|
row_hash = row.to_hash # <-converts each item in csv into a symbol to be used in a hash
add_entry(row_hash["name"], row_hash["phone_number"], row_hash["email"])
end
end
end
| e0067ca82c7eb4784826b43112418d75b51fa160 | [
"Ruby"
] | 2 | Ruby | BtheKid13/address_bloc | 8fb2cbc0436759a6b28a657e8fc8c090906ad6f9 | dcc7211929b8445c2910df35bd4d73c9092c5b56 | |
refs/heads/master | <repo_name>tcampanella/bravonext-test<file_sep>/src/main/java/com/tcampanella/bravonext/iface/Item.java
package com.tcampanella.bravonext.iface;
import java.math.BigDecimal;
/**
* @author <NAME>
*
* General interface for an Item
*
*/
public interface Item {
public String getName();
public BigDecimal getPrice();
public int getAmount();
public boolean isImported();
public boolean isExempted();
}
<file_sep>/src/main/java/com/tcampanella/bravonext/iface/IList.java
package com.tcampanella.bravonext.iface;
import java.util.List;
/**
* @author <NAME>
*
* The following interface (generic) let the class that implements it
* expose two methods to access a private list of Items
*
*/
public interface IList<T> {
public List<T> getItems();
public T getItem(int index);
}
<file_sep>/src/test/java/com/tcampanella/bravonext/test/main/ShoppingListTest.java
package com.tcampanella.bravonext.test.main;
import org.junit.Test;
import com.tcampanella.bravonext.main.ShoppingList;
import static org.junit.Assert.*;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
/**
* @author <NAME>
*
* JUnit test case for the class ShoppingList
*
*/
public class ShoppingListTest {
@Test
public void testShoppingList() {
/**
* Create a new ShoppingList object
*/
ShoppingList shoppingList = null;
try {
/**
* Standard "file.txt" is used
*/
shoppingList = new ShoppingList();
} catch (IOException e) {
// Should not happen
e.printStackTrace();
}
/**
* Check that the shopping list has been correctly
* populated
*/
assertTrue(shoppingList.getItems().size() > 0);
assertTrue(shoppingList.getItem(0).getItems().size() > 0);
/**
* Check that, in case a wrong file name is provided,
* a FileNotFound exception is thrown
*/
FileNotFoundException fileNotFoundException = null;
try {
shoppingList = new ShoppingList("wrong file name");
} catch (UnsupportedEncodingException e) {
//should not happen
e.printStackTrace();
} catch (FileNotFoundException e) {
fileNotFoundException = e;
} catch (IOException e) {
//should not happen
e.printStackTrace();
}
assertTrue(fileNotFoundException != null);
}
}
<file_sep>/README.md
# Bravonext test
The actual repository is to provide a solution to the test proposed by Bravonext.
The project can be manually built by executing the following maven command:
mvn test assembly:single
A uber jar file will be then generated, by the name bravonextTest.jar. Such jar can be run by executing the following command:
java -jar bravonextTest.jar
N.B.: At the same path where the jar is located, another file should exist, by the name shoppingList.txt
The project has been conceived as follows:
Two main entities exist, ShoppingList and ReceiptList, which contain respectively a list of ShoppingBaskets (a series of items to be bought) and Receipts (a series of items just bought, together with the total cost and amount of taxes). A ReceiptList is created out of an Existing ShoppingList, which must be created (instantiated) before it (the same concept is applied to Receipts-ShoppingBaskets and ReceiptItems-ShoppingItems).
A ShoppingBasket contains a variable number of ShoppingItems, while a Receipt contains a variable number of ReceiptItems. Each ReceiptItem, Receipt and ReceiptList will always have access to the corresponding entity (ShoppingItem, ShoppingBasket, ShoppingList).
No additional library/framework has been used in this project
<file_sep>/src/main/java/com/tcampanella/bravonext/iface/IReference.java
package com.tcampanella.bravonext.iface;
/**
* @author <NAME>
*
* Generic interface to obtain a reference
* to a related entity
*/
public interface IReference<T> {
public T getReference();
}
<file_sep>/src/main/java/com/tcampanella/bravonext/main/ShoppingBasket.java
package com.tcampanella.bravonext.main;
import java.util.ArrayList;
import java.util.List;
import com.tcampanella.bravonext.iface.IShoppingBasket;
import com.tcampanella.bravonext.iface.Item;
/**
* @author <NAME>
*
* Class representing a Shopping Basket
*
*/
public class ShoppingBasket implements IShoppingBasket {
/**
* List of ShoppingItems
*/
private final List<Item> shoppingIems = new ArrayList<Item>();
/**
*
* A ShoppingBasket is created out of a list of ShoppingItems
*
* @param shoppingIems
*/
public ShoppingBasket(List<Item> shoppingIems) {
this.shoppingIems.addAll(shoppingIems);
}
/*
* @see com.tcampanella.last_minute.main.IList#getItems()
*/
public List<Item> getItems() {
return shoppingIems;
}
/*
* @see com.tcampanella.last_minute.main.IList#getItem(int index)
*/
public Item getItem(int index) {
return this.shoppingIems.get(index);
}
}
<file_sep>/src/main/java/com/tcampanella/bravonext/main/Receipt.java
package com.tcampanella.bravonext.main;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
import com.tcampanella.bravonext.iface.IReceipt;
import com.tcampanella.bravonext.iface.IReference;
import com.tcampanella.bravonext.iface.IShoppingBasket;
import com.tcampanella.bravonext.iface.Item;
/**
* @author <NAME>
*
* Class representing a Receipt
*
*/
public class Receipt implements IReference<ShoppingBasket>, IReceipt {
/**
* List of ReceiptItem
*/
private final List<Item> receiptItems = new ArrayList<Item>();
/**
* Total cost of the Receipt (including taxes)
*/
private BigDecimal total_cost = new BigDecimal("0.0");
/**
* Total taxes of the Receipt
*/
private BigDecimal total_taxes = new BigDecimal("0.0");
/**
* Reference to the ShoppingBasket a Receipt
* is created from
*/
private final IShoppingBasket shoppingBasket;
/**
*
* @param shoppingBasket
*/
public Receipt(ShoppingBasket shoppingBasket) {
this.shoppingBasket = shoppingBasket;
generateReceipt();
}
/**
* Method to populate a Receipt from a ShoppingBasket
*/
private void generateReceipt() {
for(Item shoppingItem : shoppingBasket.getItems()) {
Item receiptItem = new ReceiptItem(shoppingItem);
total_cost =
total_cost.add(receiptItem.getPrice().multiply(new BigDecimal(""+receiptItem.getAmount())));
total_taxes =
total_taxes.add(receiptItem.getPrice().subtract(((ReceiptItem)receiptItem).getReference().getPrice()));
receiptItems.add(receiptItem);
}
}
public BigDecimal getTotal_cost() {
return total_cost;
}
/**
* @return the total_taxes
*/
public BigDecimal getTotal_taxes() {
return total_taxes;
}
/*
* @see com.tcampanella.last_minute.main.IReference#getReference()
*/
public ShoppingBasket getReference() {
return (ShoppingBasket) this.shoppingBasket;
}
/**
* The following method will return a String formatted as follows:
*
1 book : 12.49
1 music CD: 16.49
1 chocolate bar: 0.85
Sales Taxes: 1.50 Total: 29.83
*/
@Override
public String toString() {
StringBuilder string = new StringBuilder();
for(Item item : receiptItems)
string.append(""+item.getAmount() + " "+item.getName() + ": " + item.getPrice() +"\n");
string.append("\nSales Taxes: " + this.getTotal_taxes() + " Total: " + this.getTotal_cost()+"\n\n");
return string.toString();
}
/*
* @see com.tcampanella.last_minute.main.IList#getItems()
*/
public List<Item> getItems() {
return receiptItems;
}
/*
* @see com.tcampanella.last_minute.main.IList#getItem(int index)
*/
public Item getItem(int index) {
return receiptItems.get(index);
}
}
<file_sep>/src/main/java/com/tcampanella/bravonext/main/ReceiptItem.java
package com.tcampanella.bravonext.main;
import java.math.BigDecimal;
import com.tcampanella.bravonext.iface.IReference;
import com.tcampanella.bravonext.iface.Item;
import com.tcampanella.bravonext.util.Util;
/**
*
* @author <NAME>
*
* Class representing a single Item in a Receipt
*/
public class ReceiptItem implements Item, IReference<Item> {
/**
* Item name
*/
private String name;
/**
* Item price (with taxes)
*/
private BigDecimal price;
/**
* Number of items
*/
private int amount;
/**
* Good exempted from basic sales taxes
*/
boolean exempted;
/**
* Good imported
*/
private boolean imported;
/**
* A reference to the related sshoppingItem
*/
private final Item shoppingItem;
/**
* Utility class
*/
private static final Util util = new Util();
/*
*
* @param shoppingItem
*
* A ReceiptItem is created out of an existing SshoppingItem
*/
public ReceiptItem(Item shoppingItem) {
this.shoppingItem = shoppingItem;
this.name = shoppingItem.getName();
this.amount = shoppingItem.getAmount();
this.exempted = shoppingItem.isExempted();
this.imported = shoppingItem.isImported();
/**
* The price is calculated including the necessary taxes
*/
this.price = util.calculateTaxes(shoppingItem).add(shoppingItem.getPrice());
}
/*
* @see com.tcampanella.last_minute.main.Item#getName()
*/
public String getName() {
return this.name;
}
/*
* @see com.tcampanella.last_minute.main.Item#getPrice()
*/
public BigDecimal getPrice() {
return this.price;
}
/*
* @see com.tcampanella.last_minute.main.Item#getAmount()
*/
public int getAmount() {
return this.amount;
}
public boolean isExempted() {
return this.exempted;
}
/*
* @see com.tcampanella.last_minute.main.Item#isImported()
*/
public boolean isImported() {
return this.imported;
}
/*
* @see com.tcampanella.last_minute.main.IReference#getReference()
*/
public Item getReference() {
return this.shoppingItem;
}
}
<file_sep>/src/main/java/com/tcampanella/bravonext/main/ShoppingList.java
package com.tcampanella.bravonext.main;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.util.ArrayList;
import java.util.List;
import com.tcampanella.bravonext.iface.IShoppingList;
import com.tcampanella.bravonext.util.Util;
/**
* @author <NAME>
*
*/
public class ShoppingList implements IShoppingList {
private List<ShoppingBasket> shoppingBaskets = new ArrayList<ShoppingBasket>();
private final Util util = new Util();
private final static String DEFAULT_FILE_NAME = "shoppingList.txt";
public ShoppingList() throws UnsupportedEncodingException, FileNotFoundException, IOException {
this(DEFAULT_FILE_NAME);
}
public ShoppingList(String fileName) throws UnsupportedEncodingException, FileNotFoundException, IOException {
shoppingBaskets.addAll(util.readShoppingList(new FileInputStream("./" + fileName)));
}
public List<ShoppingBasket> getItems(){
return this.shoppingBaskets;
}
public ShoppingBasket getItem(int index) {
return shoppingBaskets.get(index);
}
}
<file_sep>/src/test/java/com/tcampanella/bravonext/test/util/UtilTest.java
package com.tcampanella.bravonext.test.util;
import static org.junit.Assert.*;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
import org.junit.Test;
import com.tcampanella.bravonext.iface.Item;
import com.tcampanella.bravonext.main.ShoppingBasket;
import com.tcampanella.bravonext.main.ShoppingItem;
import com.tcampanella.bravonext.util.Util;
/**
*
* @author <NAME>
*
* JUnit test case for the class Util
*
*/
public class UtilTest {
@Test
public void testisExempt() {
/**
* Create a new Util class
*/
Util util = new Util();
/**
* Check the correct behaviour of isExempt(String name)
*
* exemption list --> { "chocolate","book","headache pills"}
*/
assertTrue(util.isExempt("book"));
assertTrue(util.isExempt("Book"));
assertFalse(util.isExempt("music CD"));
assertTrue(util.isExempt("headache pills"));
}
@Test
public void testCalculateTaxes() {
/**
* Create a new Util class
*/
Util util = new Util();
/**
* Check the correct behaviour of calculateTaxes(Item item)
*/
Item item1 = new ShoppingItem("name", new BigDecimal("1.51"), 1, true, true);
assertTrue(util.calculateTaxes(item1).compareTo(new BigDecimal("0.10")) == 0);
Item item2 = new ShoppingItem("name", new BigDecimal("1.51"), 1, false, true);
assertTrue(util.calculateTaxes(item2).compareTo(new BigDecimal("0.25")) == 0);
Item item3 = new ShoppingItem("name", new BigDecimal("1.51"), 1, false, false);
assertTrue(util.calculateTaxes(item3).compareTo(new BigDecimal("0.20")) == 0);
}
@Test
public void testRoundNumber() {
/**
* Create a new Util class
*/
Util util = new Util();
/**
* Check the correct behaviour of roundNumber(BigDecimal numberToBeRounded)
*/
assertTrue(util.roundNumber(new BigDecimal("0.013")).compareTo(new BigDecimal("0.05")) == 0);
assertTrue(util.roundNumber(new BigDecimal("7.123")).compareTo(new BigDecimal("7.15")) == 0);
assertTrue(util.roundNumber(new BigDecimal("7.120001")).compareTo(new BigDecimal("7.15")) == 0);
}
@Test
public void testReadShoppingList() {
/**
* Create a new Util class
*/
Util util = new Util();
/**
* Create a new list of ShoppingBasket
*/
List<ShoppingBasket> shoppingBaskets = new ArrayList<ShoppingBasket>();
try {
/**
* Check the correct behaviour of readShoppingList(FileInputStream inputStream)
*/
shoppingBaskets = util.readShoppingList(new FileInputStream("./" + "shoppingList.txt"));
} catch (IOException e) {
// should not be reached
e.printStackTrace();
}
/**
* Check that the list has been
* correctly populated
*/
assertTrue(shoppingBaskets.size() == 6);
assertTrue(shoppingBaskets.get(0).getItem(0).getName().equals("book"));
/**
* Check that readShoppingList(FileInputStream inputStream), if invoked
* with a not existing file name, it would throw a FileNotFoundException
*/
FileNotFoundException fileNotFoundException = null;
try {
shoppingBaskets = util.readShoppingList(new FileInputStream("./" + "file_not_existing.txt"));
} catch (FileNotFoundException e) {
// should not be reached
fileNotFoundException = e;
} catch (IOException e) {
// should not be reached
e.printStackTrace();
}
assertTrue(fileNotFoundException != null);
}
}
<file_sep>/src/test/java/com/tcampanella/bravonext/test/main/ReceiptTest.java
package com.tcampanella.bravonext.test.main;
import static org.junit.Assert.assertTrue;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
import org.junit.Test;
import com.tcampanella.bravonext.iface.Item;
import com.tcampanella.bravonext.main.Receipt;
import com.tcampanella.bravonext.main.ShoppingBasket;
import com.tcampanella.bravonext.main.ShoppingItem;
/**
* @author <NAME>
*
* JUnit test case for the class Receipt
*/
public class ReceiptTest {
@Test
public void test() {
/**
* Create a new list of Items
*/
List<Item> shoppingItems = new ArrayList<Item>();
for(int i = 0; i< 10; i++)
shoppingItems.add(new ShoppingItem("name "+ i, new BigDecimal("1.10"), 1, false, false));
/**
* Create a new shopping basket with
* the list of items (shoppingItems)
*/
ShoppingBasket shoppingBasket = new ShoppingBasket(shoppingItems);
/**
* Create a new Receipt
*/
Receipt receipt = new Receipt(shoppingBasket);
/**
* Check that the receipt has been
* correctly populated
*/
assertTrue(receipt.getItems().size() == 10);
assertTrue(receipt.getItem(1).getName().equals("name 1"));
/**
* Check that the getReference returns the correct ShoppingBasket
*/
assertTrue(receipt.getReference().equals(shoppingBasket));
/**
* Check that the total cost and total amount of taxes
* have been correctly calculated given the list of items (shoppingItems)
*/
assertTrue(receipt.getTotal_cost().equals(new BigDecimal("12.50")));
assertTrue(receipt.getTotal_taxes().equals(new BigDecimal("1.50")));
}
}
| 6a4f829def753e38ee644e725cb75cdfaf58d10a | [
"Markdown",
"Java"
] | 11 | Java | tcampanella/bravonext-test | 3bfa2364bc1f52cdc6043c8ac229eeecc33b6a71 | bde26428f432612d42e7a077c4d9ecb260317afa | |
refs/heads/master | <file_sep>package kevinrmendez.flutter_bluetooth_adapter
import android.bluetooth.BluetoothAdapter
import io.flutter.plugin.common.MethodCall
import io.flutter.plugin.common.MethodChannel
import io.flutter.plugin.common.MethodChannel.MethodCallHandler
import io.flutter.plugin.common.MethodChannel.Result
import io.flutter.plugin.common.PluginRegistry.Registrar
class FlutterBluetoothAdapterPlugin(val registrar: Registrar) : MethodCallHandler {
companion object {
@JvmStatic
fun registerWith(registrar: Registrar) {
val channel = MethodChannel(registrar.messenger(), "flutter_bluetooth")
channel.setMethodCallHandler(FlutterBluetoothAdapterPlugin(registrar))
}
}
override fun onMethodCall(call: MethodCall, result: Result) {
val mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter()
val pairedDevices = mBluetoothAdapter.getBondedDevices()
var bluetoothStatus: Boolean
var address: String
var deviceName: String?
when (call.method) {
"getBluetoothList" -> {
val s = ArrayList<String>()
for (bt in pairedDevices)
s.add(bt.getName())
result.success(s)
}
"enableBluetooth" -> {
bluetoothStatus = mBluetoothAdapter.enable()
result.success(bluetoothStatus)
}
"disableBluetooth" -> {
bluetoothStatus = mBluetoothAdapter.disable()
result.success(bluetoothStatus)
}
"getAddress" -> {
address = mBluetoothAdapter.getAddress()
result.success(address)
}
"getName" -> {
deviceName = mBluetoothAdapter.getName()
result.success(deviceName)
}
"setName" -> {
var isNameSet: Boolean
deviceName = call.argument("name")
isNameSet = mBluetoothAdapter.setName(deviceName)
result.success(isNameSet)
}
"isEnabled" -> {
val isEnabled = mBluetoothAdapter.isEnabled()
result.success(isEnabled)
}
}
}
}
<file_sep>rootProject.name = 'flutter_bluetooth_adapter'
| 8cc2596dc883dbabdbb322397b7b913d419cef8d | [
"Kotlin",
"Gradle"
] | 2 | Kotlin | kevinrmendez/flutter_bluetooth_adapter_plugin | 46cc4856bb83d42ea9afd565bd20e7b656618b60 | a9b740437d71bbc4e6c32e760b4b2e0fb1ca5135 | |
refs/heads/master | <file_sep>#!/usr/bin/env python3
import os
from reportlab.platypus import SimpleDocTemplate
from reportlab.platypus import Paragraph
from reportlab.lib.styles import getSampleStyleSheet
styles = getSampleStyleSheet()
report = SimpleDocTemplate("/tmp/processed.pdf")
dir = "./supplier-data/descriptions/"
long_text = []
for i in os.listdir(dir):
with open(os.path.join(dir,i)) as f:
long_text.append('name: ' + f.readline().strip() + '<br/>')
long_text.append('weight: ' + f.readline().strip() + '<br/>')
long_text.append(' <br/>')
paragraph_fruit = "".join(long_text)
report_title = Paragraph("Supplied inventory", styles['h1'])
report_body = Paragraph(paragraph_fruit, styles['Normal'])
if __name__ == "__main__":
report.build([report_title,report_body])
<file_sep>#!/usr/bin/env python3
import os
import requests
from collections import OrderedDict
def open_file(directory,file):
dict_text = OrderedDict()
keys = ["name","weight","description"]
count = 0
with open(os.path.join(directory,file)) as f:
for line in f:
if line.strip() != "":
dict_text[keys[count]] = line.strip()
if keys[count] == 'weight':
dict_text[keys[count]] = line[:-5]
count += 1
dict_text['image_name'] = file[:-4]+'.jpeg'
return dict_text
def main():
dir = "./supplier-data/descriptions/"
dir_img = "./supplier-data/images/"
url = "http://35.202.121.162/fruits/"
for i in os.listdir(dir):
if i[-3:] == "txt":
comp_dict = open_file(dir,i)
requests.post(url, data=comp_dict)
if __name__ == '__main__':
main()
<file_sep>#!/usr/bin/env python3
import email.message
import mimetypes
import os.path
import smtplib
import psutil
import shutil
def generate(sender, recipient, subject, body):
message = email.message.EmailMessage()
message["From"] = sender
message["To"] = recipient
message["Subject"] = subject
message.set_content(body)
return message
def send(message):
mail_server = smtplib.SMTP('localhost')
mail_server.send_message(message)
mail_server.quit()
class cpu_too_high(Error):
"""Raised when the CPU is too high """
pass
def check_cpu():
if psutil.cpu_percent() > 80:
raise cpu_too_high
try:
check_cpu()
except cpu_too_high:
from1 = '<EMAIL>'
to1 = '<EMAIL>'
subject1 = 'Error - CPU too high'
body1 = 'Please check your system and resolve the issue as soon as possible.'
message = generate(from1,to1,subject1,body1)
send(message)
except:
print('Unknown error')
<file_sep>
from mastermind_code_class import colour_choice, mastermind_code
class player:
def __init__(self, code_size = 4, num_col_choice = 6, *args, **kwargs):
self.guesses = []
self.feedback_all = []
self.round = 1
self.num_col_choice = num_col_choice
self.code_size = code_size
self.SECRET_CODE = mastermind_code(
col_selection_class = colour_choice,
code_size = code_size,
numcols = num_col_choice)
def add_guess(self, code_input = None):
guess = mastermind_code(
col_selection_class = colour_choice,
code_size = self.code_size,
numcols = self.num_col_choice,
code = code_input)
self.guesses.append(guess)
self.round += 1
def check_score(self):
feedback = [0] * self.code_size
taken_1_point = []
for i in range(self.code_size):
if self.guesses[-1][i] == self.SECRET_CODE[i]:
feedback[i] = 2
else:
for j in [num for num in range(self.code_size) if num != i ]:
if self.guesses[-1][i] == self.SECRET_CODE[j]:
if self.guesses[-1][j] != self.SECRET_CODE[j]:
if j not in taken_1_point:
feedback[i] = 1
taken_1_point.append(j)
self.feedback_all.append(feedback)
if __name__ == "__main__":
tom = player(code_size = 5, num_col_choice=2)
print(tom.num_col_choice)
"""
tom.add_guess()
print(tom.guesses[-1])
tom.check_score()
print(tom.feedback_all)
tom.add_guess(code_input = ["black","white","yellow","yellow","grunge"])
print(tom.guesses[-1])
tom.check_score()
print(tom.feedback_all)
tom.add_guess()
print(tom.guesses[-1])
tom.check_score()
print(tom.feedback_all)
print(tom.SECRET_CODE)
"""
<file_sep>"""
This script creates a class to store mastermind codes.
Firstly it defines a class colour_choice which specifice each code entry.
It then uses this as part of mastermind_code to form the total code
"""
import random
colour_choices = ["red","blue","yellow","green","black","white"]
def colours_included(num_col):
colour_choice_now = colour_choices[0:num_col]
return colour_choice_now
def choose_colour(colours_included):
return "".join(random.sample(colours_included, 1))
class colour_choice:
def __init__(self, num_colours , value = ""):
if not isinstance(num_colours,int):
raise ValueError("num_colours must be a number")
elif not ( (num_colours > 1) & (num_colours <= 6) ):
raise ValueError("num_colours must be between 2 and 6")
elif not isinstance(value,str):
raise ValueError("value must be a string")
colours = colours_included(num_colours)
if value:
if value not in colours:
raise ValueError("""
The value you entered wasn't part of the game:
You entered {}.
The allowed colours are {}""".format(value,colours))
else:
self.value = value
else:
self.value = choose_colour(colours)
class mastermind_code(list):
def __init__(self, code_size = 4, numcols = 6,
col_selection_class = None, code = None, *args, **kwargs):
if not col_selection_class:
raise ValueError("You must provide a class to select colours")
elif not isinstance(code_size,int):
raise ValueError("code_size must be a number")
elif not ( (code_size > 1) & (code_size <= 6) ):
raise ValueError("code_size must be between 2 and 6")
super().__init__()
if code:
if not code_size == len(code):
raise ValueError("Make sure your entry is the same length as the code you are trying to break!")
else:
for i in range(code_size):
self.append(col_selection_class(num_colours = numcols,
value = code[i]).value)
else:
for _ in range(code_size):
self.append(col_selection_class(num_colours = numcols).value)
"""
code_test1 = mastermind_code(col_selection_class = colour_choice,
code = None, numcols = 2)
print(code_test1)
code_test2 = mastermind_code(col_selection_class = colour_choice,
code = ["red","blue","purple","green","purple"],
code_size = 5)
print(code_test2)
"""
<file_sep>from mastermind_code_class import colour_choice, mastermind_code, colour_choices
from mastermind_player_class import player
import time
import csv
print("\n")
print("Welcome to Mastermind!")
time.sleep(1)
print("Mastermind is a code-breaking game for two players.")
time.sleep(1)
print("However, in this version it will be 1 player vs the computer!")
time.sleep(1)
print("Type 'Help' at any time to get instructions")
time.sleep(1)
print("\n")
time.sleep(1)
print("I will generate a code, which you have to break!")
time.sleep(1)
print("\n")
time.sleep(1)
game_status = "begin"
def pre_game(game_status):
while game_status != 'start':
game_status = input("'Start' to begin, 'Help' for help, 'Exit' for exit: \n").lower()
if game_status == 'help':
time.sleep(1)
print("\nVisit the following link for full rules & strategies: https://en.wikipedia.org/wiki/Mastermind_(board_game)#Gameplay_and_rules")
time.sleep(1)
print("\nContact <EMAIL> with any issues with the application.\n")
if game_status == 'exit':
print("\nThanks for playing! \n")
exit()
return game_status
def num_colours_in_game():
colours = ""
while not colours:
try:
colours = int(input(
"""
How many colours do you want to use as part of the game?
Minimum 2, Maximum 6: """))
time.sleep(1)
except:
print("Error: Integer only, between 2 and 6")
return colours
def num_entries_in_code():
code_entry = ""
while not code_entry:
try:
code_entry = int(input(
"""
And what should the length of the code be?
Minimum 2 Maximum 6: """))
time.sleep(1)
except:
print("Error: Code length is a whole number > 2")
return code_entry
def game_start():
name = input("What's your name? (for high score credit purposes!) ")
time.sleep(1)
colours = num_colours_in_game()
code_length = num_entries_in_code()
try:
player_go = player(code_size = code_length, num_col_choice = colours)
except Exception as err:
print(err)
return "start", "", ""
time.sleep(1)
print(
"""
Time to play {}! I have created a secret code, good luck guessing it!
I'll keep track of your score and attempts.
""".format(name))
time.sleep(2)
return "long_options", name, player_go
def instructions(name_input):
print(
"""
{} - it's your turn to add a code.
Here are the colours the computer made their code from.
{}
Remember, the code length is {}
""".format(name_input, colour_choices[:player_details.num_col_choice], player_details.code_size))
time.sleep(3)
print("""
If you get the right colour in the right slot, you get 2 points.
If you get the right colour in the wrong slot, you get 1 point.
""")
time.sleep(3)
while game_status != "finished":
if game_status == "begin":
game_status = pre_game(game_status)
elif game_status == "start":
game_status, name, player_details = game_start()
elif game_status == "long_options":
instructions(name)
game_status = "short_options"
elif game_status == "short_options":
user_go = input("""
'guess' to guess a code, 'view' to view guesses, 'exit' to exit, 'more' for detailed instructions
""").lower()
if user_go == 'exit':
game_status = "begin"
elif user_go == 'more':
game_status = "long_options"
elif user_go == 'view':
print("Your guesses so far")
guess_list = list(zip(player_details.guesses,player_details.feedback_all))
for i in guess_list:
print(i)
elif user_go == 'guess':
list_guess = list(map(str.strip,input("Add your guess here, comma seperated: ").split(",")))
try:
player_details.add_guess(code_input = list_guess)
player_details.check_score()
time.sleep(2)
print("""
Good guess, here is your score:
{}""".format(player_details.feedback_all[-1]))
if player_details.feedback_all[-1] == [2]*player_details.code_size:
print("Congratulations! You broke the code!")
print("It took you {} attempts".format(player_details.round))
time.sleep(2)
play_again = input("Play again? Y/N: ").lower()
if play_again == "y":
game_status = "begin"
else:
game_status = "finished"
except ValueError as err:
time.sleep(1)
print("something went wrong..")
print("check the below error message and try again")
time.sleep(1)
print(err)
time.sleep(2)
user_go == "short_options"
new_score = [name, player_details.round]
with open('scores.csv','r') as scoreboard:
reader = list(csv.reader(scoreboard, delimiter=','))
if int(reader[-1][1]) > int(new_score[1]):
for row in reader[1:]:
if int(row[1]) > int(new_score[1]):
new_entry_row = reader.index(row)
reader.insert(new_entry_row,new_score)
break
else:
reader.append(new_score)
reader = reader[:5]
print("Latest High Scores!:")
time.sleep(1)
if new_entry_row < 5:
print("New entry at position {}!!!!".format(new_entry_row))
time.sleep(1)
for row in reader:
print(row)
with open('scores.csv', "w") as outfile:
writer = csv.writer(outfile)
for line in reader:
writer.writerow(line)
# Todo
# seperate score boards depending on size of code and number of colours_included
# Log rounds, colours & difficulty in log file, use for statistics on players
# need to imrpvoe view score so its visual plug in based
# need to add pip style guide and check
<file_sep>#!/usr/bin/env python3
import requests
import os
dir = "./supplier-data/images/"
url = "http://localhost/upload/"
for i in os.listdir(dir):
if i[-4:] == 'jpeg':
with open(os.path.join(dir,i), 'rb') as opened:
r = requests.post(url, files={'file': opened})
<file_sep>#!/usr/bin/env python3
from PIL import Image
import os
from pathlib import Path
# task 1: user enters relative location of images, we locate
# absolute path of images
"""
rel_path = "./supplier-data/images"
posix_path = Path(rel_path)
print(posix_path.resolve())
"""
def main():
path_images = confirm_correct_path()
imgs = find_images_convert(path_images)
def confirm_correct_path():
confirm_path = 'no'
while confirm_path.lower() != 'yes':
rel_path = input(
"\nInput relative position of images in following form: ./directory/subdirectory/ \nThey are usually found in ./supplier-data/images: \n" )
full_path = str(Path(rel_path).resolve())
confirm_path = input("\n Is this the correct folder? (yes/no/quit) \n "+ full_path + " ")
if confirm_path.lower() == "quit":
exit()
return full_path
def find_images_convert(img_folder):
images = os.listdir(img_folder)
print('Dealing with ' + str(len(images)) + ' files')
count = 0
for i in images:
if i[-4:] == 'tiff':
count += 1
im = Image.open(os.path.join(img_folder,i)).convert('RGB').resize((600,400))
im.save(os.path.join(img_folder,i[:-4]+'jpeg'),"JPEG")
print('Processed '+str(count)+' tiff images')
if __name__ == '__main__':
main()
# task friendly
"""
#!/usr/bin/env python3
from PIL import Image
import os
def main():
find_images_convert("./supplier-data/images/")
def find_images_convert(img_folder):
images = os.listdir(img_folder)
print('Dealing with ' + str(len(images)) + ' files')
count = 0
for i in images:
if i[-4:] == 'tiff':
count += 1
im = Image.open(os.path.join(img_folder,i)).convert('RGB').resize((600,400))
im.save(os.path.join(img_folder,i[:-4]+'jpeg'),"JPEG")
print('Processed '+str(count)+' tiff images')
if __name__ == '__main__':
main()
"""
<file_sep># all-things - my public repo
## final_google_project (IT automation with Python - Coursera)
This repo contains most of my final project code for the Google IT Automation course. The course covered python/bash/unix, the final project included:
- image manipulation
- working with text files and dictionaries
- JSON posting
- DJANGO frameworks
- email automation
## Mastermind (I developed a application to play the game 'Mastermind')
I wanted to recreate a game I enjoy using Python and OOP. I built classes to represent players, and the rules for playing hands built as methods in those classes.
The application allows you to:
- Play mastermind vs the computer
- Error handling to avoid crashing based on user input
- Class inheritance between code entries and full codes.
- High score file as a csv which is updated each game
- Algorithm logic to score each guess (complex if and for/while loops)
| df15b764017e457a173f991ac42d649d48b17efa | [
"Markdown",
"Python"
] | 9 | Python | theyeahman/all-things | ebefe0da236872530deec7021024d04d62364b33 | 24ddcd237c96f4c81529e3a5fb86c20362377c78 | |
refs/heads/master | <repo_name>lewischen1123/Work_Stealing_Java<file_sep>/WorkingStealing/src/house/House.java
package house;//####[1]####
//####[1]####
import java.awt.Color;//####[3]####
import java.awt.Dimension;//####[4]####
import java.awt.Font;//####[5]####
import java.awt.Graphics;//####[6]####
import java.util.ArrayList;//####[7]####
import java.util.Collection;//####[8]####
import java.util.Collections;//####[9]####
import java.util.Iterator;//####[10]####
import java.util.List;//####[11]####
import java.util.concurrent.ConcurrentLinkedQueue;//####[12]####
import java.util.concurrent.CopyOnWriteArrayList;//####[13]####
import javax.swing.JApplet;//####[15]####
import javax.swing.SwingUtilities;//####[16]####
//####[16]####
//-- ParaTask related imports//####[16]####
import pt.runtime.*;//####[16]####
import java.util.concurrent.ExecutionException;//####[16]####
import java.util.concurrent.locks.*;//####[16]####
import java.lang.reflect.*;//####[16]####
import pt.runtime.GuiThread;//####[16]####
import java.util.concurrent.BlockingQueue;//####[16]####
import java.util.ArrayList;//####[16]####
import java.util.List;//####[16]####
//####[16]####
public class House extends JApplet {//####[18]####
static{ParaTask.init();}//####[18]####
/* ParaTask helper method to access private/protected slots *///####[18]####
public void __pt__accessPrivateSlot(Method m, Object instance, TaskID arg, Object interResult ) throws IllegalArgumentException, IllegalAccessException, InvocationTargetException {//####[18]####
if (m.getParameterTypes().length == 0)//####[18]####
m.invoke(instance);//####[18]####
else if ((m.getParameterTypes().length == 1))//####[18]####
m.invoke(instance, arg);//####[18]####
else //####[18]####
m.invoke(instance, arg, interResult);//####[18]####
}//####[18]####
//####[20]####
private Build builder;//####[20]####
//####[22]####
private int width = 500;//####[22]####
//####[23]####
private int height = 320;//####[23]####
//####[25]####
private int N = 20;//####[25]####
//####[26]####
private boolean clearScreen = true;//####[26]####
//####[28]####
private CopyOnWriteArrayList<BuildingMaterial> foundation = null;//####[28]####
//####[29]####
private CopyOnWriteArrayList<BuildingMaterial> wallSiding = null;//####[29]####
//####[30]####
private CopyOnWriteArrayList<BuildingMaterial> roofTiles = null;//####[30]####
//####[31]####
private CopyOnWriteArrayList<BuildingMaterial> windows = null;//####[31]####
//####[33]####
private BuildingMaterial door = null;//####[33]####
//####[34]####
private BuildingMaterial forSaleSign = null;//####[34]####
//####[36]####
private Color colorRoof;//####[36]####
//####[37]####
private Color colorWalls;//####[37]####
//####[39]####
public House(Build builder) {//####[39]####
this.builder = builder;//####[40]####
setPreferredSize(new Dimension(width, height));//####[41]####
initialiseMaterial();//####[42]####
}//####[43]####
//####[46]####
private static volatile Method __pt__buildSingleTask_Color_Color_method = null;//####[46]####
private synchronized static void __pt__buildSingleTask_Color_Color_ensureMethodVarSet() {//####[46]####
if (__pt__buildSingleTask_Color_Color_method == null) {//####[46]####
try {//####[46]####
__pt__buildSingleTask_Color_Color_method = ParaTaskHelper.getDeclaredMethod(new ParaTaskHelper.ClassGetter().getCurrentClass(), "__pt__buildSingleTask", new Class[] {//####[46]####
Color.class, Color.class//####[46]####
});//####[46]####
} catch (Exception e) {//####[46]####
e.printStackTrace();//####[46]####
}//####[46]####
}//####[46]####
}//####[46]####
public TaskID<Void> buildSingleTask(Color colorWalls, Color colorRoof) {//####[46]####
//-- execute asynchronously by enqueuing onto the taskpool//####[46]####
return buildSingleTask(colorWalls, colorRoof, new TaskInfo());//####[46]####
}//####[46]####
public TaskID<Void> buildSingleTask(Color colorWalls, Color colorRoof, TaskInfo taskinfo) {//####[46]####
// ensure Method variable is set//####[46]####
if (__pt__buildSingleTask_Color_Color_method == null) {//####[46]####
__pt__buildSingleTask_Color_Color_ensureMethodVarSet();//####[46]####
}//####[46]####
taskinfo.setParameters(colorWalls, colorRoof);//####[46]####
taskinfo.setMethod(__pt__buildSingleTask_Color_Color_method);//####[46]####
taskinfo.setInstance(this);//####[46]####
return TaskpoolFactory.getTaskpool().enqueue(taskinfo);//####[46]####
}//####[46]####
public TaskID<Void> buildSingleTask(TaskID<Color> colorWalls, Color colorRoof) {//####[46]####
//-- execute asynchronously by enqueuing onto the taskpool//####[46]####
return buildSingleTask(colorWalls, colorRoof, new TaskInfo());//####[46]####
}//####[46]####
public TaskID<Void> buildSingleTask(TaskID<Color> colorWalls, Color colorRoof, TaskInfo taskinfo) {//####[46]####
// ensure Method variable is set//####[46]####
if (__pt__buildSingleTask_Color_Color_method == null) {//####[46]####
__pt__buildSingleTask_Color_Color_ensureMethodVarSet();//####[46]####
}//####[46]####
taskinfo.setTaskIdArgIndexes(0);//####[46]####
taskinfo.addDependsOn(colorWalls);//####[46]####
taskinfo.setParameters(colorWalls, colorRoof);//####[46]####
taskinfo.setMethod(__pt__buildSingleTask_Color_Color_method);//####[46]####
taskinfo.setInstance(this);//####[46]####
return TaskpoolFactory.getTaskpool().enqueue(taskinfo);//####[46]####
}//####[46]####
public TaskID<Void> buildSingleTask(BlockingQueue<Color> colorWalls, Color colorRoof) {//####[46]####
//-- execute asynchronously by enqueuing onto the taskpool//####[46]####
return buildSingleTask(colorWalls, colorRoof, new TaskInfo());//####[46]####
}//####[46]####
public TaskID<Void> buildSingleTask(BlockingQueue<Color> colorWalls, Color colorRoof, TaskInfo taskinfo) {//####[46]####
// ensure Method variable is set//####[46]####
if (__pt__buildSingleTask_Color_Color_method == null) {//####[46]####
__pt__buildSingleTask_Color_Color_ensureMethodVarSet();//####[46]####
}//####[46]####
taskinfo.setQueueArgIndexes(0);//####[46]####
taskinfo.setIsPipeline(true);//####[46]####
taskinfo.setParameters(colorWalls, colorRoof);//####[46]####
taskinfo.setMethod(__pt__buildSingleTask_Color_Color_method);//####[46]####
taskinfo.setInstance(this);//####[46]####
return TaskpoolFactory.getTaskpool().enqueue(taskinfo);//####[46]####
}//####[46]####
public TaskID<Void> buildSingleTask(Color colorWalls, TaskID<Color> colorRoof) {//####[46]####
//-- execute asynchronously by enqueuing onto the taskpool//####[46]####
return buildSingleTask(colorWalls, colorRoof, new TaskInfo());//####[46]####
}//####[46]####
public TaskID<Void> buildSingleTask(Color colorWalls, TaskID<Color> colorRoof, TaskInfo taskinfo) {//####[46]####
// ensure Method variable is set//####[46]####
if (__pt__buildSingleTask_Color_Color_method == null) {//####[46]####
__pt__buildSingleTask_Color_Color_ensureMethodVarSet();//####[46]####
}//####[46]####
taskinfo.setTaskIdArgIndexes(1);//####[46]####
taskinfo.addDependsOn(colorRoof);//####[46]####
taskinfo.setParameters(colorWalls, colorRoof);//####[46]####
taskinfo.setMethod(__pt__buildSingleTask_Color_Color_method);//####[46]####
taskinfo.setInstance(this);//####[46]####
return TaskpoolFactory.getTaskpool().enqueue(taskinfo);//####[46]####
}//####[46]####
public TaskID<Void> buildSingleTask(TaskID<Color> colorWalls, TaskID<Color> colorRoof) {//####[46]####
//-- execute asynchronously by enqueuing onto the taskpool//####[46]####
return buildSingleTask(colorWalls, colorRoof, new TaskInfo());//####[46]####
}//####[46]####
public TaskID<Void> buildSingleTask(TaskID<Color> colorWalls, TaskID<Color> colorRoof, TaskInfo taskinfo) {//####[46]####
// ensure Method variable is set//####[46]####
if (__pt__buildSingleTask_Color_Color_method == null) {//####[46]####
__pt__buildSingleTask_Color_Color_ensureMethodVarSet();//####[46]####
}//####[46]####
taskinfo.setTaskIdArgIndexes(0, 1);//####[46]####
taskinfo.addDependsOn(colorWalls);//####[46]####
taskinfo.addDependsOn(colorRoof);//####[46]####
taskinfo.setParameters(colorWalls, colorRoof);//####[46]####
taskinfo.setMethod(__pt__buildSingleTask_Color_Color_method);//####[46]####
taskinfo.setInstance(this);//####[46]####
return TaskpoolFactory.getTaskpool().enqueue(taskinfo);//####[46]####
}//####[46]####
public TaskID<Void> buildSingleTask(BlockingQueue<Color> colorWalls, TaskID<Color> colorRoof) {//####[46]####
//-- execute asynchronously by enqueuing onto the taskpool//####[46]####
return buildSingleTask(colorWalls, colorRoof, new TaskInfo());//####[46]####
}//####[46]####
public TaskID<Void> buildSingleTask(BlockingQueue<Color> colorWalls, TaskID<Color> colorRoof, TaskInfo taskinfo) {//####[46]####
// ensure Method variable is set//####[46]####
if (__pt__buildSingleTask_Color_Color_method == null) {//####[46]####
__pt__buildSingleTask_Color_Color_ensureMethodVarSet();//####[46]####
}//####[46]####
taskinfo.setQueueArgIndexes(0);//####[46]####
taskinfo.setIsPipeline(true);//####[46]####
taskinfo.setTaskIdArgIndexes(1);//####[46]####
taskinfo.addDependsOn(colorRoof);//####[46]####
taskinfo.setParameters(colorWalls, colorRoof);//####[46]####
taskinfo.setMethod(__pt__buildSingleTask_Color_Color_method);//####[46]####
taskinfo.setInstance(this);//####[46]####
return TaskpoolFactory.getTaskpool().enqueue(taskinfo);//####[46]####
}//####[46]####
public TaskID<Void> buildSingleTask(Color colorWalls, BlockingQueue<Color> colorRoof) {//####[46]####
//-- execute asynchronously by enqueuing onto the taskpool//####[46]####
return buildSingleTask(colorWalls, colorRoof, new TaskInfo());//####[46]####
}//####[46]####
public TaskID<Void> buildSingleTask(Color colorWalls, BlockingQueue<Color> colorRoof, TaskInfo taskinfo) {//####[46]####
// ensure Method variable is set//####[46]####
if (__pt__buildSingleTask_Color_Color_method == null) {//####[46]####
__pt__buildSingleTask_Color_Color_ensureMethodVarSet();//####[46]####
}//####[46]####
taskinfo.setQueueArgIndexes(1);//####[46]####
taskinfo.setIsPipeline(true);//####[46]####
taskinfo.setParameters(colorWalls, colorRoof);//####[46]####
taskinfo.setMethod(__pt__buildSingleTask_Color_Color_method);//####[46]####
taskinfo.setInstance(this);//####[46]####
return TaskpoolFactory.getTaskpool().enqueue(taskinfo);//####[46]####
}//####[46]####
public TaskID<Void> buildSingleTask(TaskID<Color> colorWalls, BlockingQueue<Color> colorRoof) {//####[46]####
//-- execute asynchronously by enqueuing onto the taskpool//####[46]####
return buildSingleTask(colorWalls, colorRoof, new TaskInfo());//####[46]####
}//####[46]####
public TaskID<Void> buildSingleTask(TaskID<Color> colorWalls, BlockingQueue<Color> colorRoof, TaskInfo taskinfo) {//####[46]####
// ensure Method variable is set//####[46]####
if (__pt__buildSingleTask_Color_Color_method == null) {//####[46]####
__pt__buildSingleTask_Color_Color_ensureMethodVarSet();//####[46]####
}//####[46]####
taskinfo.setQueueArgIndexes(1);//####[46]####
taskinfo.setIsPipeline(true);//####[46]####
taskinfo.setTaskIdArgIndexes(0);//####[46]####
taskinfo.addDependsOn(colorWalls);//####[46]####
taskinfo.setParameters(colorWalls, colorRoof);//####[46]####
taskinfo.setMethod(__pt__buildSingleTask_Color_Color_method);//####[46]####
taskinfo.setInstance(this);//####[46]####
return TaskpoolFactory.getTaskpool().enqueue(taskinfo);//####[46]####
}//####[46]####
public TaskID<Void> buildSingleTask(BlockingQueue<Color> colorWalls, BlockingQueue<Color> colorRoof) {//####[46]####
//-- execute asynchronously by enqueuing onto the taskpool//####[46]####
return buildSingleTask(colorWalls, colorRoof, new TaskInfo());//####[46]####
}//####[46]####
public TaskID<Void> buildSingleTask(BlockingQueue<Color> colorWalls, BlockingQueue<Color> colorRoof, TaskInfo taskinfo) {//####[46]####
// ensure Method variable is set//####[46]####
if (__pt__buildSingleTask_Color_Color_method == null) {//####[46]####
__pt__buildSingleTask_Color_Color_ensureMethodVarSet();//####[46]####
}//####[46]####
taskinfo.setQueueArgIndexes(0, 1);//####[46]####
taskinfo.setIsPipeline(true);//####[46]####
taskinfo.setParameters(colorWalls, colorRoof);//####[46]####
taskinfo.setMethod(__pt__buildSingleTask_Color_Color_method);//####[46]####
taskinfo.setInstance(this);//####[46]####
return TaskpoolFactory.getTaskpool().enqueue(taskinfo);//####[46]####
}//####[46]####
public void __pt__buildSingleTask(Color colorWalls, Color colorRoof) {//####[46]####
build(colorWalls, colorRoof);//####[47]####
}//####[48]####
//####[48]####
//####[51]####
public void build(Color colorWalls, Color colorRoof) {//####[51]####
this.colorWalls = colorWalls;//####[52]####
this.colorRoof = colorRoof;//####[53]####
initialiseMaterial();//####[54]####
buildAll(foundation);//####[56]####
buildAll(wallSiding);//####[57]####
buildAll(roofTiles);//####[58]####
buildItem(door);//####[59]####
buildAll(windows);//####[60]####
buildItem(forSaleSign);//####[61]####
}//####[62]####
//####[65]####
private static volatile Method __pt__buildTask_Color_Color_method = null;//####[65]####
private synchronized static void __pt__buildTask_Color_Color_ensureMethodVarSet() {//####[65]####
if (__pt__buildTask_Color_Color_method == null) {//####[65]####
try {//####[65]####
__pt__buildTask_Color_Color_method = ParaTaskHelper.getDeclaredMethod(new ParaTaskHelper.ClassGetter().getCurrentClass(), "__pt__buildTask", new Class[] {//####[65]####
Color.class, Color.class//####[65]####
});//####[65]####
} catch (Exception e) {//####[65]####
e.printStackTrace();//####[65]####
}//####[65]####
}//####[65]####
}//####[65]####
public TaskID<Void> buildTask(Color colorWalls, Color colorRoof) {//####[65]####
//-- execute asynchronously by enqueuing onto the taskpool//####[65]####
return buildTask(colorWalls, colorRoof, new TaskInfo());//####[65]####
}//####[65]####
public TaskID<Void> buildTask(Color colorWalls, Color colorRoof, TaskInfo taskinfo) {//####[65]####
// ensure Method variable is set//####[65]####
if (__pt__buildTask_Color_Color_method == null) {//####[65]####
__pt__buildTask_Color_Color_ensureMethodVarSet();//####[65]####
}//####[65]####
taskinfo.setParameters(colorWalls, colorRoof);//####[65]####
taskinfo.setMethod(__pt__buildTask_Color_Color_method);//####[65]####
taskinfo.setInstance(this);//####[65]####
return TaskpoolFactory.getTaskpool().enqueue(taskinfo);//####[65]####
}//####[65]####
public TaskID<Void> buildTask(TaskID<Color> colorWalls, Color colorRoof) {//####[65]####
//-- execute asynchronously by enqueuing onto the taskpool//####[65]####
return buildTask(colorWalls, colorRoof, new TaskInfo());//####[65]####
}//####[65]####
public TaskID<Void> buildTask(TaskID<Color> colorWalls, Color colorRoof, TaskInfo taskinfo) {//####[65]####
// ensure Method variable is set//####[65]####
if (__pt__buildTask_Color_Color_method == null) {//####[65]####
__pt__buildTask_Color_Color_ensureMethodVarSet();//####[65]####
}//####[65]####
taskinfo.setTaskIdArgIndexes(0);//####[65]####
taskinfo.addDependsOn(colorWalls);//####[65]####
taskinfo.setParameters(colorWalls, colorRoof);//####[65]####
taskinfo.setMethod(__pt__buildTask_Color_Color_method);//####[65]####
taskinfo.setInstance(this);//####[65]####
return TaskpoolFactory.getTaskpool().enqueue(taskinfo);//####[65]####
}//####[65]####
public TaskID<Void> buildTask(BlockingQueue<Color> colorWalls, Color colorRoof) {//####[65]####
//-- execute asynchronously by enqueuing onto the taskpool//####[65]####
return buildTask(colorWalls, colorRoof, new TaskInfo());//####[65]####
}//####[65]####
public TaskID<Void> buildTask(BlockingQueue<Color> colorWalls, Color colorRoof, TaskInfo taskinfo) {//####[65]####
// ensure Method variable is set//####[65]####
if (__pt__buildTask_Color_Color_method == null) {//####[65]####
__pt__buildTask_Color_Color_ensureMethodVarSet();//####[65]####
}//####[65]####
taskinfo.setQueueArgIndexes(0);//####[65]####
taskinfo.setIsPipeline(true);//####[65]####
taskinfo.setParameters(colorWalls, colorRoof);//####[65]####
taskinfo.setMethod(__pt__buildTask_Color_Color_method);//####[65]####
taskinfo.setInstance(this);//####[65]####
return TaskpoolFactory.getTaskpool().enqueue(taskinfo);//####[65]####
}//####[65]####
public TaskID<Void> buildTask(Color colorWalls, TaskID<Color> colorRoof) {//####[65]####
//-- execute asynchronously by enqueuing onto the taskpool//####[65]####
return buildTask(colorWalls, colorRoof, new TaskInfo());//####[65]####
}//####[65]####
public TaskID<Void> buildTask(Color colorWalls, TaskID<Color> colorRoof, TaskInfo taskinfo) {//####[65]####
// ensure Method variable is set//####[65]####
if (__pt__buildTask_Color_Color_method == null) {//####[65]####
__pt__buildTask_Color_Color_ensureMethodVarSet();//####[65]####
}//####[65]####
taskinfo.setTaskIdArgIndexes(1);//####[65]####
taskinfo.addDependsOn(colorRoof);//####[65]####
taskinfo.setParameters(colorWalls, colorRoof);//####[65]####
taskinfo.setMethod(__pt__buildTask_Color_Color_method);//####[65]####
taskinfo.setInstance(this);//####[65]####
return TaskpoolFactory.getTaskpool().enqueue(taskinfo);//####[65]####
}//####[65]####
public TaskID<Void> buildTask(TaskID<Color> colorWalls, TaskID<Color> colorRoof) {//####[65]####
//-- execute asynchronously by enqueuing onto the taskpool//####[65]####
return buildTask(colorWalls, colorRoof, new TaskInfo());//####[65]####
}//####[65]####
public TaskID<Void> buildTask(TaskID<Color> colorWalls, TaskID<Color> colorRoof, TaskInfo taskinfo) {//####[65]####
// ensure Method variable is set//####[65]####
if (__pt__buildTask_Color_Color_method == null) {//####[65]####
__pt__buildTask_Color_Color_ensureMethodVarSet();//####[65]####
}//####[65]####
taskinfo.setTaskIdArgIndexes(0, 1);//####[65]####
taskinfo.addDependsOn(colorWalls);//####[65]####
taskinfo.addDependsOn(colorRoof);//####[65]####
taskinfo.setParameters(colorWalls, colorRoof);//####[65]####
taskinfo.setMethod(__pt__buildTask_Color_Color_method);//####[65]####
taskinfo.setInstance(this);//####[65]####
return TaskpoolFactory.getTaskpool().enqueue(taskinfo);//####[65]####
}//####[65]####
public TaskID<Void> buildTask(BlockingQueue<Color> colorWalls, TaskID<Color> colorRoof) {//####[65]####
//-- execute asynchronously by enqueuing onto the taskpool//####[65]####
return buildTask(colorWalls, colorRoof, new TaskInfo());//####[65]####
}//####[65]####
public TaskID<Void> buildTask(BlockingQueue<Color> colorWalls, TaskID<Color> colorRoof, TaskInfo taskinfo) {//####[65]####
// ensure Method variable is set//####[65]####
if (__pt__buildTask_Color_Color_method == null) {//####[65]####
__pt__buildTask_Color_Color_ensureMethodVarSet();//####[65]####
}//####[65]####
taskinfo.setQueueArgIndexes(0);//####[65]####
taskinfo.setIsPipeline(true);//####[65]####
taskinfo.setTaskIdArgIndexes(1);//####[65]####
taskinfo.addDependsOn(colorRoof);//####[65]####
taskinfo.setParameters(colorWalls, colorRoof);//####[65]####
taskinfo.setMethod(__pt__buildTask_Color_Color_method);//####[65]####
taskinfo.setInstance(this);//####[65]####
return TaskpoolFactory.getTaskpool().enqueue(taskinfo);//####[65]####
}//####[65]####
public TaskID<Void> buildTask(Color colorWalls, BlockingQueue<Color> colorRoof) {//####[65]####
//-- execute asynchronously by enqueuing onto the taskpool//####[65]####
return buildTask(colorWalls, colorRoof, new TaskInfo());//####[65]####
}//####[65]####
public TaskID<Void> buildTask(Color colorWalls, BlockingQueue<Color> colorRoof, TaskInfo taskinfo) {//####[65]####
// ensure Method variable is set//####[65]####
if (__pt__buildTask_Color_Color_method == null) {//####[65]####
__pt__buildTask_Color_Color_ensureMethodVarSet();//####[65]####
}//####[65]####
taskinfo.setQueueArgIndexes(1);//####[65]####
taskinfo.setIsPipeline(true);//####[65]####
taskinfo.setParameters(colorWalls, colorRoof);//####[65]####
taskinfo.setMethod(__pt__buildTask_Color_Color_method);//####[65]####
taskinfo.setInstance(this);//####[65]####
return TaskpoolFactory.getTaskpool().enqueue(taskinfo);//####[65]####
}//####[65]####
public TaskID<Void> buildTask(TaskID<Color> colorWalls, BlockingQueue<Color> colorRoof) {//####[65]####
//-- execute asynchronously by enqueuing onto the taskpool//####[65]####
return buildTask(colorWalls, colorRoof, new TaskInfo());//####[65]####
}//####[65]####
public TaskID<Void> buildTask(TaskID<Color> colorWalls, BlockingQueue<Color> colorRoof, TaskInfo taskinfo) {//####[65]####
// ensure Method variable is set//####[65]####
if (__pt__buildTask_Color_Color_method == null) {//####[65]####
__pt__buildTask_Color_Color_ensureMethodVarSet();//####[65]####
}//####[65]####
taskinfo.setQueueArgIndexes(1);//####[65]####
taskinfo.setIsPipeline(true);//####[65]####
taskinfo.setTaskIdArgIndexes(0);//####[65]####
taskinfo.addDependsOn(colorWalls);//####[65]####
taskinfo.setParameters(colorWalls, colorRoof);//####[65]####
taskinfo.setMethod(__pt__buildTask_Color_Color_method);//####[65]####
taskinfo.setInstance(this);//####[65]####
return TaskpoolFactory.getTaskpool().enqueue(taskinfo);//####[65]####
}//####[65]####
public TaskID<Void> buildTask(BlockingQueue<Color> colorWalls, BlockingQueue<Color> colorRoof) {//####[65]####
//-- execute asynchronously by enqueuing onto the taskpool//####[65]####
return buildTask(colorWalls, colorRoof, new TaskInfo());//####[65]####
}//####[65]####
public TaskID<Void> buildTask(BlockingQueue<Color> colorWalls, BlockingQueue<Color> colorRoof, TaskInfo taskinfo) {//####[65]####
// ensure Method variable is set//####[65]####
if (__pt__buildTask_Color_Color_method == null) {//####[65]####
__pt__buildTask_Color_Color_ensureMethodVarSet();//####[65]####
}//####[65]####
taskinfo.setQueueArgIndexes(0, 1);//####[65]####
taskinfo.setIsPipeline(true);//####[65]####
taskinfo.setParameters(colorWalls, colorRoof);//####[65]####
taskinfo.setMethod(__pt__buildTask_Color_Color_method);//####[65]####
taskinfo.setInstance(this);//####[65]####
return TaskpoolFactory.getTaskpool().enqueue(taskinfo);//####[65]####
}//####[65]####
public void __pt__buildTask(Color colorWalls, Color colorRoof) {//####[65]####
this.colorWalls = colorWalls;//####[66]####
this.colorRoof = colorRoof;//####[67]####
initialiseMaterial();//####[68]####
TaskID idFoundation = buildAllTask(foundation);//####[70]####
TaskInfo __pt__idWalls = new TaskInfo();//####[71]####
//####[71]####
/* -- ParaTask dependsOn clause for 'idWalls' -- *///####[71]####
__pt__idWalls.addDependsOn(idFoundation);//####[71]####
//####[71]####
TaskID idWalls = buildAllTask(wallSiding, __pt__idWalls);//####[71]####
TaskInfo __pt__idRoof = new TaskInfo();//####[72]####
//####[72]####
/* -- ParaTask dependsOn clause for 'idRoof' -- *///####[72]####
__pt__idRoof.addDependsOn(idWalls);//####[72]####
//####[72]####
TaskID idRoof = buildAllTask(roofTiles, __pt__idRoof);//####[72]####
TaskInfo __pt__idDoor = new TaskInfo();//####[73]####
//####[73]####
/* -- ParaTask dependsOn clause for 'idDoor' -- *///####[73]####
__pt__idDoor.addDependsOn(idWalls);//####[73]####
//####[73]####
TaskID idDoor = buildItemTask(door, __pt__idDoor);//####[73]####
TaskInfo __pt__idWindows = new TaskInfo();//####[74]####
//####[74]####
/* -- ParaTask dependsOn clause for 'idWindows' -- *///####[74]####
__pt__idWindows.addDependsOn(idWalls);//####[74]####
//####[74]####
TaskID idWindows = buildAllTask(windows, __pt__idWindows);//####[74]####
TaskInfo __pt__idSign = new TaskInfo();//####[75]####
//####[75]####
/* -- ParaTask dependsOn clause for 'idSign' -- *///####[75]####
__pt__idSign.addDependsOn(idRoof);//####[75]####
__pt__idSign.addDependsOn(idDoor);//####[75]####
__pt__idSign.addDependsOn(idWindows);//####[75]####
//####[75]####
TaskID idSign = buildItemTask(forSaleSign, __pt__idSign);//####[75]####
try {//####[77]####
idSign.waitTillFinished();//####[78]####
} catch (Exception e) {//####[79]####
e.printStackTrace();//####[80]####
}//####[81]####
}//####[82]####
//####[82]####
//####[84]####
private void buildItem(BuildingMaterial item) {//####[84]####
if (!item.getAndSetVisible(true)) //####[85]####
{//####[85]####
simulateWork(N);//####[86]####
repaint();//####[87]####
}//####[88]####
}//####[89]####
//####[91]####
private static volatile Method __pt__buildItemTask_BuildingMaterial_method = null;//####[91]####
private synchronized static void __pt__buildItemTask_BuildingMaterial_ensureMethodVarSet() {//####[91]####
if (__pt__buildItemTask_BuildingMaterial_method == null) {//####[91]####
try {//####[91]####
__pt__buildItemTask_BuildingMaterial_method = ParaTaskHelper.getDeclaredMethod(new ParaTaskHelper.ClassGetter().getCurrentClass(), "__pt__buildItemTask", new Class[] {//####[91]####
BuildingMaterial.class//####[91]####
});//####[91]####
} catch (Exception e) {//####[91]####
e.printStackTrace();//####[91]####
}//####[91]####
}//####[91]####
}//####[91]####
public TaskID<Void> buildItemTask(BuildingMaterial item) {//####[91]####
//-- execute asynchronously by enqueuing onto the taskpool//####[91]####
return buildItemTask(item, new TaskInfo());//####[91]####
}//####[91]####
public TaskID<Void> buildItemTask(BuildingMaterial item, TaskInfo taskinfo) {//####[91]####
// ensure Method variable is set//####[91]####
if (__pt__buildItemTask_BuildingMaterial_method == null) {//####[91]####
__pt__buildItemTask_BuildingMaterial_ensureMethodVarSet();//####[91]####
}//####[91]####
taskinfo.setParameters(item);//####[91]####
taskinfo.setMethod(__pt__buildItemTask_BuildingMaterial_method);//####[91]####
taskinfo.setInstance(this);//####[91]####
return TaskpoolFactory.getTaskpool().enqueue(taskinfo);//####[91]####
}//####[91]####
public TaskID<Void> buildItemTask(TaskID<BuildingMaterial> item) {//####[91]####
//-- execute asynchronously by enqueuing onto the taskpool//####[91]####
return buildItemTask(item, new TaskInfo());//####[91]####
}//####[91]####
public TaskID<Void> buildItemTask(TaskID<BuildingMaterial> item, TaskInfo taskinfo) {//####[91]####
// ensure Method variable is set//####[91]####
if (__pt__buildItemTask_BuildingMaterial_method == null) {//####[91]####
__pt__buildItemTask_BuildingMaterial_ensureMethodVarSet();//####[91]####
}//####[91]####
taskinfo.setTaskIdArgIndexes(0);//####[91]####
taskinfo.addDependsOn(item);//####[91]####
taskinfo.setParameters(item);//####[91]####
taskinfo.setMethod(__pt__buildItemTask_BuildingMaterial_method);//####[91]####
taskinfo.setInstance(this);//####[91]####
return TaskpoolFactory.getTaskpool().enqueue(taskinfo);//####[91]####
}//####[91]####
public TaskID<Void> buildItemTask(BlockingQueue<BuildingMaterial> item) {//####[91]####
//-- execute asynchronously by enqueuing onto the taskpool//####[91]####
return buildItemTask(item, new TaskInfo());//####[91]####
}//####[91]####
public TaskID<Void> buildItemTask(BlockingQueue<BuildingMaterial> item, TaskInfo taskinfo) {//####[91]####
// ensure Method variable is set//####[91]####
if (__pt__buildItemTask_BuildingMaterial_method == null) {//####[91]####
__pt__buildItemTask_BuildingMaterial_ensureMethodVarSet();//####[91]####
}//####[91]####
taskinfo.setQueueArgIndexes(0);//####[91]####
taskinfo.setIsPipeline(true);//####[91]####
taskinfo.setParameters(item);//####[91]####
taskinfo.setMethod(__pt__buildItemTask_BuildingMaterial_method);//####[91]####
taskinfo.setInstance(this);//####[91]####
return TaskpoolFactory.getTaskpool().enqueue(taskinfo);//####[91]####
}//####[91]####
public void __pt__buildItemTask(BuildingMaterial item) {//####[91]####
buildItem(item);//####[92]####
}//####[93]####
//####[93]####
//####[95]####
private static volatile Method __pt__buildAllTask_ListBuildingMaterial_method = null;//####[95]####
private synchronized static void __pt__buildAllTask_ListBuildingMaterial_ensureMethodVarSet() {//####[95]####
if (__pt__buildAllTask_ListBuildingMaterial_method == null) {//####[95]####
try {//####[95]####
__pt__buildAllTask_ListBuildingMaterial_method = ParaTaskHelper.getDeclaredMethod(new ParaTaskHelper.ClassGetter().getCurrentClass(), "__pt__buildAllTask", new Class[] {//####[95]####
List.class//####[95]####
});//####[95]####
} catch (Exception e) {//####[95]####
e.printStackTrace();//####[95]####
}//####[95]####
}//####[95]####
}//####[95]####
public TaskIDGroup<Void> buildAllTask(List<BuildingMaterial> items) {//####[95]####
//-- execute asynchronously by enqueuing onto the taskpool//####[95]####
return buildAllTask(items, new TaskInfo());//####[95]####
}//####[95]####
public TaskIDGroup<Void> buildAllTask(List<BuildingMaterial> items, TaskInfo taskinfo) {//####[95]####
// ensure Method variable is set//####[95]####
if (__pt__buildAllTask_ListBuildingMaterial_method == null) {//####[95]####
__pt__buildAllTask_ListBuildingMaterial_ensureMethodVarSet();//####[95]####
}//####[95]####
taskinfo.setParameters(items);//####[95]####
taskinfo.setMethod(__pt__buildAllTask_ListBuildingMaterial_method);//####[95]####
taskinfo.setInstance(this);//####[95]####
return TaskpoolFactory.getTaskpool().enqueueMulti(taskinfo, -1);//####[95]####
}//####[95]####
public TaskIDGroup<Void> buildAllTask(TaskID<List<BuildingMaterial>> items) {//####[95]####
//-- execute asynchronously by enqueuing onto the taskpool//####[95]####
return buildAllTask(items, new TaskInfo());//####[95]####
}//####[95]####
public TaskIDGroup<Void> buildAllTask(TaskID<List<BuildingMaterial>> items, TaskInfo taskinfo) {//####[95]####
// ensure Method variable is set//####[95]####
if (__pt__buildAllTask_ListBuildingMaterial_method == null) {//####[95]####
__pt__buildAllTask_ListBuildingMaterial_ensureMethodVarSet();//####[95]####
}//####[95]####
taskinfo.setTaskIdArgIndexes(0);//####[95]####
taskinfo.addDependsOn(items);//####[95]####
taskinfo.setParameters(items);//####[95]####
taskinfo.setMethod(__pt__buildAllTask_ListBuildingMaterial_method);//####[95]####
taskinfo.setInstance(this);//####[95]####
return TaskpoolFactory.getTaskpool().enqueueMulti(taskinfo, -1);//####[95]####
}//####[95]####
public TaskIDGroup<Void> buildAllTask(BlockingQueue<List<BuildingMaterial>> items) {//####[95]####
//-- execute asynchronously by enqueuing onto the taskpool//####[95]####
return buildAllTask(items, new TaskInfo());//####[95]####
}//####[95]####
public TaskIDGroup<Void> buildAllTask(BlockingQueue<List<BuildingMaterial>> items, TaskInfo taskinfo) {//####[95]####
// ensure Method variable is set//####[95]####
if (__pt__buildAllTask_ListBuildingMaterial_method == null) {//####[95]####
__pt__buildAllTask_ListBuildingMaterial_ensureMethodVarSet();//####[95]####
}//####[95]####
taskinfo.setQueueArgIndexes(0);//####[95]####
taskinfo.setIsPipeline(true);//####[95]####
taskinfo.setParameters(items);//####[95]####
taskinfo.setMethod(__pt__buildAllTask_ListBuildingMaterial_method);//####[95]####
taskinfo.setInstance(this);//####[95]####
return TaskpoolFactory.getTaskpool().enqueueMulti(taskinfo, -1);//####[95]####
}//####[95]####
public void __pt__buildAllTask(List<BuildingMaterial> items) {//####[95]####
buildAll(items);//####[96]####
}//####[97]####
//####[97]####
//####[99]####
private void buildAll(List<BuildingMaterial> items) {//####[99]####
Iterator<BuildingMaterial> it = items.iterator();//####[100]####
while (it.hasNext()) //####[101]####
{//####[101]####
buildItem(it.next());//####[102]####
}//####[103]####
}//####[104]####
//####[106]####
public void update(Graphics g) {//####[106]####
paint(g);//####[107]####
}//####[108]####
//####[110]####
public void paint(Graphics g) {//####[110]####
if (clearScreen) //####[112]####
{//####[112]####
g.clearRect(0, 0, width, height);//####[113]####
clearScreen = false;//####[114]####
}//####[115]####
for (BuildingMaterial b : foundation) //####[118]####
{//####[118]####
if (b.isVisible()) //####[119]####
{//####[119]####
g.setColor(new Color(162, 158, 24));//####[120]####
g.fillRect(b.getX(), b.getY(), b.getWidth(), b.getHeight());//####[121]####
g.setColor(Color.BLACK);//####[122]####
g.drawRect(b.getX(), b.getY(), b.getWidth(), b.getHeight());//####[123]####
}//####[124]####
}//####[125]####
for (BuildingMaterial b : wallSiding) //####[128]####
{//####[128]####
if (b.isVisible()) //####[130]####
{//####[130]####
g.setColor(colorWalls);//####[131]####
g.fillRect(b.getX(), b.getY(), b.getWidth(), b.getHeight());//####[132]####
g.setColor(Color.BLACK);//####[133]####
g.drawRect(b.getX(), b.getY(), b.getWidth(), b.getHeight());//####[134]####
}//####[135]####
}//####[136]####
for (BuildingMaterial b : roofTiles) //####[139]####
{//####[139]####
if (b.isVisible()) //####[141]####
{//####[141]####
g.setColor(colorRoof);//####[142]####
g.fillRect(b.getX(), b.getY(), b.getWidth(), b.getHeight());//####[143]####
g.setColor(Color.BLACK);//####[144]####
g.drawRect(b.getX(), b.getY(), b.getWidth(), b.getHeight());//####[145]####
}//####[146]####
}//####[147]####
if (door.isVisible()) //####[150]####
{//####[150]####
g.setColor(new Color(152, 118, 84));//####[151]####
g.fillRect(door.getX(), door.getY(), door.getWidth(), door.getHeight());//####[152]####
g.setColor(Color.BLACK);//####[153]####
g.drawRect(door.getX(), door.getY(), door.getWidth(), door.getHeight());//####[154]####
}//####[155]####
for (BuildingMaterial b : windows) //####[158]####
{//####[158]####
if (b.isVisible()) //####[159]####
{//####[159]####
g.setColor(new Color(173, 216, 230));//####[160]####
g.fillRect(b.getX(), b.getY(), b.getWidth(), b.getHeight());//####[161]####
g.setColor(Color.BLACK);//####[162]####
g.drawRect(b.getX(), b.getY(), b.getWidth(), b.getHeight());//####[163]####
}//####[164]####
}//####[165]####
if (forSaleSign.isVisible()) //####[168]####
{//####[168]####
g.setColor(new Color(152, 118, 84));//####[169]####
g.fillRect(400, 260, 15, 20);//####[170]####
g.fillRect(445, 260, 15, 20);//####[171]####
g.setColor(Color.BLACK);//####[172]####
g.drawRect(400, 260, 15, 20);//####[173]####
g.drawRect(445, 260, 15, 20);//####[174]####
g.setColor(new Color(255, 239, 0));//####[176]####
g.fillRect(forSaleSign.getX(), forSaleSign.getY(), forSaleSign.getWidth(), forSaleSign.getHeight());//####[177]####
g.setColor(Color.BLACK);//####[178]####
g.drawRect(forSaleSign.getX(), forSaleSign.getY(), forSaleSign.getWidth(), forSaleSign.getHeight());//####[179]####
Font f = g.getFont();//####[181]####
g.setFont(new Font(f.getName(), Font.BOLD, 21));//####[182]####
g.drawString("For", forSaleSign.getX() + 30, forSaleSign.getY() + 30);//####[183]####
g.drawString("Sale", forSaleSign.getX() + 25, forSaleSign.getY() + 60);//####[184]####
}//####[185]####
}//####[186]####
//####[188]####
private void initFoundation() {//####[188]####
int numCols = 31;//####[190]####
int w = 15;//####[191]####
int h = 10;//####[192]####
int x = 20;//####[194]####
int y = 280;//####[195]####
for (int i = 0; i < numCols; i++) //####[196]####
foundation.add(new BuildingMaterial(x + i * w, y, w, h, false));//####[197]####
x -= 7;//####[199]####
y += h;//####[200]####
for (int i = 0; i < numCols; i++) //####[201]####
foundation.add(new BuildingMaterial(x + i * w, y, w, h, false));//####[202]####
x += 7;//####[204]####
y += h;//####[205]####
for (int i = 0; i < numCols; i++) //####[206]####
foundation.add(new BuildingMaterial(x + i * w, y, w, h, false));//####[207]####
List<BuildingMaterial> list = new ArrayList<BuildingMaterial>();//####[209]####
list.addAll(foundation);//####[210]####
Collections.shuffle(list);//####[211]####
foundation.clear();//####[212]####
foundation.addAll(list);//####[213]####
}//####[214]####
//####[216]####
private void initWallSiding() {//####[216]####
int numPlanks = 40;//####[217]####
int totalW = 320;//####[218]####
int w = totalW / numPlanks;//####[219]####
int h = 150;//####[220]####
int x = 40;//####[222]####
int y = 130;//####[223]####
for (int i = 0; i < numPlanks; i++) //####[224]####
wallSiding.add(new BuildingMaterial(x + i * w, y, w, h, false));//####[225]####
List<BuildingMaterial> list = new ArrayList<BuildingMaterial>();//####[228]####
list.addAll(wallSiding);//####[229]####
Collections.shuffle(list);//####[230]####
wallSiding.clear();//####[231]####
wallSiding.addAll(list);//####[232]####
}//####[234]####
//####[236]####
private void initRoofTiles() {//####[236]####
int numPlanks = 12;//####[237]####
int dec = 10;//####[238]####
int h = 10;//####[239]####
int w = 360;//####[240]####
int x = 20;//####[242]####
int y = 130 - h;//####[243]####
for (int i = 0; i < numPlanks; i++) //####[244]####
{//####[244]####
roofTiles.add(new BuildingMaterial(x + i * dec, y - i * h, w, h, false));//####[245]####
w -= 2 * dec;//####[246]####
}//####[247]####
List<BuildingMaterial> list = new ArrayList<BuildingMaterial>();//####[250]####
list.addAll(roofTiles);//####[251]####
Collections.shuffle(list);//####[252]####
roofTiles.clear();//####[253]####
roofTiles.addAll(list);//####[254]####
}//####[255]####
//####[257]####
private void initWindowsAndDoor() {//####[257]####
door = new BuildingMaterial(63, 160, 75, 120, false);//####[258]####
windows.add(new BuildingMaterial(160, 160, 80, 60, false));//####[260]####
windows.add(new BuildingMaterial(253, 160, 75, 60, false));//####[261]####
}//####[262]####
//####[264]####
private void initForSaleSign() {//####[264]####
forSaleSign = new BuildingMaterial(380, 180, 100, 80, false);//####[265]####
}//####[266]####
//####[268]####
public void setComputationLevel(int N) {//####[268]####
this.N = N;//####[269]####
}//####[270]####
//####[272]####
public void reset() {//####[272]####
clearScreen = true;//####[273]####
for (BuildingMaterial b : foundation) //####[275]####
{//####[275]####
b.getAndSetVisible(false);//####[276]####
}//####[277]####
for (BuildingMaterial b : wallSiding) //####[279]####
{//####[279]####
b.getAndSetVisible(false);//####[280]####
}//####[281]####
for (BuildingMaterial b : roofTiles) //####[283]####
{//####[283]####
b.getAndSetVisible(false);//####[284]####
}//####[285]####
door.getAndSetVisible(false);//####[287]####
for (BuildingMaterial b : windows) //####[289]####
{//####[289]####
b.getAndSetVisible(false);//####[290]####
}//####[291]####
forSaleSign.getAndSetVisible(false);//####[293]####
repaint();//####[294]####
}//####[295]####
//####[297]####
private void simulateWork(int N) {//####[297]####
double xmin = -1.0;//####[298]####
double ymin = -1.0;//####[299]####
double width = 2.0;//####[300]####
double height = 2.0;//####[301]####
for (int i = 0; i < N; i++) //####[302]####
{//####[302]####
for (int j = 0; j < N; j++) //####[303]####
{//####[303]####
double x = xmin + i * width / N;//####[304]####
double y = ymin + j * height / N;//####[305]####
Complex z = new Complex(x, y);//####[306]####
newton(z);//####[307]####
}//####[308]####
}//####[309]####
}//####[310]####
//####[312]####
private Color newton(Complex z) {//####[312]####
double EPSILON = 0.00000001;//####[313]####
Complex four = new Complex(4, 0);//####[314]####
Complex one = new Complex(1, 0);//####[315]####
Complex root1 = new Complex(1, 0);//####[316]####
Complex root2 = new Complex(-1, 0);//####[317]####
Complex root3 = new Complex(0, 1);//####[318]####
Complex root4 = new Complex(0, -1);//####[319]####
for (int i = 0; i < 100; i++) //####[320]####
{//####[320]####
Complex f = z.times(z).times(z).times(z).minus(one);//####[321]####
Complex fp = four.times(z).times(z).times(z);//####[322]####
z = z.minus(f.divides(fp));//####[323]####
if (z.minus(root1).abs() <= EPSILON) //####[324]####
return Color.WHITE;//####[324]####
if (z.minus(root2).abs() <= EPSILON) //####[325]####
return Color.RED;//####[325]####
if (z.minus(root3).abs() <= EPSILON) //####[326]####
return Color.GREEN;//####[326]####
if (z.minus(root4).abs() <= EPSILON) //####[327]####
return Color.BLUE;//####[327]####
}//####[328]####
return Color.BLACK;//####[329]####
}//####[330]####
//####[332]####
public void initialiseMaterial() {//####[332]####
foundation = new CopyOnWriteArrayList<BuildingMaterial>();//####[333]####
wallSiding = new CopyOnWriteArrayList<BuildingMaterial>();//####[334]####
roofTiles = new CopyOnWriteArrayList<BuildingMaterial>();//####[335]####
windows = new CopyOnWriteArrayList<BuildingMaterial>();//####[336]####
initFoundation();//####[338]####
initWallSiding();//####[339]####
initRoofTiles();//####[340]####
initWindowsAndDoor();//####[341]####
initForSaleSign();//####[342]####
}//####[343]####
}//####[343]####
<file_sep>/WorkingStealing/src/house/BuildingMaterial.java
package house;
import java.util.concurrent.atomic.AtomicBoolean;
public class BuildingMaterial {
private int x;
private int y;
private int width;
private int height;
private AtomicBoolean isVisible;
public BuildingMaterial(int x, int y, int width, int height, boolean isVisible) {
this.x = x;
this.y = y;
this.width = width;
this.height = height;
this.isVisible = new AtomicBoolean(isVisible);
}
public int getX() {
return x;
}
public int getY() {
return y;
}
public int getWidth() {
return width;
}
public int getHeight() {
return height;
}
public boolean isVisible() {
return isVisible.get();
}
public boolean getAndSetVisible(boolean isVisible) {
return this.isVisible.getAndSet(isVisible);
}
}
<file_sep>/document/Work-Stealing & Recursive Partitioning with Fork_Join - igvita.com.html
<!DOCTYPE html>
<!-- saved from url=(0090)https://www.igvita.com/2012/02/29/work-stealing-and-recursive-partitioning-with-fork-join/ -->
<html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Work-Stealing & Recursive Partitioning with Fork/Join - igvita.com</title>
<script type="text/javascript" async="" src="./Work-Stealing & Recursive Partitioning with Fork_Join - igvita.com_files/analytics.js.下载"></script><script>var dataLayer=dataLayer||[];dataLayer.push({'gtm.start':new Date().getTime(),event:'gtm.js'});</script>
<script src="./Work-Stealing & Recursive Partitioning with Fork_Join - igvita.com_files/gtm.js.下载" async="" defer=""></script>
<link rel="preconnect" href="https://fonts.gstatic.com/" crossorigin="">
<style>/* cyrillic-ext */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 400;
src: local('Open Sans'), local('OpenSans'), url(https://fonts.gstatic.com/s/opensans/v13/K88pR3goAWT7BTt32Z01mxJtnKITppOI_IvcXXDNrsc.woff2) format('woff2');
unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F;
}
/* cyrillic */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 400;
src: local('Open Sans'), local('OpenSans'), url(https://fonts.gstatic.com/s/opensans/v13/RjgO7rYTmqiVp7vzi-Q5URJtnKITppOI_IvcXXDNrsc.woff2) format('woff2');
unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek-ext */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 400;
src: local('Open Sans'), local('OpenSans'), url(https://fonts.gstatic.com/s/opensans/v13/LWCjsQkB6EMdfHrEVqA1KRJtnKITppOI_IvcXXDNrsc.woff2) format('woff2');
unicode-range: U+1F00-1FFF;
}
/* greek */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 400;
src: local('Open Sans'), local('OpenSans'), url(https://fonts.gstatic.com/s/opensans/v13/xozscpT2726on7jbcb_pAhJtnKITppOI_IvcXXDNrsc.woff2) format('woff2');
unicode-range: U+0370-03FF;
}
/* vietnamese */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 400;
src: local('Open Sans'), local('OpenSans'), url(https://fonts.gstatic.com/s/opensans/v13/59ZRklaO5bWGqF5A9baEERJtnKITppOI_IvcXXDNrsc.woff2) format('woff2');
unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 400;
src: local('Open Sans'), local('OpenSans'), url(https://fonts.gstatic.com/s/opensans/v13/u-WUoqrET9fUeobQW7jkRRJtnKITppOI_IvcXXDNrsc.woff2) format('woff2');
unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 400;
src: local('Open Sans'), local('OpenSans'), url(https://fonts.gstatic.com/s/opensans/v13/cJZKeOuBrn4kERxqtaUH3VtXRa8TVwTICgirnJhmVJw.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215;
}
/* cyrillic-ext */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 700;
src: local('Open Sans Bold'), local('OpenSans-Bold'), url(https://fonts.gstatic.com/s/opensans/v13/k3k702ZOKiLJc3WVjuplzK-j2U0lmluP9RWlSytm3ho.woff2) format('woff2');
unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F;
}
/* cyrillic */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 700;
src: local('Open Sans Bold'), local('OpenSans-Bold'), url(https://fonts.gstatic.com/s/opensans/v13/k3k702ZOKiLJc3WVjuplzJX5f-9o1vgP2EXwfjgl7AY.woff2) format('woff2');
unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek-ext */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 700;
src: local('Open Sans Bold'), local('OpenSans-Bold'), url(https://fonts.gstatic.com/s/opensans/v13/k3k702ZOKiLJc3WVjuplzBWV49_lSm1NYrwo-zkhivY.woff2) format('woff2');
unicode-range: U+1F00-1FFF;
}
/* greek */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 700;
src: local('Open Sans Bold'), local('OpenSans-Bold'), url(https://fonts.gstatic.com/s/opensans/v13/k3k702ZOKiLJc3WVjuplzKaRobkAwv3vxw3jMhVENGA.woff2) format('woff2');
unicode-range: U+0370-03FF;
}
/* vietnamese */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 700;
src: local('Open Sans Bold'), local('OpenSans-Bold'), url(https://fonts.gstatic.com/s/opensans/v13/k3k702ZOKiLJc3WVjuplzP8zf_FOSsgRmwsS7Aa9k2w.woff2) format('woff2');
unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 700;
src: local('Open Sans Bold'), local('OpenSans-Bold'), url(https://fonts.gstatic.com/s/opensans/v13/k3k702ZOKiLJc3WVjuplzD0LW-43aMEzIO6XUTLjad8.woff2) format('woff2');
unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 700;
src: local('Open Sans Bold'), local('OpenSans-Bold'), url(https://fonts.gstatic.com/s/opensans/v13/k3k702ZOKiLJc3WVjuplzOgdm0LZdjqr5-oayXSOefg.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215;
}
</style>
<link rel="stylesheet" href="./Work-Stealing & Recursive Partitioning with Fork_Join - igvita.com_files/A.style.css,q1s3as.pagespeed.cf.dtk_Z6HfGX.css">
<style>.hll{background-color:#49483e}.c{color:#75715e}.err{color:#960050;background-color:#1e0010}.k{color:#66d9ef}.l{color:#ae81ff}.n{color:#f8f8f2}.o{color:#f92672}.p{color:#f8f8f2}.cm{color:#75715e}.cp{color:#75715e}.c1{color:#75715e}.cs{color:#75715e}.ge{font-style:italic}.gs{font-weight:bold}.kc{color:#66d9ef}.kd{color:#66d9ef}.kn{color:#f92672}.kp{color:#66d9ef}.kr{color:#66d9ef}.kt{color:#66d9ef}.ld{color:#e6db74}.m{color:#ae81ff}.s{color:#e6db74}.na{color:#a6e22e}.nb{color:#f8f8f2}.nc{color:#a6e22e}.no{color:#66d9ef}.nd{color:#a6e22e}.ni{color:#f8f8f2}.ne{color:#a6e22e}.nf{color:#a6e22e}.nl{color:#f8f8f2}.nn{color:#f8f8f2}.nx{color:#a6e22e}.py{color:#f8f8f2}.nt{color:#f92672}.nv{color:#f8f8f2}.ow{color:#f92672}.w{color:#f8f8f2}.mf{color:#ae81ff}.mh{color:#ae81ff}.mi{color:#ae81ff}.mo{color:#ae81ff}.sb{color:#e6db74}.sc{color:#e6db74}.sd{color:#e6db74}.s2{color:#e6db74}.se{color:#ae81ff}.sh{color:#e6db74}.si{color:#e6db74}.sx{color:#e6db74}.sr{color:#e6db74}.s1{color:#e6db74}.ss{color:#e6db74}.bp{color:#f8f8f2}.vc{color:#f8f8f2}.vg{color:#f8f8f2}.vi{color:#f8f8f2}.il{color:#ae81ff}</style>
<link rel="manifest" href="https://www.igvita.com/manifest.json">
<link rel="icon" sizes="192x192" href="data:image/webp;base64,UklGRhQ<KEY>VlA4TAcJAAAvv8AvEIU1atuOza3OCSaanSeobUa17T6<KEY>5<KEY>4s0AuBxPzO8jmbsS8GrLZ4G9itVoM8nkssW6CjLb3BDFGaoCcdnU/KXxMb8hrnZ18Ttr82UHq<KEY>>
<meta name="theme-color" content="#000">
<meta name="author" content="<NAME>">
<meta name="twitter:card" content="summary">
<meta name="description" content="JDK7's Fork/Join combines a double ended queue (deque) and a recursive job partitioning step to minimize synchronization - a great design pattern to keep in mind for single host and distributed cases!">
<meta name="twitter:description" content="JDK7's Fork/Join combines a double ended queue (deque) and a recursive job partitioning step to minimize synchronization - a great design pattern to keep in mind for single host and distributed cases!">
<meta property="og:image" content="http://www.igvita.com/posts/12/duke.png">
<meta name="twitter:image:src" content="http://www.igvita.com/posts/12/duke.png">
<meta name="twitter:creator" content="@igrigorik">
<meta name="twitter:url" content="https://www.igvita.com/2012/02/29/work-stealing-and-recursive-partitioning-with-fork-join/">
<meta name="twitter:title" content="Work-Stealing & Recursive Partitioning with Fork/Join">
<meta property="twitter:account_id" content="9980812">
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1">
<link rel="alternate" type="application/rss+xml" title="igvita.com RSS Feed" href="https://www.igvita.com/feed/">
<link rel="canonical" href="https://www.igvita.com/2012/02/29/work-stealing-and-recursive-partitioning-with-fork-join/">
<script src="./Work-Stealing & Recursive Partitioning with Fork_Join - igvita.com_files/saved_resource"></script><script src="./Work-Stealing & Recursive Partitioning with Fork_Join - igvita.com_files/count-data.js.下载"></script></head>
<body>
<div id="container">
<header>
<div class="content">
<a href="https://www.igvita.com/">igvita.com</a> <b> | </b> <span>a goal is a dream with a deadline</span>
<a href="https://www.igvita.com/" class="about">about</a>
</div>
</header>
<div id="main" role="main">
<div id="post" class="content" itemscope="" itemtype="http://schema.org/Article">
<h1 itemprop="name">Work-Stealing & Recursive Partitioning with Fork/Join</h1>
<p class="byline">By <a href="https://www.igvita.com/" rel="author" itemprop="author"><NAME></a> on <b itemprop="datePublished" datetime="2012-02-29">February 29, 2012</b></p>
<p><script data-pagespeed-no-defer="">(function(){var g=this;function h(b,d){var a=b.split("."),c=g;a[0]in c||!c.execScript||c.execScript("var "+a[0]);for(var e;a.length&&(e=a.shift());)a.length||void 0===d?c[e]?c=c[e]:c=c[e]={}:c[e]=d};function l(b){var d=b.length;if(0<d){for(var a=Array(d),c=0;c<d;c++)a[c]=b[c];return a}return[]};function m(b){var d=window;if(d.addEventListener)d.addEventListener("load",b,!1);else if(d.attachEvent)d.attachEvent("onload",b);else{var a=d.onload;d.onload=function(){b.call(this);a&&a.call(this)}}};var n;function p(b,d,a,c,e){this.h=b;this.j=d;this.l=a;this.f=e;this.g={height:window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,width:window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth};this.i=c;this.b={};this.a=[];this.c={}}function q(b,d){var a,c,e=d.getAttribute("data-pagespeed-url-hash");if(a=e&&!(e in b.c))if(0>=d.offsetWidth&&0>=d.offsetHeight)a=!1;else{c=d.getBoundingClientRect();var f=document.body;a=c.top+("pageYOffset"in window?window.pageYOffset:(document.documentElement||f.parentNode||f).scrollTop);c=c.left+("pageXOffset"in window?window.pageXOffset:(document.documentElement||f.parentNode||f).scrollLeft);f=a.toString()+","+c;b.b.hasOwnProperty(f)?a=!1:(b.b[f]=!0,a=a<=b.g.height&&c<=b.g.width)}a&&(b.a.push(e),b.c[e]=!0)}p.prototype.checkImageForCriticality=function(b){b.getBoundingClientRect&&q(this,b)};h("pagespeed.CriticalImages.checkImageForCriticality",function(b){n.checkImageForCriticality(b)});h("pagespeed.CriticalImages.checkCriticalImages",function(){r(n)});function r(b){b.b={};for(var d=["IMG","INPUT"],a=[],c=0;c<d.length;++c)a=a.concat(l(document.getElementsByTagName(d[c])));if(0!=a.length&&a[0].getBoundingClientRect){for(c=0;d=a[c];++c)q(b,d);a="oh="+b.l;b.f&&(a+="&n="+b.f);if(d=0!=b.a.length)for(a+="&ci="+encodeURIComponent(b.a[0]),c=1;c<b.a.length;++c){var e=","+encodeURIComponent(b.a[c]);131072>=a.length+e.length&&(a+=e)}b.i&&(e="&rd="+encodeURIComponent(JSON.stringify(t())),131072>=a.length+e.length&&(a+=e),d=!0);u=a;if(d){c=b.h;b=b.j;var f;if(window.XMLHttpRequest)f=new XMLHttpRequest;else if(window.ActiveXObject)try{f=new ActiveXObject("Msxml2.XMLHTTP")}catch(k){try{f=new ActiveXObject("Microsoft.XMLHTTP")}catch(v){}}f&&(f.open("POST",c+(-1==c.indexOf("?")?"?":"&")+"url="+encodeURIComponent(b)),f.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),f.send(a))}}}function t(){var b={},d=document.getElementsByTagName("IMG");if(0==d.length)return{};var a=d[0];if(!("naturalWidth"in a&&"naturalHeight"in a))return{};for(var c=0;a=d[c];++c){var e=a.getAttribute("data-pagespeed-url-hash");e&&(!(e in b)&&0<a.width&&0<a.height&&0<a.naturalWidth&&0<a.naturalHeight||e in b&&a.width>=b[e].o&&a.height>=b[e].m)&&(b[e]={rw:a.width,rh:a.height,ow:a.naturalWidth,oh:a.naturalHeight})}return b}var u="";h("pagespeed.CriticalImages.getBeaconData",function(){return u});h("pagespeed.CriticalImages.Run",function(b,d,a,c,e,f){var k=new p(b,d,a,e,f);n=k;c&&m(function(){window.setTimeout(function(){r(k)},0)})});})();pagespeed.CriticalImages.Run('/ngx_pagespeed_beacon','https://www.igvita.com/2012/02/29/work-stealing-and-recursive-partitioning-with-fork-join/','XwPRccgygX',true,false,'ciL5ehleprA');</script><img src="data:image/webp;base64,UklGRlYKAABXRUJQVlA4IEoKAABQLwCdASqCAG8APm0wlEckIyIhKTOcQIANiUAapoevmfOLtze8jhcrvQ360NvD5pvNu9G/oAdJz6DXlxeyV+3v7b+znmqvZJ/nPDPyieyvcXlMxJu2P9p52eCvyR1CPxn+c/6Phg7Nd+fih0q2gB9Lvsl/TvoD+qPYK/Wf00vZf6In7dINuAdn+Ezvnx/n6X8rWzANeRymeO2xjFn8QpzSaLT3ewAVY2esPU5JRCIcHjHghFUEpXpTkvYfYF9bFQGP7aM83gjUY5c7p6w6QXAU/kseXWtv+c6e9YYOX0/OuWM5XlZp2jtW44Jg236KM5cxJziZuNrc30h4RU<KEY>//<KEY> class="left" data-pagespeed-url-hash="2806458656" onload="pagespeed.CriticalImages.checkImageForCriticality(this);">Implementing an efficient parallel algorithm is, unfortunately, still a non-trivial task in most languages: we need to determine how to partition the problem, determine the optimal level of parallelism, and finally build an implementation with minimal synchronization. This last bit is especially critical since as <a href="http://en.wikipedia.org/wiki/Amdahl's_law">Amdahl's law</a> tells us: <strong>"the speedup of a program using multiple processors in parallel computing is limited by the time needed for the sequential fraction of the program".</strong></p>
<p>The Fork/Join framework (<a href="http://jcp.org/en/jsr/detail?id=166">JSR 166</a>) in <a href="http://openjdk.java.net/projects/jdk7/features/">JDK7</a> implements a clever work-stealing technique for parallel execution that is worth learning about - even if you are not a JDK user. Optimized for parallelizing <a href="http://en.wikipedia.org/wiki/Divide_and_conquer_algorithm">divide-and-conquer</a> (and <a href="http://en.wikipedia.org/wiki/MapReduce#Logical_view">map-reduce</a>) algorithms it abstracts all the CPU scheduling and work balancing behind a simple to use API.</p>
<h2>Load Balancing vs. Synchronization</h2>
<p>One of the key challenges in parallelizing any type of workload is the partitioning step: ideally we want to partition the work such that every piece will take the exact same amount of time. In reality, we often have to guess at what the partition should be, which means that some parts of the problem will take longer, either because of the inefficient partitioning scheme, or due to some other, unanticipated reasons (e.g. external service, slow disk access, etc).</p>
<p>This is where <a href="http://en.wikipedia.org/wiki/Cilk#Work-stealing">work-stealing</a> comes in. If some of the CPU cores finish their jobs early, then we want them to help to finish the problem. However, now we have to be careful: trying to "steal" work from another worker will require synchronization, which will slowdown the processing. Hence, <strong>we want work-stealing, but with minimal synchronization</strong> - think back to <a href="http://en.wikipedia.org/wiki/Amdahl's_law">Amdahl's law</a>.</p>
<h2>Fork/Join Work-Stealing</h2>
<p>The <a href="http://gee.cs.oswego.edu/dl/papers/fj.pdf">Fork-Join framework</a> (<a href="http://docs.oracle.com/javase/tutorial/essential/concurrency/forkjoin.html">docs</a>) solves this problem in a clever way: recursive job partitioning, and a <a href="http://en.wikipedia.org/wiki/Double-ended_queue">double-ended queue</a> (<strong>deque</strong>) structure for holding the tasks.</p>
<p><img src="./Work-Stealing & Recursive Partitioning with Fork_Join - igvita.com_files/xwork-stealing.png.pagespeed.ic.iTkWB_3KHR.webp" class="center" data-pagespeed-url-hash="4118241220" onload="pagespeed.CriticalImages.checkImageForCriticality(this);"></p>
<p>Given a problem, we divide the problem into N large pieces, and hand each piece to one of the workers (2 in the diagram above). Each worker then recursively subdivides the first problem at the head of the deque and appends the split tasks to the head of the same deque. After a few iterations we will end up with some number of smaller tasks at the front of the deque, and a few larger and yet to be partitioned tasks on end. So far so good, but what do we get?</p>
<p>Imagine the second worker has finished all of its work, while the first worker is busy. To minimize synchronization the second worker grabs a job from <strong>the end</strong> of the deque (hence the reason for efficient head and tail access). By doing so, it will get the largest available block of work, allowing it to minimize the number of times it has to interact with the other worker (aka, minimize synchronization). Simple, but a very clever technique!</p>
<h2>Fork-Join in Practice (JRuby)</h2>
<p>It is important to understand why and how the Fork/Join framework works under the hood, but the best part is that the API presented to the developer completely abstracts all of these details. The runtime can and will determine the level of parallelism, as well as handle all the work of balancing tasks across the available workers:</p>
<div class="highlight"><pre><code class="language-ruby" data-lang="ruby"><span class="nb">require</span> <span class="s1">'forkjoin'</span>
<span class="k">class</span> <span class="nc">Fibonacci</span> <span class="o"><</span> <span class="no">ForkJoin</span><span class="o">::</span><span class="no">Task</span>
<span class="k">def</span> <span class="nf">initialize</span><span class="p">(</span><span class="n">n</span><span class="p">)</span>
<span class="vi">@n</span> <span class="o">=</span> <span class="n">n</span>
<span class="k">end</span>
<span class="k">def</span> <span class="nf">call</span>
<span class="k">return</span> <span class="vi">@n</span> <span class="k">if</span> <span class="vi">@n</span> <span class="o"><=</span> <span class="mi">1</span>
<span class="p">(</span><span class="n">f</span> <span class="o">=</span> <span class="no">Fibonacci</span><span class="o">.</span><span class="n">new</span><span class="p">(</span><span class="vi">@n</span> <span class="o">-</span> <span class="mi">1</span><span class="p">))</span><span class="o">.</span><span class="n">fork</span>
<span class="no">Fibonacci</span><span class="o">.</span><span class="n">new</span><span class="p">(</span><span class="vi">@n</span> <span class="o">-</span> <span class="mi">2</span><span class="p">)</span><span class="o">.</span><span class="n">call</span> <span class="o">+</span> <span class="n">f</span><span class="o">.</span><span class="n">join</span>
<span class="k">end</span>
<span class="k">end</span>
<span class="n">n</span> <span class="o">=</span> <span class="no">ARGV</span><span class="o">.</span><span class="n">shift</span><span class="o">.</span><span class="n">to_i</span>
<span class="n">pool</span> <span class="o">=</span> <span class="no">ForkJoin</span><span class="o">::</span><span class="no">Pool</span><span class="o">.</span><span class="n">new</span> <span class="c1"># 2,4,8, ...</span>
<span class="nb">puts</span> <span class="s2">"fib(</span><span class="si">#{</span><span class="n">n</span><span class="si">}</span><span class="s2">) = </span><span class="si">#{</span><span class="n">pool</span><span class="o">.</span><span class="n">invoke</span><span class="p">(</span><span class="no">Fibonacci</span><span class="o">.</span><span class="n">new</span><span class="p">(</span><span class="n">n</span><span class="p">))</span><span class="si">}</span><span class="s2">, parallelism = </span><span class="si">#{</span><span class="n">pool</span><span class="o">.</span><span class="n">parallelism</span><span class="si">}</span><span class="s2">"</span>
<span class="c1"># $> ruby fib.rb 33</span></code></pre></div>
<p>The <a href="https://github.com/headius/forkjoin.rb">JRuby forkjoin gem</a> is a simple wrapper for the Java API. In the example above, we instatiate a <code>ForkJoin::Pool</code> and call <code>invoke</code> passing it our Fibonacci problem. The Fibonacci problem is type of <code>ForkJoin::Task</code>, which implements a recursive <code>call</code> method: if the problem is "too big", then we split it into two parts, one of which is "forked" (pushed onto the head of the deque), and the second half we invoke immediately. The final answer is the sum of the two tasks.</p>
<p>By default, the <code>ForkJoin::Pool</code> will allocate the same number of threads as available CPU cores - in my case, that happens to be 2, but the code above will automatically scale up to the number of available cores! Copy the code, run it, and you will see all of your available resources light up under load.</p>
<h2>Map-Reduce and Fork-Join</h2>
<p>The recursion of the divide-and-conquer technique is what enables the efficient deque work-stealing. However, it is interesting to note that the <strong>"map-reduce" workflow is simply a special case of this pattern</strong>. Instead of recursively partitioning the problem, the map-reduce algorithm will subdivide the problem upfront. This, in turn, means that in the case of an unbalanced workload we are likely to steal finer-grained tasks, which will also lead to more need for synchronization - if you can partition the problem recursively, do so!</p>
<div class="highlight"><pre><code class="language-ruby" data-lang="ruby"><span class="nb">require</span> <span class="s1">'zlib'</span>
<span class="nb">require</span> <span class="s1">'forkjoin'</span>
<span class="nb">require</span> <span class="s1">'archive/tar/minitar'</span>
<span class="n">pool</span> <span class="o">=</span> <span class="no">ForkJoin</span><span class="o">::</span><span class="no">Pool</span><span class="o">.</span><span class="n">new</span>
<span class="n">jobs</span> <span class="o">=</span> <span class="no">Dir</span><span class="o">[</span><span class="no">ARGV</span><span class="o">[</span><span class="mi">0</span><span class="o">].</span><span class="n">chomp</span><span class="p">(</span><span class="s1">'/'</span><span class="p">)</span> <span class="o">+</span> <span class="s1">'/*'</span><span class="o">].</span><span class="n">map</span> <span class="k">do</span> <span class="o">|</span><span class="n">dir</span><span class="o">|</span>
<span class="no">Proc</span><span class="o">.</span><span class="n">new</span> <span class="k">do</span>
<span class="nb">puts</span> <span class="s2">"Threads: </span><span class="si">#{</span><span class="n">pool</span><span class="o">.</span><span class="n">active_thread_count</span><span class="si">}</span><span class="s2">, </span><span class="si">#{</span><span class="no">Thread</span><span class="o">.</span><span class="n">current</span><span class="si">}</span><span class="s2"> processing: </span><span class="si">#{</span><span class="n">dir</span><span class="si">}</span><span class="s2">"</span>
<span class="n">backup</span> <span class="o">=</span> <span class="s2">"/tmp/backup/</span><span class="si">#{</span><span class="no">File</span><span class="o">.</span><span class="n">basename</span><span class="p">(</span><span class="n">dir</span><span class="p">)</span><span class="si">}</span><span class="s2">.tgz"</span>
<span class="n">tgz</span> <span class="o">=</span> <span class="no">Zlib</span><span class="o">::</span><span class="no">GzipWriter</span><span class="o">.</span><span class="n">new</span><span class="p">(</span><span class="no">File</span><span class="o">.</span><span class="n">open</span><span class="p">(</span><span class="n">backup</span><span class="p">,</span> <span class="s1">'wb'</span><span class="p">))</span>
<span class="no">Archive</span><span class="o">::</span><span class="no">Tar</span><span class="o">::</span><span class="no">Minitar</span><span class="o">.</span><span class="n">pack</span><span class="p">(</span><span class="n">dir</span><span class="p">,</span> <span class="n">tgz</span><span class="p">)</span>
<span class="no">File</span><span class="o">.</span><span class="n">size</span><span class="p">(</span><span class="n">backup</span><span class="p">)</span>
<span class="k">end</span>
<span class="k">end</span>
<span class="n">results</span> <span class="o">=</span> <span class="n">pool</span><span class="o">.</span><span class="n">invoke_all</span><span class="p">(</span><span class="n">jobs</span><span class="p">)</span><span class="o">.</span><span class="n">map</span><span class="p">(</span><span class="o">&</span><span class="ss">:get</span><span class="p">)</span>
<span class="nb">puts</span> <span class="s2">"Created </span><span class="si">#{</span><span class="n">results</span><span class="o">.</span><span class="n">size</span><span class="si">}</span><span class="s2"> backup archives, total bytes: </span><span class="si">#{</span><span class="n">results</span><span class="o">.</span><span class="n">reduce</span><span class="p">(</span><span class="ss">:+</span><span class="p">)</span><span class="si">}</span><span class="s2">"</span>
<span class="c1"># $> ruby backup.rb /home/igrigorik/</span></code></pre></div>
<p>The above is a simple, map-reduce example via the same API. Given a path, this program will iterate over all files and folders, create all the backup tasks upfront, and finally invoke them to create the backup archives. Best of all, there is no threadpool management or synchronization code to be seen and the framework will easily pin all of your available cores, as well as automatically balance the work between all of the workers.</p>
<h2>Parallel Java & Distributed Work-Stealing</h2>
<p>The Fork/Join framework is deceivingly simple on the surface, but as usual, the <a href="http://cs.oswego.edu/pipermail/concurrency-interest/2012-January/008987.html">devil is in the details</a> when it comes to optimizing for performance. However, regardless of whether you are a JDK user or not, <strong>the deque, combined with a recursive partitioning step is a great pattern to keep in mind</strong>. The JDK implementation is built for "within single JVM" workloads, but a similar pattern can be just as useful in many distributed cases.</p>
<div class="author-callout">
<img src="data:image/webp;base64,UklGRkABAABXRUJQVlA4IDQBAACQBwCdASojACMAPm0sk0WkIqGY7M0AQAbEtIACimd5LwNhb1mmMhaemgd/9MsXcT04KxSkF9TgmxcVs3qi9pt9idTWiAAA/v0BSccs2Wslieu639ZzsnAqMw2Kt9aHa6taGUneSS3W3lot0I1v46dsp/Kb3zhlAY0xw88Sa7Qza0rN9FBXD7+ZMUUycl1Avh9tLShWimybukziNKH+3J3IGYAbiEAeatj+TGz/9BB120CzpM7Iavw4sX75hCG3STx5czWirHmauIxOdTCB8oWhrF01o48i4f5+iRRyj4swZ4pO8E8yhvuA5vu4q88HDgwLEd77r6uPyLFTJoMViFSYkyGbl7bitKwK8ALeKh6V6rv0F5w5yrrpb1vQSHGt9yd25ko2Fn8WH+p8NNDWKMeVsAAAAA==" alt="<NAME>" data-pagespeed-url-hash="3389108481" onload="pagespeed.CriticalImages.checkImageForCriticality(this);"><strong><NAME></strong> is a web performance engineer at Google, co-chair of the W3C Web Performance working group, and author of High Performance Browser Networking (O'Reilly) book — follow on <a href="https://twitter.com/igrigorik">Twitter</a>, <a href="https://plus.google.com/+IlyaGrigorik">Google+</a>.
</div>
<div class="content social">
<a href="http://www.igvita.com/2012/02/29/work-stealing-and-recursive-partitioning-with-fork-join/#disqus_thread" onclick="return loadDisqus()">View comments (12)</a>, share on <a href="https://twitter.com/share?url=http://www.igvita.com/2012/02/29/work-stealing-and-recursive-partitioning-with-fork-join/&text=Work-Stealing+%26+Recursive+Partitioning+with+Fork%2FJoin:&via=igrigorik" target="_blank">Twitter</a><span id="twittercount"></span>, <a href="https://plus.google.com/share?url=http://www.igvita.com/2012/02/29/work-stealing-and-recursive-partitioning-with-fork-join/" target="_blank">Google+</a><span id="gpluscount"> (25)</span><span id="fbcount">, <a href="https://www.facebook.com/sharer/sharer.php?u=http://www.igvita.com/2012/02/29/work-stealing-and-recursive-partitioning-with-fork-join/" target="_blank">Facebook</a> (5)</span>.
</div>
</div>
<div id="comments" class="content">
<div id="disqus_thread"></div>
</div>
</div>
<div id="meta">
<div class="group book">
<div class="book-cover" style="margin-top:0.2em"></div>
<h3 style="color: #fff">High Performance Browser Networking - O'Reilly</h3>
<p style="font-style:italic">What every web developer needs to know about the various types of networks (WiFi, 3G/4G), transport protocols (UDP, TCP, and TLS), application protocols (HTTP/1.1, HTTP/2), and APIs available in the browser (XHR & Fetch, WebSocket, WebRTC, and more) to deliver the best—fast, reliable, and resilient—user experience.</p>
<p style="padding-top:0.5em"><a href="https://hpbn.co/?utm_source=igvita&utm_medium=referral&utm_campaign=igvita-footer" style="text-decoration:none;"><span class="button">Read at hpbn.co (free)</span></a></p>
</div>
</div>
<script>var disqus_url='http://www.igvita.com/2012/02/29/work-stealing-and-recursive-partitioning-with-fork-join/';var disqus_shortname='igvita';var loadDisqus=function(){var dsq=document.createElement('script');dsq.type='text/javascript';dsq.async=true;dsq.src='//igvita.disqus.com/embed.js';(document.getElementsByTagName('head')[0]||document.getElementsByTagName('body')[0]).appendChild(dsq);return false;};function social_counts(data){var twc=document.getElementById('twittercount'),gwc=document.getElementById('gpluscount'),fwc=document.getElementById('fbcount');if(data['Twitter']>0){twc.innerText=' ('+data['Twitter']+')'}if(data['GooglePlusOne']>0){gwc.innerText=' ('+data['GooglePlusOne']+')'}if(data['Facebook']['total_count']>0){fwc.innerHTML=", <a href='https://www.facebook.com/sharer/sharer.php?u=http://www.igvita.com/2012/02/29/work-stealing-and-recursive-partitioning-with-fork-join/' target='_blank'>Facebook</a>"+' ('+data['Facebook']['total_count']+')';}}var scount=document.createElement('script');scount.src="//free.sharedcount.com/?callback=social_counts&url=http://www.igvita.com/2012/02/29/work-stealing-and-recursive-partitioning-with-fork-join/&apikey=<KEY>"
document.getElementsByTagName('head')[0].appendChild(scount);</script>
<script src="./Work-Stealing & Recursive Partitioning with Fork_Join - igvita.com_files/count.js.下载" async=""></script>
<footer>
<div id="copyright">
<div class="group">
<span>© <NAME></span>
<a href="https://www.igvita.com/" class="about">about</a><a href="http://feeds.igvita.com/igvita" class="about rss">subscribe via rss</a>
</div>
</div>
</footer>
</div>
</body></html> | c92b4e7a9be38a2e38f5433aa3647ed79fa596a8 | [
"Java",
"HTML"
] | 3 | Java | lewischen1123/Work_Stealing_Java | 1687f81b4e720baeaefc1548113b3c1e8770f64c | d5322316a097aecc298ad45ab323a30a72eb1549 | |
refs/heads/master | <repo_name>marui0608/Exam<file_sep>/apps/account/forms.py
from captcha.fields import CaptchaField
from django import forms
class RegisterForm(forms.Form):
'''
注册验证表单
'''
nick_name = forms.CharField(required=True, min_length=1)
email = forms.EmailField(required=True)
password = forms.CharField(required=True, min_length=5)
# 验证码
captcha = CaptchaField(error_messages={'invalid': '验证码错误'})
class ForgetPwdForm(forms.Form):
'''忘记密码'''
email = forms.EmailField(required=True)
captcha = CaptchaField(error_messages={'invalid': '验证码错误'})
class LoginForm(forms.Form):
"""
登陆验证码
"""
username = forms.CharField(required=True)
password = forms.CharField(required=True, min_length=5)
class ModifyPwdForm(forms.Form):
'''重置密码'''
password1 = forms.CharField(required=True, min_length=5)
password2 = forms.CharField(required=True, min_length=5)
<file_sep>/apps/competition/urls.py
from django.urls import path
from apps.competition.views import *
app_name = 'set'
urlpatterns = [
# 录入、配置题库首页
path('set_index/', set_index, name='set_index'),
# 录制题库
path('set_bank/', set_bank, name='set_bank'),
# 模板下载
path('template_download/', template_download, name='template_download'),
# 配置考试
path('set_test/', set_test, name='set_test'),
path('type/', type, name='type'),
# 考试信息
path('test_info/<id>', test_info, name='test_info'),
# 开始考试
path('test_start/<id>', test_start, name='test_start'),
# 考试结果
path('result/<uid>/<gid>', result, name='result'),
]
<file_sep>/apps/account/views.py
import datetime
import json
import random
import re
import requests
from django.contrib.auth import authenticate, login, logout
from django.contrib.auth.backends import ModelBackend
from django.contrib.auth.hashers import make_password
from django.db.models import Q
from django.http import HttpResponse, HttpResponseRedirect
from django.shortcuts import render, redirect
from django.urls import reverse
from django.views.generic.base import View
from Exam.settings import APIKEY
from apps.account.models import UserProfile, EmailVerifyRecord, VerifyCode
from utils import weibo
from utils.email_send import send_register_eamil
from utils.yunpian import YunPian
from .forms import RegisterForm, LoginForm, ForgetPwdForm, ModifyPwdForm
# 激活用户功能视图
class ActiveUserView(View):
def get(self, request, active_code):
# 查询邮箱验证记录是否存在
all_record = EmailVerifyRecord.objects.filter(code=active_code)
if all_record:
for record in all_record:
# 获取到对应的邮箱
email = record.email
# 查找到邮箱对应的user
user = UserProfile.objects.get(email=email)
user.is_active = True
user.save()
# 激活成功跳转到登录页面
return render(request, "login.html", )
# 验证码不对的时候跳转到激活失败页面
else:
return render(request, 'active_fail.html')
else:
return render(request, "register.html", {"msg": "您的激活链接无效"})
# 邮箱注册视图
class RegisterView(View):
def get(self, request):
register_form = RegisterForm()
return render(request, 'register.html', {'register_form': register_form})
def post(self, request):
register_form = RegisterForm(request.POST)
if register_form.is_valid():
nick_name = request.POST.get('nick_name', None)
user_name = request.POST.get('email', None)
pass_word = request.POST.get('password', None)
# 实例化一个user_profile对象
user_profile = UserProfile()
user_profile.nick_name = nick_name
user_profile.username = user_name
user_profile.email = user_name
user_profile.is_active = False
# 对保存到数据库的密码加密
user_profile.password = <PASSWORD>(pass_<PASSWORD>)
user_profile.save()
send_register_eamil(user_name, 'register')
return render(request, 'send_success.html')
else:
return render(request, 'register.html', {'register_form': register_form})
# 手机号注册视图
class ForCodeView(View):
def get(self, request):
return render(request, 'register.html')
def post(self, request):
mobile = request.POST.get('mobile', None)
password = request.POST.get('password', None)
if mobile:
# 验证是否为有效手机号
mobile_pat = re.compile('^(13\d|14[5|7]|15\d|166|17[3|6|7]|18\d)\d{8}$')
res = re.search(mobile_pat, mobile)
if res:
if password:
# 生成手机验证码
c = random.randint(100000, 999999)
code = VerifyCode.objects.create(code=str(c), mobile=mobile)
code.save()
code = VerifyCode.objects.filter(code=str(c)).first()
yunpian = YunPian(APIKEY)
sms_status = yunpian.send_sms(code=code, mobile=mobile)
reg = UserProfile.objects.create(username=mobile, mobile=mobile, password=(<PASSWORD>(password)))
reg.save()
msg = '发送成功,请查收!'
return HttpResponse(msg)
else:
msg = '请输入账户密码!'
return HttpResponse(msg)
else:
msg = '请输入有效手机号码!'
return HttpResponse(msg)
else:
msg = '手机号不能为空!'
return HttpResponse(msg)
# 实现多用户类型登录
class CustomBackend(ModelBackend):
def authenticate(self, request, username=None, password=<PASSWORD>, **kwargs):
try:
# Q查询集获取数据,实现手机号/邮箱/username都可以登录
user = UserProfile.objects.get(Q(username=username) | Q(email=username) | Q(mobile=username))
# 符合条件,加密密码,不可以明文存入
if user.check_password(password):
return user
except Exception as e:
return None
# 用户登录视图
class LoginView(View):
def get(self, request):
return render(request, 'login.html')
def post(self, request):
login_form = LoginForm(request.POST)
if login_form.is_valid():
user_name = request.POST.get('username', None)
pass_word = request.POST.get('password', None)
user = authenticate(username=user_name, password=<PASSWORD>)
if user is not None:
if user.is_active:
login(request, user)
return HttpResponseRedirect(reverse('index'))
else:
return render(request, 'login.html', {'msg': '用户名或密码错误', 'login_form': login_form})
else:
return render(request, 'login.html', {'msg': '用户名或密码错误', 'login_form': login_form})
else:
return render(request, 'login.html', {'login_form': login_form})
# 注销功能视图
class LogoutView(View):
def get(self, request):
logout(request)
return HttpResponseRedirect(reverse('index'))
# 找回密码视图
class ForgetPwdView(View):
def get(self, request):
forget_form = ForgetPwdForm()
return render(request, 'forgetpwd.html', {'forget_form': forget_form})
def post(self, request):
forget_form = ForgetPwdForm(request.POST)
if forget_form.is_valid():
email = request.POST.get('email', None)
# 发送邮箱
send_register_eamil(email, 'forget')
return render(request, 'send_success.html')
else:
return render(request, 'forgetpwd.html', {'forget_form': forget_form})
# 邮箱修改密码视图
class ModifyPwdView(View):
def post(self, request):
modify_form = ModifyPwdForm(request.POST)
if modify_form.is_valid():
pwd1 = request.POST.get("password1", "")
pwd2 = request.POST.get("password2", "")
email = request.POST.get("email", "")
if pwd1 != pwd2:
return render(request, "password_reset.html", {"email": email, "msg": "密码不一致!"})
user = UserProfile.objects.get(email=email)
user.password = <PASSWORD>(<PASSWORD>)
user.save()
return render(request, "login.html")
else:
email = request.POST.get("email", "")
return render(request, "password_reset.html", {"email": email, "modify_form": modify_form})
# 重置密码视图
class ResetView(View):
def get(self, request, active_code):
all_records = EmailVerifyRecord.objects.filter(code=active_code)
if all_records:
for record in all_records:
email = record.email
return render(request, "password_reset.html", {"email": email})
else:
return render(request, "active_fail.html")
return render(request, "login.html")
# 跳转微博登录请求视图
def weibo_login(request):
url = 'https://api.weibo.com/oauth2/' \
'authorize?client_id=' + weibo.client_id + '&response_type=code&redirect_uri=' + weibo.redirect_uri
return redirect(url)
# 微博登录后回调函数视图
class Bindemail(View):
def get(self, request):
code = request.GET.get('code')
token = requests.post('https://api.weibo.com/oauth2/access_token?client_id=' + weibo.client_id + '&client_s'
'ecret=' + weibo.client_secret + '&grant_type=authorization_'
'code&redirect_uri=' + weibo.redirect_uri + '&code=' + code)
text = json.loads(token.text)
if token.status_code != 200:
return redirect('/login/')
access_token = text['access_token']
uid = text['uid']
url = 'https://api.weibo.com/2/users/show.json?access_token=' + access_token + '&uid=' + uid
info2 = requests.get(url)
info = info2.text
info1 = json.loads(info)
uid = info1['id']
print(uid)
name = info1['name']
user = UserProfile.objects.filter(username=name).first()
if user:
login(request, user, backend='django.contrib.auth.backends.ModelBackend')
return redirect('/')
a = UserProfile.objects.create(username=str(name), last_login=datetime.datetime.now(), is_active=True,
password=<PASSWORD>))
login(request, user, backend='django.contrib.auth.backends.ModelBackend')
a.save()
return redirect('/')
<file_sep>/apps/utils/weibo.py
# 引导用户授权地址
authorize_url = 'https://api.weibo.com/oauth2/authorize'
# 应用 App Key:
client_id = '2798589275'
# 应用 App Secret
client_secret = '9a4eb7e02c1fc3e50f32c7e1a10f81e1'
# App Key App Secret可在应用的详情信息中找到
# 回调地址,线上地址
redirect_uri = 'http://127.0.0.1:8000/bindemail'
# 获取用户access_token地址
access_token_url = 'https://api.weibo.com/oauth2/access_token'
# 获取用户信息的 url
info_url = 'https://api.weibo.com/2/users/show.json'
<file_sep>/apps/competition/migrations/0001_initial.py
# Generated by Django 2.2.5 on 2020-08-05 20:02
import datetime
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.CreateModel(
name='BankXlsx',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('bank_name', models.CharField(max_length=20, verbose_name='题库名称')),
('bank_type', models.CharField(max_length=10, verbose_name='题库所属分类')),
('bank_xlsx', models.CharField(max_length=50, verbose_name='上传文件名称')),
('bank_nums', models.IntegerField(verbose_name='题库总数')),
('bank_chio', models.IntegerField(verbose_name='单选题数')),
('bank_chios', models.IntegerField(verbose_name='多选题数')),
('bank_judge', models.IntegerField(verbose_name='判断题数')),
('bank_gap', models.IntegerField(verbose_name='填空题数')),
('bank_person', models.IntegerField(verbose_name='参与人数')),
('bank_bs', models.IntegerField(verbose_name='已出考试')),
],
options={
'verbose_name': '存储题库xlsx',
'verbose_name_plural': '存储题库xlsx',
},
),
migrations.CreateModel(
name='Classify',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('class_name', models.CharField(max_length=10, verbose_name='类型名')),
('class_head', models.ImageField(upload_to='web/static/images', verbose_name='类型头像')),
('class_desc', models.TextField(verbose_name='类型描述')),
],
options={
'verbose_name': '考试分类',
'verbose_name_plural': '考试分类',
},
),
migrations.CreateModel(
name='Game',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('game_name', models.CharField(max_length=50, verbose_name='考试名称')),
('game_nums', models.IntegerField(verbose_name='出题数量')),
('game_score', models.IntegerField(verbose_name='总分数')),
('create_time', models.DateTimeField(default=datetime.datetime.now, verbose_name='开始时间')),
('end_time', models.DateTimeField(verbose_name='结束时间')),
('time_bar', models.IntegerField(verbose_name='答题时间限制')),
('game_rule', models.TextField(verbose_name='考试规则')),
('bank_game', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='competition.BankXlsx', verbose_name='关联题库表')),
('class_game', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='competition.Classify', verbose_name='关联分类表')),
],
options={
'verbose_name': '考试配置',
'verbose_name_plural': '考试配置',
},
),
migrations.CreateModel(
name='Ques_judge',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('ques_type', models.CharField(default='判断题', max_length=5, verbose_name='题类型')),
('question', models.TextField(verbose_name='判断题目')),
('answer', models.TextField(verbose_name='答案')),
('score', models.IntegerField(verbose_name='分值')),
('judge_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='competition.BankXlsx', verbose_name='关联题库表')),
],
options={
'verbose_name': '判断题',
'verbose_name_plural': '判断题',
},
),
migrations.CreateModel(
name='Ques_gap',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('ques_type', models.CharField(default='填空题', max_length=5, verbose_name='题类型')),
('question', models.TextField(verbose_name='填空题目')),
('answer', models.TextField(verbose_name='答案')),
('score', models.IntegerField(verbose_name='分值')),
('gap_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='competition.BankXlsx', verbose_name='关联题库表')),
],
options={
'verbose_name': '填空题',
'verbose_name_plural': '填空题',
},
),
migrations.CreateModel(
name='Ques_choices',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('ques_type', models.CharField(default='多选题', max_length=5, verbose_name='题类型')),
('question', models.TextField(verbose_name='多选题目')),
('answer', models.TextField(verbose_name='答案')),
('choiceA', models.TextField(verbose_name='选项A')),
('choiceB', models.TextField(verbose_name='选项B')),
('choiceC', models.TextField(verbose_name='选项C')),
('choiceD', models.TextField(verbose_name='选项D')),
('score', models.IntegerField(verbose_name='分值')),
('chois_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='competition.BankXlsx', verbose_name='关联题库表')),
],
options={
'verbose_name': '多选题',
'verbose_name_plural': '多选题',
},
),
migrations.CreateModel(
name='Ques_choice',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('ques_type', models.CharField(default='单选题', max_length=5, verbose_name='题类型')),
('question', models.TextField(verbose_name='单选题目')),
('answer', models.TextField(verbose_name='答案')),
('choiceA', models.TextField(verbose_name='选项A')),
('choiceB', models.TextField(verbose_name='选项B')),
('choiceC', models.TextField(verbose_name='选项C')),
('choiceD', models.TextField(verbose_name='选项D')),
('score', models.IntegerField(verbose_name='分值')),
('choi_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='competition.BankXlsx', verbose_name='关联题库表')),
],
options={
'verbose_name': '单选题',
'verbose_name_plural': '单选题',
},
),
migrations.CreateModel(
name='GameInfo',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('total', models.IntegerField(verbose_name='得分')),
('times', models.CharField(max_length=20, verbose_name='用时')),
('yes', models.IntegerField(verbose_name='答对数量')),
('no', models.IntegerField(verbose_name='答错数量')),
('ginfo_game', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='competition.Game', verbose_name='关联考试配置表')),
('ginfo_user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='关联用户表')),
],
options={
'verbose_name': '考试记录',
'verbose_name_plural': '考试记录',
},
),
]
<file_sep>/apps/competition/views.py
import json
import os
import random
import xlrd
from django.http import StreamingHttpResponse, Http404
from django.shortcuts import render, redirect
from Exam.settings import BACKUP_ROOT
from .models import *
# 首页
def index(request):
class_datas = Classify.objects.all()
return render(request, 'web/index.html', {'class_datas': class_datas})
# 考试分类详情
def class_detail(request, str):
if request.user.is_authenticated:
type = Classify.objects.get(class_name=str)
game_datas = Game.objects.filter(class_game_id=type.id)
return render(request, 'competition/games.html', {'game_datas': game_datas})
else:
return render(request, 'login.html')
# 录入、配置题库首页
def set_index(request):
if request.user.is_authenticated:
return render(request, 'setgames/index.html')
else:
return render(request, 'login.html')
# 录制题库
def set_bank(request):
back_class = Classify.objects.all()
if request.user.is_authenticated:
if request.method == 'POST':
bank_name = request.POST.get('bank_name', '')
bank_type = request.POST.get('bank_type')
bank_template = request.FILES.get('template', None)
if bank_name and bank_type and bank_template:
if not bank_template:
return render(request, 'err.html')
if bank_template.name.split('.')[-1] not in ['xls', 'xlsx']:
return render(request, 'err.html')
bank = BankXlsx.objects.filter(bank_name=bank_name)
xlsx = BankXlsx.objects.filter(bank_xlsx=bank_template)
if not bank and not xlsx:
# 上传题库到backup文件夹
bank_repo = open(os.path.join(BACKUP_ROOT, bank_template.name), 'wb+')
for chunk in bank_template.chunks():
bank_repo.write(chunk)
bank_repo.close()
# 取出xlsx格式 题库里面的题
data = xlrd.open_workbook('backup/{}'.format(bank_template))
table = data.sheets()[0]
num1 = 0
num2 = 0
num3 = 0
num4 = 0
for i in range(1, table.nrows):
ti_type = table.row_values(i)[0]
if ti_type == '单选题':
num1 += 1
elif ti_type == '多选题':
num2 += 1
elif ti_type == '判断题':
num3 += 1
elif ti_type == '填空题':
num4 += 1
else:
pass
# 添加到题库录入表
bank_data = BankXlsx(bank_name=bank_name, bank_type=bank_type, bank_xlsx=bank_template,
bank_nums=table.nrows - 1, bank_chio=num1, bank_chios=num2, bank_judge=num3,
bank_gap=num4, bank_person=0, bank_bs=0)
bank_data.save()
# 添加到各个类型的题表
bank1 = BankXlsx.objects.get(bank_name=bank_name)
for i in range(1, table.nrows):
ti_type = table.row_values(i)[0]
if ti_type == '单选题':
question = table.row_values(i)[1]
answer = table.row_values(i)[2]
A = table.row_values(i)[3]
B = table.row_values(i)[4]
C = table.row_values(i)[5]
D = table.row_values(i)[6]
if question and answer and A and B and C and D:
cun1 = Ques_choice(question=question, answer=answer, choiceA=A, choiceB=B, choiceC=C,
choiceD=D, score=5, choi_id_id=bank1.id)
cun1.save()
else:
pass
elif ti_type == '多选题':
question = table.row_values(i)[1]
answer = table.row_values(i)[2]
A = table.row_values(i)[3]
B = table.row_values(i)[4]
C = table.row_values(i)[5]
D = table.row_values(i)[6]
if question and answer and A and B and C and D:
cun2 = Ques_choices(question=question, answer=answer, choiceA=A, choiceB=B, choiceC=C,
choiceD=D, score=5, chois_id_id=bank1.id)
cun2.save()
else:
pass
elif ti_type == '判断题':
question = table.row_values(i)[1]
answer = table.row_values(i)[2]
if question and answer:
cun3 = Ques_judge(question=question, answer=answer, score=5, judge_id_id=bank1.id)
cun3.save()
else:
pass
elif ti_type == '填空题':
question = table.row_values(i)[1]
answer = table.row_values(i)[2]
if question and answer:
cun4 = Ques_gap(question=question, answer=answer, score=5, gap_id_id=bank1.id)
cun4.save()
else:
pass
else:
pass
else:
return render(request, 'setgames/bank.html', {'class_datas': back_class, 'err': '题库名/题库文件已存在'})
else:
return render(request, 'setgames/bank.html', {'class_datas': back_class, 'err': '数据不完整'})
return render(request, 'setgames/bank.html', {'class_datas': back_class})
else:
return render(request, 'login.html')
# 题库模板下载
def template_download(request):
file_name = 'web/static/template/template.xlsx'
try:
# StreamingHttpResponse 下载大文件
response = StreamingHttpResponse(open(file_name, 'rb'))
# 防止输出文件乱码
response['content_type'] = "application/octet-stream" # 指示传输内容的类型
response['Content-Disposition'] = 'attachment; filename=' + os.path.basename(file_name) # 以附件的形式下载保存
return response
except Exception:
raise Http404
# 配置考试
def set_test(request):
con = ''
type = request.GET.get('type', '')
bank = request.GET.get('bank')
class_datas = Classify.objects.all()
bank_datas = BankXlsx.objects.all()
if request.user.is_authenticated:
if type:
bank_datas = BankXlsx.objects.filter(bank_type=type)
if bank:
bank_info = BankXlsx.objects.get(id=bank)
else:
bank_info = []
if request.method == 'POST':
name = request.POST.get('name')
num = request.POST.get('num')
score = request.POST.get('score')
starttime = request.POST.get('starttime')
endtime = request.POST.get('endtime')
times = request.POST.get('times')
ruleText = request.POST.get('ruleText', '')
name_exists = Game.objects.filter(game_name=name)
if type and bank:
if name and num and score and starttime and endtime and times:
if not name_exists:
if int(num) <= bank_info.bank_nums:
g = Game(game_name=name, game_nums=num, game_score=score, create_time=starttime, end_time=endtime,
time_bar=times, game_rule=ruleText, class_game_id=Classify.objects.get(class_name=type).id,
bank_game_id=bank_info.id)
g.save()
bank_info.bank_bs += 1
bank_info.save()
return redirect('/detail/{}'.format(type))
else:
con = '数量超出所属题库的题数!'
else:
con = '该考试名已存在!'
else:
con = '配置信息输入有误!'
else:
con = '请选择题库!'
return render(request, 'setgames/game.html',
{'class_datas': class_datas, 'bank_datas': bank_datas, 'type_date': type, 'bank': bank,
'bank_info': bank_info, 'con': con})
else:
return render(request, 'login.html')
# 考试信息
def test_info(request, id):
if request.user.is_authenticated:
game_info = Game.objects.get(id=id)
exists = GameInfo.objects.filter(ginfo_user_id=request.user.id,ginfo_game_id=game_info.id)
return render(request, 'competition/index.html', {'game_info': game_info,'exists':exists})
else:
return render(request, 'login.html')
starttime1 = []
suiji_list = []
# 开始考试
def test_start(request, id):
import datetime
starttime2 = datetime.datetime.now()
starttime1.append(starttime2)
num = 0
data_list = []
test_data = Game.objects.get(id=id)
times = test_data.time_bar - 1
bank_data = test_data.bank_game
choi_data = Ques_choice.objects.filter(choi_id=bank_data.id).all()
chois_data = Ques_choices.objects.filter(chois_id=bank_data.id)
judge_data = Ques_judge.objects.filter(judge_id=bank_data.id)
gap_data = Ques_gap.objects.filter(gap_id=bank_data.id)
for data1 in choi_data:
num += 1
data_list.append(data1)
for data2 in chois_data:
num += 1
data_list.append(data2)
for data3 in judge_data:
num += 1
data_list.append(data3)
for data4 in gap_data:
num += 1
data_list.append(data4)
data_list = random.sample(data_list, test_data.game_nums)
suiji_list.append(data_list)
if request.user.is_authenticated:
if request.method == 'POST':
my_score = 0
endtime = datetime.datetime.now()
my_time = endtime - starttime1[0]
starttime1.clear()
yes = 0
for i, data in zip(range(te), suiji_list[0]):
j = i + 1
name = request.POST.getlist('{}'.format(j),[])
if not name:
name = ['空']
print(name)
if data.ques_type == '多选题':
if name == list(data.answer):
yes += 1
my_score += data.score
else:
if name[0] == data.answer:
yes += 1
my_score += data.score
print(my_score)
suiji_list.clear()
# 做记录
user = UserProfile.objects.get(id=request.user.id)
no = test_data.game_nums - yes
jilu = GameInfo(total=my_score, times=my_time, yes=yes, no=int(no), ginfo_game_id=test_data.id,
ginfo_user_id=user.id)
jilu.save()
# 参与考试人数
person_nums = BankXlsx.objects.get(id=int(test_data.bank_game_id))
person_nums.bank_person += 1
person_nums.save()
return redirect('set:result', user.id, test_data.id)
return render(request, 'competition/game.html', {
'test_data': test_data, 'bank_data': suiji_list[0],
'times': json.dumps(times), 'leng': json.dumps(len(suiji_list[0]))
})
else:
return render(request, 'login.html')
# 考试结果
def result(request, uid, gid):
count = 0
user = UserProfile.objects.get(id=uid)
userinfo = GameInfo.objects.filter(ginfo_user_id=uid, ginfo_game_id=gid)[0]
rank = GameInfo.objects.order_by('-total')
rank = GameInfo.objects.filter(ginfo_game_id=gid).order_by('-total')
for i in rank:
count += 1
if request.user.is_authenticated:
if i.id == userinfo.id:
print(count)
return render(request, 'competition/result.html', {'user': user, 'userinfo': userinfo, 'count': count})
else:
return render(request, 'login.html')
# 成绩排行
def rank(request):
game = request.GET.get('test')
if request.user.is_authenticated:
if not game:
order = GameInfo.objects.order_by('-total')
else:
game_deatil = Game.objects.get(game_name=game)
order = GameInfo.objects.filter(ginfo_game_id=game_deatil.id).order_by('-total')
good = GameInfo.objects.filter(ginfo_user_id=request.user.id).order_by('-total')
return render(request, 'competition/rank.html', {'game': game, 'order': order, 'good': good})
else:
return render(request, 'login.html')
<file_sep>/apps/competition/adminx.py
import xadmin
from .models import *
class ClassifyAdmin(object):
list_display = ['class_name', 'class_head', 'class_desc']
search_fields = ['class_name']
list_filter = ['class_name']
class BankXlsxAdmin(object):
list_display = ['bank_name', 'bank_type', 'bank_xlsx', 'bank_nums', 'bank_chio', 'bank_chios', 'bank_judge',
'bank_gap', 'bank_person', 'bank_bs']
search_fields = ['bank_name', 'bank_type', 'bank_xlsx', 'bank_nums', 'bank_chio', 'bank_chios', 'bank_judge',
'bank_gap', 'bank_person', 'bank_bs']
list_filter = ['bank_name', 'bank_type', 'bank_xlsx', 'bank_nums', 'bank_chio', 'bank_chios', 'bank_judge',
'bank_gap', 'bank_person', 'bank_bs']
class Ques_choiceAdmin(object):
list_display = ['question', 'answer', 'choiceA', 'choiceB', 'choiceC', 'choiceD', 'score', 'choi_id']
search_fields = ['question']
list_filter = ['question', 'score']
class Ques_choicesAdmin(object):
list_display = ['question', 'answer', 'choiceA', 'choiceB', 'choiceC', 'choiceD', 'score', 'chois_id']
search_fields = ['question']
list_filter = ['question', 'score']
class Ques_judgeAdmin(object):
list_display = ['question', 'answer', 'score', 'judge_id']
search_fields = ['question']
list_filter = ['question', 'score']
class Ques_gapAdmin(object):
list_display = ['question', 'answer', 'score', 'gap_id']
search_fields = ['question']
list_filter = ['question', 'score']
class GameAdmin(object):
list_display = ['game_name', 'game_nums', 'game_score', 'create_time', 'end_time', 'time_bar', 'game_rule',
'class_game', 'bank_game']
search_fields = ['game_name']
list_filter = ['game_name', 'game_nums', 'game_score', 'time_bar', 'game_rule']
class GameInfoAdmin(object):
list_display = ['total', 'times', 'ginfo_game', 'ginfo_user']
search_fields = ['total']
list_filter = ['total', 'times']
xadmin.site.register(Classify, ClassifyAdmin)
xadmin.site.register(BankXlsx, BankXlsxAdmin)
xadmin.site.register(Ques_choice, Ques_choiceAdmin)
xadmin.site.register(Ques_choices, Ques_choicesAdmin)
xadmin.site.register(Ques_judge, Ques_judgeAdmin)
xadmin.site.register(Ques_gap, Ques_gapAdmin)
xadmin.site.register(Game, GameAdmin)
xadmin.site.register(GameInfo, GameInfoAdmin)
<file_sep>/apps/competition/__init__.py
default_app_config = 'apps.competition.apps.CompetitionConfig'<file_sep>/Exam/settings.py
"""
Django settings for Exam project.
Generated by 'django-admin startproject' using Django 2.2.5.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.2/ref/settings/
"""
import os
import sys
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.insert(0, BASE_DIR)
sys.path.insert(0, os.path.join(BASE_DIR, 'apps'))
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/2.2/howto/deployment/checklist/
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = '^<KEY>'
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
ALLOWED_HOSTS = []
# 重载AUTH_USER_MODEL
AUTH_USER_MODEL = 'account.UserProfile'
# 云片网APIKEY
APIKEY = "<KEY>"
# Application definition
AUTHENTICATION_BACKENDS = (
'account.views.CustomBackend',
'social_core.backends.weibo.WeiboOAuth2',
'django.contrib.auth.backends.ModelBackend',
)
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'apps.account',
'apps.competition',
'xadmin',
'reversion',
'crispy_forms',
'social_django',
'captcha',
]
MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
]
ROOT_URLCONF = 'Exam.urls'
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [os.path.join(BASE_DIR, 'templates'), os.path.join(BASE_DIR, 'web/templates')]
,
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
# 第三方登陆
'social_django.context_processors.backends',
'social_django.context_processors.login_redirect',
],
},
},
]
WSGI_APPLICATION = 'Exam.wsgi.application'
# Database
# https://docs.djangoproject.com/en/2.2/ref/settings/#databases
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'exam',
'USER': 'root',
'PASSWORD': '<PASSWORD>',
'HOST': '192.168.127.12',
'PORT': '3306',
}
}
# Password validation
# https://docs.djangoproject.com/en/2.2/ref/settings/#auth-password-validators
AUTH_PASSWORD_VALIDATORS = [
{
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
},
]
# Internationalization
# https://docs.djangoproject.com/en/2.2/topics/i18n/
LANGUAGE_CODE = 'zh-hans'
TIME_ZONE = 'Asia/Shanghai'
USE_I18N = True
USE_L10N = True
USE_TZ = False
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/2.2/howto/static-files/
# 静态文件
STATIC_URL = '/static/'
STATICFILES_DIRS = (
os.path.join(BASE_DIR, "web/static"),
os.path.join(BASE_DIR, "static"),
)
STATIC_ROOT = os.path.join(BASE_DIR,'static1')
# # 默认图片
# MEDIA_URL = '/heads/'
# MEDIA_ROOT = os.path.join(BASE_DIR, 'web/heads')
# 上传文件
BACKUP_URL = '/backup/'
BACKUP_ROOT = os.path.join(BASE_DIR, 'backup')
EMAIL_HOST = "smtp.qq.com" # SMTP服务器主机
EMAIL_PORT = 25 # 端口
EMAIL_HOST_USER = "<EMAIL>" # 邮箱地址
EMAIL_HOST_PASSWORD = "<PASSWORD>" # 密码
EMAIL_USE_TLS = True
EMAIL_FROM = "<EMAIL>" # 邮箱地址
<file_sep>/apps/account/adminx.py
import xadmin
from xadmin import views
from .models import *
class BaseSettings(object):
# xadmin基础配置
enable_themes = True #开启主题功能
use_bootswatch = True
class GlobalSettings(object):
# 设置网站标题和页脚、收起菜单栏
site_title = '考试系统后台管理页面'
site_footer = 'EXAM - Powered By A-team-Group'
menu_style = 'accordion'
class EmailVerifyRecordAdmin(object):
list_display = ['code', 'email', 'send_type', 'send_time']
search_fields = ['code', 'email', 'send_type']
list_filter = ['code', 'email', 'send_type', 'send_time']
xadmin.site.register(views.BaseAdminView,BaseSettings)
xadmin.site.register(views.CommAdminView,GlobalSettings)
xadmin.site.register(EmailVerifyRecord,EmailVerifyRecordAdmin)
<file_sep>/requirements.txt
certifi==2020.6.20
cffi==1.14.1
chardet==3.0.4
cryptography==3.0
defusedxml==0.6.0
diff-match-patch==20200713
Django==2.2.5
django-crispy-forms==1.9.2
django-filter==2.3.0
django-formtools==2.2
django-import-export==2.3.0
django-ranged-response==0.2.0
django-reversion==3.0.7
django-simple-captcha==0.5.12
et-xmlfile==1.0.1
future==0.18.2
httplib2==0.9.2
idna==2.10
importlib-metadata==1.7.0
jdcal==1.4.1
Markdown==3.2.2
MarkupPy==1.14
mysqlclient==2.0.1
oauthlib==3.1.0
odfpy==1.4.1
openpyxl==3.0.4
Pillow==7.2.0
pycparser==2.20
PyJWT==1.7.1
PyMySQL==0.10.0
python3-openid==3.2.0
pytz==2020.1
PyYAML==5.3.1
requests==2.24.0
requests-oauthlib==1.3.0
six==1.15.0
social-auth-app-django==4.0.0
social-auth-core==3.3.3
sqlparse==0.3.1
tablib==2.0.0
urllib3==1.25.10
xadmin==2.0.1
xlrd==1.2.0
xlwt==1.3.0
zipp==3.1.0
<file_sep>/apps/competition/apps.py
from django.apps import AppConfig
class CompetitionConfig(AppConfig):
name = 'apps.competition'
verbose_name = '考试系统'
<file_sep>/apps/competition/models.py
from datetime import datetime
from django.db import models
from apps.account.models import UserProfile
# 考试分类
class Classify(models.Model):
class_name = models.CharField(u'类型名', max_length=10)
class_head = models.ImageField(u'类型头像', upload_to='web/static/images')
class_desc = models.TextField(u'类型描述')
# meta信息,即后台栏目名
class Meta:
verbose_name = "考试分类"
verbose_name_plural = verbose_name
def __repr__(self):
return self.class_name
# 存储题库xlsx表
class BankXlsx(models.Model):
bank_name = models.CharField(u'题库名称', max_length=20)
bank_type = models.CharField(u'题库所属分类', max_length=10)
bank_xlsx = models.CharField(u'上传文件名称', max_length=50)
bank_nums = models.IntegerField(u'题库总数')
bank_chio = models.IntegerField(u'单选题数')
bank_chios = models.IntegerField(u'多选题数')
bank_judge = models.IntegerField(u'判断题数')
bank_gap = models.IntegerField(u'填空题数')
bank_person = models.IntegerField(u'参与人数')
bank_bs = models.IntegerField(u'已出考试')
class Meta:
verbose_name = "存储题库xlsx"
verbose_name_plural = verbose_name
def __repr__(self):
return self.bank_name
# 单选题表
class Ques_choice(models.Model):
ques_type = models.CharField(u'题类型', default='单选题', max_length=5)
question = models.TextField(u'单选题目')
answer = models.TextField(u'答案')
choiceA = models.TextField(u'选项A')
choiceB = models.TextField(u'选项B')
choiceC = models.TextField(u'选项C')
choiceD = models.TextField(u'选项D')
score = models.IntegerField(u'分值')
choi_id = models.ForeignKey(BankXlsx, on_delete=models.CASCADE, verbose_name='关联题库表')
class Meta:
verbose_name = "单选题"
verbose_name_plural = verbose_name
def __repr__(self):
return self.question
# 多选题表
class Ques_choices(models.Model):
ques_type = models.CharField(u'题类型', default='多选题', max_length=5)
question = models.TextField(u'多选题目')
answer = models.TextField(u'答案')
choiceA = models.TextField(u'选项A')
choiceB = models.TextField(u'选项B')
choiceC = models.TextField(u'选项C')
choiceD = models.TextField(u'选项D')
score = models.IntegerField(u'分值')
chois_id = models.ForeignKey(BankXlsx, on_delete=models.CASCADE, verbose_name='关联题库表')
class Meta:
verbose_name = "多选题"
verbose_name_plural = verbose_name
def __repr__(self):
return self.question
# 判断题
class Ques_judge(models.Model):
ques_type = models.CharField(u'题类型', default='判断题', max_length=5)
question = models.TextField(u'判断题目')
answer = models.TextField(u'答案')
score = models.IntegerField(u'分值')
judge_id = models.ForeignKey(BankXlsx, on_delete=models.CASCADE, verbose_name='关联题库表')
class Meta:
verbose_name = "判断题"
verbose_name_plural = verbose_name
def __repr__(self):
return self.question
# 填空题
class Ques_gap(models.Model):
ques_type = models.CharField(u'题类型', default='填空题', max_length=5)
question = models.TextField(u'填空题目')
answer = models.TextField(u'答案')
score = models.IntegerField(u'分值')
gap_id = models.ForeignKey(BankXlsx, on_delete=models.CASCADE, verbose_name='关联题库表')
class Meta:
verbose_name = "填空题"
verbose_name_plural = verbose_name
def __repr__(self):
return self.question
# 考试配置表
class Game(models.Model):
game_name = models.CharField(u'考试名称', max_length=50)
game_nums = models.IntegerField(u'出题数量')
game_score = models.IntegerField(u'总分数')
create_time = models.DateTimeField(u'开始时间', default=datetime.now)
end_time = models.DateTimeField(u'结束时间')
time_bar = models.IntegerField(u'答题时间限制')
game_rule = models.TextField(u'考试规则')
class_game = models.ForeignKey(Classify, on_delete=models.CASCADE, verbose_name='关联分类表')
bank_game = models.ForeignKey(BankXlsx, on_delete=models.CASCADE, verbose_name='关联题库表')
class Meta:
verbose_name = "考试配置"
verbose_name_plural = verbose_name
def __repr__(self):
return self.game_name
# 考试记录表
class GameInfo(models.Model):
total = models.IntegerField(u'得分')
times = models.CharField(u'用时', max_length=20)
yes = models.IntegerField(u'答对数量')
no = models.IntegerField(u'答错数量')
ginfo_game = models.ForeignKey(Game, on_delete=models.CASCADE, verbose_name='关联考试配置表')
ginfo_user = models.ForeignKey(UserProfile, on_delete=models.CASCADE, verbose_name='关联用户表')
class Meta:
verbose_name = "考试记录"
verbose_name_plural = verbose_name
<file_sep>/Exam/urls.py
import xadmin
from django.urls import path, include, re_path
from django.views.decorators.csrf import csrf_exempt
from account.views import RegisterView, ActiveUserView, ForCodeView, LoginView, ForgetPwdView, LogoutView, \
ResetView, ModifyPwdView, weibo_login, Bindemail
from apps.competition.views import *
urlpatterns = [
# xadmin后台路由
path('xadmin/', xadmin.site.urls),
# 验证码
path('captcha/', include('captcha.urls')),
# 首页
path('', index, name='index'),
# 邮箱注册路由
path('register/', RegisterView.as_view(), name='register'),
# 邮件激活路由
re_path('active/(?P<active_code>.*)/', ActiveUserView.as_view(), name='user_active'),
# 手机号注册路由
path('forcode/', csrf_exempt(ForCodeView.as_view()), name='forcode'),
# 第三方登录
path('social/', include('social_django.urls', namespace='social')),
# 微博第三方登录路由
path('weibo/', weibo_login, name="weibo"),
# 微博登录后回调路由
path("bindemail/", Bindemail.as_view(), name="Bindemail"),
# 用户登陆路由
path("login/", LoginView.as_view(), name="login"),
# 用户注销路由
path('logout/', LogoutView.as_view(), name="logout"),
# 用户找回密码路由
path('forget/', ForgetPwdView.as_view(), name='forget_pwd'),
# 用户重置密码路由
re_path('reset/(?P<active_code>.*)/', ResetView.as_view(), name='reset_pwd'),
# 用户修改密码路由
path('modify_pwd/', ModifyPwdView.as_view(), name='modify_pwd'),
# 首页信息
path('detail/<str>', class_detail, name='detail'),
#
path('set/', include('competition.urls', namespace='set')),
#
path('rank/', rank, name='rank'),
]
| 7bf51d064d6def748f0d1531b9818497b081de3a | [
"Python",
"Text"
] | 14 | Python | marui0608/Exam | 1c4843bc8848d2b7239f02a30614c81ccdf73725 | 24d47874cd12409e44f3c3bf962cb3753cf5ab50 | |
refs/heads/master | <repo_name>manikanta-kondeti/D3-samosa<file_sep>/parse.py
#!/bin/python
import json
from pprint import pprint
import re
#json_file='a.json'
json_file='installation.json'
cube='1'
json_data=open(json_file)
data = json.load(json_data)
pprint(data["results"][0]["createdAt"])
year=[]
day=[]
month=[]
hour=[]
minute=[]
pprint(len(data["results"]))
countItems = len(data["results"]);
for i in range(0,countItems):
dataStamp = data["results"][i]["createdAt"];
# Year
match = re.match("(.*)T",dataStamp);
string = match.group()
year.append(int(string[0]+string[1]+string[2]+string[3]));
month.append(int(string[5]+string[6]));
day.append(int(string[8]+string[9]));
# Time
match = re.match("(.*)Z",dataStamp);
string = match.group()
hour.append(int(string[11]+string[12]));
minute.append(int(string[14]+string[15]));
countInstalls = [];
for i in range(0,25):
countInstalls.append(0)
count = 0;
for i in range(0,countItems):
countInstalls[hour[i]] +=1 ;
for i in range(0,24):
print countInstalls[i]
for i in range(0,25):
count += countInstalls[i]
print count
jsondict = {}
for i in range(0,24):
jsondict[i+1] = countInstalls[i]
pprint(json.dumps(jsondict))
with open('hours.json', 'w') as outfile:
json.dump(jsondict, outfile)
json_data.close()
<file_sep>/doc/D3jd.md
Data Driven Documents:
=====================
#Select and Append:
1. Add d3js script
2. At the end of the body. Write a javascript
* d3.select("p").text("Hello World");
- If there is no paragraph p
* d3.select("body")
.append("p")
.style("red")
.text("Hi, Whats up!");
# Basic SVG shapes(scalable vector graphics):
1. var canvas = d3.select("body")
.append("svg")
.attr("width", 800)
.attr("height", 400);
2. var circle = canvas.append("circle");
.attr("cx" ,250);
.attr("cy", 250);
.attr("r",50);
.attr("fill","red")
# Visualizing data:
1. var data Array= [20, 40, 60];
Bar chart
2. var bars = canvas.selectAll("rect")
.data(dataArray);
.enter()
.append("rect")
.attr("width", function(d){
return d*10;
})
.attr("height", function(){
return 50;
})
.attr("y", function(d,i){
return i*100;
});
Scale
3. var widthScale = d3.scale.linear()
.domain([])
.range([]);
Groups and Axes
4. Group is added to canvas element to transform the svg element.
var canvas = d3.select("body")
.append("svg")
.attr("width", 500)
.attr("height", 500)
.append("g")
.attr("transform", "translate(20,20)")
Axis --- (call axis)
canvas.call(axis);
5. Enter, Update, Exit
DOM elements > data elements (enter)
DOM elements < data elements (update)
DOM elements == data elements (exit)
6. Transition : .duration(), .delay()
7. Working with arrays
d3 has pretty good methods in that library
d3.min(data)
d3.max(data)
d3.extent(data)
d3.mean(data)
d3. median(data)
d3.shuffle -- Some random order.
8 . No need of jquery, you can directly load json with d3. example given below
d3.json("./mysampledata.json", function(data){
//code..
});
9. (Paths, Arcs, PieLayouts) <file_sep>/README.md
# D3-samosa
* Watch this 13 Video Tutorials: https://www.youtube.com/watch?v=n5NcCoa9dDU&list=PL6il2r9i3BqH9PmbOf5wA5E1wOG3FT22p
* Important points: https://github.com/manikanta-kondeti/D3-samosa/blob/master/doc/D3jd.md
| 8714e3c427a3388488fbf0d80948de5426b57bd6 | [
"Markdown",
"Python"
] | 3 | Python | manikanta-kondeti/D3-samosa | 839f95792adae03da2d7c40015f5be3d27605bf5 | a5f06a36f331de579e7b06b4696702d349876924 | |
refs/heads/master | <file_sep>package com.movierec.application.controller.rest;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.movierec.application.service.MainService;
import com.movierec.model.MovieEntity;
@RestController
@RequestMapping("/api/v1")
public class MainRestController {
@Autowired
MainService mainService;
@RequestMapping("/movie")
public List<MovieEntity> selectMovieList(@RequestParam(value="param1", required=false) String param1) {
return mainService.selectMovieList(param1);
}
}
| 0f6cd374b3bf5a733fd9bc376f3ea99679aab1e5 | [
"Java"
] | 1 | Java | shd8989/movie_recommend | 9a9b3a46cfac78e7a92b6f7cfe74e464fdbaeb9f | affdabf3f4f7cb364bac141041707a64b766fb51 | |
refs/heads/master | <file_sep>INSTALL_PATH=~/bin
CC=gcc
.PHONY=install
install: realpath
mkdir -p $(INSTALL_PATH)
cp realpath ~/bin
realpath: realpath.c
$(CC) -o $@ $?
<file_sep>#!/bin/bash
this_script=$(basename "$0")
usage="$this_script (install | uninstall | list | pull_sm | help)"
RCol='\e[0m' # Text Reset
# Regular Bold Underline High Intensity
Bla='\e[0;30m'; BBla='\e[1;30m'; UBla='\e[4;30m'; IBla='\e[0;90m';
Red='\e[0;31m'; BRed='\e[1;31m'; URed='\e[4;31m'; IRed='\e[0;91m';
Gre='\e[0;32m'; BGre='\e[1;32m'; UGre='\e[4;32m'; IGre='\e[0;92m';
Yel='\e[0;33m'; BYel='\e[1;33m'; UYel='\e[4;33m'; IYel='\e[0;93m';
Blu='\e[0;34m'; BBlu='\e[1;34m'; UBlu='\e[4;34m'; IBlu='\e[0;94m';
Pur='\e[0;35m'; BPur='\e[1;35m'; UPur='\e[4;35m'; IPur='\e[0;95m';
Cya='\e[0;36m'; BCya='\e[1;36m'; UCya='\e[4;36m'; ICya='\e[0;96m';
Whi='\e[0;37m'; BWhi='\e[1;37m'; UWhi='\e[4;37m'; IWhi='\e[0;97m';
# BoldHigh Intens Background High Intensity Backgrounds
BIBla='\e[1;90m'; On_Bla='\e[40m'; On_IBla='\e[0;100m';
BIRed='\e[1;91m'; On_Red='\e[41m'; On_IRed='\e[0;101m';
BIGre='\e[1;92m'; On_Gre='\e[42m'; On_IGre='\e[0;102m';
BIYel='\e[1;93m'; On_Yel='\e[43m'; On_IYel='\e[0;103m';
BIBlu='\e[1;94m'; On_Blu='\e[44m'; On_IBlu='\e[0;104m';
BIPur='\e[1;95m'; On_Pur='\e[45m'; On_IPur='\e[0;105m';
BICya='\e[1;96m'; On_Cya='\e[46m'; On_ICya='\e[0;106m';
BIWhi='\e[1;97m'; On_Whi='\e[47m'; On_IWhi='\e[0;107m';
settle_tag="${Cya}[settle]${RCol}"
#cd_to_toplevel
# runs chdir to the toplevel of the working tree.
# from the git source: git/git-sh-setup.sh
cd_to_toplevel () {
cdup=$(git rev-parse --show-toplevel) &&
cd "$cdup" || {
echo >&2 "Cannot chdir to $cdup, the toplevel of the working tree. Are you in a the dotfile repository?"
exit 1
}
}
cd_to_toplevel
settle_path=$(pwd)
dotfile_dir_path=${settle_path}/home
if [ ! -d "${dotfile_dir_path}" ]
then
echo "settle expects you to have a directory 'home' in it's top level."
return 1
fi
settle_dotfile_dir_is_submodule () {
# intuitively, we'd check [ -d ... ], but for git submodules, there is no
# .git directory in the working tree, but instead just a .git file (which
# points to the actual .git directory in the parent's .git/modules
# directory). So, because it's a file, -f is necessary.
[ -f ${dotfile_dir_path}/.git ] && return 0
return 1
}
settle_dotfile_dir_exists () {
[ -d "${dotfile_dir_path}" ] && return 0
return 1
}
settle_parseable_ls () {
for f in *; do
echo "${f}"
done
}
settle_list_dotfiles () {
cd "${dotfile_dir_path}"
if settle_dotfile_dir_is_submodule; then
echo $(git ls-files)
return
fi
echo $(settle_parseable_ls)
}
check_deploy_path () {
# $1 is deploy_dotfile_path
# $2 is dotfile_path
if [ -e "$1" ]
then
#file exists at deploy path
if [ -h "$1" ]
then
#file is a link
if [ $(readlink "${1}") = "$2" ]
then
#link points to our dotfile
echo "linked"
else
echo "other"
fi
else
#file is a regular file or directory or socket or some other esoteric that
# is, for all intents and purposes, NOT a link to our dotfile
echo "other"
fi
else
# file is not at deploy path
echo "notexist"
fi
}
usage () {
echo "usage: ${1}"
exit 1
}
LIST_USAGE="settle list [-p|--parseable] [[-i|--installed]|[-n|--not-installed]]"
settle_list () {
parseable=0
installed=1
notinstalled=1
while [ $# -ne 0 ]
do
case "$1" in
-p | --parseable)
parseable=1
;;
-i | --installed)
installed=1
notinstalled=0
;;
-n | --not-installed)
notinstalled=1
installed=0
;;
-*)
usage "$LIST_USAGE"
;;
*)
break
;;
esac
shift
done
cd "${dotfile_dir_path}"
for dotfile in $(settle_list_dotfiles)
do
dotfile_path=$(readlink -e "${dotfile}")
deploy_dotfile_path=$HOME/${dotfile}
status=$(check_deploy_path $deploy_dotfile_path $dotfile_path)
if [ $installed -eq 1 ] && [ $status != "linked" ]
then
continue
fi
if [ $notinstalled -eq 1 ] && [ $status == "linked" ]
then
continue
fi
if [ $parseable -eq 1 ]
then
echo "${dotfile_path} ${deploy_dotfile_path}"
else
echo -e "${BWhi}${dotfile_path}${RCol}"
echo -e " target:\t ${deploy_dotfile_path}"
echo -ne " status:\t"
case $status in
"linked")
echo -e "${Gre}Installed${RCol}"
;;
"other")
echo -e "${Red}Other file in place${RCol}"
;;
"notexist")
echo -e "${Red}Path non-existant${RCol}"
;;
esac
fi
done
}
INSTALL_USAGE="settle install [--dry-run] [[-o|--overwite-all]|[-s|--skip-all]|[-b|--backup-all]]"
SETTLE_DRY_RUN=0
CONFLICT_HELP=" s skip this file
S skip this and all subsequent conflict files
b backup this file
B backup this and all subsequent conflict files
o overwrite destination file
O overwrite this and all subsequent conflict files
q quit this installation
? this help"
prompt_for_existing () {
while true; do
read -p "target '${1}' already exists. resolve by [s/S/b/B/o/O/q/?]:" ans
case $ans in
[s]* ) echo "skip"; break;;
[S]* ) echo "skip-all"; break;;
[b]* ) echo "backup"; break;;
[B]* ) echo "backup-all"; break;;
[o]* ) echo "overwrite"; break;;
[O]* ) echo "overwrite-all"; break;;
[?]* ) echo "${CONFLICT_HELP}" 1>&2;;
[q]* ) exit 1;;
esac
done
}
settle_remove_for_overwrite () {
if [ $SETTLE_DRY_RUN -ne 1 ]
then
rm -rf ${1}
fi
echo -e "${settle_tag} removed ${1}"
}
settle_backup () {
if [ $SETTLE_DRY_RUN -ne 1 ]
then
mv "${1}" "${1}_$(date --iso-8601=m)"
fi
echo -e "${settle_tag} ${1} backed up to ${1}_$(date --iso-8601=m)"
}
settle_link () {
if [ $SETTLE_DRY_RUN -ne 1 ]
then
ln -s ${1} ${2}
fi
echo -e "${settle_tag} ${1} linked to ${2}"
}
settle_install () {
overwrite=0
skip=0
backup=0
while [ $# -ne 0 ]
do
case "$1" in
-o | --overwrite-all)
overwrite=1
skip=0
backup=0
;;
-s | --skip-all)
overwrite=0
skip=1
backup=0
;;
-b | --backup-all)
overwrite=0
skip=0
backup=1
;;
--dry-run)
SETTLE_DRY_RUN=1
;;
-*)
usage "$INSTALL_USAGE"
;;
*)
break
;;
esac
shift
done
notinstalled=$(settle_list -p -n)
while IFS= read -ra arr -u 3
do
#why do we need to do this, thought read -a arr gave it to us already...
arr=( $arr )
dotfile_path=${arr[0]}
deploy_dotfile_path=${arr[1]}
if [ -e ${deploy_dotfile_path} ]
then
if [ $overwrite -eq 1 ]
then
settle_remove_for_overwrite ${deploy_dotfile_path}
elif [ $skip -eq 1 ]
then
echo "skipping '${dotfile_path}'"
continue
elif [ $backup -eq 1 ]
then
settle_backup ${deploy_dotfile_path}
elif [ $backup -eq 0 ] && [ $overwrite -eq 0 ] && [ $skip -eq 0 ]
then
#we prompt
response=$(prompt_for_existing ${deploy_dotfile_path})
case $response in
"skip")
echo "skipping '${dotfile_path}'"
continue
;;
"skip-all")
echo "skipping '${dotfile_path}'"
skip=1
continue
;;
"overwrite")
settle_remove_for_overwrite ${deploy_dotfile_path}
;;
"overwrite-all")
settle_remove_for_overwrite ${deploy_dotfile_path}
overwrite=1
;;
"backup")
settle_backup ${deploy_dotfile_path}
;;
"backup-all")
settle_backup ${deploy_dotfile_path}
backup=1
;;
esac
fi
fi
settle_link ${dotfile_path} ${deploy_dotfile_path}
done 3<<< "$notinstalled"
}
UNINSTALL_USAGE="settle uninstall [--dry-run]"
settle_uninstall ()
{
while [ $# -ne 0 ]
do
case "$1" in
--dry-run)
SETTLE_DRY_RUN=1
;;
-*)
usage "$UNINSTALL_USAGE"
;;
*)
break
;;
esac
shift
done
installed=$(settle_list -p -i)
printf %s "$installed" | while IFS= read -ra arr
do
arr=( $arr )
dotfile_path=${arr[0]}
deploy_dotfile_path=${arr[1]}
if [ -e ${deploy_dotfile_path} ]
then
settle_remove_for_overwrite ${deploy_dotfile_path}
fi
done
}
settle_list
exit
echo -e "${Yel}Make sure to git submodule update --init to get your submodules if this is your first time installing!${RCol}"
#df_pull_sm
# pull the latest commits from all submodule remotes. then, add them to staging and start writing a commit.
df_pull_sm () {
echo "$settle_tag Pulling down latest submodule commits."
git submodule foreach git pull origin master
git commit --all --message="${settle_tag} pull submodules' latest commits" --edit
}
ret=0
case "$1" in
install|instal|insta|inst|ins|in|i)
df_install
exit $ret
;;
uninstall|uninstal|uninsta|unist|unis|uni|un|u)
df_uninstall
exit $ret
;;
list|lis|li|l)
settle_list
exit $ret
;;
pull_sm|pull_s|pull_|pull|pul|pu|p)
df_pull_sm
exit $ret
;;
help|hel|he|h)
echo $usage
exit $ret
;;
*)
echo $usage
exit 1
;;
esac
<file_sep> <NAME>'s Dotfiles
=====================
This project is a combination of:
* An installation procedure for placing [configuration files](http://en.wikipedia.org/wiki/Configuration_file) and running scripts.
* My actual configuration files and scripts to set up a system the way I like it. The most prominent configs are for vim and zsh (via [oh-my-zsh](../robbyrussell/oh-my-zsh)).
This project was forked from [ryanb's version](../ryanb/dotfiles), but little has survived.
Prerequisites
------------
To run the installation procedure you need:
* ruby
* rake
And optionally, my configurations are for this software:
* vim
* zsh
* GDM
* nethack
This project have been tested with Ubuntu 12.04, but I'd imagine it'd work on
any \*nix system.
Usage Notes
-----------
When you run `rake`, the process is as follows:
1. Run a pre-installation script called `PRE_INSTALL.sh`.
2. Link the configuration files in this directory to your $HOME as dotfiles.
3. Initialize and pull down submodules to the commit specified in `.gitmodules`.
This is super useful if you want to retain the repo-ness of another project
within this one.
4. Run the post-install script called `POST_INSTALL.sh`.
The pre/post install scripts are just shell scripts. If they don't exist, that's
okay.
To link a configuration file to your $HOME, it must not be hidden here (e.g.
`some_config`, NOT `.some_config`). The '.' will be prepended automatically.
This applies to folders too. Of course, this file and the pre/post install
scripts will not be linked.
Running `rake submodule:latest` will pull the latest commits of your submodules
repos. This goes further than the default rake task, which just gets the
submodules up to the commit when you `git submodule add ...`-ed them. This may
cause compatibility issues if your set up relies on submodule features only
present in a certain commit.
Enjoy and don't hesitate to contact me, fork, or pull request.
-Tim
| 0d31896c691ce8f6e032ddf5883565f007734dfd | [
"Markdown",
"Makefile",
"Shell"
] | 3 | Makefile | t-mart/settle | 3a9b8d473025e77f5ab444a9e3a1fa89fc96a6fa | 1fd811b2ac9b8f4a9ef083298376cd3bc9680d5e | |
refs/heads/master | <repo_name>mickaelpham/blog<file_sep>/app/models/author.rb
class Author < ApplicationRecord
default_scope { order(updated_at: :desc) }
validates :display_name, :email, presence: true
end
<file_sep>/app/serializers/author_serializer.rb
class AuthorSerializer < ActiveModel::Serializer
attributes :id,
:display_name,
:email,
:biography,
:created_at,
:updated_at
end
<file_sep>/app/controllers/authors_controller.rb
class AuthorsController < ApplicationController
before_action :set_author, only: [:show, :update, :destroy]
# GET /api/authors
def index
@authors = Author.all
render json: @authors
end
# GET /api/authors/1
def show
render json: @author
end
# POST /api/authors
def create
@author = Author.new(author_params)
if @author.save
render json: @author, status: :created, location: @author
else
render json: @author,
status: :unprocessable_entity,
serializer: ActiveModel::Serializer::ErrorSerializer
end
end
# PATCH/PUT /api/authors/1
def update
if @author.update(author_params)
render json: @author
else
render json: @author,
status: :unprocessable_entity,
serializer: ActiveModel::Serializer::ErrorSerializer
end
end
# DELETE /api/authors/1
def destroy
@author.destroy
end
private
# Use callbacks to share common setup or constraints between actions.
def set_author
@author = Author.find(params[:id])
end
# Only allow a trusted parameter "white list" through.
def author_params
ActiveModelSerializers::Deserialization.jsonapi_parse(
params,
only: ['display-name', :email, :biography]
)
end
end
<file_sep>/frontend/app/routes/authors/show.js
import Ember from 'ember';
export default Ember.Route.extend({
notify: Ember.inject.service('notify'),
model(params) {
return this.store.findRecord('author', params.id);
},
deactivate() {
this.controller.get('model').rollbackAttributes();
},
actions: {
saveAuthor() {
let author = this.controller.get('model');
author.save().then(() => {
let name = author.get('displayName') ? author.get('displayName') : 'Author';
this.get('notify').success(`${name} saved`);
}).catch(() => {
this.get('notify').alert("Couldn't save author");
});
},
onCancel() {
this.transitionTo('authors.index');
},
onDelete() {
let author = this.controller.get('model');
author.deleteRecord();
author.save().then(() => {
let name = author.get('displayName') ? author.get('displayName') : 'Author';
this.get('notify').success(`${name} deleted`);
this.transitionTo('authors.index');
});
}
}
});
| 56d1af7c450628a0dede7900cdd560611f67f14a | [
"JavaScript",
"Ruby"
] | 4 | Ruby | mickaelpham/blog | b762927918e26f533468e0c2e68c434115cd5bf4 | 13c9e23fcc33e018bcc1ca1b63c4a2fb32f4c8c7 | |
refs/heads/master | <repo_name>satojkovic/fm-detector<file_sep>/README.md
# fm-detector
under construction.
<file_sep>/main.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Usage:
main.py <image_file>
main.py -h | --help
Options:
-h --help show help message
"""
import os
import numpy as np
import cv2
from collections import Counter
from math import sqrt
import sys
from docopt import docopt
rtoh = lambda rgb: '#%s' % ''.join(('%02x' % p for p in rgb))
def get_colors(img, w, h):
pixels = [(img[y, x][0], img[y, x][1], img[y, x][2])
for x in range(w) for y in range(h)]
return Counter(pixels)
def get_points(img):
points = []
h, w, ch = img.shape
for color, count in get_colors(img, w, h).items():
points.append([np.array(color), count])
return np.array(points)
def initialize(data, k):
# choose one data point as an initial cluster center
center = [data[0][0]]
for i in range(1, k):
# calculate distances
dist = np.array([np.min([np.inner(c-d[0], c-d[0]) for c in center])
for d in data])
# probability distribution
probs = dist / dist.sum()
cumprobs = np.cumsum(probs)
# select next cluster center
r = np.random.random()
for j, p in enumerate(cumprobs):
if r < p:
i = j
break
center.append(data[i][0])
return np.array(center)
def calculate_center(data_i):
val = 0.0
cnt_i = len(data_i)
for d in data_i:
val += np.array(d[0])
return (val / cnt_i)
def euclid_dist(center, data_i):
center = center.astype(np.int)
data_i = data_i.astype(np.int)
return sqrt(sum([
(center[n] - data_i[n]) ** 2 for n in range(len(center))
]))
def assign_label(center, data_i):
dist = []
for k in range(len(center)):
dist.append(euclid_dist(center[k], data_i[0]))
return np.argsort(np.ravel(dist))[0]
def kmeanspp(data, k, max_iter=300):
# calculate an initial cluster center
center = initialize(data, k)
# assign the cluster labels
labels = np.zeros(len(data)).astype(np.int)
for i, d in enumerate(data):
labels[i] = assign_label(center, d)
# kmeans clustering
iter = 0
while 1:
print iter, 'th iteration'
# calculate the cluster centers
for i in range(k):
center[i] = calculate_center(data[labels == i])
# assign new labels
new_labels = np.zeros(len(data)).astype(np.int)
for i, d in enumerate(data):
new_labels[i] = assign_label(center, d)
if np.array_equal(labels, new_labels) or iter > max_iter:
break
else:
labels = new_labels
iter += 1
return new_labels, center
def dominant_colors(filename, k=5):
img = cv2.imread(filename)
img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
points = get_points(img)
labels, center = kmeanspp(points, k)
rgbs = [map(np.int, c) for c in center]
return map(rtoh, rgbs)
def main():
args = docopt(__doc__)
img_file = args['<image_file>']
if not os.path.exists(img_file):
print 'Not found:', img_file
sys.exit(-1)
# dominant colors
print dominant_colors(img_file, k=5)
if __name__ == '__main__':
main()
| 6c0c527ae914c52c941b6c344464f25a520f80b7 | [
"Markdown",
"Python"
] | 2 | Markdown | satojkovic/fm-detector | a91055a3e11704fc37a6c8bc6b11c2fb1c7123c8 | 380d2d91c8358697de5e6279b40118a474ea4920 | |
refs/heads/master | <file_sep><div class="container catalog">
<h2 class="mt-5 d-none d-sm-block">Каталог {{ item.name }}</h2>
<h3 class="mt-5 d-block d-sm-none">Каталог {{ item.name }}</h3>
<? include('blocks/sort-panel.php'); ?>
<? include('blocks/map-pannel.php'); ?>
<div class="row pl-0 pr-3 pl-sm-3">
<div class="col-12 col-sm-4 sidebar pb-4 pb-sm-0"><? include('blocks/sidebar.php'); ?></div>
<div class="col-12 col-sm-8 p-0">
<div class="row pl-0 pl-sm-3 pt-4 pt-sm-0">
<div class="col ml-0 ">
<?
$comps=array(
array('id'=>'slider1','imgs'=>array(array('src'=>'../img/company-slider1.png','title'=>'slider1'),array('src'=>'../img/company_slider2.png','title'=>'slider2'),array('src'=>'../img/company_slider3.png','title'=>'slider3')),'title'=>'Title','description'=>'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi ornare vulputate sed imperdiet nec purus. Ullamcorper tortor nisi, sed viverra pulvinar feugiat ante. Bibendum cum erat libero aliquet ipsum porta in amet, feugiat. Mattis placerat integer donec pharetra dictum. Egestas senectus eget vitae, id viverra purus rhoncus. Quis viverra dui magna in ut.'),
array('id'=>'slider2','imgs'=>array(array('src'=>'../img/company-slider1.png','title'=>'slider1'),array('src'=>'../img/company_slider2.png','title'=>'slider2'),array('src'=>'../img/company_slider3.png','title'=>'slider3')),'title'=>'Title','description'=>'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi ornare vulputate sed imperdiet nec purus. Ullamcorper tortor nisi, sed viverra pulvinar feugiat ante. Bibendum cum erat libero aliquet ipsum porta in amet, feugiat. Mattis placerat integer donec pharetra dictum. Egestas senectus eget vitae, id viverra purus rhoncus. Quis viverra dui magna in ut.'),
array('id'=>'slider3','imgs'=>array(array('src'=>'../img/company-slider1.png','title'=>'slider1'),array('src'=>'../img/company_slider2.png','title'=>'slider2'),array('src'=>'../img/company_slider3.png','title'=>'slider3')),'title'=>'Title','description'=>'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi ornare vulputate sed imperdiet nec purus. Ullamcorper tortor nisi, sed viverra pulvinar feugiat ante. Bibendum cum erat libero aliquet ipsum porta in amet, feugiat. Mattis placerat integer donec pharetra dictum. Egestas senectus eget vitae, id viverra purus rhoncus. Quis viverra dui magna in ut.','bookmark'=>1)
);
foreach ($comps as $e) {
include('card/company_card_mini_slider.php');
}
?>
</div>
</div>
<? $array=array('href'=>'#','alt'=>'...','src'=>'../img/banner.png');?>
<div class="mb-3 pb-3 ml-3"><? include('card/banner.php')?></div>
<div class="row">
<div class="col ml-0 ml-sm-3 mt-3">
<h3 class="mb-3 d-none d-sm-block">{{ city.name }}: Лучшие {{ category.name }} в городе</h3>
<h4 class="mb-3 d-sm-none d-block">{{ city.name }}: Лучшие {{ category.name }} в городе</h4>
</div>
</div>
<div class="row">
<div class="col ml-0 ml-sm-3 mt-3">
<?
$comps=array(
array('id'=>'slider4','imgs'=>array(array('src'=>'../img/company-slider1.png','title'=>'slider1'),array('src'=>'../img/company_slider2.png','title'=>'slider2'),array('src'=>'../img/company_slider3.png','title'=>'slider3')),'title'=>'Title','description'=>'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi ornare vulputate sed imperdiet nec purus. Ullamcorper tortor nisi, sed viverra pulvinar feugiat ante. Bibendum cum erat libero aliquet ipsum porta in amet, feugiat. Mattis placerat integer donec pharetra dictum. Egestas senectus eget vitae, id viverra purus rhoncus. Quis viverra dui magna in ut.'),
);
foreach ($comps as $e) {
include('card/company_card_mini_slider.php');
}
?>
</div>
</div>
</div>
</div>
</div>
<file_sep><a class="col-auto service-small shadow text-100 mx-auto" href="<?=$array['href']?>">
<div class="row">
<div class="col" style="top:45">
<span class="mdi mdi-<?=$array['icon']?> mdi-24px brown-color"></span>
<p><?=$array['text']?></p>
</div>
</div>
</a>
<file_sep><div class="maps">
<? include('blocks/map-pannel-max.php'); ?>
</div>
<file_sep><? foreach ($array_figura as $figura){?>
<div class="row mb-4">
<div class="col-<?=isset($figura['a_text'])?'7':'12'?>"><<?=$figura['tag']?>><?=$figura['title']?></<?=$figura['tag']?>></div>
<? if(isset($figura['a_text'])){?><div class="col-5"><a href="<?=$figura['a_href']?>" class="brown-color float-right text-decoration-underline"><?=$figura['a_text']?></a></div><? } ?>
</div>
<div class="row mb-4">
<? foreach ($figura['elements'] as $e) {?>
<div class="col-12 col-sm-6 col-lg-3 mt-5 mt-lg-0 mx-auto block_figura_card">
<figure class="figure">
<div class=" position-absolute d-flex flex-column justify-content-around pl-2 h-100 mr-3 mr-xl-0 ">
<span class=" position-relative bookmark mdi mdi-bookmark-outline mdi-24px brown-color"></span>
<figcaption class="position-relative shadow"><<?=$e['tag']?>><?=$e['title']?></<?=$e['tag']?>><?=$e['text']?></figcaption>
</div>
<img src="<?=$e['src']?>" alt="<?=$e['alt']?>" class="figure-img img-fluid rounded ">
</figure>
</div>
<? } ?>
</div>
<? } ?><file_sep><section class="search mt-md-4 mt-3">
<div class="container">
<h2 class="d-none d-sm-block">Результаты поиска</h2>
<h3 class="d-block d-sm-none mt-3" >Результаты поиска</h3>
<p class="mb-4">Поиск по {{ запрос / тег }} {{ item.search }} pariatur ex ipsum sit cillum eiusmod exercitation exercitation velit deserunt excepteur veniam nostrud.</p>
<ul id="tags" class="row " style="list-style: none">
<?
$tags=array(
array('href'=>'/search.php','name'=>'tagName'),
array('href'=>'/search.php','name'=>'tagName'),
array('href'=>'/search.php','name'=>'tagName'),
array('href'=>'/search.php','name'=>'tagName'),
array('href'=>'/search.php','name'=>'tagName'),
array('href'=>'/search.php','name'=>'tagName'),
array('href'=>'/search.php','name'=>'tagName'),
array('href'=>'/search.php','name'=>'tagName'),
array('href'=>'/search.php','name'=>'tagName'),
array('href'=>'/search.php','name'=>'tagName'),
array('href'=>'/search.php','name'=>'tagName'),
array('href'=>'/search.php','name'=>'tagName'),
array('href'=>'/search.php','name'=>'tagName'),
);
foreach ($tags as $e){
include('card/tag.php');
}
?>
</ul>
<div class="mt-sm-3">
<? $search=array(
array('title'=>'Title','src'=>'/img/stocks_img1.png', 'alt'=>'...', 'tag'=>'h3','href'=>'/product.php','raitting'=>4,'description'=>'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi ornare vulputate sed imperdiet nec purus. Ullamcorper tortor nisi, sed viverra pulvinar feugiat ante. Bibendum cum erat libero aliquet ipsum porta in amet, feugiat. Mattis placerat integer donec pharetra dictum. Egestas senectus eget vitae, id viverra purus rhoncus. Quis viverra dui magna in ut.'),
array('title'=>'Title','src'=>'/img/stocks_img1.png', 'alt'=>'...', 'tag'=>'h3','href'=>'/product.php','raitting'=>4,'description'=>'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi ornare vulputate sed imperdiet nec purus. Ullamcorper tortor nisi, sed viverra pulvinar feugiat ante. Bibendum cum erat libero aliquet ipsum porta in amet, feugiat. Mattis placerat integer donec pharetra dictum. Egestas senectus eget vitae, id viverra purus rhoncus. Quis viverra dui magna in ut.'),
array('title'=>'Title','src'=>'/img/stocks_img1.png', 'alt'=>'...', 'tag'=>'h3','href'=>'/product.php','raitting'=>4,'description'=>'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi ornare vulputate sed imperdiet nec purus. Ullamcorper tortor nisi, sed viverra pulvinar feugiat ante. Bibendum cum erat libero aliquet ipsum porta in amet, feugiat. Mattis placerat integer donec pharetra dictum. Egestas senectus eget vitae, id viverra purus rhoncus. Quis viverra dui magna in ut.'),
array('title'=>'Title','src'=>'/img/stocks_img1.png', 'alt'=>'...', 'tag'=>'h3','href'=>'/product.php','raitting'=>4,'description'=>'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi ornare vulputate sed imperdiet nec purus. Ullamcorper tortor nisi, sed viverra pulvinar feugiat ante. Bibendum cum erat libero aliquet ipsum porta in amet, feugiat. Mattis placerat integer donec pharetra dictum. Egestas senectus eget vitae, id viverra purus rhoncus. Quis viverra dui magna in ut.'),
);?>
<? foreach ($search as $e){
include('card/company_row.php');
}?>
</div>
</div> <!-- container -->
</section>
<link type="text/css" rel="stylesheet" href="/css/lightslider.css" />
<script src="/js/lightslider.js"></script>
<script type="text/javascript">
$(document).ready(function() {
if($(document).width()<540) {
$("#tags").lightSlider({
item: 3,
autoWidth: true,
slideMove: 2, // slidemove will be 1 if loop is true
slideMargin: 10,
addClass: '',
mode: "slide",
useCSS: true,
cssEasing: 'ease', //'cubic-bezier(0.25, 0, 0.25, 1)',//
easing: 'linear', //'for jquery animation',////
speed: 400, //ms'
auto: false,
loop: false,
slideEndAnimation: true,
pause: 2000,
keyPress: false,
controls: false,
prevHtml: '',
nextHtml: '',
rtl: false,
adaptiveHeight: false,
vertical: false,
verticalHeight: 500,
vThumbWidth: 100,
thumbItem: 10,
pager: false,
gallery: false,
galleryMargin: 5,
thumbMargin: 5,
currentPagerPosition: 'middle',
enableTouch: true,
enableDrag: true,
freeMove: true,
swipeThreshold: 40,
responsive: [],
});
}
});
</script><file_sep><li class="events mb-3 px-0 owl-item" style="max-width: 540px;width:540px: background:none;">
<img src="<?=$array['img']?>" class="w-100 position-absolute rounded-lg">
</li><file_sep><!--../img/company-slider1.png-->
<div class="card mb-3 pb-3 company_card_mini">
<div id="<?=$e['id']?>" class="card-img-top carousel slide" data-ride="carousel">
<div class="carousel-inner">
<? foreach ($e['imgs'] as $k=>$img){?>
<div class="carousel-item <?=$k==0?'active':''?>">
<img src="<?=$img['src']?>" class="d-block w-100" alt="<?=$img['title']?>">
</div>
<? } ?>
</div>
<? if(count($e['imgs'])>1) { ?>
<a class="carousel-control-prev" href="#carouselExampleControls" role="button" data-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="carousel-control-next" href="#carouselExampleControls" role="button" data-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
<? } ?>
</div>
<div class="card-body">
<span class="mdi-24px d-inline-block mr-3 brown-color mdi mdi-bookmark<?=!$e['bookmark']?'-outline':''?>"></span> <a href="#"><h3 class="d-inline-block card-title brown-color"><?=$e['title']?></h3></a>
<p class="card-text mt-3"><?=$e['description']?></p>
</div>
</div>
<? if($e['id']&&count($e['imgs'])>1){?>
<script>
$(document).ready(function() {
var car<?=$e['id']?> = $('#<?=$e['id']?>').carousel({
interval: 2000
});
$('#<?=$e['id']?>').on('click','.carousel-control-prev', function () {
$('#<?=$e['id']?>').carousel('prev');
});
$('#<?=$e['id']?>').on('click','.carousel-control-next', function () {
$('#<?=$e['id']?>').carousel('next');
});
});
</script>
<? } ?><file_sep><header <? if($_SERVER['SCRIPT_NAME']=='/index.php') echo 'class="homepage"'; ?>>
<div class="topnav">
<div class="fixed-top">
<div class="container">
<div class="row align-items-center topnav">
<div class="col-auto menu d-inline-block d-md-none">
<div class="btn-group" role="group">
<a id="btnGroupDrop1" href="#" class="color-black text-decoration-none open-header-menu" data-toggle="collapse" data-target="#dropdown-menu" aria-expanded="true" aria-controls="collapseOne">
<span class="mdi mdi-menu"></span>
</a>
</div>
</div>
<a class="col col-md-3 logo d-inline-block text-center px-1 px-md-3" href="/">
GDE<span>GO</span>
</a>
<? include('blocks/login-pannel-mini.php'); ?>
<div class="col-md-4 col-sm-12">
<span class="mdi mdi-magnify search-icon"></span>
<input name="search" type="text" class="search col-sm-12">
</div>
<div class="col-md-5 col-sm-12 ">
<? include('blocks/login-pannel.php'); ?>
</div>
</div>
</div>
</div>
</div>
<div class="panel-menu">
<div class="container">
<div class="row align-items-center topbar d-none d-md-flex">
<div class="col-sm-12 col-md-3 p-0 select-city">
<span class="mdi mdi-map-marker local"></span>
Санкт-Петербург
<span class="mdi mdi-chevron-down select"></span>
</div>
<div class="col-md-3 col-sm-12 menu d-none d-sm-inline-block">
<div class="btn-group" role="group">
<a id="btnGroupDrop1" href="#" class="color-black open-header-menu text-decoration-none" data-toggle="collapse" data-target="#dropdown-menu" aria-expanded="true" aria-controls="collapseOne">
<svg class="menu-icon brown-color" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M3 6H21V8H3V6ZM3 11H17V13H3V11ZM3 16H14V18H3V16Z" fill="#847768"/>
</svg>
Меню
</a>
</div>
</div>
<div class="col-md-6 col-sm-12 contacts px-0">
<span class="email d-none pr-2 d-sm-inline-block">
<EMAIL>
<span class="mdi mdi-email-open email-icon brown-color"></span>
</span>
<span class="phone d-none d-sm-inline-block">
+7 (225) 555-0118
<span class="mdi mdi-cellphone-iphone phone-icon brown-color"></span>
</span>
</div>
</div>
</div>
</div>
<div class="bg-white">
<? include('blocks/menu.php') ?>
</div>
</header><file_sep><li class="advice shadow text-100 owl-item">
<div class="align-items-start">
<img src="<?=$array['img']?>" class="w-100">
<div class="col">
<p class="mt-3 mb-2 text-100"><?=$array['text']?></p>
<div class="row mt-1">
<div class="col-7 pr-0">
<? $raitting=4; include('blocks/raitting.php'); ?>
</div>
<div class="col-5 text-small text-60 text-right pl-0">
<?=$array['comment']?$array['comment']:'0'?> отзывов
</div>
</div>
</div>
</div>
<div class="row align-items-end no-gutters">
<div class="col-1"><span class="mdi brown-color mdi-bookmark<?=!$array['bookmark']?'-outline':''?> mdi-24px"></span> </div>
<div class="col-auto ml-auto"><a class="btn brown--default text-white" href="<?=$array['href']?>">Подробнее</a></div>
</div>
</li>
<file_sep><?
$array=array('control_panel'=>true, 'id'=>'carouselMenu', 'text-width'=>'w-50',
'elements'=>array(
array('img'=>'/slider/slide-1.jfif','href'=>'/catalog.php','alt'=>'...','title'=>'First slide label','tag'=>'h1','text'=>'Sint nulla aute sunt irure irure ut laborum aute fugiat culpa exercitation eu et dolore. Minim exercitation mollit irure voluptate proident culpa veniam consequat culpa mollit. Cillum sit ut nulla esse exercitation aliqua nisi proident fugiat consequat dolor Lorem nostrud.'),
// array('img'=>'/slider/slide-2.jfif','href'=>'/catalog.php','alt'=>'...','title'=>'Two slide label','tag'=>'h2','text'=>'Sint nulla aute sunt irure irure ut laborum aute fugiat culpa exercitation eu et dolore. Minim exercitation mollit irure voluptate proident culpa veniam consequat culpa mollit. Cillum sit ut nulla esse exercitation aliqua nisi proident fugiat consequat dolor Lorem nostrud.'),
)
);
include('blocks/slider-main.php');?>
<div class="mt-5 mt-md-0">
<?
include('blocks/search-pannel.php'); ?>
</div>
<div class="container">
<div class="row">
<?
$arrays = array(
array('icon'=>'silverware','text'=>'Еда','href'=>'/catalog.php'),
array('icon'=>'cart-arrow-down','text'=>'Шопинг','href'=>'/catalog.php'),
array('icon'=>'car-info','text'=>'Авто','href'=>'/catalog.php'),
array('icon'=>'airballoon','text'=>'Развлечения','href'=>'/catalog.php'),
array('icon'=>'book-open-page-variant','text'=>'Культура','href'=>'/catalog.php'),
array('icon'=>'video-vintage','text'=>'Кинотеатры','href'=>'/catalog.php')
);
foreach($arrays as $array){
include('card/services-small.php');
}?>
</div>
<div class="more_places mt-3 mt-md-5 text-center text-md-right brown-color mb-3 mb-md-0">
<a class="dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Еще места
</a>
<div class="dropdown-menu dropdown-menu-right w-25 border-0 shadow text-justify">
<a href="#" class="dropdown-item text-100 pt-3 pb-2"><span class="mdi mdi-view-dashboard-outline mdi-24px pr-2 mb-2"></span>Lorem ipsum</a>
<a href="#" class="dropdown-item text-100 pt-1 pb-2"><span class="mdi mdi-view-dashboard-outline mdi-24px pr-2 mb-2"></span>Lorem ipsum</a>
<a href="#" class="dropdown-item text-100 pt-1 pb-2"><span class="mdi mdi-view-dashboard-outline mdi-24px pr-2 mb-2"></span>Lorem ipsum</a>
<a href="#" class="dropdown-item text-100 pt-1 pb-2"><span class="mdi mdi-view-dashboard-outline mdi-24px pr-2 mb-2"></span>Lorem ipsum</a>
<a href="#" class="dropdown-item text-100 pt-1 pb-2"><span class="mdi mdi-view-dashboard-outline mdi-24px pr-2 mb-2"></span>Lorem ipsum</a>
</div>
</div>
<div class="row">
<div class="col pl-0 text-center text-md-left">
<h2 class="d-none d-sm-block">Рекомендации для вас</h2>
<h3 class="d-sm-none">Рекомендации для вас</h3>
</div>
</div>
</div>
<ul class="mt-3 mt-md-5 " id="cl-advice">
<?
$arrays = array(
array('img'=>'/slider/coffe-4.jfif','href'=>'/product.php','text'=>'Сеть закусочных “DAMI”'),
array('img'=>'/slider/coffe-3.jfif','href'=>'/product.php','raitting'=>3,'text'=>'Сеть закусочных “DAMI”','comment'=>1900,'bookmark'=>0),
array('img'=>'/slider/coffe-4.jfif','href'=>'/product.php','raitting'=>2,'text'=>'Сеть закусочных “DAMI”','comment'=>100,'bookmark'=>0),
array('img'=>'/slider/coffe-3.jfif','href'=>'/product.php','raitting'=>2.8,'text'=>'Сеть закусочных “DAMI”','comment'=>10,'bookmark'=>1),
array('img'=>'/slider/coffe-4.jfif','href'=>'/product.php','raitting'=>1,'text'=>'Сеть закусочных “DAMI”','comment'=>190,'bookmark'=>0),
array('img'=>'/slider/coffe-4.jfif','href'=>'/product.php','raitting'=>1.5,'text'=>'Сеть закусочных “DAMI”','comment'=>5500,'bookmark'=>1),
array('img'=>'/slider/coffe-4.jfif','href'=>'/product.php','raitting'=>1.5,'text'=>'Сеть закусочных “DAMI”','comment'=>5500,'bookmark'=>1),
array('img'=>'/slider/coffe-4.jfif','href'=>'/product.php','raitting'=>2,'text'=>'Сеть закусочных “DAMI”','comment'=>100,'bookmark'=>0),
array('img'=>'/slider/coffe-3.jfif','href'=>'/product.php','raitting'=>2.8,'text'=>'Сеть закусочных “DAMI”','comment'=>10,'bookmark'=>1),
array('img'=>'/slider/coffe-4.jfif','href'=>'/product.php','raitting'=>1,'text'=>'Сеть закусочных “DAMI”','comment'=>190,'bookmark'=>0),
array('img'=>'/slider/coffe-4.jfif','href'=>'/product.php','raitting'=>2,'text'=>'Сеть закусочных “DAMI”','comment'=>100,'bookmark'=>0),
array('img'=>'/slider/coffe-3.jfif','href'=>'/product.php','raitting'=>2.8,'text'=>'Сеть закусочных “DAMI”','comment'=>10,'bookmark'=>1),
array('img'=>'/slider/coffe-4.jfif','href'=>'/product.php','raitting'=>1,'text'=>'Сеть закусочных “DAMI”','comment'=>190,'bookmark'=>0),
array('img'=>'/slider/coffe-4.jfif','href'=>'/product.php','raitting'=>2,'text'=>'Сеть закусочных “DAMI”','comment'=>100,'bookmark'=>0),
array('img'=>'/slider/coffe-3.jfif','href'=>'/product.php','raitting'=>2.8,'text'=>'Сеть закусочных “DAMI”','comment'=>10,'bookmark'=>1),
array('img'=>'/slider/coffe-4.jfif','href'=>'/product.php','raitting'=>1,'text'=>'Сеть закусочных “DAMI”','comment'=>190,'bookmark'=>0),
array('img'=>'/slider/coffe-4.jfif','href'=>'/product.php','raitting'=>2,'text'=>'Сеть закусочных “DAMI”','comment'=>100,'bookmark'=>0),
);
foreach($arrays as $array){
include('card/advice.php');
}?>
</ul>
<div class="container mt-3 mt-md-5">
<div class="row">
<div class="col-12 col-md-auto text-center text-md-left">
<h2 class="d-none d-sm-block">Ближайшие события</h2>
<h3 class="d-sm-none">Ближайшие события</h3>
</div>
<div class="col-12 col-md text-center text-md-right align-self-center">
<a href="/catalog.php" class="brown-color text-decoration-underline pr-4">Бесплатно</a>
<a href="/catalog.php" class="brown-color text-decoration-underline pl-4 border-left">Все события</a>
</div>
</div>
</div>
<ul class="mt-3 mt-md-5" id="cl-events">
<?
$arrays = array(
array('img'=>'/slider/coffe-1.jfif','href'=>'/product.php','date'=>'5–6 марта 11:00–20:00','bookmark'=>0,'age_cens'=>'18+','text'=>'Сеть закусочных “DAMI”'),
array('img'=>'/slider/coffe-1.jfif','href'=>'/product.php','date'=>'5–6 марта 11:00–20:00','bookmark'=>1,'age_cens'=>'3+','text'=>'Выставка каникулярных программ Language Fair 2020 ','price'=>'от 1000 ₽','bookmarks'=>0),
array('img'=>'/slider/coffe-2.jfif','href'=>'/product.php','date'=>'5–6 марта 11:00–20:00','bookmark'=>0,'age_cens'=>'2+','text'=>'Выставка каникулярных программ Language Fair 2020','price'=>100,'bookmarks'=>0),
array('img'=>'/slider/coffe-1.jfif','href'=>'/product.php','date'=>'5–6 марта 11:00–20:00','bookmark'=>1,'age_cens'=>'2.8+','text'=>'Сеть закусочных “DAMI”','price'=>10,'bookmarks'=>1),
array('img'=>'/slider/coffe-2.jfif','href'=>'/product.php','date'=>'5–6 марта 11:00–20:00','bookmark'=>0,'age_cens'=>'1+','text'=>'Выставка каникулярных программ Language Fair 2020 ','price'=>190,'bookmarks'=>0),
array('img'=>'/slider/coffe-1.jfif','href'=>'/product.php','date'=>'5–6 марта 11:00–20:00','bookmark'=>1,'age_cens'=>'1.5+','text'=>'Сеть закусочных “DAMI”','price'=>5500,'bookmarks'=>1)
);
foreach($arrays as $array){
include('card/events.php');
}?>
</ul>
<div class="container mt-3 mt-md-5">
<div class="row">
<div class="col-12 pl-md-0 text-center text-md-left">
<h2 class="d-none d-sm-block">Ближайшие события</h2>
<h3 class="d-sm-none">Ближайшие события</h3>
</div>
</div>
</div>
<ul class="mt-3 mt-md-5" id="cl-advice2">
<?
$arrays = array(
array('img'=>'/slider/coffe-4.jfif','href'=>'/catalog.php','text'=>'Сеть закусочных “DAMI”'),
array('img'=>'/slider/coffe-3.jfif','href'=>'/catalog.php','raitting'=>3,'text'=>'Сеть закусочных “DAMI”','comment'=>1900,'bookmark'=>0),
array('img'=>'/slider/coffe-4.jfif','href'=>'/catalog.php','raitting'=>2,'text'=>'Сеть закусочных “DAMI”','comment'=>100,'bookmark'=>0),
array('img'=>'/slider/coffe-3.jfif','href'=>'/catalog.php','raitting'=>2.8,'text'=>'Сеть закусочных “DAMI”','comment'=>10,'bookmark'=>1),
array('img'=>'/slider/coffe-4.jfif','href'=>'/catalog.php','raitting'=>1,'text'=>'Сеть закусочных “DAMI”','comment'=>190,'bookmark'=>0),
array('img'=>'/slider/coffe-4.jfif','href'=>'/catalog.php','raitting'=>1.5,'text'=>'Сеть закусочных “DAMI”','comment'=>5500,'bookmark'=>1),
array('img'=>'/slider/coffe-4.jfif','href'=>'/catalog.php','raitting'=>1.5,'text'=>'Сеть закусочных “DAMI”','comment'=>5500,'bookmark'=>1),
array('img'=>'/slider/coffe-4.jfif','href'=>'/catalog.php','raitting'=>2,'text'=>'Сеть закусочных “DAMI”','comment'=>100,'bookmark'=>0),
array('img'=>'/slider/coffe-3.jfif','href'=>'/catalog.php','raitting'=>2.8,'text'=>'Сеть закусочных “DAMI”','comment'=>10,'bookmark'=>1),
array('img'=>'/slider/coffe-4.jfif','href'=>'/catalog.php','raitting'=>1,'text'=>'Сеть закусочных “DAMI”','comment'=>190,'bookmark'=>0),
array('img'=>'/slider/coffe-4.jfif','href'=>'/catalog.php','raitting'=>2,'text'=>'Сеть закусочных “DAMI”','comment'=>100,'bookmark'=>0),
array('img'=>'/slider/coffe-3.jfif','href'=>'/catalog.php','raitting'=>2.8,'text'=>'Сеть закусочных “DAMI”','comment'=>10,'bookmark'=>1),
array('img'=>'/slider/coffe-4.jfif','href'=>'/catalog.php','raitting'=>1,'text'=>'Сеть закусочных “DAMI”','comment'=>190,'bookmark'=>0),
array('img'=>'/slider/coffe-4.jfif','href'=>'/catalog.php','raitting'=>2,'text'=>'Сеть закусочных “DAMI”','comment'=>100,'bookmark'=>0),
);
foreach($arrays as $array){
include('card/advice.php');
}?>
</ul>
<link rel="stylesheet" href="/css/homepage.css"/>
<link rel="stylesheet" href="/css/lightslider.css"/>
<script src="/js/lightslider.js"></script>
<script>
$(document).ready(function(){
$('#cl-events').lightSlider({
item:4,
loop:true,
controls:false,
slideMove:2,
currentPagerPosition:'middle',
easing: 'cubic-bezier(0.25, 0, 0.25, 1)',
speed:600,
responsive : [
{
breakpoint:800,
settings: {
item:3,
slideMove:1,
slideMargin:6,
}
},
{
breakpoint:480,
settings: {
item:1,
slideMove:1
}
}
]
});
$("#cl-advice, #cl-advice2").lightSlider({
item:6,
loop:true,
controls:false,
autoWidth:true,
slideMargin:15,
currentPagerPosition:'middle',
easing: 'cubic-bezier(0.25, 0, 0.25, 1)',
speed:600,
responsive : [
{
breakpoint:800,
settings: {
item:3,
slideMove:1,
slideMargin:6,
}
},
{
breakpoint:480,
settings: {
item:2,
slideMove:1
}
}
]
});
});
</script><file_sep><li class="events bg-white mb-3 px-0 owl-item" style="max-width: 540px;width:540px">
<img src="<?=$array['img']?>" class="w-100 position-absolute">
<div class="row align-items-start text-white no-gutters p-3">
<div class="col-auto text-white">
<? if($array['age_cens']) { ?>
<div class="cens py-2 px-3">
<?=$array['age_cens']?>
</div>i
<? } ?>
</div>
<div class="col-auto ml-auto">
<? if($array['price']) { ?>
<div class="cens py-2 px-3">
<?=$array['price']=='0'?'Бесплатно':$array['price']?>
</div>
<? } ?>
</div>
</div>
<div class="row align-items-end h-75 no-gutters">
<div class="col">
<div class="row">
<div class="col text-white">
<h4><?=$array['text']?></h4>
</div>
</div><div class="row"><div class="col-1"><span class="mdi brown-color mdi-bookmark<?=!$array['bookmark']?'-outline':''?>"></span> </div><div class="col-5 text-white"><span class="mdi mdi-event"></span><?=$array['date']?></div><div class="col-auto ml-auto"><a href="<?=$array['href']?>" class="text-white text-uppercase">Подробнее <span class="mdi mdi-arrow-right"></span></a></div></div>
</div>
</div>
</li>
<file_sep><html>
<head>
<meta name="viewport" content="user-scalable=no, initial-scale = 1, minimum-scale = 1, maximum-scale = 1, width=device-width">
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="<KEY>" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js" integrity="<KEY>" crossorigin="anonymous"></script>
<script src="/js/bootstrap.min.js"></script>
</head>
<body>
<?php
include('blocks/header.php');
include('page/profile.php');
include('blocks/footer.php');
?>
<link rel="stylesheet" href="/css/bootstrap.min.css" />
<link rel="stylesheet" href="/css/materialdesignicons.min.css" />
<link rel="stylesheet" href="/css/style.css" />
</body>
</html>
<file_sep><div class="row shadow bg-white d-flex align-items-center mb-sm-4 stocks_mb pr-sm-3 pl-0 pr-0">
<div class="d-flex justify-content-center col-sm-3 col-12 px-sm-3 px-0 py-sm-2 py-0">
<img src="<?=$e['src']?>" alt="<?=$e['alt']?>" class="w-100 d-none d-sm-block rounded">
<img src="<?=$e['src']?>" alt="<?=$e['alt']?>" class="w-100 d-block d-sm-none rounded-top">
</div>
<div class="col-sm-9 col-12">
<div class="row align-items-center">
<div class="col-auto pl-sm-0">
<span class=" d-sm-inline-block mdi mdi-bookmark-outline mdi-24px brown-color"></span>
<a href="<?=$e['href']?>" class="d-inline-block">
<<?=$e['tag']?> class="mb-0 text-100 mt-3"><?=$e['title']?></<?=$e['tag']?>>
</a>
</div>
<div class="col text-right">
<? $raitting=$e['raitting']; include('blocks/raitting.php'); ?>
</div>
</div>
<p class="mt-4 mb-4"><?=$e['description']?></p>
</div>
</div><file_sep><div class="raitting">
<? $raitting=round($raitting);
for($i=0;$i<5;$i++){?>
<span class="mdi mdi-star<?=$raitting>=$i?'':'-outline'?>"></span>
<? }?>
<input type="hidden" name="raitting_star" value="<?=$raitting?>" />
</div>
<file_sep><div class="row mt-4 position-relivate">
<div class="col-auto pt-3 pb-3 d-inline-block"><?=isset($v['img'])?$v['img']:'<span class="mdi mdi-account-circle mdi-48px grey"></span>'?>
</div>
<div class="col d-inline-block">
<div class="row">
<div class="col-12">
<h4><?=$v['name']?></h4>
</div>
<div class="col-12">
<p><?=$v['date']?></p>
</div>
<div class="col-12 mb-4">
<? $raitting=4; include('blocks/raitting.php'); ?>
</div>
</div>
</div>
</div>
<div class="row mb-3">
<div class="col-12"><?=$v['text']?></div>
</div><file_sep><h4 class="mt-3 mb-4"><?=$element['name']?></h4>
<select name="<?=$element['id']?>" id="<?=$element['id']?>" class="mt-2">
<? foreach ($element['variants'] as $variant){?>
<option value="<?=$variant['value']?>"><?=$variant['text']?></option>
<? } ?>
</select><file_sep><?
$array=array('control_panel'=>true, 'id'=>'carouselProduct',
'align-text'=>'center',
'width-text'=>'w-25',
'elements'=>array(
array('img'=>'/img/slider-product.png','alt'=>'...','title'=>'First slide label','tag'=>'h1','text'=>'Sint nulla aute sunt irure irure ut laborum aute fugiat culpa exercitation eu et dolore. Minim exercitation mollit irure voluptate proident culpa veniam consequat culpa mollit. Cillum sit ut nulla esse exercitation aliqua nisi proident fugiat consequat dolor Lorem nostrud.'),
array('img'=>'/img/slider-product.png','alt'=>'...','title'=>'Two slide label','tag'=>'h2','text'=>'Sint nulla aute sunt irure irure ut laborum aute fugiat culpa exercitation eu et dolore. Minim exercitation mollit irure voluptate proident culpa veniam consequat culpa mollit. Cillum sit ut nulla esse exercitation aliqua nisi proident fugiat consequat dolor Lorem nostrud.'),
)
);
include('blocks/slider-main.php'); ?>
<div class="container product">
<? $array=array('href'=>'#','alt'=>'...','src'=>'../img/banner.png');?>
<div class="row">
<div class="col-8 mt-3 mb-3 d-sm-flex d-none">
<? include('card/banner.php')?>
</div>
<div class="col-4 text-sm-right mt-3 mb-3 ">
<a href="#"><span class="mdi mdi-bookmark-outline mdi-24px brown-color"></span></a>
<a href="#"><span class="mdi mdi-share-variant mdi-24px brown-color"></span></a>
</div>
</div>
<div class="row pl-0 pl-md-3 mb-3">
<div class="d-none d-xl-inline-block col-xl-4 sidebar"><?
$viewpoints = array(
array('name'=>'<NAME>','date'=>'08.05.2020 13:25','text'=>'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Non ac, nunc, habitasse pulvinar nisl eu lobortis. Nunc quis placerat iaculis gravida nunc, fermentum quam mattis tellus.'),
array('name'=>'<NAME>','date'=>'08.05.2020 13:25','text'=>'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Non ac, nunc, habitasse pulvinar nisl eu lobortis. Nunc quis placerat iaculis gravida nunc, fermentum quam mattis tellus.'),
);
include('blocks/viewpoint.php'); ?></div>
<div class="col-12 col-xl-8 ml-0 mt-3 mt-xl-0 ml-xl-0">
<div class="row"><div class="col ml-0 ml-xl-3 galery px-0 px-xl-3">
<?
$gallery=array(
'id'=>'imageGallery',
'elements'=>array(
array('src'=>'/img/largeImage2.jpg','alt'=>'...','thumb'=>'/img/largeImage2.jpg'),
array('src'=>'/img/largeImage3.jpg','alt'=>'...','thumb'=>'/img/largeImage3.jpg'),
array('src'=>'/img/largeImage4.jpg','alt'=>'...','thumb'=>'/img/largeImage4.jpg'),
array('src'=>'/img/largeImage6.jpg','alt'=>'...','thumb'=>'/img/largeImage6.jpg'),
)
);
include('blocks/gallery.php');
?>
</div>
</div>
</div>
</div>
<div class="list-group list-group-horizontal mt-4 mb-4" id="list-product" role="tablist">
<a class="btn list-group-item-action active w-auto" data-toggle="list" href="#home" role="tab"><h3>О нас</h3></a>
<a class="btn list-group-item-action w-auto" data-toggle="list" href="#profile" role="tab"><h3>Оценки и отзывы</h3></a>
</div>
<hr class="my-0">
<div class="row">
<div class="col-12 py-4">
<div class="tab-content">
<div class="tab-pane fade active show" id="home" role="tabpanel">
<p>Enim in ad exercitation Lorem ipsum Lorem mollit voluptate laboris ut do commodo eu officia. Nostrud cillum mollit nostrud Lorem duis laborum duis est labore est mollit amet officia nisi. Lorem ea ad cupidatat veniam adipisicing ut consectetur. Magna do minim nulla sint enim nostrud qui laboris non proident. Do in amet tempor mollit ad tempor laboris consequat. Nulla labore dolor qui eiusmod ullamco aliqua Lorem deserunt amet irure id ut. Laboris nostrud est dolor in duis sit.</p>
<p>Reprehenderit qui aliquip elit esse ut sit cupidatat adipisicing aute veniam in. Sint nulla proident ea enim deserunt consectetur tempor ullamco laboris et. Sit exercitation nulla velit irure cillum et eu incididunt culpa veniam veniam ad. Excepteur voluptate ut elit non. Quis id mollit minim quis. Irure excepteur non occaecat in laboris ullamco Lorem dolor enim occaecat veniam ex labore et. Ullamco adipisicing proident incididunt minim enim ea cupidatat reprehenderit cillum non adipisicing id.
Ut reprehenderit sunt enim ex pariatur magna nostrud Lorem dolore eu. Quis mollit dolore do elit non proident id non do. Laborum minim tempor ut occaecat amet et labore.</p>
</div>
<div class="tab-pane fade" id="profile" role="tabpanel">
<div class="row">
<div class="col-12">
<? include('blocks/add_rating_review.php'); ?>
<? include('blocks/add_review.php');
$comments = array(
array('name'=>'<NAME>','date'=>'08.05.2020 13:25','text'=>'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Non ac, nunc, habitasse pulvinar nisl eu lobortis. Nunc quis placerat iaculis gravida nunc, fermentum quam mattis tellus. Lectus cursus et diam praesent enim. Magnis rhoncus neque, sed vel. Enim orci, eget dictum diam a a. Eget phasellus vitae sapien nisi est aliquam sed enim, erat. Eget ullamcorper eget luctus morbi sapien mattis. Lorem nulla integer dui mauris urna nibh diam. Pharetra quis aliquet massa, sit viverra platea molestie. Molestie sit cras semper et. Arcu faucibus integer augue venenatis auctor facilisi pulvinar volutpat enim. Leo pharetra bibendum posuere quisque amet sit porttitor et. Montes, in nisi donec volutpat. Convallis fermentum scelerisque scelerisque neque.
Sem enim consectetur etiam quam sed arcu, nisl. At pellentesque fringilla duis a posuere rhoncus in duis. Facilisis morbi ut vitae ut. Magna leo, metus porttitor blandit cras. Quisque massa faucibus aliquam vitae id egestas odio. Egestas cursus libero amet sed amet mauris sit. Netus cursus viverra in condimentum. Ut senectus aliquam duis leo gravida leo egestas. Neque sed risus sit mus.'),
array('name'=>'<NAME>','date'=>'08.05.2020 13:25','text'=>'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Non ac, nunc, habitasse pulvinar nisl eu lobortis. Nunc quis placerat iaculis gravida nunc, fermentum quam mattis tellus.'),
);
foreach ($comments as $v){?>
<div class="py-4">
<? include('card/comment.php'); ?>
</div>
<?
}
?>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row mb-2">
<div class="col-12 col-md-6"><? include('blocks/map-pannel.php'); ?></div>
<div class="col-12 col-md-6">
<div class="row">
<div class="col-12 mb-2">
<span class="mdi mdi-home text-60 mdi-24px mr-2"></span><span>2496 Miller Ave undefined Lansing, Illinois 67658 United States</span>
</div>
<div class="col-12 mt-1 mb-2">
<span class="mdi mdi-email-open text-60 mdi-24px mr-2"></span><span>dolores.<EMAIL></span>
</div>
<div class="col-12 mt-1 mb-2">
<span class="mdi mdi-phone-in-talk text-60 mdi-24px mr-2"></span><span>2496 Miller Ave undefined Lansing, Illinois 67658 United States</span>
</div>
<div class="col-12 mt-1 mb-2">
<span class="mdi mdi-badge-account text-60 mdi-24px mr-2"></span><span>2496 Miller Ave undefined Lansing, Illinois 67658 United States</span>
</div>
</div>
</div>
</div>
<div class="row mb-4">
<div class="col-12"><h2>Что есть поблизости?</h2></div>
</div>
<div class="row">
<div class="col-12 mb-4">
<? include('blocks/map-pannel.php');?>
</div>
</div>
<? $array_figura= array(
array('a_text'=>'Все места','a_href'=>'#','title'=>'Зоопарки','tag'=>'h3',
'elements'=>array(
array('tag'=>'h3','title'=>'Title','src'=>'/img/figura/figura_1.png','alt'=>'...','text'=>'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Amet morbi auctor turpis mattis mattis suscipit ipsum volutpat.'),
array('tag'=>'h3','title'=>'Title','src'=>'/img/figura/figura_2.png','alt'=>'...','text'=>'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Amet morbi auctor turpis mattis mattis suscipit ipsum volutpat.'),
array('tag'=>'h3','title'=>'Title','src'=>'/img/figura/figura_3.png','alt'=>'...','text'=>'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Amet morbi auctor turpis mattis mattis suscipit ipsum volutpat.'),
array('tag'=>'h3','title'=>'Title','src'=>'/img/figura/figura_1.png','alt'=>'...','text'=>'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Amet morbi auctor turpis mattis mattis suscipit ipsum volutpat.'),
),
),
array('a_text'=>'Все места','a_href'=>'#','title'=>'Зоопарки','tag'=>'h3',
'elements'=>array(
array('tag'=>'h3','title'=>'Title','src'=>'/img/figura/figura_1.png','alt'=>'...','text'=>'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Amet morbi auctor turpis mattis mattis suscipit ipsum volutpat.'),
array('tag'=>'h3','title'=>'Title','src'=>'/img/figura/figura_2.png','alt'=>'...','text'=>'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Amet morbi auctor turpis mattis mattis suscipit ipsum volutpat.'),
array('tag'=>'h3','title'=>'Title','src'=>'/img/figura/figura_3.png','alt'=>'...','text'=>'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Amet morbi auctor turpis mattis mattis suscipit ipsum volutpat.'),
array('tag'=>'h3','title'=>'Title','src'=>'/img/figura/figura_1.png','alt'=>'...','text'=>'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Amet morbi auctor turpis mattis mattis suscipit ipsum volutpat.'),
),
),
array('a_text'=>'Все места','a_href'=>'#','title'=>'Зоопарки','tag'=>'h3',
'elements'=>array(
array('tag'=>'h3','title'=>'Title','src'=>'/img/figura/figura_1.png','alt'=>'...','text'=>'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Amet morbi auctor turpis mattis mattis suscipit ipsum volutpat.'),
array('tag'=>'h3','title'=>'Title','src'=>'/img/figura/figura_2.png','alt'=>'...','text'=>'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Amet morbi auctor turpis mattis mattis suscipit ipsum volutpat.'),
array('tag'=>'h3','title'=>'Title','src'=>'/img/figura/figura_3.png','alt'=>'...','text'=>'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Amet morbi auctor turpis mattis mattis suscipit ipsum volutpat.'),
array('tag'=>'h3','title'=>'Title','src'=>'/img/figura/figura_1.png','alt'=>'...','text'=>'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Amet morbi auctor turpis mattis mattis suscipit ipsum volutpat.'),
),
),
);
include('card/figura_card_mini.php'); ?>
<script>
$(function () {
$('#myList a:last-child').tab('show')
})
</script>
<link type="text/css" rel="stylesheet" href="/css/lightslider.css" />
<script src="/js/lightslider.js"></script>
</div><file_sep><!--../img/company-slider1.png-->
<div class="card mb-3 pb-3 company_card_mini">
<div id="<?=$e['id']?>" class="card-img-left">
<img src="<?=$e['src']?>" class="d-block w-100" alt="<?=$e['title']?>">
</div>
<div class="card-body">
<span class="mdi-24px brown-color mdi mdi-bookmark<?=!$e['bookmark']?'-outline':''?> d-inline-block mr-3"></span> <a href="#"><h3 class="d-inline-block card-title brown-color"><?=$e['title']?></h3></a>
<p class="card-text mt-3"><?=$e['description']?></p>
</div>
</div><file_sep><?
$block_align =isset($array['align-text'])?'align-items-'.$array['align-text'].(isset($array['width-text'])?' '.$array['width-text']:''):'';
$text_align=!isset($array['align-text'])&&isset($array['width-text'])?$array['width-text']:'';
?>
<div id="<?=$array['id']?>" class="carousel slide flex-wrap d-none d-md-block" data-ride="carousel">
<ol class="carousel-indicators">
<? foreach ($array['elements'] as $k=>$e){?>
<li data-target="#carouselExampleCaptions" data-slide-to="<?=$k?>>"<?=$k==0?' class="active"':''?>></li>
<? } ?>
</ol>
<div class="carousel-inner">
<? foreach ($array['elements'] as $k=>$e){?>
<div class="carousel-item<?=$k==0?' active':''?>">
<img src="<?=$e['img']?>" class="d-block w-100" alt="<?=$e['alt']?>">
<div class="container carousel-caption d-none d-md-block text-white <?=$block_align?>">
<div class="row <?=$text_align?>">
<<?=$e['tag']?>><?=$e['title']?></<?=$e['tag']?>>
<p class="text-white text-left"><?=$e['text']?></p>
</div>
</div>
</div>
<? } ?>
</div>
<? if(isset($array['control-pannel'])&&$array['control-pannel']){?>
<a class="carousel-control-prev" href="#carouselExampleCaptions" role="button" data-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="carousel-control-next" href="#carouselExampleCaptions" role="button" data-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
<? } ?>
</div><file_sep><div class="col-12 pr-0 pl-0 mb-3">
<button class="btn" data-toggle="collapse" data-target="#<?=$ee['id']?>"><<?=$ee['tag']?>><?=$ee['name']?></<?=$ee['tag']?>><span class="mdi mdi-chevron-down"></span></button>
<div id="<?=$ee['id']?>" class="collapse help_dropdown text-60"><?=$ee['description']?></div>
</div><file_sep><div class="row">
<div class="col col-md-10 offset-md-1">
<div class="row">
<div class="col-12">
<h4 class="mt-3 mb-3">Мнения пользователей</h4>
</div>
</div>
<div class="row">
<div class="col-12">Incididunt aliquip ex qui eiusmod mollit amet esse nostrud in aliquip eiusmod dolore est esse. Elit officia incididunt aute labore dolore sint.</div>
</div>
<? foreach ($viewpoints as $v){?>
<? include('card/comment.php') ?>
<? }?>
<div class="row">
<div class="col-12 text-center mb-3">
<a href="#" class="btn brown--default shadow align-items-center">ВСЕ ОТЗЫВЫ</a>
</div>
</div>
</div>
</div>
<file_sep><ul class="mt-3 " id="cl-kitchen" styles="background:#F1F3F5;">
<?
$arrays = array(
array('img'=>'/img/eat-2.png','href'=>'/product.php'),
array('img'=>'/img/eat-3.png','href'=>'/product.php'),
array('img'=>'/img/eat-1.png','href'=>'/product.php'),
array('img'=>'/img/eat-2.png','href'=>'/product.php'),
array('img'=>'/img/eat-1.png','href'=>'/product.php'),
array('img'=>'/img/eat-2.png','href'=>'/product.php'),
array('img'=>'/img/eat-3.png','href'=>'/product.php'),
);
foreach($arrays as $array){
include('card/menu_kitchen_slide.php');
}?>
</ul>
<div class="container menu_page">
<div class="mt-3 mb-2">
<h2>Titel</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Netus aliquet faucibus at sollicitudin. Dolor vestibulum pellentesque sit a viverra nam at integer vestibulum. Purus condimentum sem non nulla sollicitudin pharetra turpis massa. Facilisi bibendum consequat, donec neque magnis a senectus id purus. Sed blandit cursus ac sit pellentesque. Dui tellus placerat enim, facilisis morbi morbi neque, integer morbi. Condimentum massa quis est ac eget velit. Interdum nisl cras non eget suspendisse facilisis pellentesque quis. Faucibus ac sed orci, a dui turpis. Ut quisque dignissim magna diam consectetur. Sollicitudin lectus enim sit suspendisse velit massa. Quam facilisis ipsum risus tortor at semper a faucibus.</p>
</div>
</div>
<link rel="stylesheet" href="/css/lightslider.css"/>
<script src="/js/lightslider.js"></script>
<script>
$(document).ready(function(){
$('#cl-kitchen').lightSlider({
item:3,
loop:true,
controls:false,
slideMove:1,
currentPagerPosition:'middle',
easing: 'cubic-bezier(0.25, 0, 0.25, 1)',
speed:600,
responsive : [
{
breakpoint:800,
settings: {
item:2,
slideMove:1,
slideMargin:6,
}
},
{
breakpoint:480,
settings: {
item:1,
slideMove:1
}
}
]
});
});
</script>
<file_sep><? if(isset($gallery['id'])){?>
<ul id="<?=$gallery['id']?>">
<? foreach ($gallery['elements'] as $k=>$e){?>
<li data-thumb="<?=isset($e['thumb'])?$e['thumb']:$e['src']?>">
<img src="<?=$e['src']?>" alt="<?=$e['alt']?>" class="w-100 shadow rounded"/>
</li>
<? } ?>
</ul>
<script>
$(document).ready(function() {
$('#<?=$gallery['id']?>').lightSlider({
gallery: true,
auto:true,
item: 1,
loop:true,
adaptiveHeight:true,
controls:true,
slideMargin: 0,
thumbItem: 3
});
});
</script>
<? } ?>
<file_sep><div class="rating_review">
<h3 class="mb-4">Оценки и отзывы</h3>
<div class="row mb-4">
<div class="col col-md-5">
<div class="row">
<div class="col">
<input type="radio" name="raitting" value="5" id="rating5" checked><label type="radio" for="rating5" class="text-60"><span class="pl-1">Отлично</span></label>
</div>
</div>
<div class="row">
<div class="col">
<input type="radio" name="raitting" value="4" id="rating4"><label type="radio" for="rating4" class="text-60"><span class="pl-1">Очень хорошо</span></label>
</div>
</div>
<div class="row">
<div class="col">
<input type="radio" name="raitting" value="3" id="rating3"><label type="radio" for="rating3" class="text-60"><span class="pl-1">Неплохо</span></label>
</div>
</div>
<div class="row">
<div class="col">
<input type="radio" name="raitting" value="2" id="rating2"><label type="radio" for="rating2" class="text-60"><span class="pl-1">Плохо</span></label>
</div>
</div>
<div class="row">
<div class="col">
<input type="radio" name="raitting" value="1" id="rating1"><label type="radio" for="rating1" class="text-60"><span class="pl-1">Ужасно</span></label>
</div>
</div>
<? $raitting=4; include('blocks/raitting.php'); ?>
</div>
<div class="col-7 d-none d-md-flex">
<img src="/img/rca.png" class="w-100" />
</div>
</div>
</div>
<script>
function setStars(index){
$('.rating_review .raitting input').val(index+1);
}
function fillStart(index){
const element = '.rating_review .raitting span';
$(element).each(function (i,r) {
if(i<=index) {
$(this).addClass('mdi-star');
if($(this).hasClass('mdi-star-outline')) {
$(this).removeClass('mdi-star-outline')
}
} else {
$(this).addClass('mdi-star-outline');
if($(this).hasClass('mdi-star')) {
$(this).removeClass('mdi-star')
}
}
});
}
$(document).ready(function () {
var index=$('.rating_review .raitting input').val()-1;
$('.rating_review').on('mouseover','.raitting span',function () {
index=$(this).index();
fillStart(index);
});
$('.rating_review').on('mouseover','.raitting',function () {
fillStart(index);
});
$('.rating_review').on('click','.raitting span',function () {
index=$(this).index();
fillStart(index);
setStars(index);
});
$('.rating_review .raitting').mouseout(function () {
var index=$('.rating_review .raitting input').val()-1;
fillStart(index);
});
});
</script><file_sep><!-- $arr=; -->
<!-- $radio=; -->
<? $sidebar=array(
array('type'=>'select','id'=>'city_filter','name'=>'Город','variants'=>array(array('value'=>'cena','text'=>'По цене'),array('value'=>'name','text'=>'По имени'))),
array('type'=>'radio','id'=>'name_institution','name'=>'Название заведения','variants'=>array(array('value'=>'1','text'=>'Кафе'),array('value'=>'2','text'=>'Кальянная'),array('value'=>'3','text'=>'Ресторан'))),
array('type'=>'checkbox','id'=>'name_institution','name'=>'Название заведения','variants'=>array(array('value'=>'1','text'=>'Кафе'),array('value'=>'2','text'=>'Кальянная'),array('value'=>'3','text'=>'Ресторан'))),
);
?>
<div class="row">
<div class="col">
<? foreach ($sidebar as $element) {?>
<? if($element['type']=='select'){
include('blocks/filter/select.php');
} else {
include('blocks/filter/radiogroup.php');
}
} ?>
</div>
</div><file_sep><h4 class="mt-4"><?=$element['name']?></h4>
<div class="radio-group" id="<?=$element['id']?>">
<? foreach ($element['variants'] as $k=>$variant){?>
<div class="row">
<div class="col">
<input type="<?=$element['type']?>" name="<?=$element['id']?><? if($element['type']=='checkbox') {?>[]<? } ?>" id="<?=$element['type']?>_<?=$element['id']?>_<?=$k?>" value="<?=$variant['value']?>"><label type="<?=$element['type']?>" class="text-60" for="<?=$element['type']?>_<?=$element['id']?>_<?=$k?>"><span><?=$variant['text']?></span></label>
</div>
</div>
<? } ?>
</div><file_sep><<?=$e['tag']?> class="mb-4"><?=$e['title']?></<?=$e['tag']?>>
<? foreach ($e['elements'] as $ee){?>
<? include('card/collapse.php');?>
<?}?><file_sep><?php
$arrays=array(
array('id'=>1,'name'=>'Поесть','href'=>'#','submenu'=>array(
array('name'=>'Lorem ipsum','href'=>'#'),
array('name'=>'Lorem ipsum','href'=>'#'),
array('name'=>'Lorem ipsum','href'=>'#'),
array('name'=>'Lorem ipsum','href'=>'#'),
array('name'=>'Lorem ipsum','href'=>'#'),
array('name'=>'Lorem ipsum','href'=>'#'),
array('name'=>'Lorem ipsum','href'=>'#'),
array('name'=>'Lorem ipsum','href'=>'#'),
array('name'=>'Lorem ipsum','href'=>'#'),
array('name'=>'Lorem ipsum','href'=>'#'),
)),
array('id'=>2,'name'=>'Развлечения','href'=>'#'),
array('id'=>3,'name'=>'Красота','href'=>'#'),
array('id'=>4,'name'=>'Услуги бытовые','href'=>'#','active'=>'active'),
array('id'=>5,'name'=>'Шопинг','href'=>'#','submenu'=>array(
array('name'=>'Lorem ipsum','href'=>'#'),
array('name'=>'Lorem ipsum','href'=>'#'),
array('name'=>'Lorem ipsum','href'=>'#'),
array('name'=>'Lorem ipsum','href'=>'#'),
array('name'=>'Lorem ipsum','href'=>'#'),
array('name'=>'Lorem ipsum','href'=>'#'),
array('name'=>'Lorem ipsum','href'=>'#'),
array('name'=>'Lorem ipsum','href'=>'#'),
array('name'=>'Lorem ipsum','href'=>'#'),
array('name'=>'Lorem ipsum','href'=>'#'),
)
),
array('id'=>6,'name'=>'Авто','href'=>'#'),
array('id'=>7,'name'=>'Достопримечательности и культура','href'=>'#'),
);
?>
<div id="dropdown-menu" class="container border-0 collapse text-100 py-3 justify-content-center">
<div class="row">
<? foreach($arrays as $array) {?>
<div class="col-auto p-0">
<a href="<?=$array['href']?>" class="dropdown-item text-100 py-2 px-3<?=' '.$array['active']?>"
<?=$array['submenu']?' data-toggle="collapse" data-target="#submenu'.$array['id'].'" aria-expanded="true" aria-controls="collapseOne"':''?>
><?=$array['name']?></a>
</div>
<? } ?>
</div>
</div>
<? $submenu = array_filter($arrays,function ($a){return isset($a['submenu']);});
foreach($submenu as $array){?>
<div id="submenu<?=$array['id']?>" class="container submenu border-0 collapse text-100 pt-3 pb-3">
<div class="row">
<? foreach($array['submenu'] as $sub){?>
<div class="col-auto">
<a href="<?=$sub['href']?>" class="dropdown-item text-100 py-2 px-3<?=' '.$sub['active']?>"><?=$sub['name']?></a>
</div>
<? } ?>
</div>
</div>
<? } ?>
<script>
$(document).ready(function(){
$('#dropdown-menu').on('click','.dropdown-item',function () {
if($(this).data('target')) {
$('.submenu:not(' + $(this).data('target') + ')').removeClass('show');
} else {
$('.submenu').removeClass('show');
}
});
$('header').on('click','.open-header-menu',function () {
if($(this).data('expanded')) {
$('#dropdown-menu').addClass('show');
} else {
$('.submenu').removeClass('show');
}
});
});
</script> | 15e647625ea4e53de8737df61b452f251af3985e | [
"PHP"
] | 28 | PHP | andrew489/gdego | 1d82297ad0981b387f59908f769f153a21d0edb2 | 48ef1852a24416f624379a3d46c9c2858d8af611 | |
refs/heads/master | <repo_name>K4YO/SysInfo<file_sep>/README.md
# SysInfo
Sistema de informação e monitoramento Desktop inteligente
Developers Version : 1.0.1
<NAME> Date: 11/26/2017
<NAME>
<NAME>
<NAME>
PUC Minas - Sistemas de Informação
Arquitetura de Computadores
<file_sep>/TP_ARQUITETURA/Conversoes.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace TP_ARQUITETURA
{
public class Conversoes
{
public static string ConverterUnMedida(string Num)
{
double numero = 0;
if (Num != string.Empty)
{
numero = Convert.ToDouble(Num);
}
if (numero <= 1024)
{
return numero + " Bits";
}
else if (numero >= 1024 && numero < 1048576)
{
return (numero / 1024).ToString("0.00") + " KB";
}
else if (numero >= 1048576 && numero < 1073741824)
{
return (numero / 1048576).ToString("0.00") + " MB";
}
else if (numero >= 1073741824 && numero < 1099511627776)
{
return (numero / 1073741824).ToString("0.00") + " GB";
}
else if (numero >= 1099511627776 && numero <= 1125899906842624)
{
return (numero / 1099511627776).ToString("0.00") + " TB";
}
else
{
return numero.ToString();
}
}
}
}
<file_sep>/TP_ARQUITETURA/Memoria.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Management;
using System.Diagnostics;
using System.Text;
using System.Threading.Tasks;
namespace TP_ARQUITETURA
{
public class Memoria
{
private PerformanceCounter memoryAvailable = new PerformanceCounter("Memory", "Available Bytes");
private PerformanceCounter memoryInUse = new PerformanceCounter("Memory", "% Committed Bytes In Use"); //porcentagem
//VARIAVEIS COM GETSET
public string Nome { get; set; }
public string CapacidadeTotal { get; set; }
public string Frequecia { get; set; }
public string FrequeciaClock { get; set; }
public string TipoMemoria { get; set; }
public string MaxVoltage { get; set; }
private double BitsTotal;
//CONSTRUTOR
public Memoria()
{
this.IniciaMemoria();
}
private void IniciaMemoria()
{
double aux;
ManagementObjectSearcher InfoMemory = new ManagementObjectSearcher("root\\CIMV2", "SELECT * FROM Win32_PhysicalMemory");
foreach (ManagementObject memory in InfoMemory.Get())
{
this.Nome = memory["Name"].ToString();
this.BitsTotal = Convert.ToDouble(memory["Capacity"]);
aux = Convert.ToDouble(memory["MaxVoltage"]) / 1000;
if (aux == 0) this.MaxVoltage = "Desconhecido";
else this.MaxVoltage = string.Format("{0:0.0} Volts", Convert.ToDouble(memory["MaxVoltage"]) / 1000);
this.TipoMemoria = VerificaTipoMemoria(Convert.ToInt32(memory["MemoryType"]), Convert.ToInt32(memory["MaxVoltage"]));
this.Frequecia = string.Format("{0} MHz", memory["Speed"]);
this.FrequeciaClock = string.Format("{0} MHz", memory["ConfiguredClockSpeed"]);
}
this.CapacidadeTotal = Conversoes.ConverterUnMedida(BitsTotal.ToString());
}
public float PercentUso() { return memoryInUse.NextValue(); }
public string CapacidadeLivre() { return Conversoes.ConverterUnMedida(memoryAvailable.NextValue().ToString()); }
public string CapacidadeUtilizada() { return Conversoes.ConverterUnMedida((this.BitsTotal - memoryAvailable.NextValue()).ToString()); }
public string VerificaTipoMemoria(int MemoryType, int MaxVoltage)
{
switch (MemoryType)
{
case 20:
return "DDR";
case 21:
return "DDR2";
case 22:
return "DDR2 FB-DIMM";
case 24:
return "DDR3";
default:
if (MemoryType == 0 || MemoryType > 24 || MaxVoltage > 1200)
{
return "DDR4";
}
else
{
return "OUTRO";
}
}
}
}
}
<file_sep>/TP_ARQUITETURA/Form1.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using MetroFramework.Forms;
using MetroFramework.Controls;
namespace TP_ARQUITETURA
{
public partial class Form1 : MetroForm
{
List<Disco> storage = new List<Disco>();
Disco disks = new Disco();
Processador proc = new Processador();
Memoria ram = new Memoria();
public Form1()
{
InitializeComponent();
disks.GetInfoDisk(ref storage);
InsertInfoListStorage(ref metroListViewStorage, storage);
txt_proc_l1.Text = Convert.ToString(proc.L1Cache);
txt_proc_l2.Text = Convert.ToString(proc.L2Cache);
txt_proc_l3.Text = Convert.ToString(proc.L3Cache);
txt_proc_log.Text = Convert.ToString(proc.ProcessadoresLogicos);
txt_proc_modelo.Text = proc.Nome;
txt_prox_nuc.Text = Convert.ToString(proc.Nucleos);
txt_proc_arq.Text = proc.Arquitetura;
txt_proc_freqmax.Text = proc.FrequeciaMaxima;
txt_ram_bar.Text = ram.TipoMemoria;
txt_ram_freq.Text = ram.Frequecia;
txt_ram_Clock.Text = ram.FrequeciaClock;
txt_ram_volts.Text = ram.MaxVoltage;
txt_ram_total.Text = ram.CapacidadeTotal;
}
private void InsertInfoListStorage(ref MetroListView lst, List<Disco> storage)
{
lst.Items.Clear();
ListViewGroup grp;
string[] Texts = { "DeviceID", "Nome Unidade", "Rótulo", "Tipo Partição", "Tipo Disco", "Capacidade Total", "Capacidade Utilizada", "Capacidade Livre" };
string[] Properties = { "DeviceID", "NomeUnidade", "Rotulo", "TipoParticao", "TipoDisco", "CapacidadeTotal", "CapacidadeUilizada", "CapacidadeLivre" };
try
{
foreach (Disco disk in storage)
{
grp = lst.Groups.Add(disk.Nome.ToString(), disk.Nome.ToString());
for (int i = 0; i < Texts.Length; i++)
{
ListViewItem item = new ListViewItem(grp);
if (lst.Items.Count % 2 != 0)
item.BackColor = Color.White;
else item.BackColor = Color.WhiteSmoke;
item.Text = Texts[i];
item.SubItems.Add(disk.GetProperties(Properties[i]));
lst.Items.Add(item);
}
}
}
catch (Exception exp)
{
MessageBox.Show("can't get data because of the followeing error \n" + exp.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
private void label4_Click(object sender, EventArgs e)
{
}
private void textBox4_TextChanged(object sender, EventArgs e)
{
}
private void label3_Click(object sender, EventArgs e)
{
}
private void textBox3_TextChanged(object sender, EventArgs e)
{
}
private void label3_Click_1(object sender, EventArgs e)
{
}
private void textBox3_TextChanged_1(object sender, EventArgs e)
{
}
private void label9_Click(object sender, EventArgs e)
{
}
private void textBox9_TextChanged(object sender, EventArgs e)
{
}
private void label5_Click(object sender, EventArgs e)
{
}
private void textBox5_TextChanged(object sender, EventArgs e)
{
}
private void groupBox3_Enter(object sender, EventArgs e)
{
}
private void label8_Click(object sender, EventArgs e)
{
}
private void timer1_Tick(object sender, EventArgs e)
{
float percentCPUInUse = proc.PercentUso();
float percentMemoryInUse = ram.PercentUso();
txt_ram_livre.Text = ram.CapacidadeLivre();
txt_ram_uso.Text = ram.CapacidadeUtilizada();
circularProgressBarCPU.Value = (int)percentCPUInUse; // adiciona a porcentagem do CPU em uso ao valor (gráfico) da barra
circularProgressBarCPU.Text = string.Format("{0:0.00}%", percentCPUInUse);
circularProgressBarMemory.Value = (int)percentMemoryInUse; // adiciona a porcentagem da memória primária ao valor (gráfico) da barra
circularProgressBarMemory.Text = string.Format("{0:0.00}%", percentMemoryInUse);
}
private void metroButton1_Click(object sender, EventArgs e)
{
Form2 formInformation = new Form2();
formInformation.Show();
}
}
}
<file_sep>/TP_ARQUITETURA/Disco.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Management;
using System.Diagnostics;
//using System.Management.ManagementObject;
//using System.Diagnostics.PerformanceCounter;
namespace TP_ARQUITETURA
{
public class Disco
{
//VARIAVEIS COM GETSET
public string NomeUnidade { get; set; }
public string DeviceID { get; set; }
public string Nome { get; set; }
public string Rotulo { get; set; }
public string CapacidadeTotal { get; set; }
public string CapacidadeLivre { get; set; }
public string CapacidadeUtilizada { get; set; }
public string TipoParticao { get; set; }
public string TipoDisco{ get; set; }
//CONSTRUTOR
public Disco()
{
}
public void GetInfoDisk(ref List<Disco> Disks)
{
ManagementObjectSearcher InfoDisk = new ManagementObjectSearcher("root\\CIMV2", "SELECT * FROM Win32_Volume");
foreach (ManagementObject Disk in InfoDisk.Get())
{
foreach (PropertyData Propriedade in Disk.Properties)
{
if (Propriedade.Name.Length > 4 && Propriedade.Name == "Access" && Disk["DeviceID"] != null)
{
Disco novoDisco = new Disco();
novoDisco.Nome = Disk["Name"].ToString();
novoDisco.DeviceID = Disk["DeviceID"].ToString();
try
{
novoDisco.Rotulo = Disk["Label"].ToString();
}
catch (NullReferenceException)
{
novoDisco.Rotulo = "null";
}
try
{
novoDisco.NomeUnidade = Disk["Caption"].ToString();
novoDisco.CapacidadeTotal = Conversoes.ConverterUnMedida(Disk["Capacity"].ToString());
novoDisco.CapacidadeLivre = Conversoes.ConverterUnMedida(Disk["FreeSpace"].ToString());
novoDisco.CapacidadeUtilizada = Conversoes.ConverterUnMedida((Convert.ToDouble(Disk["Capacity"]) - Convert.ToDouble(Disk["FreeSpace"])).ToString());
novoDisco.TipoParticao = Disk["FileSystem"].ToString();
}
catch (NullReferenceException)
{
novoDisco.NomeUnidade = "null";
novoDisco.CapacidadeTotal = "null";
novoDisco.CapacidadeLivre = "null";
novoDisco.CapacidadeUtilizada = "null";
novoDisco.TipoParticao = "null";
}
switch (Convert.ToInt32(Disk["DriveType"]))
{
case 1:
novoDisco.TipoDisco = "Nenhum diretório raiz";
break;
case 2:
novoDisco.TipoDisco = "Disco removível";
break;
case 3:
novoDisco.TipoDisco = "Disco local";
break;
case 4:
novoDisco.TipoDisco = "Unidade de rede";
break;
case 5:
novoDisco.TipoDisco = "Disco compacto";
break;
case 6:
novoDisco.TipoDisco = "Disco RAM";
break;
default:
novoDisco.TipoDisco = "Desconhecido";
break;
}
Disks.Add(novoDisco);
}
}
}
}
public string GetProperties(string query)
{
switch (query)
{
case "DeviceID":
return this.DeviceID;
case "Nome":
return this.Nome;
case "NomeUnidade":
return this.NomeUnidade;
case "Rotulo":
return this.Rotulo;
case "TipoParticao":
return this.TipoParticao;
case "TipoDisco":
return this.TipoDisco;
case "CapacidadeTotal":
return this.CapacidadeTotal;
case "CapacidadeUilizada":
return this.CapacidadeUtilizada;
case "CapacidadeLivre":
return this.CapacidadeLivre;
default:
return "No Information Available";
}
}
}
}
<file_sep>/TP_ARQUITETURA/Processador.cs
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Management;
namespace TP_ARQUITETURA
{
public class Processador
{
private PerformanceCounter cpuCounter = new PerformanceCounter("Processor", "% Processor Time", "_Total");
private ManagementObjectSearcher InfoProcess = new ManagementObjectSearcher("root\\CIMV2", "SELECT * FROM Win32_Processor");
private ManagementObjectSearcher InfoCache = new ManagementObjectSearcher("root\\CIMV2", "SELECT * FROM Win32_CacheMemory");
// VARIAVEIS COM GETSET
public string Nome { get; set; }
public string Nucleos { get; set; }
public string ProcessadoresLogicos { get; set; }
public string FrequeciaMaxima { get; set; }
public string Arquitetura { get; set; }
public string L1Cache { get; set; }
public string L2Cache { get; set; }
public string L3Cache { get; set; }
//CONSTRUTOR
public Processador()
{
this.InfoProcessador();
}
private void InfoProcessador()
{
foreach (ManagementObject processador in InfoProcess.Get())
{
this.Nome = processador["Name"].ToString();
this.Nucleos = processador["NumberOfCores"].ToString();
this.ProcessadoresLogicos = processador["NumberOfLogicalProcessors"].ToString();
this.L2Cache = string.Format("{0} KB",processador["L2CacheSize"]);
this.L3Cache = string.Format("{0:0.0} MB", Convert.ToDouble(processador["L3CacheSize"])/1024);
this.FrequeciaMaxima = string.Format("{0:0.0} GHz", Convert.ToDouble(processador["CurrentClockSpeed"])/1000);
switch (Convert.ToInt32(processador["Architecture"]))
{
case 0:
this.Arquitetura = "x86";
break;
case 9:
this.Arquitetura = "x64";
break;
default:
this.Arquitetura = "Desconhecido";
break;
}
}
foreach(ManagementObject cache in InfoCache.Get())
{
if (Convert.ToString(cache["Purpose"]).Contains("L1"))
{
this.L1Cache = string.Format("{0} x {1} KB", this.Nucleos ,cache["InstalledSize"]);
}
}
}
public float PercentUso() { return cpuCounter.NextValue(); }
}
}
| 9adb2e84aeaa9973f188699d26923c359c6d5374 | [
"Markdown",
"C#"
] | 6 | Markdown | K4YO/SysInfo | 3aa7c046c16fa635b35a97aaaeaba21812956cef | 7b28b54c077964b52f468fe8ecb4a2a2a66ff07e | |
refs/heads/master | <file_sep>package com.itheima.service;
import com.itheima.domain.Orders;
import java.util.List;
public interface OrdersService {
/*查询所有订单*/
List<Orders> findAll(Integer pageNum,Integer pageSize) throws Exception;
/*通过id查找订单详情*/
Orders findById(String id);
}
<file_sep>jdbc.driver=oracle.jdbc.OracleDriver
jdbc.url=jdbc:oracle:thin:@192.168.32.128:1521:orcl
jdbc.user=itheima
jdbc.pwd=<PASSWORD><file_sep>package com.itheima.service.impl;
import com.itheima.domain.Role;
import com.itheima.domain.UserInfo;
import com.itheima.mapper.UserMapper;
import com.itheima.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.authority.SimpleGrantedAuthority;
import org.springframework.security.core.userdetails.User;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.List;
@Service("userService")
@Transactional
public class UserServiceImpl implements UserService {
@Autowired
private UserMapper userMapper;
/*查询所有用户*/
@Override
public List<UserInfo> findAll() throws Exception {
return userMapper.findAll();
}
/*保存用户*/
@Override
public void saveUser(UserInfo userInfo) throws Exception {
userMapper.saveUser(userInfo);
}
/*通过id查找用户*/
@Override
public UserInfo findUserById(String id) throws Exception {
UserInfo user = userMapper.findUserById(id);
return user;
}
@Override
public void updateUser(UserInfo userInfo) throws Exception {
userMapper.updateUser(userInfo);
}
@Override
/*登录安全认证*/
public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {
System.out.println(username);
/*通过username找到userinfo对象*/
UserInfo userInfo = null;
try {
userInfo = userMapper.findByUserName(username);
} catch (Exception e) {
e.printStackTrace();
}
User user = new User(userInfo.getUsername(),userInfo.getPassword(),
userInfo.getStatus()==0?false:true,
true,true,
true, getRoles(userInfo.getRoles()));
/*将userinfo对象装入userdetailsservice中的user对象中*/
return user;
}
public List<SimpleGrantedAuthority> getRoles(List<Role> rolesList){
List<SimpleGrantedAuthority> roles=new ArrayList<SimpleGrantedAuthority>();
for (Role role:rolesList){
SimpleGrantedAuthority sga=new SimpleGrantedAuthority("ROLE_"+role.getRoleName());
roles.add(sga);
}
return roles;
}
}
| 9d03341c3ba3ce3f1443e5a7455e96b3a5842ec8 | [
"Java",
"INI"
] | 3 | Java | kibrosple/ssm02 | 65823d7733393a4abaaa4da055297640ba88f94d | c3b24c946c57a7da6bf21a1a59833b04fa10ab3b | |
refs/heads/master | <file_sep>class Node(object):
def __init__(self,data):
self.data = data
self.left = None
self.right = None
class BST(object):
def __init__(self):
self.root = None
def insert(self,data):
node = Node(data)
if self.root is None:
self.root = node
else:
self.insertNode(self.root, node)
def insertNode(self, root, node):
if node.data <= root.data:
if root.left is None:
root.left = node
else:
self.insertNode(root.left, node)
else:
if root.right is None:
root.right = node
else:
self.insertNode(root.right, node)
def traverse(self):
if self.root:
self.inOrder(self.root)
def inOrder(self, root):
if root is None:
return
else:
self.inOrder(root.left)
print(root.data)
self.inOrder(root.right)
def getMax(self):
if self.root :
return self.findMaxValue(self.root)
def findMaxValue(self,root):
if root.right is None:
return self.findMax(root.right)
return root.data
def getMin(self):
if self.root:
return self.findMaxValue(self.root)
def findMinValue(self,root):
if root.left:
return self.findMin(root.left)
return root.data
def delete(self,data):
if self.root:
self.root = self.deleteNode(self.root,data)
def deleteNode(self,root, data):
if root is None:
return root
elif data <= root.data:
root.left = self.deleteNode(root.left,data)
elif data > root.data:
root.right = self.deleteNode(root.right,data)
else:
if root.right is None and root.left is None:
del root
return None
elif root.left is None:
tempNode = root.right
del root
return tempNode
elif root.right is None:
tempNode = root.left
del root
return tempNode
else:
tempdata = self.getPredecessor(root.left)
root.data = data
self.deleteNode(root.right,tempdata)
return root
def getPredecessor(self, root):
if root.right:
return self.getMin(root.right)
return root
def getSucceesor(self, root):
pass
<file_sep>class Vertex(object):
def __init__(self, data):
self.data = data
self.neighbours = []
self.visited = False
def addNeighbours(self, v):
self.neighbours.append(v)
self.neighbours.sort()
class Graph(object):
def __init__(self):
self.vertices = {}
def addVertex(self, vertex):
if isinstance(vertex, Vertex) and vertex not in self.vertices:
self.vertices[vertex.data] = vertex
return True
return False
def addEdge(self,v1, v2):
if v1 in self.vertices and v2 in self.vertices:
self.vertices[v1].addNeighbours(v2)
self.vertices[v2].addNeighbours(v1)
return True
return False
def print_graph(self):
for key in sorted(list(self.vertices.keys())):
print(key + " -> "+str(self.vertices[key].neighbours))
graph = Graph()
for i in range(ord("A"), ord("K")):
graph.addVertex(Vertex(chr(i)))
edges = ['AB', 'AE', 'BF', 'CG', 'DE', 'DH', 'EH', 'FG', 'FI', 'FJ', 'GJ', 'HI']
for edge in edges:
graph.addEdge(edge[:1],edge[1:])
graph.print_graph()<file_sep>class Node(object):
def __init__(self, name):
self.name = name
self.neighbours = []
self.visited = False
def addNeighbours(self,node):
self.neighbours.append(node)
class BreadthFirstSearch(object):
def bfs(self,startNode):
queue = []
queue.append(startNode)
startNode.visited = True
while queue:
actualNode = queue.pop(0)
print(actualNode.name)
for n in actualNode.neighbours:
if not n.visited:
n.visited = True
queue.append(n)
node1 = Node("A")
node2 = Node("B")
node3 = Node("C")
node4 = Node("D")
node5 = Node("E")
node1.addNeighbours(node2)
node1.addNeighbours(node3)
node1.addNeighbours(node4)
node2.addNeighbours(node1)
node3.addNeighbours(node1)
node3.addNeighbours(node4)
node4.addNeighbours(node1)
node4.addNeighbours(node3)
node4.addNeighbours(node5)
node5.addNeighbours(node4)
bfs = BreadthFirstSearch()
bfs.bfs(node1)
<file_sep>INF = 100000
import heapq
class PriorityQueueMap(object):
def __init__(self):
self.eq = []
self.eq_finder = {}
def add(self, key, priority=INF):
self.eq_finder[key] = priority
heapq.heappush(self.eq, [priority,key])
def getMin(self):
minVertex = heapq.heappop(self.eq)[1]
self.eq_finder.pop(minVertex)
return minVertex
def decrease(self,key, priority):
previousPriority = self.eq_finder[key]
self.eq_finder[key] = priority
index = self.eq.index([previousPriority, key])
del self.eq[index]
heapq.heappush(self.eq,[priority,key])
class Edge(object):
def __init__(self, startVertex, endVertex, weight):
self.startVertex = startVertex
self.endVertex = endVertex
self.weight = weight
class Vertex(object):
def __init__(self,name):
self.name = name
self.neighbours = []
self.visited = False
self.edges = []
def addNeighbour(self,v):
self.neighbours.append(v)
class Graph(object):
def __init__(self, numVertex):
self.numberVertex = numVertex
self.vertexs = {}
self.edges = []
def addVertex(self, name):
vertex = Vertex(name)
self.vertexs[name] = vertex
def addEdge(self, u, v, w):
edge = Edge(u,v,w)
self.vertexs[u].addNeighbour(v)
self.vertexs[v].addNeighbour(u)
self.vertexs[u].edges.append(edge)
self.vertexs[v].edges.append(edge)
self.edges.append(edge)
def DijkstraAlgorithm(self, sourceVertex = 0):
vertexParent = {}
vertexDistance = {}
queue = PriorityQueueMap()
for key in self.vertexs.keys():
queue.add(key)
queue.decrease(sourceVertex,0)
vertexParent[sourceVertex] = None
vertexDistance[sourceVertex] = 0
while len(queue.eq_finder) > 0:
currentVertex = queue.getMin()
print("CurrentVertex ",currentVertex)
for edge in self.vertexs[currentVertex].edges:
print("Start vertex", edge.startVertex)
print("End Vertex", edge.endVertex)
print("Weight ",edge.weight)
otherVertex = self.get_other_vertex_for_edge(currentVertex, edge)
if not otherVertex in queue.eq_finder:
continue
new_distance = int(edge.weight) + int(vertexDistance[currentVertex])
if queue.eq_finder[otherVertex] > new_distance:
vertexParent[otherVertex] = currentVertex
vertexDistance[otherVertex] = new_distance
queue.decrease(otherVertex, new_distance)
print(vertexParent)
print(sorted(vertexDistance.items(), key=lambda s: s[0]))
def get_other_vertex_for_edge(self, vertex, edge):
if edge.startVertex == vertex:
return edge.endVertex
else:
return edge.startVertex
graph = Graph(9)
for i in range(graph.numberVertex):
graph.addVertex(i)
graph.addEdge(0,1,4)
graph.addEdge(0,7,8)
graph.addEdge(1,2,8)
graph.addEdge(1,7,11)
graph.addEdge(2,3,7)
graph.addEdge(2,8,2)
graph.addEdge(2,5,4)
graph.addEdge(3,4,9)
graph.addEdge(3,5,14)
graph.addEdge(4,5,10)
graph.addEdge(5,6,2)
graph.addEdge(6,7,1)
graph.addEdge(6,8,6)
graph.addEdge(7,8,7)
graph.DijkstraAlgorithm()
<file_sep>class BinaryNode(object):
def __init__(self,data):
self.data = data
self.left = None
self.right = None
def getRight(self):
return self.right
def getLeft(self):
return self.left
def setRight(self, right):
self.right = right
def setLeft(self, left):
self.left = left
class BinarySearchTree(object):
def __init__(self):
self.root = None
def getNewNode(self, data):
new_node = BinaryNode(data)
return new_node
def insert(self, data):
node = BinaryNode(data)
if self.root is None:
self.root = node
else:
self.insertNode(self, self.root, node)
def insertNode(self, root, node):
if node.data <= root.data:
if root.left is None:
root.left = node
else:
self.insertNode(root.left,node)
elif node.data > root.data:
if root.right is None:
root.right = node
else:
self.insertNode(root.right, node)
def searchKey(self, root, key):
if root is None:
return False
elif root.data == key:
return True
elif key < root.data:
return self.searchKey(root.left, key)
elif key > root.data:
return self.searchKey(root.right, key)
def inOrder(self,root):
if root is None:
return
self.inOrder(root.left)
print(root.data)
self.inOrder(root.right)
def findMin(self,root):
if root is None:
return -1
else:
if root.left is not None:
return self.findMin(root.left)
return root.data
def findMax(self, root):
if root is None:
return -1
else:
if root.right is not None:
return self.findMax(root.right)
return root.data
def findHeightTree(self, root):
if root is None:
return -1
else:
return max(self.findHeightTree(root.left),self.findHeightTree(root.right)) + 1
BST = BinarySearchTree()
node = BST.getNewNode(15)
BST.insertNode(BST.root,node)
node = BST.getNewNode(10)
BST.insertNode(BST.root,node)
node = BST.getNewNode(5)
BST.insertNode(BST.root,node)
node = BST.getNewNode(25)
BST.insertNode(BST.root,node)
node = BST.getNewNode(1)
BST.insertNode(BST.root,node)
node = BST.getNewNode(40)
BST.insertNode(BST.root,node)
node = BST.getNewNode(45)
BST.insertNode(BST.root,node)
node = BST.getNewNode(35)
BST.insertNode(BST.root,node)
node = BST.getNewNode(30)
BST.insertNode(BST.root,node)
node = BST.getNewNode(50)
BST.insertNode(BST.root,node)
print(BST.searchKey(BST.root, 50))
BST.inOrder(BST.root)
print(BST.findMin(BST.root))
print((BST.findMax(BST.root)))
print(BST.findHeightTree(BST.root))<file_sep>class Node(object):
def __init__(self, data):
self.data = data
self.parent = None
self.size = 1
class DisjointSet(object):
def __init__(self):
self.set = {}
def makeSet(self,data):
new_node = Node(data)
new_node.parent = new_node
self.set[data] = new_node
def union(self,data1, data2):
node1 = self.set[data1]
node2 = self.set[data2]
parent1 = self.findSetByCompression(node1)
parent2 = self.findSetByCompression(node2)
if parent1.data == parent2.data:
return
else:
if parent1.size >= parent2.size:
parent2.parent = parent1
parent1.size = parent1.size + parent2.size
else:
parent1.parent = parent2
parent2.size = parent2.size + parent1.size
def findSetByCompression(self,node):
if node.parent == node:
return node
else:
node.parent = self.findSetByCompression(node.parent)
return node.parent
def findSizeOfCommunity(self,data):
return self.findSetByCompression(self.set[data]).size
ds = DisjointSet()
n,q = list(map(int,input().split()))
for i in range(1,n+1):
ds.makeSet(i)
for _ in range(q):
input_list = list(input().split())
if input_list[0] == 'Q':
print(ds.findSizeOfCommunity(int(input_list[1])))
elif input_list[0] == 'M':
ds.union(int(input_list[1]),int(input_list[2]))<file_sep>class Node(object):
def __init__(self, data):
self.data = data
self.parent = None
self.rank = 0
class DisjointSet(object):
def __init__(self):
self.setDict = {}
def makeSet(self,data):
new_node = Node(data)
new_node.parent = new_node
self.setDict[data] = new_node
def union(self, parent1, parent2):
if parent1.rank >= parent2.rank:
parent2.parent = parent1
parent1.rank = parent1.rank + 1 if parent1.rank == parent2.rank else parent1.rank
else:
parent1.parent = parent2
def findSetByCompression(self,node):
if node.parent == node:
return node
else:
node.parent = self.findSetByCompression(node.parent)
return node.parent
def findSet(self,data):
return self.findSetByCompression(self.setDict[data])
class Graph(object):
def __init__(self, num):
self.edgeList = []
self.numberVertices = num
def addEdge(self, u, v, w,):
self.edgeList.append([u,v,w])
def sortEdge(self):
self.edgeList = sorted(self.edgeList,key=lambda l: l[2])
def kruskalAlgorithm(self):
added_edge_list = []
ds = DisjointSet()
for i in range(0,self.numberVertices):
ds.makeSet(i)
self.sortEdge()
for arr in self.edgeList:
parent1 = ds.findSet(arr[0])
parent2 = ds.findSet(arr[1])
if parent1 == parent2:
continue
else:
ds.union(parent1,parent2)
added_edge_list.append(arr)
return added_edge_list
g = Graph(9)
g.addEdge(0,7,8)
g.addEdge(0,1,4)
g.addEdge(1,2,8)
g.addEdge(1,7,11)
g.addEdge(2,5,4)
g.addEdge(2,3,7)
g.addEdge(3,4,9)
g.addEdge(3,5,14)
g.addEdge(5,4,10)
g.addEdge(6,5,2)
g.addEdge(7,8,7)
g.addEdge(7,6,1)
g.addEdge(8,6,6)
g.addEdge(8,2,2)
print(g.kruskalAlgorithm())
<file_sep>class Evaluate(object):
def __init__(self):
self.stk = []
self.top = None
def pop(self):
try:
res = self.stk.pop()
self.top = self.stk[-1]
except IndexError:
self.top = None
return res
def push(self,data):
self.stk.append(data)
self.top = self.stk[-1]
def evaluatePostfix(self, expression):
for char in expression:
try:
data = int(char)
except ValueError:
oper2 = self.pop()
oper1 = self.pop()
res = self.evaluateExpression(char,oper1, oper2)
self.push(res)
else:
self.push(data)
print(self.getTop())
def evaluatePrefix(self,expression):
for char in expression[::-1]:
try:
data = int(char)
except ValueError:
oper1 = self.pop()
oper2 = self.pop()
res = self.evaluateExpression(char, oper1, oper2)
self.push(res)
else:
self.push(data)
print(self.getTop())
def evaluateExpression(self,operand, operator1, operator2):
if operand == '*':
return operator1 * operator2
elif operand == '/':
return operator1 // operator2
elif operand == '+':
return operator1 + operator2
elif operand == '-':
return operator1 - operator2
def infixtopostfix(self,expression):
pass
def getTop(self):
return self.top
evalexper = Evaluate()
evalexper.evaluatePostfix('23*54*+9-')
evalexper.evaluatePrefix('-+*23*549')
<file_sep>class Graph:
def __init__(self, n):
self.noOfVertex = n
self.matrix = [[0 for _ in range(n)] for _ in range(n)]
def addEdge(self, u,v):
self.matrix[u-1][v-1] = 1
self.matrix[v-1][u-1] = 1
def dfs(self):
pass
graph = Graph(6)
graph.addEdge(1,2)
graph.addEdge(1,3)
graph.addEdge(2,4)
graph.addEdge(4,5)
graph.addEdge(2,3)
graph.addEdge(6,1)
graph.addEdge(6,2)
print(graph.matrix)<file_sep>def reverse(str):
if len(str) == 1:
return str
return reverse(str[1:]) + str[0]
print(reverse("Ravi"))
def permute(str):
out = []
if len(str) == 1:
out = [str]
else:
for i,let in enumerate(str):
for perm in permute(str[:i] + str[i+1:]):
print(perm)
out += [let+perm]
return out
print(permute('abc'))<file_sep>class Heap(object):
def __init__(self):
self.heap = []
self.size = 0
def build_max_heap(self, arr):
self.size = len(arr)
self.heap = arr
for i in range(self.size//2, -1,-1):
self.max_heapify(i)
def swap(self,i, j):
self.heap[i], self.heap[j] = self.heap[j], self.heap[i]
def max_heapify(self, index):
left = 2 * index + 1
right = 2 * index +2
largest = index
if left < self.size and self.heap[largest] < self.heap[left]:
largest = left
if right < self.size and self.heap[largest] < self.heap[right]:
largest = right
if largest != index:
self.swap(index,largest)
self.max_heapify(largest)
def heapSort(self, array):
self.build_max_heap(array)
for i in range(self.size-1,0,-1):
self.swap(i,0)
self.size -= 1
self.max_heapify(0)
heap = Heap()
heap.heapSort([3,4,9,7,8,2,5,6,1])
print(heap.heap)<file_sep>class Node(object):
def __init__(self, data):
self.data = data
self.next = None
def setNext(self,next):
self.next = next
def setData(self, data):
self.data = data
def getNext(self):
return self.next
def getData(self):
return self.data
class Queue(object):
def __init__(self):
self.top = None
self.end = None
def enqueue(self,data):
new_node = Node(data)
if self.top is None:
self.top = new_node
else:
current = self.top
while current.next is not None:
current = current.next
current.setNext(new_node)
self.end = new_node
def dequeue(self):
self.top = self.top.next
if self.top is None:
self.end = None
def getTop(self):
return self.top
def display(self):
current = self.top
while current is not None:
print(current.data)
current = current.next
q = Queue()
q.enqueue(1)
q.enqueue(2)
q.enqueue(5)
q.enqueue(8)
q.enqueue(9)
q.dequeue()
q.display()<file_sep>class Node(object):
def __init__(self, data):
self.data = data
self.left = None
self.right = None
class BinarySearchTree(object):
def __init__(self):
self.root = None
def addData(self, data):
new_node = Node(data)
if self.root is None:
self.root = new_node
else:
self.addUtil(self.root,new_node)
def addUtil(self, startingNode, node):
if node.data <= startingNode.data:
if startingNode.left is None:
startingNode.left = node
else:
self.addUtil(startingNode.left, node)
else:
if startingNode.right is None:
startingNode.right = node
else:
self.addUtil(startingNode.right, node)
def searchkey(self,key, node):
if node is None:
return False
if node.data == key:
return True
else:
if node.data < key:
self.searchkey(key, node.right)
else:
self.searchkey(key, node.left)
def getMax(self, node):
if node.right is None:
return node.data
else:
self.getMax(node.right)
def getMin(self, node):
if node.left is None:
return node.data
else:
self.getMin(node.left)
def getLowestCommonAncestor(self,data1,data2, node):
if node.data > data1 and node.data > data2:
self.getLowestCommonAncestor(data1, data2, node.left)
elif node.data < data1 and node.data < data2:
self.getLowestCommonAncestor(data1, data2, node.right)
else:
print(node.data)
def inOrder(self, node):
if node is None:
return
else:
self.inOrder(node.left)
print(node.data)
self.inOrder(node.right)
def checkBST(self):
return self.checkBSTUtil(self.root, -1400, 1400)
def checkBSTUtil(self, node, min, max):
if node is None:
return True
else:
if min <= node.data and node.data > max:
return False
return (self.checkBSTUtil(node.left, min, node.data) and self.checkBSTUtil(node.right, node.data, max))
BST = BinarySearchTree()
BST.addData(10)
BST.root.left = Node(24)
BST.root.right = Node(25)
print(BST.checkBST())
'''
BST.addData(10)
BST.addData(-10)
BST.addData(30)
BST.addData(25)
BST.addData(60)
BST.addData(28)
BST.addData(78)
print(BST.checkBST())
'''
<file_sep>import heapq
INF = 1000000
class PriorityQueueMap(object):
def __init__(self):
self.eq = []
self.entry_finder = {}
def add(self, key, prioprity = INF):
if key in self.entry_finder:
raise KeyError("Key already exists")
self.entry_finder[key] = prioprity
heapq.heappush(self.eq,[prioprity, key])
def delete(self, task):
if not task in self.entry_finder:
raise KeyError("Key doesnt exist")
self.entry_finder.pop(task)
def getMin(self):
minVertex = heapq.heappop(self.eq)[1]
self.entry_finder.pop(minVertex)
return minVertex
def descrease(self, key, priority):
previousPriority = self.entry_finder[key]
self.entry_finder[key] = priority
index = self.eq.index([previousPriority, key])
del self.eq[index]
heapq.heappush(self.eq,[priority, key])
class Edge(object):
def __init__(self, vertex1, vertex2, weight ):
self.startingVertex = vertex1
self.endVertex = vertex2
self.weight = weight
class Vertex(object):
def __init__(self, data):
self.name = data
self.adjanceyList = []
self.visited = False
self.edges = []
def addNeighbours(self,edge, neighbour):
self.adjanceyList.append(neighbour)
self.edges.append(edge)
def getEdge(self):
return self.edges
class Graph():
def __init__(self):
self.vertexList = {}
self.edgeList = {}
def addEdge(self,u,v,w):
edge = Edge(u,v,w)
self.edgeList[u+v] = edge
self.vertexList[u].addNeighbours(edge, v)
self.vertexList[v].addNeighbours(edge, u)
def addVertex(self,data):
self.vertexList[data] = Vertex(data)
def PrimsAlgorithm(self, startVertex):
resultEdge = []
vertexEdge = {}
queue = PriorityQueueMap()
for key in self.vertexList.keys():
queue.add(key)
queue.descrease(startVertex, 0)
while len(queue.entry_finder) > 0:
vertex = queue.getMin()
if vertex in vertexEdge:
resultEdge.append(vertexEdge[vertex])
for edge in self.vertexList[vertex].edges:
adjacent = self.get_other_vertex_for_edge(vertex,edge)
if adjacent in queue.entry_finder and edge.weight < queue.entry_finder[adjacent]:
queue.descrease(adjacent, edge.weight)
vertexEdge[adjacent] = edge.startingVertex + edge.endVertex
print(resultEdge)
def get_other_vertex_for_edge(self ,vertex, edge):
if edge.startingVertex == vertex:
return edge.endVertex
else:
return edge.startingVertex
graph = Graph()
for i in range(ord("A"), ord("G")):
graph.addVertex(chr(i))
graph.addEdge("A","D",1)
graph.addEdge("A","B",3)
graph.addEdge("B","D",3)
graph.addEdge("B","C",1)
graph.addEdge("C","E",5)
graph.addEdge("C","D",1)
graph.addEdge("C","F",4)
graph.addEdge("D","E",6)
graph.addEdge("F","E",2)
graph.PrimsAlgorithm("A")
<file_sep>class BalanacedParentheses(object):
def __init__(self):
self.stk = []
self.top = None
def pop(self):
self.stk.pop()
try:
self.top = self.stk[-1]
except IndexError:
self.top = None
def push(self,data):
self.stk.append(data)
self.top = self.stk[-1]
def balancedParantheses(self, string):
for para in string:
if para == '(' or para =='{' or para == '[':
self.push(para)
elif para == '}' or para == ')' or para == ']':
if self.arePair(self.top, para):
self.pop()
else:
return False
return self.isEmpty()
def arePair(self,opening, closing):
return(
opening == '(' and closing == ')'
or opening == '[' and closing == ']'
or opening == '{' and closing == '}'
)
def isEmpty(self):
return len(self.stk) == 0
#stk = BalanacedParentheses()
#print(stk.balancedParantheses(input()))
import sys
class Stack(object):
def __init__(self):
self.stk = []
self.top = None
def push(self, data):
self.stk.append(data)
self.top = self.stk[-1]
def pop(self):
try:
self.stk.pop()
self.top = self.stk[-1]
except IndexError:
self.top = None
def isEmpty(self):
return len(self.stk) == 0
def isClosingPair(self, opening, close):
return (
opening == '(' and close == ')' or
opening == '{' and close == '}' or
opening == '[' and close == ']'
)
def balancedParanthese(self, expression):
for para in expression:
if para in ['(', '{', '[']:
self.push(para)
elif para in [')', '}', ']']:
if self.isClosingPair(self.top, para):
self.pop()
else:
return 'NO'
else:
if self.isEmpty():
return 'YES'
else:
return 'NO'
t = int(input().strip())
for a0 in range(t):
s = input().strip()
stack = Stack()
print(stack.balancedParanthese(s))<file_sep>class Heap(object):
def __init__(self):
self.arr = []
self.heap_size = 0
def build_max_heap(self):
length = (len(self.arr) // 2)
while length > 0:
self.max_heapify(length)
length -= 1
def max_heapify(self, i):
l = self.left(i)
r = self.right(i)
largest = self.arr[i]
if l > largest:
largest = l
if r > largest:
largest = r
l_index = self.arr.index(largest)
if l_index != i:
(self.arr[i],self.arr[l_index]) = (self.arr[l_index],self.arr[i])
self.max_heapify(l_index)
def min_heapify(self,i):
l = self.left(i)
r = self.right(i)
smallest = self.arr[i]
if self.arr.index(l) <= self.heap_size and l < smallest:
smallest = l
if self.arr.index(r) <= self.heap_size < smallest:
smallest = r
l_index = self.arr.index(smallest)
if l_index != i:
self.arr[i],self.arr[l_index] = self.arr[l_index],self.arr[i]
self.min_heapify(l_index)
def right(self,i):
if i == 0:
return self.arr[1]
try:
return self.arr[2*i]
except IndexError:
return 0
def left(self,i):
if i == 0:
return self.arr[2]
try:
return self.arr[2*i + 1]
except IndexError:
return 0
def setArr(self,arr):
self.arr = arr
self.heap_size = len(self.arr)
def HeapSort(self):
l = []
self.build_max_heap()
length = len(self.arr)
for i in range(length-1, 2,-1):
self.arr[i],self.arr[1] = self.arr[1],self.arr[i]
l.append(self.arr.pop())
self.heap_size -= 1
self.max_heapify(1)
l.extend(self.arr[1:])
self.arr = l[::-1]
heap = Heap()
heap.setArr([0,4,1,3,2,16,9,10,14,8,7])
heap.HeapSort()
print(heap.arr)<file_sep>class Node(object):
def __init__(self,name):
self.name = name
self.parent = None
self.size = 1
def setParent(self, parent):
self.parent = parent
def getParent(self):
return self.parent
<file_sep>class Node(object):
def __init__(self,data, next = None, previous = None):
self.data = data
self.next = next
self.previous = previous
def setData(self, data):
self.data = data
def setPrevious(self, previous):
self.previous = previous
def setNext(self, next):
self.next = next
def getData(self):
return self.data
def getNext(self):
return self.next
def getPrevious(self):
return self.previous
class DoubleLinkedList(object):
def __init__(self):
self.head = None
self.count = 0
def addNodeAtEnd(self, data):
new_node = Node(data)
if self.count == 0:
self.head = new_node
else:
current = self.head
while current.getNext() is not None:
current = current.getNext()
current.setNext(new_node)
new_node.setPrevious(current)
self.count += 1
def addNodeAtStart(self,data):
new_node = Node(data)
if self.count == 0:
self.head = new_node
else:
current = self.head
current.setPrevious(new_node)
new_node.setNext(current)
self.head = new_node
self.count += 1
def addNodeAtPosition(self,data,position):
if position > self.count or position < 0:
print('Print Invalid Position')
else:
if position == self.count:
self.addNodeAtEnd(data)
elif position == 1:
self.addNodeAtStart(data)
else:
current = self.head
new_node = Node(data)
current_position = 1
while current_position != position:
current = current.getNext()
current_position += 1
next = current.getNext() #Getting next node
current.setNext(new_node) #setting current->next = new_node
new_node.setPrevious(current) #setting new_node->previous = current
new_node.setNext(next) #setting new_node -> next = next
next.setPrevious(new_node) #next->previous = new_node
self.count+=1
def deleteNodeAtStart(self):
if self.count == 0:
print('List Is Empty')
else:
current = self.head
next = current.getNext()
current.setNext(None)
next.setPrevious(None)
self.head = next
self.count -= 1
def deleteNodeAtEnd(self):
if self.count == 0:
print('List is empty')
else:
current = self.head
while current.getNext() is not None:
current = current.getNext()
previous = current.getPrevious()
current.setPrevious(None)
previous.setNext(None)
self.count -= 1
def deleteNodeAtPosition(self, position):
if position > self.count or position < 1:
print('Invalid position')
elif position == self.count:
self.deleteNodeAtEnd()
elif position == 1:
self.deleteNodeAtStart()
else:
current = self.head
current_position = 1
while current_position != position:
current = current.getNext()
current_position += 1
previous = current.getPrevious()
next = current.getNext()
previous.setNext(next)
next.setPrevious(previous)
current.setPrevious(None)
current.setNext(None)
self.count -= 1
def reverseDoubleLinkedList(self):
if self.count == 0:
return
else:
current = self.head
while current is not None:
previous = current.getPrevious()
next = current.getNext()
current.setPrevious(next)
current.setNext(previous)
previous = current
current = next
self.head = previous
def printAllNode(self):
current = self.head
while current != None:
print('---------------------------------')
print('Data {0}'.format(current.getData()))
print('Current {0}'.format(current))
print('Previous {0}'.format(current.getPrevious()))
print('Next {0}'.format(current.getNext()))
print('---------------------------------')
current = current.getNext()
def getCount(self):
return self.count
def PrintReverse(self, head):
if head is None:
return
self.PrintReverse(head.next)
print(head.data)
d = DoubleLinkedList()
d.addNodeAtEnd(12)
d.addNodeAtEnd(13)
d.addNodeAtEnd(15)
d.addNodeAtEnd(19)
d.addNodeAtStart(10)
d.addNodeAtPosition(14,3)
d.printAllNode()
d.deleteNodeAtStart()
d.deleteNodeAtEnd()
d.deleteNodeAtPosition(2)
d.printAllNode()
d.reverseDoubleLinkedList()
d.printAllNode()<file_sep>class Vertex(object):
def __init__(self, name):
self.name = name
self.neighbours = []
self.visited = False
def addNeighbours(self, vertex):
self.neighbours.append(vertex)
class Graph(object):
def __init__(self):
self.vertices = {}
def addVertex(self, vertex):
if isinstance(vertex, Vertex) and vertex not in self.vertices:
self.vertices[vertex.name] = vertex
return True
return False
def addEdge(self,u,v):
self.vertices[u].addNeighbours(self.vertices[v])
def DFS(self,v):
v.visited = True
print(v.name)
for vertex in v.neighbours:
if not vertex.visited:
self.DFS(vertex)
def TopologicalUtil(self, vertex, sorted):
if not vertex.visited:
vertex.visited = True
for v in vertex.neighbours:
if not v.visited:
self.TopologicalUtil(v,sorted)
sorted.append(vertex.name)
def TopologicalSort(self):
sorted = []
for key in self.vertices.keys():
if not self.vertices[key].visited:
self.TopologicalUtil(self.vertices[key],sorted)
print(sorted)
graph = Graph()
graph = Graph()
for i in range(ord("A"), ord("I")):
graph.addVertex(Vertex(chr(i)))
edges = ['AC', 'BC', 'BD', 'CE', 'DF', 'EH', 'EF', 'FG',]
for edge in edges:
graph.addEdge(edge[:1],edge[1:])
graph.TopologicalSort()<file_sep>class BinaryTreeNode(object):
def __init__(self, data):
self.data = data
self.left = None
self.right = None
def setLeft(self,left):
self.left = left
def setRight(self,right):
self.right = right
def getLeft(self):
return self.left
def getRight(self):
return self.right
def getData(self):
return self.data
class BinaryTree(object):
def __init__(self):
self.root = None
def getNewNode(self,data):
new_node = BinaryTreeNode(data)
return new_node
def InsertNode(self, root, node):
if root is None:
self.root = node
else:
if root.data > node.data:
if root.left is None:
root.left = node
else:
self.InsertNode(root.left, node)
elif root.data < node.data:
if root.right is None:
root.right = node
else:
self.InsertNode(root.right, node)
def SearchNode(self,root, key):
if root is None:
return False
elif root.data == key:
return True
elif key < root.data:
return self.SearchNode(root.left, key)
elif key > root.data:
return self.SearchNode(root.right, key)
def getMin(self,root):
if root.left is None:
return root.data
else:
return self.getMin(root.left)
def getMax(self,root):
if root.right is None:
return root.data
else:
return self.getMax(root.right)
def FindHeight(self, root):
if root is None:
return -1
return max(self.FindHeight(root.left), self.FindHeight(root.right)) + 1
def leveorder(self):
if self.root is None:
return
else:
l = []
l.append(self.root)
while len(l) != 0:
node = l.pop(0)
print(node.data)
if node.left is not None:
l.append(node.left)
if node.right is not None:
l.append(node.right)
def preorder(self,root):
if root is None:
return
print(root.data)
self.preorder(root.left)
self.preorder(root.right)
def inorder(self, root):
if root is None:
return
self.inorder(root.left)
print(root.data)
self.inorder(root.right)
def postorder(self, root):
if root is None:
return
self.postorder(root.left)
self.postorder(root.right)
print(root.data)
BT = BinaryTree()
node = BT.getNewNode(15)
BT.InsertNode(BT.root,node)
node = BT.getNewNode(20)
BT.InsertNode(BT.root,node)
node = BT.getNewNode(30)
BT.InsertNode(BT.root,node)
node = BT.getNewNode(5)
BT.InsertNode(BT.root,node)
node = BT.getNewNode(10)
BT.InsertNode(BT.root,node)
node = BT.getNewNode(25)
BT.InsertNode(BT.root,node)
node = BT.getNewNode(28)
BT.InsertNode(BT.root,node)
node = BT.getNewNode(45)
BT.InsertNode(BT.root,node)
#print(BT.getMin(BT.root))
#print(BT.getMax(BT.root))
#print(BT.SearchNode(BT.root,45))
#print(BT.FindHeight(BT.root))
#BT.leveorder()
BT.preorder(BT.root)
BT.inorder(BT.root)
BT.postorder(BT.root)<file_sep>class Node(object):
def __init__(self,data):
self.key = data
self.right = None
self.left = None
self.parent = None
class BST(object):
def __init__(self):
self.root = None
def insert(self,data):
node = Node(data)
if self.root is None:
self.root = node
self.root.parent = self.root
else:
self.insertNode(self.root,node)
def insertNode(self, root, node):
if node.key <= root.key:
if root.left is None:
root.left = node
node.parent = root
else:
self.insertNode(root.left, node)
else:
if root.right is None:
root.right = node
node.parent = root
else:
self.insertNode(root.right, node)
def getMinTree(self):
if self.root is None:
return self.root
else:
return self.getMin(self.root)
def getMin(self, root):
if root.left is not None:
return self.getMin(root.left)
return root
def getMaxTree(self):
if self.root is None:
return self.root
else:
return self.getMax(self.root)
def getMax(self, root):
if root.right:
return self.getMax(root.right)
return root
def successor(self, root):
if root.right:
return self.getMin(root.right)
y = root.parent
while y is not None and root == y.right:
root = y
y = y.parent
return y
def predecessor(self, root):
if root.left:
return self.getMax(root.left)
y = root.parent
while y is not None and root == y.left:
root = y
y = y.parent
return y
def delete(self, data):
if self.root:
self.root = self.removeNode(self.root, data)
def removeNode(self, root, data):
if root is None:
return root
elif data < root.key:
root.left = self.removeNode(root.left, data)
elif data > root.key:
root. right = self.removeNode(root.right, data)
else:
if root.right is None and root.left is None:
del root
return None
elif root.right is None:
tempNode = root.left
del root
return tempNode
elif root.left is None:
tempNode = root.right
del root
return tempNode
else:
tempNode = self.successor(root)
root.key = tempNode.key
root.right = self.removeNode(root.right,tempNode.key)
return root
def traverse(self):
if self.root is not None:
self.traverseInOrder(self.root)
def traverseInOrder(self, root):
if root is None:
return
else:
self.traverseInOrder(root.left)
print(root.key)
self.traverseInOrder(root.right)
def heightOfTree(self, root):
if root is None:
return -1
return max(self.heightOfTree(root.left), self.heightOfTree(root.right)) + 1
tree = BST()
tree.insert(15)
tree.insert(6)
tree.insert(18)
tree.insert(3)
tree.insert(7)
tree.insert(17)
tree.insert(20)
tree.insert(2)
tree.insert(4)
tree.insert(13)
#tree.insert(9)
#print(tree.root.key)
tree.traverse()
#node = tree.successor()
#print(node.key)
tree.delete(6)
print('-----------')
print('')
tree.traverse()
node = tree.predecessor(tree.root)
print(node.key)
#for _ in range(int(input())):
# user_oper = list(map(int,input().split()))
# if user_oper[0] == 1: # insert new node in tree
# tree.insert(int(user_oper[1]))
# elif user_oper[0] == 2: # delete node in tree
# tree.delete()
# elif user_oper[0] == 3: # get the Min of Tree
# tree.getMinTree()
# elif user_oper[0] == 4: #get the Max of Tree
# tree.getMaxTree()
# elif user_oper[0] == 5: #get the Successor of tree
# tree.successor(tree.root)
# elif user_oper[0] == 6:
# node = tree.successor(tree.root)
# print(node.data)
# elif user_oper[0] == 7:
# tree.traverse()
<file_sep>def rec_sum(n):
if n == 0:
return 0
else:
return n + rec_sum(n-1)
print(rec_sum(5))
def sum_func(n):
if n < 1:
return 0
else:
return n%10 + sum_func(n//10)
print(sum_func(4321))
def word_split(phrase,list_of_words, output = None):
if output is None:
output = []
for word in list_of_words:
if phrase.startwith(word):
output.append(word)
return word_split(phrase[len(word):],list_of_words, output)
return output<file_sep>class Node(object):
def __init__(self, data):
self.data = data
self.next = None
def setNext(self,next):
self.next = next
def setData(self,data):
self.data = data
def getData(self):
return self.data
def getNext(self):
return self.next
class Stack(object):
def __init__(self, limit = 10):
self.limit = limit
self.top = None
self.count = 0
def push(self, data):
if self.isFull():
print('Stack is Overflow')
return
else:
new_node = Node(data)
if self.top is not None:
new_node.next = self.top
self.top = new_node
self.count += 1
def pop(self):
if self.isEmpty():
print('Stack is empty')
else:
next = self.top.next
self.top.next = None
self.top = next
self.count -= 1
def getTop(self):
return self.top.getData()
def isFull(self):
return self.count == self.limit
def isEmpty(self):
return self.count == 0
def display(self):
current = self.top
while current is not None:
print(current.getData())
current = current.getNext()
stklinked = Stack()
stklinked.push(10)
stklinked.push(9)
stklinked.push(11)
stklinked.push(15)
stklinked.pop()
stklinked.pop()
stklinked.pop()
stklinked.pop()
stklinked.pop()<file_sep>class Node(object):
def __init__(self,data):
self.data = data
self.parent = None
self.rank = 0
class DisjointSet(object):
def __init__(self):
self.set = {}
def makeSet(self, data):
new_node = Node(data)
new_node.parent = new_node
self.set[data] = new_node
def union(self, data1, data2):
node1 = self.set[data1]
node2 = self.set[data2]
parent1 = self.findSetByCompersion(node1)
parent2 = self.findSetByCompersion(node2)
if parent1.data == parent2.data:
return
else:
if parent1.rank >= parent2.rank:
parent2.parent = parent1
parent1.rank = parent1.rank + 1 if parent1.rank == parent2.rank else parent1.rank
else:
parent1.parent = parent2
def findSetByCompersion(self,node):
if node.parent == node:
return node
else:
node.parent = self.findSetByCompersion(node.parent)
return node.parent
def findSet(self, data):
return self.findSetByCompersion(self.set[data]).data
ds = DisjointSet()
for i in range(1,8):
ds.makeSet(i)
ds.union(1, 2)
ds.union(2, 3)
ds.union(4, 5)
ds.union(6, 7)
ds.union(5, 6)
ds.union(3, 7)
for key in ds.set.keys():
print(ds.findSet(key))
<file_sep>class Node(object):
def __init__(self, data = None, color = None, parent = None,left = None, right = None):
self.data = data
self.parent = parent
self.color = color
self.left = left
self.right = right
class RedBlackTree(object):
def __init__(self):
self.root = None
def createNilNode(self):
node = Node()
node.color = "B"
return node
def createNode(self,data):
node = Node()
node.data = data
node.color = "R"
return node
def leftRotate(self, node):
pass
def rightRotate(self, node):
pass
def insert(self,data):
node = self.createNode(data)
if self.root is None:
self.root = node
self.root.color = "B"
self.root.right = self.createNilNode()
self.root.left = self.createNilNode()
else:
self.root = self.insertNode(self.root, node)
def insertNode(self,root,node):
if node.data <= root.data:
if root.left.data is None:
root.left = node
node.parent = root
else:
root.left = self.insertNode(root.left,node)
else:
if root.right.data is None:
root.right = node
node.parent = root
else:
root.right = self.insertNode(root.right, node)
return root
def inOrderTraversal(self,root):
if root is None:
return
self.inOrderTraversal(root.left)
print(root.data)
self.inOrderTraversal(root.right)
def getUncle(self,root):
if root =
def predecessor(self,root):
pass
def successor(self,root):
pass
def heightOfTree(self,root):
pass
tree = RedBlackTree()
tree.insert(10)
tree.insert(-10)
tree.insert(20)
tree.inOrderTraversal(tree.root)
<file_sep>#PNR 8357948831, 2658321936
class Node(object):
def __init__(self):
self.data = None
self.next = None
def setData(self, data):
self.data = data
def setNext(self, next):
self.next = next
def getData(self):
return self.data
def getNext(self):
return self.next
def hasNext(self):
return self.next == None
class LinkedList(object):
def __init__(self):
self.head = None
self.count = 0
def addNodeAtEnd(self, data):
newNode = Node()
newNode.setData(data)
if self.head is None:
self.head = newNode
else:
current = self.head
while current.next != None:
current = current.getNext()
current.setNext(newNode)
self.count += 1
def addNodeAtStart(self,data):
newNode = Node()
newNode.setData(data)
if self.head is None:
self.head = newNode
else:
newNode.setNext(self.head)
self.head = newNode
def addNodeAtPosition(self,data,position):
if position > self.count or position < 0:
return None
else:
if position == self.count:
self.addNodeAtEnd(data)
elif position == 0:
self.addNodeAtStart(data)
else:
newNode = Node()
newNode.setData(data)
current = self.head
currentPosition = 1
while position != currentPosition:
current = current.getNext()
currentPosition += 1
temp = current.getNext()
current.setNext(newNode)
newNode.setNext(temp)
self.count += 1
def deleteNodeAtStart(self):
if self.count == 0:
print('The list is empty')
else:
self.head = self.head.getNext()
self.count -= 1
def deleteNodeAtEnd(self):
if self.count == 0:
print('The list is empty')
else:
currentNode = self.head
previousNode = self.head
while currentNode.next is not None:
previousNode = currentNode
currentNode = currentNode.getNext()
currentNode.setNext(None)
previousNode.setNext(None)
self.count -= 1
def deleteNodeAtPosition(self, position):
if position > self.count or position < 0:
print('Invalid Position')
else:
if position == 1:
self.deleteNodeAtStart()
elif position == self.count:
self.deleteNodeAtEnd()
else:
currentPosition = 1
previous= self.head
current = self.head
while currentPosition != position:
previous = current
current = current.getNext()
temp = current.getNext()
previous.setNext(temp)
current.setNext(None)
self.count -= 1
def LinkedListInReverse(self):
pass
def reverseLinkedList(self):
if self.count == 0:
print('The list is empty')
elif self.count == 1:
return None
else:
current = self.head
previous = None
while current is not None:
next = current.getNext()
current.setNext(previous)
previous = current
current = next
self.head = previous
def printAllNode(self):
current = self.head
while current is not None:
print("Current Location " , current)
print("Current Next ",current.getNext())
print("Current Data ",current.getData())
current = current.getNext()
def getCount(self):
return self.count
def PrintReverse(self, head):
if head is None:
return
self.PrintReverse(head.next)
print(head.data)
def reverse(self, p):
if p.next is None:
self.head = p
return
self.reverse(p.next)
next_node = p.next
next_node.next = p
p.next = None
def RemoveDuplicates(self):
head = self.head
if head is None:
return
current = head
while current.next is not None:
next = current.next
if current.data == next.data:
temp = next.next
current.next = temp
current = current.next
return head
newLinkedList = LinkedList()
newLinkedList.addNodeAtEnd(4)
newLinkedList.addNodeAtEnd(8)
newLinkedList.addNodeAtEnd(0)
newLinkedList.addNodeAtStart(10)
newLinkedList.addNodeAtPosition(25,2)
#newLinkedList.addNodeAtPosition(23,3)
#newLinkedList.printAllNode()
#print('')
#newLinkedList.deleteNodeAtEnd()
#newLinkedList.printAllNode()
#print('')
#newLinkedList.deleteNodeAtStart()
#newLinkedList.printAllNode()
#print('')
#newLinkedList.deleteNodeAtPosition(3)
#newLinkedList.printAllNode()
#newLinkedList.reverseLinkedList()
#print('')
#newLinkedList.printAllNode()
newLinkedList.printAllNode()<file_sep>class Node(object):
def __init__(self,data):
self.data = data
self.next = None
def getNext(self):
return self.next
def getData(self):
return self.data
def setNext(self, next):
self.next = next
def setData(self, data):
self.data = data
class CircularSinglyLinkedList(object):
def __init__(self):
self.head = None
self.count = 0
def addNodeAtStart(self, data):
new_node = Node(data)
if self.count == 0:
new_node.setNext(new_node)
else:
current = self.head
while current.getNext() != self.head:
current = current.getNext()
current.setNext(new_node)
new_node.setNext(self.head)
self.head = new_node
self.count += 1
def addNodeAtEnd(self,data):
new_node = Node(data)
if self.count == 0:
self.head = new_node
new_node.setNext(new_node)
else:
current = self.head
while current.getNext() != self.head:
current = current.getNext()
current.setNext(new_node)
new_node.setNext(self.head)
self.count += 1
def addNodeAtPosition(self,data,position):
if position > self.count or position < 1:
print('Invalid position')
return
elif position == self.count:
self.addNodeAtEnd(data)
elif position == 1:
self.addNodeAtStart(data)
else:
new_node = Node(data)
current = self.head
current_position = 1
while current_position != position:
current = current.getNext()
current_position += 1
next = current.getNext()
current.setNext(new_node)
new_node.setNext(next)
self.count += 1
def deleteNodeAtStart(self):
if self.count == 0:
print('List is empty')
return
else:
current = self.head
while current.getNext() != self.head:
current = current.getNext()
next = self.head.getNext()
current.setNext(next)
self.head = next
self.count -= 1
def deleteNodeAtEnd(self):
if self.count == 0:
print('List is empty')
else:
current = self.head
while current.getNext() != self.head:
previous = current
current = current.getNext()
previous.setNext(self.head)
current.setNext(None)
self.count -= 1
def deleteNodeAtPosition(self, position):
if position > self.count or position < 1:
print('Invalid position')
elif position == self.count:
self.deleteNodeAtEnd()
elif position == 1:
self.deleteNodeAtStart()
else:
current = self.head
current_position = 1
while current_position != position:
previous = current
current = current.getNext()
current_position += 1
next = current.getNext()
previous.setNext(next)
current.setNext(None)
self.count -= 1
def printAllNode(self):
current = self.head
count = 1
while count <= self.count:
print('---------------------------------')
print('Data {0}'.format(current.getData()))
print('Current {0}'.format(current))
#print('Previous {0}'.format(current.getPrevious()))
print('Next {0}'.format(current.getNext()))
print('---------------------------------')
current = current.getNext()
count += 1
cll = CircularSinglyLinkedList()
cll.addNodeAtStart(10)
cll.addNodeAtEnd(12)
cll.addNodeAtEnd(14)
cll.addNodeAtEnd(19)
cll.addNodeAtStart(9)
cll.addNodeAtPosition(15,4)
#cll.printAllNode()
cll.deleteNodeAtStart()
#cll.printAllNode()
cll.deleteNodeAtEnd()
#cll.printAllNode()
cll.deleteNodeAtPosition(3)
cll.printAllNode()
<file_sep>class Stack(object):
def __init__(self):
self.stk = []
self.top = None
def push(self,data):
self.stk.append(data)
self.top = self.stk[-1]
def pop(self):
res = self.stk.pop()
self.top = self.stk[-1]
return res
stack = Stack()
for char in input().split():
stack.push(char)
stack.pop()
<file_sep>import sys
class Node(object):
def __init__(self, name):
self.name = name
self.parent = None
self.rank = 0
class DisjointSet(object):
def __init__(self):
self.setdict = {}
def makeSet(self, data):
new_node = Node(data)
new_node.parent = new_node
self.setdict[data] = new_node
def union(self, data1, data2):
node1 = self.setdict[data1]
node2 = self.setdict[data2]
parent1 = self.findByCompression(node1)
parent2 = self.findByCompression(node2)
if parent1 == parent2:
return False
else:
if parent1.rank >= parent2.rank:
parent2.parent = parent1
parent1.rank = parent1.rank + 1 if parent1.rank == parent2.rank else parent1.rank
else:
parent1.parent = parent2
return True
def findByCompression(self, node):
if node.parent == node:
return node
else:
node.parent = self.findByCompression(node.parent)
return node.parent
def find(self, data):
return self.findByCompression(self.setdict[data]).name
class City(object):
def __init__(self, numberCity, noOfRoad, costLibrary, costRoad):
self.numberCity = numberCity
self.edges = []
self.costRoad = costRoad
self.costLibrary = costLibrary
self.noOfRoad = noOfRoad
def calculateCostofLibrary(self, numberCity):
return self.costLibrary * numberCity
def calculateNoOfRoad(self):
count = 0
ds = DisjointSet()
for i in range(1, self.numberCity + 1):
ds.makeSet(i)
for edge in self.edges:
if ds.union(edge[0], edge[1]):
count += 1
return count
def addEdge(self, startingVertex, endVertex):
self.edges.append([startingVertex, endVertex])
def totalCost(self):
noOFtotalroad = self.numberCity - 1
actualRoadBuild = self.calculateNoOfRoad()
noOfLibaray = noOFtotalroad - actualRoadBuild
totalCostOfroad = self.calculateCostofLibrary(noOfLibaray+1) + actualRoadBuild * self.costRoad
totalCostOfLibaray = self.calculateCostofLibrary(self.numberCity)
print(min(totalCostOfroad,totalCostOfLibaray))
q = int(input().strip())
for a0 in range(q):
n, m, x, y = input().strip().split(' ')
n, m, x, y = [int(n), int(m), int(x), int(y)]
city = City(n, m, x, y)
for a1 in range(m):
city_1, city_2 = input().strip().split(' ')
city_1, city_2 = [int(city_1), int(city_2)]
city.addEdge(city_1,city_2)
city.totalCost()
<file_sep>class Heap(object):
HEAP_SIZE = 10
def __init__(self):
self.heap = [0] * Heap.HEAP_SIZE
self.currentPosition = -1
def insert(self, item):
if self.isFull():
return
self.currentPosition += 1
self.heap[self.currentPosition] = item
self.fixUp(self.currentPosition)
def isFull(self):
return self.currentPosition == Heap.HEAP_SIZE
def fixUp(self, index):
parentIndex = (index-1) //2
while parentIndex >= 0 and self.heap[parentIndex] < self.heap[index]:
(self.heap[parentIndex],self.heap[index]) = (self.heap[index],self.heap[parentIndex])
parentIndex = (index - 1) // 2
def heapSort(self):
for i in range(0,self.currentPosition+1):
temp = self.heap[0]
self.heap[0] = self.heap[self.currentPosition-i]
self.heap[self.currentPosition-i] = temp
self.fixDown(0, self.currentPosition-i-1)
def fixDown(self, index, upto):
while index <= upto:
leftChild = 2 * index + 1
rightChild = 2 * index + 2
if leftChild < upto:
swapChild = None
if rightChild > upto:
swapChild = leftChild
else:
if self.heap[leftChild] > self.heap[rightChild]:
swapChild = leftChild
else:
swapChild = rightChild
if self.heap[index] < self.heap[swapChild]:
temp = self.heap[index]
self.heap[index] = self.heap[swapChild]
self.heap[swapChild] = temp
else:
break
index = swapChild
else:
break
heap = Heap()
heap.insert(10)
heap.insert(-20)
heap.insert(0)
heap.insert(2)
heap.heapSort()
print(heap.heap)
<file_sep>class AVLNode(object):
def __init__(self,data):
self.data = data
self.right = None
self.left = None
self.height = 0
class AVLTree(object):
def __init__(self):
self.root = None
def calHeight(self, root):
if root is None:
return -1
return root.height
def calcBalance(self, root):
if root is None:
return 0
return self.calHeight(root.left) - self.calHeight(root.right)
def rightRotation(self, root):
print("Rotating to the right " + str(root.data))
templeft = root.left
t = templeft.right
templeft.right = root
root.left = t
root.height = max(self.calHeight(root.left), self.calHeight(root.left)) +1
templeft.height = max(self.calHeight(templeft.left), self.calHeight(templeft.left)) +1
return templeft
def leftRotation(self, root):
print("Rotating to the left " + str(root.data))
tempright = root.right
t = tempright.left
tempright.left = root
root.right = t
root.height = max(self.calHeight(root.left), self.calHeight(root.left)) +1
tempright.height = max(self.calHeight(tempright.left), self.calHeight(tempright.left)) +1
return tempright
def insert(self, data):
self.root = self.insertNode(self.root, data)
def insertNode(self,root, data):
if root is None:
return AVLNode(data)
if data <= root.data:
root.left = self.insertNode(root.left, data)
elif data > root.data:
root.right = self.insertNode(root.right, data)
root.height = max(self.calHeight(root.left), self.calHeight(root.right)) + 1
return self.settleBalance(root, data)
def settleBalance(self, root, data):
balance = self.calcBalance(root)
#Case 1 tree is heavily left unbalanced
if balance > 1 and data < root.left.data:
return self.rightRotation(root)
if balance < -1 and data > root.right.data:
return self.leftRotation(root)
if balance > 1 and data > root.left.data:
root.left = self.leftRotation(root.left)
return self.rightRotation(root)
if balance < -1 and data < root.right.data:
root.right = self.rightRotation(root.right)
return self.leftRotation(root)
return root
def inOrder(self, root):
if root is None:
return
else:
self.inOrder(root.left)
print(root.data)
self.inOrder(root.right)
tree = AVLTree()
tree.insert(21)
tree.insert(26)
tree.insert(30)
tree.insert(9)
tree.insert(4)
tree.insert(14)
tree.insert(28)
tree.insert(18)
tree.insert(15)
tree.insert(10)
tree.insert(2)
tree.insert(3)
tree.insert(7)
tree.inOrder(tree.root)<file_sep>class Node(object):
def __init__(self,data):
self.data = data
self.parent = None
self.rank = 0
class DisjointSet(object):
listOfSet = {}
def makeSet(self, data):
new_node = Node(data)
new_node.parent = new_node
self.listOfSet[data] = new_node
def union(self,data1, data2):
node1 = self.listOfSet[data1]
node2 = self.listOfSet[data2]
parent1 = self.findSet(node1)
parent2 = self.findSet(node2)
if parent1.data == parent2.data:
return
if parent1.rank >= parent2.rank:
parent1.rank = parent1.rank + 1 if parent1.rank == parent2.rank else parent1.rank
#parent1.rank = parent1.rank + 1
parent2.parent = parent1
else:
parent2.rank = parent2.rank + 1
parent1.parent = parent2
def findSetByCompersion(self,node):
if node.parent == node:
return node
node.parent = self.findSet(node.parent)
return node.parent
def findSetData(self,data):
return self.findSet(self.listOfSet[data]).data
#return self.findSet(self.listOfSet[data]).rank
class Graph(object):
def __init__(self):
self.edges = []
self.vertex = []
self.ds = DisjointSet()
def hasCycle(self):
for i in self.getAllVertex():
self.ds.makeSet(i)
def getAllVertex(self):
return self.vertex
<file_sep>class Queue(object):
def __init__(self):
self.queue = []
self.top = None
self.end = None
def enqueue(self,data):
self.queue.append(data)
self.top = self.queue[0]
if self.end is None:
self.end = self.queue[-1]
def dequeue(self):
try:
res = self.queue.pop(0)
self.top = self.queue[0]
except IndexError:
self.top = None
self.end = None
def getTop(self):
return self.top
def display(self):
print(' '.join(list(map(str,self.queue))))
q = Queue()
q.enqueue(1)
q.enqueue(2)
q.enqueue(4)
q.enqueue(7)
q.display()
q.dequeue()
q.display()
print(q.getTop())<file_sep>class Stack(object):
def __init__(self, limit=10):
self.stk = []
self.top = None
self.limit = limit
def push(self,data):
if len(self.stk) == self.limit:
print('Stack Overflow')
return
self.stk.append(data)
def length(self):
return len(self.stk)
def pop(self):
if self.isEmpty():
print('Stack is Underflow')
return
return self.stk.pop()
def isEmpty(self):
return self.stk == []
def display(self):
if self.isEmpty():
print('Stack is Empty')
return
print(' '.join(list(map(str,self.stk))))
def getTop(self):
try:
return self.stk[-1]
except IndexError:
print('Stack is Empty')
stk = Stack()
stk.push(3)
stk.push(4)
print(stk.getTop())
stk.pop()
stk.push(9)
stk.push(10)
stk.pop()
stk.display()
print(stk.getTop())
<file_sep>n = int(input())
def numFriendsGreeted(a,b,max):
count = 0
for i in range(a,max+1,b):
count += 1
return count
for _ in range(n):
user_input = list(map(int, input().split()))
print(user_input)
print(numFriendsGreeted(user_input[0],user_input[1],user_input[2]))
<file_sep>import heapq
INF = 100000
class PriorityQueueMap(object):
def __init__(self):
self.eq = []
self.entry_finder = {}
def add(self, key, prioprity=INF):
if key in self.entry_finder:
raise KeyError("Key already exists")
self.entry_finder[key] = prioprity
heapq.heappush(self.eq, [prioprity, key])
def delete(self, task):
if not task in self.entry_finder:
raise KeyError("Key doesnt exist")
self.entry_finder.pop(task)
def getMin(self):
minVertex = heapq.heappop(self.eq)[1]
self.entry_finder.pop(minVertex)
return minVertex
def descrease(self, key, priority):
previousPriority = self.entry_finder[key]
self.entry_finder[key] = priority
index = self.eq.index([previousPriority, key])
del self.eq[index]
heapq.heappush(self.eq, [priority, key])
| 302e36a8c248c397cd8fe49ad1ea049c725e2223 | [
"Python"
] | 36 | Python | ravigupta19/Data-Structure | b497d4200db43bc86a9d7becc4e41d8dd42bbaa2 | 3e52db745c75f0f370107f076c3e1cb52be60d86 | |
refs/heads/master | <repo_name>doytsujin/CyanOS<file_sep>/kernel/Tasking/WaitQueue.h
#pragma once
#include "Thread.h"
#include "Utils/IntrusiveList.h"
class WaitQueue
{
public:
WaitQueue();
void enqueue(Thread& thread);
void wake_up();
void wake_up(size_t num);
void wake_up_all();
WaitQueue(WaitQueue&&) = delete;
WaitQueue(const WaitQueue&) = delete;
WaitQueue& operator=(WaitQueue&&) = delete;
WaitQueue& operator=(const WaitQueue&) = delete;
~WaitQueue();
private:
Spinlock m_lock;
IntrusiveList<Thread> m_threads;
};
<file_sep>/kernel/Boot/Boot.h
#pragma once
#include "Arch/x86/Asm.h"
#include "Kernel_init.h"
#include "Kernel_map.h"
#include "Multiboot2.h"
#include "Utils/Assert.h"
#include "Utils/Types.h"
#include "VirtualMemory/Memory.h"
typedef struct __attribute__((__packed__)) {
multiboot_header header __attribute__((aligned(MULTIBOOT_HEADER_ALIGN)));
multiboot_header_tag_address address __attribute__((aligned(MULTIBOOT_HEADER_ALIGN)));
multiboot_header_tag_entry_address entry __attribute__((aligned(MULTIBOOT_HEADER_ALIGN)));
multiboot_header_tag_module_align mod_align __attribute__((aligned(MULTIBOOT_HEADER_ALIGN)));
multiboot_header_tag end __attribute__((aligned(MULTIBOOT_HEADER_ALIGN)));
} Mutiboot2_Header;
#define MULTIBOOT2_HEADER_CHECKSUM ((uint32_t)(-sizeof(Mutiboot2_Header) - MULTIBOOT2_HEADER_MAGIC))
#define STACK_SIZE 0x4000
extern uint32_t kernel_boot_stage1;
extern "C" void kernel_boot_stage2(uint32_t magic, multiboot_tag_start* boot_info);
BootloaderInfo parse_mbi(uintptr_t multiboot_info);
uintptr_t align_to(uintptr_t size, unsigned alignment);<file_sep>/kernel/Tasking/Semaphore.h
#pragma once
#include "Utils/Types.h"
#include "WaitQueue.h"
class Semaphore
{
private:
Spinlock m_spinlock;
unsigned m_max_count;
unsigned m_count;
WaitQueue m_queue;
public:
explicit Semaphore(size_t t_max_count, size_t t_initial_value = 0);
~Semaphore();
void acquire();
void release();
};
<file_sep>/kernel/Filesystem/Pipes/PipeFS.h
#pragma once
#include "Filesystem/FSNode.h"
#include "Pipe.h"
#include "Tasking/WaitQueue.h"
#include "Utils/CircularBuffer.h"
#include "Utils/List.h"
#include "Utils/String.h"
#include "Utils/StringView.h"
#include "Utils/Types.h"
#include "Utils/UniquePointer.h"
class PipeFS : public FSNode
{
private:
List<Pipe> m_children;
Spinlock m_lock;
explicit PipeFS(const StringView& name);
public:
static UniquePointer<FSNode> alloc(const StringView& name);
~PipeFS();
Result<FSNode&> create(const StringView& name, OpenMode mode, OpenFlags flags) override;
Result<FSNode&> dir_lookup(const StringView& file_name) override;
};<file_sep>/kernel/Filesystem/Ustar/INode.cpp
#include "INode.h"
#include "Lib/Stdlib.h"
#include "Tasking/ScopedLock.h"
#include "Utils/ErrorCodes.h"
#include "Utils/Stl.h"
INode::INode(const StringView& name, NodeType type, size_t size, char* data) :
FSNode(name, 0, 0, type, size),
m_data{data},
m_lock{},
m_children{}
{
m_lock.init();
}
INode::~INode()
{
}
Result<void> INode::open(OpenMode mode, OpenFlags flags)
{
UNUSED(mode);
UNUSED(flags);
ScopedLock local_lock(m_lock);
return ResultError(ERROR_SUCCESS);
}
Result<void> INode::close()
{
ScopedLock local_lock(m_lock);
return ResultError(ERROR_SUCCESS);
}
Result<void> INode::read(void* buff, size_t offset, size_t size)
{
ScopedLock local_lock(m_lock);
ASSERT((offset + size) <= m_size);
memcpy(buff, m_data + offset, size);
return ResultError(ERROR_SUCCESS);
}
Result<bool> INode::can_read()
{
return true;
}
Result<FSNode&> INode::dir_lookup(const StringView& file_name)
{
ScopedLock local_lock(m_lock);
for (auto& i : m_children) {
if (i.m_name == file_name) {
return i;
}
}
return ResultError(ERROR_FILE_DOES_NOT_EXIST);
}
<file_sep>/kernel/Arch/x86/Spinlock.h
#pragma once
#include "Asm.h"
#include "Utils/Types.h"
class StaticSpinlock
{
private:
uint32_t m_value;
uint32_t m_eflags;
public:
void init();
void acquire();
void release();
StaticSpinlock() = default;
~StaticSpinlock() = default;
};
<file_sep>/kernel/Tasking/Process.cpp
#include "Process.h"
#include "Arch/x86/Context.h"
#include "Filesystem/VirtualFilesystem.h"
#include "Loader/PE.h"
#include "ScopedLock.h"
#include "Thread.h"
#include "Utils/Assert.h"
#include "VirtualMemory/Memory.h"
List<Process>* Process::processes;
Bitmap* Process::pid_bitmap;
StaticSpinlock Process::global_lock;
void Process::setup()
{
pid_bitmap = new Bitmap(MAX_BITMAP_SIZE);
processes = new List<Process>;
global_lock.init();
}
Process& Process::create_new_process(const StringView& name, const StringView& path)
{
ScopedLock local_lock(global_lock);
auto& pcb = processes->emplace_back(name, path);
Thread::create_thread(pcb, initiate_process, uintptr_t(&pcb));
return pcb;
}
Process::Process(const StringView& name, const StringView& path) :
m_lock{},
m_pid{reserve_pid()},
m_name{name},
m_path{path},
m_page_directory{Memory::create_new_virtual_space()},
m_state{ProcessState::ACTIVE},
m_parent{nullptr},
m_file_descriptors{}
{
m_lock.init();
}
Process::~Process()
{
}
Result<uintptr_t> Process::load_executable(const StringView& path)
{
ScopedLock local_lock(m_lock);
auto fd = VFS::open(path, OpenMode::Read, OpenFlags::OpenExisting);
if (fd.is_error()) {
warn() << "error opening the executable file, error: " << fd.error();
return ResultError(fd.error());
}
auto file_info = fd.value()->fstat();
// FIXME: implement smart pointers and use it here.
char* buff = static_cast<char*>(Memory::alloc(file_info.value().size, MEMORY_TYPE::KERNEL | MEMORY_TYPE::WRITABLE));
memset(buff, 0, file_info.value().size);
auto result = fd.value()->read(buff, file_info.value().size);
if (result.is_error()) {
return ResultError(result.error());
}
auto execable_entrypoint = PELoader::load(buff, file_info.value().size);
if (execable_entrypoint.is_error()) {
return ResultError(execable_entrypoint.error());
}
Memory::free(buff, file_info.value().size, 0);
return execable_entrypoint.value();
}
unsigned Process::reserve_pid()
{
unsigned id = pid_bitmap->find_first_unused();
pid_bitmap->set_used(id);
return id;
}
void Process::initiate_process(uintptr_t __pcb)
{
Process* pcb = reinterpret_cast<Process*>(__pcb);
auto&& executable_entrypoint = pcb->load_executable(pcb->m_path);
if (executable_entrypoint.is_error()) {
warn() << "couldn't load the process, error: " << executable_entrypoint.error() << "\n";
return; // Remove thread
}
// return ResultError(execable_entrypoint.error());
void* thread_user_stack = Memory::alloc(STACK_SIZE, MEMORY_TYPE::WRITABLE);
Context::enter_usermode(executable_entrypoint.value(), uintptr_t(thread_user_stack) + STACK_SIZE);
ASSERT_NOT_REACHABLE();
}<file_sep>/kernel/Utils/CircularList.h
#pragma once
#include "Stl.h"
#include "Types.h"
#ifdef __UNIT_TESTS
#include <assert.h>
#define ASSERT(x) assert(x)
#else
#include "Assert.h"
#endif
template <class T> class CircularQueue
{
private:
struct Node {
T data;
Node *next, *prev;
};
Node* m_head;
size_t m_count;
void unlink_node(Node* node);
void link_node(Node* new_node, Node* pnode);
public:
class Iterator
{
private:
Node* m_current;
Node* m_head;
public:
Iterator(Node* t_list);
Node* node();
void move_cursor(int index);
Iterator& operator++(int);
Iterator& operator++();
bool operator!=(const CircularQueue<T>::Iterator& other);
bool operator==(const CircularQueue<T>::Iterator& other);
void operator=(const CircularQueue<T>::Iterator& other);
T* operator->();
T& operator*();
};
CircularQueue();
~CircularQueue();
Iterator begin();
Iterator end();
template <typename... U> T& emplace_back(U&&... u);
template <typename... U> T& emplace_front(U&&... u);
T& push_back(const T& new_data);
T& push_front(const T& new_data);
T& push_back(T&& new_data);
T& push_front(T&& new_data);
void pop_back();
void pop_front();
void remove(Iterator&);
void remove(int index);
void increment_head();
void set_head(Iterator&);
void set_head(int index);
void move_to_other_list(CircularQueue<T>* list, Iterator& itr);
void move_head_to_other_list(CircularQueue<T>* list);
bool is_empty();
size_t size();
T& head();
T& operator[](int index);
};
template <class T> CircularQueue<T>::Iterator::Iterator(Node* t_node) : m_current(t_node), m_head(t_node)
{
}
// move the current node pointer number of nodes forward or backward relative to the current head.
template <class T> void CircularQueue<T>::Iterator::move_cursor(int index)
{
Node* p = m_head;
if (index > 0) {
while (index--) {
p = p->next;
}
} else {
while (index++) {
p = p->prev;
}
}
m_current = p;
}
// Increment the current node pointer.
template <class T> typename CircularQueue<T>::Iterator& CircularQueue<T>::Iterator::operator++(int arg)
{
const auto next = m_current->next;
if (next == m_head) {
m_current = nullptr; // iterated through the whole list.
} else {
m_current = next;
}
return *this;
}
// Increment the current node pointer.
template <class T> typename CircularQueue<T>::Iterator& CircularQueue<T>::Iterator::operator++()
{
const auto next = m_current->next;
if (next == m_head) {
m_current = nullptr; // iterated through the whole list.
} else {
m_current = next;
}
return *this;
}
template <class T> bool CircularQueue<T>::Iterator::operator!=(const CircularQueue<T>::Iterator& other)
{
return m_current != other.m_current;
}
template <class T> bool CircularQueue<T>::Iterator::operator==(const CircularQueue<T>::Iterator& other)
{
return m_current == other.m_current;
}
template <class T> void CircularQueue<T>::Iterator::operator=(const CircularQueue<T>::Iterator& other)
{
m_current = other->m_current;
m_head = other->m_head;
}
template <class T> T& CircularQueue<T>::Iterator::operator*()
{
return m_current->data;
}
template <class T> T* CircularQueue<T>::Iterator::operator->()
{
return &m_current->data;
}
// Get node pointer.
template <class T> typename CircularQueue<T>::Node* CircularQueue<T>::Iterator::node()
{
return m_current;
}
template <class T> CircularQueue<T>::CircularQueue() : m_head(nullptr), m_count(0)
{
}
template <class T> CircularQueue<T>::~CircularQueue()
{
if (!m_head)
return;
Node* node_iterator = m_head;
do {
Node* next = node_iterator->next;
delete node_iterator;
node_iterator = next;
} while (node_iterator != m_head);
}
// Move node to other list.
template <class T> void CircularQueue<T>::move_to_other_list(CircularQueue<T>* list, Iterator& itr)
{
ASSERT(list);
unlink_node(itr.node());
list->link_node(itr.node(), list->m_head);
}
// Move head node to other list.
template <class T> void CircularQueue<T>::move_head_to_other_list(CircularQueue<T>* list)
{
ASSERT(list);
Node* node = m_head;
unlink_node(node);
list->link_node(node, list->m_head);
}
// unlink node from the list.
template <class T> void CircularQueue<T>::unlink_node(Node* node)
{
ASSERT(m_head);
ASSERT(node);
if (node == node->next) { // remove the last node
m_head = nullptr;
} else {
if (node == m_head) {
m_head = node->next;
}
node->prev->next = node->next;
node->next->prev = node->prev;
}
m_count--;
}
// link a new node before `pnode`.
template <class T> void CircularQueue<T>::link_node(Node* new_node, Node* pnode)
{
ASSERT(new_node);
if (pnode) {
new_node->next = pnode;
new_node->prev = pnode->prev;
pnode->prev->next = new_node;
pnode->prev = new_node;
} else {
new_node->next = new_node->prev = new_node;
}
if (!m_head) {
m_head = new_node;
}
m_count++;
}
// Get iterator object for the head node.
template <class T> typename CircularQueue<T>::Iterator CircularQueue<T>::begin()
{
return Iterator(m_head);
}
// Get iterator object for the last node.
template <class T> typename CircularQueue<T>::Iterator CircularQueue<T>::end()
{
return Iterator(nullptr);
}
template <class T> template <typename... U> T& CircularQueue<T>::emplace_back(U&&... u)
{
Node* new_node = new Node{T{forward<U>(u)...}, nullptr, nullptr};
link_node(new_node, m_head);
return new_node->data;
}
template <class T> template <typename... U> T& CircularQueue<T>::emplace_front(U&&... u)
{
Node* new_node = new Node{T{forward<U>(u)...}, nullptr, nullptr};
link_node(new_node, m_head);
m_head = m_head->prev;
return new_node->data;
}
// Push data to the back of the list.
template <class T> T& CircularQueue<T>::push_back(const T& new_data)
{
Node* new_node = new Node{new_data, nullptr, nullptr};
link_node(new_node, m_head);
return new_node->data;
}
template <class T> T& CircularQueue<T>::push_front(const T& new_data)
{
T& new_node_data = push_back(new_data);
m_head = m_head->prev;
return new_node_data;
}
// Push data to the back of the list.
template <class T> T& CircularQueue<T>::push_back(T&& new_data)
{
Node* new_node = new Node{move(new_data), nullptr, nullptr};
link_node(new_node, m_head);
return new_node->data;
}
template <class T> T& CircularQueue<T>::push_front(T&& new_data)
{
T& new_node_data = push_back(move(new_data));
m_head = m_head->prev;
return new_node_data;
}
// The second node will be the head.
template <class T> void CircularQueue<T>::increment_head()
{
ASSERT(m_head);
m_head = m_head->next;
}
// Select the head node using Iterator.
template <class T> void CircularQueue<T>::set_head(Iterator& itr)
{
ASSERT(m_head);
m_head = itr.node();
}
// Select the head node using an index.
template <class T> void CircularQueue<T>::set_head(int index)
{
ASSERT(m_head);
Iterator itr(m_head);
itr.move_cursor(index);
m_head = itr.node();
}
// Remove the last node.
template <class T> void CircularQueue<T>::pop_back()
{
ASSERT(m_head);
Node* node = m_head->prev;
unlink_node(node);
delete node;
}
// Remove the first node.
template <class T> void CircularQueue<T>::pop_front()
{
ASSERT(m_head);
Node* node = m_head;
unlink_node(node);
delete node;
}
// Remove a node whose selected by Iterator.
template <class T> void CircularQueue<T>::remove(Iterator& itr)
{
ASSERT(m_head);
Node* node = itr.node();
unlink_node(node);
delete node;
}
// Remove a node whose selected by its index.
template <class T> void CircularQueue<T>::remove(int index)
{
ASSERT(m_head);
Iterator itr(m_head);
itr.move_cursor(index);
remove(itr);
}
// Get data of the head node.
template <class T> T& CircularQueue<T>::head()
{
ASSERT(m_head);
return m_head->data;
}
template <class T> T& CircularQueue<T>::operator[](int index)
{
ASSERT(m_head);
Iterator itr(m_head);
itr.move_cursor(index);
return *itr;
}
template <class T> bool CircularQueue<T>::is_empty()
{
if (m_count)
return false;
else
return true;
}
template <class T> size_t CircularQueue<T>::size()
{
return m_count;
}<file_sep>/kernel/VirtualMemory/Virtual.h
#pragma once
#include "Arch/x86/Paging.h"
#include "Arch/x86/Panic.h"
#include "Kernel_map.h"
#include "Memory.h"
#include "Utils/Assert.h"
#include "Utils/Types.h"
class VirtualMemory
{
private:
public:
static uintptr_t find_pages(uint32_t start_address, uint32_t end_address, uint32_t pages_num);
static uintptr_t create_page_table();
static bool check_free_pages(uint32_t start_address, uint32_t pages_num);
static void map_pages(uintptr_t virtual_address, uintptr_t physical_address, uint32_t pages, uint32_t flags);
};
<file_sep>/kernel/Tasking/Loader/Winnt.h
#pragma once
#include "Utils/Types.h"
#define IMAGE_NUMBEROF_DIRECTORY_ENTRIES 16
#define IMAGE_NT_SIGNATURE 0x00004550
#define IMAGE_DOS_SIGNATURE 0x5A4D
#define IMAGE_NT_OPTIONAL_HDR32_MAGIC 0x10b
#define IMAGE_SIZEOF_SHORT_NAME 8
#pragma pack(1)
typedef struct _IMAGE_DOS_HEADER {
uint16_t e_magic;
uint16_t e_cblp;
uint16_t e_cp;
uint16_t e_crlc;
uint16_t e_cparhdr;
uint16_t e_minalloc;
uint16_t e_maxalloc;
uint16_t e_ss;
uint16_t e_sp;
uint16_t e_csum;
uint16_t e_ip;
uint16_t e_cs;
uint16_t e_lfarlc;
uint16_t e_ovno;
uint16_t e_res[4];
uint16_t e_oemid;
uint16_t e_oeminfo;
uint16_t e_res2[10];
uint32_t e_lfanew;
} IMAGE_DOS_HEADER;
typedef struct _IMAGE_FILE_HEADER {
uint16_t Machine;
uint16_t NumberOfSections;
uint32_t TimeDateStamp;
uint32_t PointerToSymbolTable;
uint32_t NumberOfSymbols;
uint16_t SizeOfOptionalHeader;
uint16_t Characteristics;
} IMAGE_FILE_HEADER;
typedef struct _IMAGE_DATA_DIRECTORY {
uint32_t VirtualAddress;
uint32_t Size;
} IMAGE_DATA_DIRECTORY;
typedef struct _IMAGE_OPTIONAL_HEADER {
uint16_t Magic;
uint8_t MajorLinkerVersion;
uint8_t MinorLinkerVersion;
uint32_t SizeOfCode;
uint32_t SizeOfInitializedData;
uint32_t SizeOfUninitializedData;
uint32_t AddressOfEntryPoint;
uint32_t BaseOfCode;
uint32_t BaseOfData;
uint32_t ImageBase;
uint32_t SectionAlignment;
uint32_t FileAlignment;
uint16_t MajorOperatingSystemVersion;
uint16_t MinorOperatingSystemVersion;
uint16_t MajorImageVersion;
uint16_t MinorImageVersion;
uint16_t MajorSubsystemVersion;
uint16_t MinorSubsystemVersion;
uint32_t Win32VersionValue;
uint32_t SizeOfImage;
uint32_t SizeOfHeaders;
uint32_t CheckSum;
uint16_t Subsystem;
uint16_t DllCharacteristics;
uint32_t SizeOfStackReserve;
uint32_t SizeOfStackCommit;
uint32_t SizeOfHeapReserve;
uint32_t SizeOfHeapCommit;
uint32_t LoaderFlags;
uint32_t NumberOfRvaAndSizes;
IMAGE_DATA_DIRECTORY DataDirectory[IMAGE_NUMBEROF_DIRECTORY_ENTRIES];
} IMAGE_OPTIONAL_HEADER32;
typedef struct _IMAGE_NT_HEADERS {
uint32_t Signature;
IMAGE_FILE_HEADER FileHeader;
IMAGE_OPTIONAL_HEADER32 OptionalHeader;
} IMAGE_NT_HEADERS32;
typedef struct _IMAGE_SECTION_HEADER {
uint8_t Name[IMAGE_SIZEOF_SHORT_NAME];
union {
uint32_t PhysicalAddress;
uint32_t VirtualSize;
} Misc;
uint32_t VirtualAddress;
uint32_t SizeOfRawData;
uint32_t PointerToRawData;
uint32_t PointerToRelocations;
uint32_t PointerToLinenumbers;
uint16_t NumberOfRelocations;
uint16_t NumberOfLinenumbers;
uint32_t Characteristics;
} IMAGE_SECTION_HEADER;
#pragma pack()<file_sep>/kernel/Tasking/Thread.h
#pragma once
#include "Arch/x86/Spinlock.h"
#include "Process.h"
#include "Utils/Bitmap.h"
#include "Utils/IntrusiveList.h"
#include "Utils/IterationDecision.h"
#include "Utils/Result.h"
#include "Utils/Types.h"
enum class ThreadState {
RUNNABLE,
BLOCKED_SLEEP,
BLOCKED_QUEUE,
BLOCKED_IO,
SUSPENDED,
};
const size_t STACK_SIZE = 0x1000;
class WaitQueue;
class Thread : public IntrusiveListNode<Thread>
{
private:
typedef void (*thread_function)(uintptr_t argument);
static void idle(_UNUSED_PARAM(uintptr_t));
static Bitmap* m_tid_bitmap;
static IntrusiveList<Thread>* ready_threads;
static IntrusiveList<Thread>* sleeping_threads;
static StaticSpinlock global_lock;
Spinlock m_lock;
const unsigned m_tid;
unsigned m_sleep_ticks;
uintptr_t m_kernel_stack_start;
uintptr_t m_kernel_stack_end;
uintptr_t m_kernel_stack_pointer;
uintptr_t m_user_stack_start;
Process& m_parent;
ThreadState m_state;
unsigned reserve_tid();
Thread(Process& process, thread_function address, uintptr_t argument);
public:
static Thread* current;
static Thread& create_thread(Process& parent_process, thread_function address, uintptr_t argument);
static void sleep(unsigned ms);
static void yield();
static void setup();
void wake_up_from_queue();
void wake_up_from_sleep();
void wait_on(WaitQueue& queue);
void terminate();
~Thread();
unsigned tid();
ThreadState state();
Process& parent_process();
static size_t number_of_ready_threads();
template <typename Callback> static void for_each_sleeping(Callback callback)
{
auto&& thread = Thread::sleeping_threads->begin();
while (thread != Thread::sleeping_threads->end()) {
auto iterator_copy = thread++;
auto ret = callback(*iterator_copy);
if (ret == IterationDecision::Break) {
break;
}
}
}
template <typename Callback> static void for_each_ready(Callback callback)
{
auto&& thread = Thread::ready_threads->begin();
while (thread != Thread::ready_threads->end()) {
auto iterator_copy = thread++;
auto ret = callback(*iterator_copy);
if (ret == IterationDecision::Break) {
break;
}
}
}
friend class Scheduler;
friend class WaitQueue;
};
<file_sep>/kernel/Utils/IntrusiveList.h
#pragma once
#include "Utils/Types.h"
#ifdef __UNIT_TESTS
#include <assert.h>
#define ASSERT(x) assert(x)
#else
#include "Assert.h"
#endif
template <typename T> class IntrusiveList;
// Inherit from this class to use it in IntrusiveList
template <typename T> class IntrusiveListNode
{
T* next = nullptr;
T* prev = nullptr;
IntrusiveList<T>* owner = nullptr;
friend class IntrusiveList<T>;
};
template <typename T> class IntrusiveList
{
private:
T* m_head = nullptr;
T* m_tail = nullptr;
size_t m_count = 0;
void remove_node(T& node);
void append_node(T& node);
public:
class Iterator
{
public:
Iterator(T* node);
Iterator(const Iterator& other);
~Iterator() = default;
bool operator==(const Iterator& other);
bool operator!=(const Iterator& other);
Iterator& operator++();
Iterator operator++(int);
T& operator*();
T* operator->();
private:
T* m_node = nullptr;
};
IntrusiveList() = default;
~IntrusiveList() = default;
IntrusiveList(const IntrusiveList&) = delete;
IntrusiveList(IntrusiveList&&) = delete;
IntrusiveList& operator=(const IntrusiveList&) = delete;
IntrusiveList& operator=(IntrusiveList&&) = delete;
void push_back(T& node);
T* pop_front();
T* remove(T& node);
Iterator begin() const;
Iterator end() const;
T* first() const
{
return m_head;
}
T* tail() const
{
return m_tail;
}
bool is_empty() const
{
return !m_count;
}
size_t size() const
{
return m_count;
}
};
template <typename T> IntrusiveList<T>::Iterator::Iterator(T* node) : m_node{node}
{
}
template <typename T> IntrusiveList<T>::Iterator::Iterator(const Iterator& other) : m_node{other.m_node}
{
}
template <typename T> bool IntrusiveList<T>::Iterator::operator==(const Iterator& other)
{
return m_node == other.m_node;
}
template <typename T> bool IntrusiveList<T>::Iterator::operator!=(const Iterator& other)
{
return m_node != other.m_node;
}
template <typename T> typename IntrusiveList<T>::Iterator& IntrusiveList<T>::Iterator::operator++()
{
m_node = m_node->next;
return *this;
}
template <typename T> typename IntrusiveList<T>::Iterator IntrusiveList<T>::Iterator::operator++(int)
{
Iterator old(*this);
m_node = m_node->next;
return old;
}
template <typename T> T& IntrusiveList<T>::Iterator::operator*()
{
return *m_node;
}
template <typename T> T* IntrusiveList<T>::Iterator::operator->()
{
return m_node;
}
template <typename T> void IntrusiveList<T>::remove_node(T& node)
{
ASSERT(node.owner == this);
if ((m_head == &node) && (m_tail == &node)) {
m_head = m_tail = nullptr;
} else if (m_head == &node) {
m_head = node.next;
node.next->prev = nullptr;
} else if (m_tail == &node) {
m_tail = node.prev;
node.prev->next = nullptr;
} else {
node.prev->next = node.next;
node.next->prev = node.prev;
}
node.owner = nullptr;
m_count--;
}
template <typename T> void IntrusiveList<T>::append_node(T& node)
{
if (node.owner == nullptr)
node.owner = this;
if (!m_head) {
node.prev = nullptr;
node.next = nullptr;
m_head = m_tail = &node;
} else {
node.prev = m_tail;
node.next = nullptr;
m_tail->next = &node;
m_tail = &node;
}
m_count++;
}
template <typename T> void IntrusiveList<T>::push_back(T& node)
{
append_node(node);
}
template <typename T> T* IntrusiveList<T>::pop_front()
{
if (!m_head) {
return nullptr;
}
T* node = m_head;
remove_node(*node);
return node;
}
template <typename T> T* IntrusiveList<T>::remove(T& node)
{
remove_node(node);
return &node;
}
template <typename T> typename IntrusiveList<T>::Iterator IntrusiveList<T>::begin() const
{
return Iterator(m_head);
}
template <typename T> typename IntrusiveList<T>::Iterator IntrusiveList<T>::end() const
{
return Iterator(nullptr);
}<file_sep>/kernel/Utils/Assert.h
#pragma once
#include "Arch/x86/Panic.h"
#ifdef NDEBUG
/*
* If not debugging, assert does nothing.
*/
#define ASSERT(x) ((void)0)
#define ASSERT_NOT_REACHABLE() ((void)0)
#else /* debugging enabled */
#define ASSERT(x) \
if (!(x)) { \
PANIC("Null Value ( " #x " )"); \
}
#define ASSERT_NOT_REACHABLE() PANIC("Not Reachable Line")
#endif<file_sep>/kernel/Utils/CircularBuffer.h
#pragma once
#include "Utils/Stl.h"
#include "Utils/Types.h"
#ifdef __UNIT_TESTS
#include <assert.h>
#define ASSERT(x) assert(x)
#else
#include "Assert.h"
#endif
template <typename T> class CircularBuffer
{
private:
T* m_data;
size_t m_head;
size_t m_tail;
size_t m_size;
const size_t m_capacity;
public:
explicit CircularBuffer(const size_t size);
void queue(const T&);
void queue(T&&);
T dequeue();
T& front();
T& back();
bool is_empty();
bool is_full();
size_t capacity();
size_t size();
size_t available_size();
~CircularBuffer();
};
template <typename T>
CircularBuffer<T>::CircularBuffer(const size_t size) :
m_data{new T[size]}, //
m_head{0},
m_tail{0},
m_size{0},
m_capacity{size}
{
}
template <typename T> void CircularBuffer<T>::queue(const T& data_to_queue)
{
ASSERT(!is_full());
m_data[m_tail] = data_to_queue;
m_tail = (m_tail + 1) % m_capacity;
m_size++;
}
template <typename T> void CircularBuffer<T>::queue(T&& data_to_queue)
{
ASSERT(!is_full());
m_data[m_tail] = move(data_to_queue);
m_tail = (m_tail + 1) % m_capacity;
m_size++;
}
template <typename T> T CircularBuffer<T>::dequeue()
{
ASSERT(!is_empty());
T ret_data = move(m_data[m_head]);
m_data[m_head].~T();
m_head = (m_head + 1) % m_capacity;
m_size--;
return ret_data;
}
template <typename T> T& CircularBuffer<T>::front()
{
return m_data[m_head];
}
template <typename T> T& CircularBuffer<T>::back()
{
return m_data[m_tail - 1];
}
template <typename T> CircularBuffer<T>::~CircularBuffer()
{
for (size_t i = m_head; i < m_tail; i++) {
m_data[i].~T();
}
operator delete(m_data);
}
template <typename T> bool CircularBuffer<T>::is_empty()
{
return m_size == 0;
}
template <typename T> bool CircularBuffer<T>::is_full()
{
return m_size == m_capacity;
}
template <typename T> size_t CircularBuffer<T>::capacity()
{
return m_capacity;
}
template <typename T> size_t CircularBuffer<T>::size()
{
return m_size;
}
template <typename T> size_t CircularBuffer<T>::available_size()
{
return capacity() - size();
}<file_sep>/kernel/Arch/x86/Asm.h
#pragma once
#include "Utils/Types.h"
#define JMP(x) asm("JMP *%0" : : "r"(kernel_init) :)
#define CALL(x, arg) asm volatile("PUSH %0;CALL %1;" : : "r"(arg), "r"(x));
#define HLT() asm("HLT")
#define DISABLE_INTERRUPTS() asm("CLI")
#define ENABLE_INTERRUPTS() asm("STI")
#define SET_STACK(x) asm("MOV %%ESP,%0; SUB %%esp,0x10" : : "r"(x) :) // PUSH for the debuggers to work properly.
static inline uint32_t get_faulted_page()
{
uint32_t page;
asm("MOV %0,%%CR2" : "=r"(page));
return page;
}
static inline uint8_t in8(uint16_t port)
{
uint8_t data;
asm volatile("inb %0, %1" : "=a"(data) : "d"(port));
return data;
}
static inline uint16_t in16(uint16_t port)
{
uint16_t data;
asm volatile("inw %0, %1" : "=a"(data) : "d"(port));
return data;
}
static inline uint32_t in32(uint16_t port)
{
uint32_t data;
asm volatile("inl %0, %1" : "=a"(data) : "d"(port));
return data;
}
static inline void out8(uint16_t port, uint8_t data)
{
asm volatile("outb %1, %0" : : "a"(data), "d"(port));
}
static inline void out16(uint16_t port, uint16_t data)
{
asm volatile("outw %1, %0" ::"a"(data), "d"(port));
}
static inline void out32(uint16_t port, uint32_t data)
{
asm volatile("outl %1, %0" : : "a"(data), "d"(port));
}
static inline uint32_t test_and_set(volatile uint32_t* address)
{
uint32_t result;
asm volatile(" LOCK XCHG %1, %0\n" : "+m"(*address), "=a"(result) : "1"(1) : "cc", "memory");
return result;
}
static inline uint32_t eflags_read()
{
uint32_t eflags;
asm volatile("PUSHF\n"
"POP %0\n"
: "=r"(eflags));
return eflags;
}
static inline void eflags_write(uint32_t eflags)
{
asm volatile("PUSH %0\n"
"POPF \n" ::"r"(eflags));
}<file_sep>/kernel/Tasking/SpinLock.h
#pragma once
#include "Arch/x86/Spinlock.h"
class Spinlock : public StaticSpinlock
{
public:
Spinlock() : StaticSpinlock{}
{
init();
}
~Spinlock() = default;
};
<file_sep>/kernel/CMakeLists.txt
include_directories(".")
#set(CMAKE_CXX_STANDARD 17)
SET(GCC_COVERAGE_COMPILE_FLAGS "-m32 -masm=intel -g -Wall -Wextra --std=c++17 -Og -MMD -fno-pie -ffreestanding -fno-rtti -fno-exceptions -fno-leading-underscore -Werror=return-type")
SET(GCC_COVERAGE_LINK_FLAGS "-T ${CMAKE_CURRENT_SOURCE_DIR}/linker.ld -m32 -nostdlib")
SET(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} ${GCC_COVERAGE_COMPILE_FLAGS})
SET(CMAKE_EXE_LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS} ${GCC_COVERAGE_LINK_FLAGS})
file(GLOB_RECURSE SOURCES "*.cpp" "*.asm")
add_executable(${OUTPUT_FILE} ${SOURCES})
add_custom_command(
TARGET ${OUTPUT_FILE}
POST_BUILD
COMMAND ${CMAKE_OBJCOPY} ARGS -O binary $<TARGET_FILE_NAME:${OUTPUT_FILE}> ${OUTPUT_IMAGE}
COMMENT "Striping the kernel output file..."
)
<file_sep>/kernel/Arch/x86/Paging.cpp
#include "Paging.h"
PAGE_DIRECTORY Paging::page_direcotry __attribute__((aligned(PAGE_SIZE)));
PAGE_TABLE Paging::kernel_page_tables[FULL_KERNEL_PAGES] __attribute__((aligned(PAGE_SIZE)));
PAGE_TABLE Paging::boostrap_page_table[2] __attribute__((aligned(PAGE_SIZE)));
// Initialize page direcotry and page tables.
void Paging::setup(uint32_t num_kernel_pages)
{
PAGE_DIRECTORY* ph_page_direcotry = (PAGE_DIRECTORY*)VIR_TO_PHY((uint32_t)&page_direcotry);
initialize_page_directory(ph_page_direcotry);
// Link to page tables
setup_page_tables();
// Map identity and higher half
map_boot_pages(KERNEL_PHYSICAL_ADDRESS, KERNEL_PHYSICAL_ADDRESS, num_kernel_pages);
map_boot_pages(KERNEL_VIRTUAL_ADDRESS, KERNEL_PHYSICAL_ADDRESS, num_kernel_pages);
// Load page directory and enable paging
load_page_directory((uint32_t)ph_page_direcotry);
enable_PSE();
enable_paging();
}
void Paging::setup_page_tables()
{
PAGE_DIRECTORY* ph_page_direcotry = (PAGE_DIRECTORY*)VIR_TO_PHY((uint32_t)&page_direcotry);
PAGE_TABLE* ph_kpage_tables = (PAGE_TABLE*)VIR_TO_PHY((uint32_t)kernel_page_tables);
PAGE_TABLE* ph_bootpage_tables = (PAGE_TABLE*)VIR_TO_PHY((uint32_t)boostrap_page_table);
uint32_t page_flags = PAGE_FLAGS_PRESENT | PAGE_FLAGS_WRITABLE;
initialize_page_directory(ph_page_direcotry);
// Kernel pages tables
for (size_t i = 0; i < FULL_KERNEL_PAGES; i++) {
initialize_page_table(&ph_kpage_tables[i]);
fill_directory_entry(&ph_page_direcotry->entries[i + GET_PDE_INDEX(KERNEL_BASE)],
GET_FRAME((uint32_t)&ph_kpage_tables[i]), page_flags);
}
// Identity page tables for 8mb of the kernel bootstrap
for (size_t i = 0; i < 2; i++) {
initialize_page_table(&ph_bootpage_tables[i]);
fill_directory_entry(&ph_page_direcotry->entries[i], GET_FRAME((uint32_t)&ph_bootpage_tables[i]), page_flags);
}
// Set recursive entry
fill_directory_entry(&ph_page_direcotry->entries[RECURSIVE_ENTRY], GET_FRAME((uint32_t)ph_page_direcotry),
page_flags);
}
// Map virtual address range to physical address, can be used only at boot time.
void Paging::map_boot_pages(uint32_t virtual_address, uint32_t physical_address, uint32_t pages)
{
PAGE_DIRECTORY* ph_page_directory = (PAGE_DIRECTORY*)VIR_TO_PHY((uint32_t)&page_direcotry);
uint32_t current_v_page = virtual_address;
uint32_t current_p_page = physical_address;
uint32_t page_flags = PAGE_FLAGS_PRESENT | PAGE_FLAGS_WRITABLE | PAGE_FLAGS_GLOBAL;
for (size_t i = 0; i < pages; i++) {
uint32_t pde = GET_PDE_INDEX(current_v_page);
uint32_t pte = GET_PTE_INDEX(current_v_page);
PAGE_TABLE* ph_page_table = (PAGE_TABLE*)(ph_page_directory->entries[pde].frame * PAGE_SIZE);
fill_page_table_entry(&ph_page_table->entries[pte], GET_FRAME(current_p_page), page_flags);
current_v_page += PAGE_SIZE;
current_p_page += PAGE_SIZE;
}
}
// Map a virtual page to a physical page.
void Paging::map_page(uint32_t virtual_address, uint32_t physical_address, uint32_t flags)
{
PAGE_TABLE* page_table = (PAGE_TABLE*)GET_PAGE_VIRTUAL_ADDRESS(RECURSIVE_ENTRY, GET_PDE_INDEX(virtual_address));
fill_page_table_entry(&page_table->entries[GET_PTE_INDEX(virtual_address)], GET_FRAME(physical_address), flags);
invalidate_page(virtual_address);
}
// Map contagious virtual pages to contagious physical pages.
void Paging::map_pages(uint32_t virtual_address, uint32_t physical_address, uint32_t pages, uint32_t flags)
{
for (size_t i = 0; i < pages; i++) {
map_page(virtual_address + PAGE_SIZE * i, physical_address + PAGE_SIZE * i, flags);
}
}
// Map a virtual page to a physical page.
void Paging::unmap_page(uint32_t virtual_address)
{
PAGE_TABLE* page_table = (PAGE_TABLE*)GET_PAGE_VIRTUAL_ADDRESS(RECURSIVE_ENTRY, GET_PDE_INDEX(virtual_address));
page_table->entries[GET_PTE_INDEX(virtual_address)].present = 0;
invalidate_page(virtual_address);
}
// Map contagious virtual pages to contagious physical pages.
void Paging::unmap_pages(uint32_t virtual_address, uint32_t pages)
{
for (size_t i = 0; i < pages; i++) {
unmap_page(virtual_address + PAGE_SIZE * i);
}
}
void Paging::map_page_table(uint32_t virtual_address, uint32_t pt_virtual_address)
{
uint32_t page_flags = PAGE_FLAGS_PRESENT | PAGE_FLAGS_WRITABLE | PAGE_FLAGS_USER;
PAGE_DIRECTORY* page_dir = (PAGE_DIRECTORY*)GET_PAGE_VIRTUAL_ADDRESS(RECURSIVE_ENTRY, RECURSIVE_ENTRY);
uint32_t pt_frame = get_physical_page(pt_virtual_address);
fill_directory_entry(&page_dir->entries[GET_PDE_INDEX(virtual_address)], pt_frame, page_flags);
}
bool Paging::check_page_table_exists(uint32_t virtual_address)
{
PAGE_DIRECTORY* page_dir = (PAGE_DIRECTORY*)GET_PAGE_VIRTUAL_ADDRESS(RECURSIVE_ENTRY, RECURSIVE_ENTRY);
return page_dir->entries[GET_PDE_INDEX(virtual_address)].present;
}
bool Paging::check_page_exits_in_table(uint32_t virtual_address)
{
PAGE_TABLE* page_table = (PAGE_TABLE*)GET_PAGE_VIRTUAL_ADDRESS(RECURSIVE_ENTRY, GET_PDE_INDEX(virtual_address));
return page_table->entries[GET_PTE_INDEX(virtual_address)].present;
}
bool Paging::check_page_present(uint32_t virtual_address)
{
if (check_page_table_exists(virtual_address) == false)
return false;
return check_page_exits_in_table(virtual_address);
}
uint32_t Paging::get_physical_page(uint32_t virtual_address)
{
PAGE_TABLE* page_table = (PAGE_TABLE*)GET_PAGE_VIRTUAL_ADDRESS(RECURSIVE_ENTRY, GET_PDE_INDEX(virtual_address));
return page_table->entries[GET_PTE_INDEX(virtual_address)].frame;
}
// Zeroing page directory entries.
void Paging::initialize_page_directory(PAGE_DIRECTORY* page_direcotry)
{
for (size_t i = 0; i < NUMBER_OF_PAGE_DIRECOTRY_ENTRIES; i++) {
*((uint32_t*)&page_direcotry->entries[i]) = 0;
}
}
// Zeroing page table entries.
void Paging::initialize_page_table(PAGE_TABLE* page_direcotry)
{
for (size_t i = 0; i < NUMBER_OF_PAGE_TABLE_ENTRIES; i++) {
*((uint32_t*)&page_direcotry->entries[i]) = 0;
}
}
void Paging::map_kernel_pd_entries(uint32_t pd)
{
uint32_t page_flags = PAGE_FLAGS_PRESENT | PAGE_FLAGS_WRITABLE;
PAGE_DIRECTORY* new_page_dir = (PAGE_DIRECTORY*)pd;
initialize_page_directory(new_page_dir);
const size_t start = GET_PDE_INDEX(KERNEL_VIRTUAL_ADDRESS);
for (size_t i = start; i < RECURSIVE_ENTRY; i++) {
memcpy((void*)&new_page_dir->entries[i], (void*)&page_direcotry.entries[i], sizeof(PAGE_DIRECTORY_ENTRY));
}
fill_directory_entry(&new_page_dir->entries[RECURSIVE_ENTRY], get_physical_page(pd), page_flags);
}
void Paging::fill_directory_entry(PAGE_DIRECTORY_ENTRY* page_direcotry_entry, uint16_t physical_frame, uint32_t flags)
{
page_direcotry_entry->unused = 0;
page_direcotry_entry->global = BOOL(flags & PAGE_FLAGS_GLOBAL);
page_direcotry_entry->pwt = 0;
page_direcotry_entry->pcd = 0;
page_direcotry_entry->pse = 0;
page_direcotry_entry->present = BOOL(flags & PAGE_FLAGS_PRESENT);
page_direcotry_entry->rw = BOOL(flags & PAGE_FLAGS_WRITABLE);
page_direcotry_entry->user = BOOL(flags & PAGE_FLAGS_USER);
page_direcotry_entry->frame = physical_frame;
}
void Paging::fill_directory_PSE_entry(PAGE_DIRECTORY_ENTRY* page_direcotry_entry, uint16_t physical_frame,
uint32_t flags)
{
page_direcotry_entry->unused = 0;
page_direcotry_entry->global = BOOL(flags & PAGE_FLAGS_GLOBAL);
page_direcotry_entry->pwt = 0;
page_direcotry_entry->pcd = 0;
page_direcotry_entry->pse = 1;
page_direcotry_entry->present = BOOL(flags & PAGE_FLAGS_PRESENT);
page_direcotry_entry->rw = BOOL(flags & PAGE_FLAGS_WRITABLE);
page_direcotry_entry->user = BOOL(flags & PAGE_FLAGS_USER);
page_direcotry_entry->frame = physical_frame;
}
void Paging::fill_page_table_entry(PAGE_TABLE_ENTRY* page_table_entry, uint16_t physical_frame, uint32_t flags)
{
// FIXME: accessing bits directly is so slow.
page_table_entry->unused = 0;
page_table_entry->global = BOOL(flags & PAGE_FLAGS_GLOBAL);
page_table_entry->pwt = 0;
page_table_entry->pcd = 0;
page_table_entry->pse = 0;
page_table_entry->present = BOOL(flags & PAGE_FLAGS_PRESENT);
page_table_entry->rw = BOOL(flags & PAGE_FLAGS_WRITABLE);
page_table_entry->user = BOOL(flags & PAGE_FLAGS_USER);
page_table_entry->frame = physical_frame;
}
void Paging::load_page_directory(uint32_t page_direcotry)
{
asm("MOV %%CR3,%0" : : "r"(page_direcotry) :);
}
void Paging::enable_paging()
{
asm("MOV %%EAX,%%CR0;"
"OR %%EAX,%0;"
"MOV %%CR0,%%EAX ;"
:
: "i"(CR0_WP | CR0_PAGING)
: "eax");
}
void Paging::enable_PSE()
{
asm("MOV %%EAX,%%CR4;"
"OR %%EAX,%0;"
"MOV %%CR4,%%EAX;"
:
: "i"(CR4_PSE)
: "eax");
}
void Paging::invalidate_page(uint32_t addr)
{
asm volatile("invlpg [%0]" ::"r"(addr) : "memory");
}<file_sep>/kernel/Lib/Malloc.cpp
#include "Arch/x86/Panic.h"
#include "Utils/Types.h"
#include "VirtualMemory/Heap.h"
void* operator new(size_t size)
{
return Heap::kmalloc(size, 0);
}
void* operator new[](size_t size)
{
return Heap::kmalloc(size, 0);
}
void operator delete(void* p)
{
return Heap::kfree(p);
}
void operator delete[](void* p)
{
return Heap::kfree(p);
}
void* operator new(size_t, void* p)
{
return p;
}
void* operator new[](size_t, void* p)
{
return p;
}
void operator delete[](void* p, size_t)
{
Heap::kfree(p);
}
void operator delete(void* p, size_t)
{
Heap::kfree(p);
}
extern "C" void __cxa_pure_virtual()
{
PANIC("Virtual function has no implementation!");
}<file_sep>/test/IntrusiveList.cpp
#ifdef __STRICT_ANSI__
#undef __STRICT_ANSI__
#endif
#include "Utils/IntrusiveList.h"
#include <gtest/gtest.h>
struct TestStruct : public IntrusiveListNode<TestStruct> {
int a;
int b;
bool operator==(const TestStruct& other)
{
if (a != other.a)
return false;
if (b != other.b)
return false;
return true;
}
TestStruct(int aa, int bb) : a{aa}, b{bb}
{
}
};
TEST(IntrusiveList_Test, Iteration)
{
TestStruct raw_list[] = {{1, 2}, {3, 4}, {5, 6}};
IntrusiveList<TestStruct> list;
for (size_t i = 0; i < 3; i++) {
list.push_back(raw_list[i]);
}
EXPECT_EQ(list.size(), 3);
size_t index = 0;
for (auto&& i : list) {
EXPECT_TRUE(i == raw_list[index]);
index++;
}
}
TEST(IntrusiveList_Test, Removing)
{
/*TestStruct raw_list[] = {{1, 2}, {3, 4}, {5, 6}};
IntrusiveList<TestStruct> list;
for (size_t i = 0; i < 3; i++) {
list.push_back(raw_list[i]);
}
EXPECT_EQ(list.size(), 3);
list.remove(1);
EXPECT_EQ(list.size(), 2);
EXPECT_TRUE(list[0] == raw_list[0]);
EXPECT_TRUE(list[1] == raw_list[2]);
list.remove(1);
EXPECT_EQ(list.size(), 1);
EXPECT_TRUE(list[0] == raw_list[0]);
list.remove(0);
EXPECT_EQ(list.size(), 0);*/
}
TEST(IntrusiveList_Test, MovingBetweenLists)
{
/*TestStruct raw_list1[] = {{1, 2}, {3, 4}, {5, 6}};
TestStruct raw_list2[] = {{10, 20}, {30, 40}, {50, 60}, {70, 80}};
IntrusiveList<TestStruct> list1;
IntrusiveList<TestStruct> list2;
for (size_t i = 0; i < 3; i++) {
list1.push_back(raw_list1[i]);
}
for (size_t i = 0; i < 4; i++) {
list2.push_back(raw_list2[i]);
}
EXPECT_EQ(list1.size(), 3);
EXPECT_EQ(list2.size(), 4);
list2.move_head_to_other_list(&list1);
EXPECT_EQ(list1.size(), 4);
EXPECT_EQ(list2.size(), 3);
EXPECT_TRUE(list1[3] == raw_list2[0]);
auto itr{list2.begin()};
itr.move_cursor(2);
list2.move_to_other_list(&list1, itr);
EXPECT_EQ(list1.size(), 5);
EXPECT_EQ(list2.size(), 2);
EXPECT_TRUE(list1[4] == raw_list2[3]);*/
}<file_sep>/test/List_Test.cpp
#ifdef __STRICT_ANSI__
#undef __STRICT_ANSI__
#endif
#include "Utils/List.h"
#include <gtest/gtest.h>
struct TestStruct {
int a;
int b;
bool operator==(const TestStruct& other)
{
if (a != other.a)
return false;
if (b != other.b)
return false;
return true;
}
};
TEST(List_Test, Iteration)
{
TestStruct raw_list[] = {{1, 2}, {3, 4}, {5, 6}};
List<TestStruct> list;
for (size_t i = 0; i < 3; i++) {
list.push_back(raw_list[i]);
}
EXPECT_EQ(list.size(), 3);
EXPECT_FALSE(list.is_empty());
size_t index = 0;
for (auto&& i : list) {
EXPECT_TRUE(i == raw_list[index]);
index++;
}
}
TEST(List_Test, Erasing)
{
TestStruct raw_list[] = {{1, 2}, {3, 4}, {5, 6}};
List<TestStruct> list;
for (size_t i = 0; i < 3; i++) {
list.push_back(raw_list[i]);
}
EXPECT_EQ(list.size(), 3);
EXPECT_FALSE(list.is_empty());
list.erase(++list.begin());
EXPECT_EQ(list.size(), 2);
EXPECT_TRUE(list[0] == raw_list[0]);
EXPECT_TRUE(list[1] == raw_list[2]);
list.erase(++list.begin());
EXPECT_EQ(list.size(), 1);
EXPECT_TRUE(list[0] == raw_list[0]);
list.erase(list.begin());
EXPECT_EQ(list.size(), 0);
EXPECT_TRUE(list.is_empty());
for (size_t i = 0; i < 3; i++) {
list.push_back(raw_list[i]);
}
EXPECT_EQ(list.size(), 3);
EXPECT_FALSE(list.is_empty());
list.clear();
EXPECT_EQ(list.size(), 0);
EXPECT_TRUE(list.is_empty());
}
TEST(List_Test, Splicing)
{
TestStruct raw_list1[] = {{1, 2}, {3, 4}, {5, 6}};
TestStruct raw_list2[] = {{10, 20}, {30, 40}, {50, 60}, {70, 80}};
List<TestStruct> list1;
List<TestStruct> list2;
for (size_t i = 0; i < 3; i++) {
list1.push_back(raw_list1[i]);
}
for (size_t i = 0; i < 4; i++) {
list2.push_back(raw_list2[i]);
}
EXPECT_EQ(list1.size(), 3);
EXPECT_EQ(list2.size(), 4);
EXPECT_FALSE(list1.is_empty());
EXPECT_FALSE(list2.is_empty());
list2.splice(list1, list2.begin());
EXPECT_EQ(list1.size(), 4);
EXPECT_EQ(list2.size(), 3);
EXPECT_TRUE(list1[3] == raw_list2[0]);
auto itr{list2.begin()};
itr++;
itr++;
list2.splice(list1, itr);
EXPECT_EQ(list1.size(), 5);
EXPECT_EQ(list2.size(), 2);
EXPECT_TRUE(list1[4] == raw_list2[3]);
EXPECT_FALSE(list1.is_empty());
EXPECT_FALSE(list2.is_empty());
}
TEST(List_Test, Inserting)
{
List<TestStruct> list;
list.emplace_back(1, 1);
list.emplace_front(2, 2);
list.emplace_back(3, 3);
EXPECT_TRUE(list[0] == TestStruct({2, 2}));
EXPECT_TRUE(list[1] == TestStruct({1, 1}));
EXPECT_TRUE(list[2] == TestStruct({3, 3}));
EXPECT_EQ(list.size(), 3);
list.insert(++list.begin(), TestStruct({4, 4}));
EXPECT_TRUE(list[0] == TestStruct({2, 2}));
EXPECT_TRUE(list[1] == TestStruct({1, 1}));
EXPECT_TRUE(list[2] == TestStruct({4, 4}));
EXPECT_TRUE(list[3] == TestStruct({3, 3}));
EXPECT_EQ(list.size(), 4);
EXPECT_TRUE(list.head() == TestStruct({2, 2}));
EXPECT_TRUE(list.tail() == TestStruct({3, 3}));
}<file_sep>/kernel/Utils/ErrorCodes.h
#pragma once
#define ERROR_SUCCESS 0
#define ERROR_UNDEFINED 1
#define ERROR_FILE_DOES_NOT_EXIST 2
#define ERROR_MOUNTPOINT_EXISTS 3
#define ERROR_EOF 4
#define ERROR_INVALID_PARAMETERS 5
#define ERROR_INVALID_EXECUTABLE 6
#define ERROR_LOADING_EXECUTABLE 7
#define ERROR_NO_ROOT_NODE 8
#define ERROR_INVALID_OPERATION 9
#define ERROR_FILE_ALREADY_EXISTS 10
#define ERROR_DEVICE_ALREADY_EXISTS 11
#define ERROR_DEVICE_DOESNOT_EXIST 12
#define ERROR_FS_ALREADY_EXISTS 13
<file_sep>/kernel/Lib/Stdlib.h
#pragma once
#include "Utils/Types.h"
void memcpy(void* dest, const void* source, unsigned int len);
void memset(void* dest, char value, unsigned int len);
bool memcmp(const void* source, const void* dest, unsigned int len);
bool strncmp(const char* source, const char* dest, unsigned int len);
bool strcmp(const char* source, const char* dest);
int strcpy(char* dst, const char* src);
unsigned strlen(const char* str);
int toupper(char* str);
int tolower(char* str);
void itoa(char* buf, unsigned long int n, int base);<file_sep>/kernel/VirtualMemory/Heap.cpp
#include "Heap.h"
#include "Tasking/ScopedLock.h"
volatile PageFrameBlock* Heap::malloc_mem;
StaticSpinlock Heap::lock;
void Heap::setup()
{
lock.init();
malloc_mem = nullptr;
malloc_mem = create_new_page();
}
// Returns address of zeroed block of memory.
void* Heap::kmalloc(unsigned size, unsigned flags)
{
UNUSED(flags);
ScopedLock local_lock(lock);
// FIXME: allocate normal memory if the size is greater than MAX_SIZE (there is a bug when less) and handle
// freeing too
if (!size)
return nullptr;
if (size > MAX_SIZE) {
return nullptr;
}
BlockHeader* free_block;
// Check if there is a free block in the list
// TODO: if the current page is not enough, try expanding it by allocating neighbor pages.
// TODO: classify the sizes into power of 2 sizes.
free_block = find_free_block(size + sizeof(BlockHeader));
if (free_block) {
link_block(free_block->previous, free_block);
free_block->size = size;
return (void*)HEADER_TO_ADDR(free_block);
}
// Create new memory page
PageFrameBlock* new_page = create_new_page();
free_block = initiate_first_block(new_page);
free_block->size = size;
uintptr_t alloc_address = HEADER_TO_ADDR(free_block);
memset((void*)alloc_address, 0, size);
return (void*)alloc_address;
}
// Frees block of memory allocated by kmalloc.
void Heap::kfree(void* addr)
{
if (!addr)
return;
ScopedLock local_lock(lock);
BlockHeader* current_block = (BlockHeader*)ADDR_TO_HEADER(addr);
unlink_block(current_block);
}
PageFrameBlock* Heap::create_new_page()
{
// FIXME: create page according to the allocation size.
// FIXME: do some asserts to nullpointers.
PageFrameBlock* new_page =
(PageFrameBlock*)Memory::alloc(MALLOC_PAGE_SIZE, MEMORY_TYPE::KERNEL | MEMORY_TYPE::WRITABLE);
new_page->size = MALLOC_PAGE_SIZE;
PageFrameBlock* last_page = get_last_page();
if (last_page) {
last_page->next = new_page;
}
return new_page;
}
BlockHeader* Heap::initiate_first_block(PageFrameBlock* new_page)
{
BlockHeader* empty_block = (BlockHeader*)(new_page + 1);
BlockHeader* free_block = (empty_block + 1);
empty_block->size = 0;
empty_block->previous = 0;
empty_block->next = free_block;
free_block->previous = empty_block;
return free_block;
}
void Heap::link_block(BlockHeader* current_block, BlockHeader* new_block)
{
BlockHeader* prev_block = current_block;
BlockHeader* next_block = current_block->next;
prev_block->next = new_block;
if (next_block)
next_block->previous = new_block;
}
void Heap::unlink_block(BlockHeader* current_block)
{
BlockHeader* prev_block = current_block->previous;
BlockHeader* next_block = current_block->next;
prev_block->next = next_block;
if (next_block) {
next_block->previous = prev_block;
}
}
BlockHeader* Heap::find_free_block(unsigned size)
{
volatile PageFrameBlock* current_page = malloc_mem;
BlockHeader *current_block, *free_block;
unsigned current_free_space;
while (current_page) {
current_block = (BlockHeader*)(current_page + 1);
while (current_block) {
if (current_block->next) {
current_free_space = (unsigned)current_block->next - NEXT_NEIGHBOR_BLOCK(current_block);
} else { // last block in the current page
current_free_space = (unsigned)current_page + current_page->size - NEXT_NEIGHBOR_BLOCK(current_block);
}
if (current_free_space >= size) {
free_block = (BlockHeader*)NEXT_NEIGHBOR_BLOCK(current_block);
free_block->previous = current_block;
free_block->next = current_block->next;
return free_block;
}
current_block = current_block->next;
}
current_page = current_page->next;
}
return nullptr;
}
PageFrameBlock* Heap::get_last_page()
{
if (!malloc_mem) {
return nullptr;
}
volatile PageFrameBlock* current = malloc_mem;
while (current->next) {
current = current->next;
}
return (PageFrameBlock*)current;
}<file_sep>/kernel/Boot/Boot.cpp
#include "Boot.h"
#include "Devices/DebugPort/Logger.h"
extern uint32_t KERNEL_END;
extern uint32_t KERNEL_START;
BootloaderInfo bootloader_info;
__attribute__((section(".multiboot2"))) const volatile Mutiboot2_Header my_multiboot2_header = {
.header = {.magic = MULTIBOOT2_HEADER_MAGIC,
.architecture = MULTIBOOT_ARCHITECTURE_I386,
.header_length = sizeof(Mutiboot2_Header),
.checksum = MULTIBOOT2_HEADER_CHECKSUM},
.address = {.type = MULTIBOOT_HEADER_TAG_ADDRESS,
.flags = 0,
.size = sizeof(multiboot_header_tag_address),
.header_addr = VIR_TO_PHY((uint32_t)&my_multiboot2_header),
.load_addr = KERNEL_PHYSICAL_ADDRESS,
.load_end_addr = 0,
.bss_end_addr = VIR_TO_PHY(uint32_t(&KERNEL_END))},
.entry = {.type = MULTIBOOT_HEADER_TAG_ENTRY_ADDRESS,
.flags = 0,
.size = sizeof(multiboot_header_tag_entry_address),
.entry_addr = VIR_TO_PHY((uint32_t)&kernel_boot_stage1)},
.mod_align = {.type = MULTIBOOT_HEADER_TAG_MODULE_ALIGN,
.flags = 0,
.size = sizeof(multiboot_header_tag_module_align)},
.end = {.type = MULTIBOOT_HEADER_TAG_END, //
.flags = 0,
.size = sizeof(multiboot_header_tag)},
};
extern "C" void kernel_boot_stage2(uint32_t magic, multiboot_tag_start* boot_info)
{
if (magic != MULTIBOOT2_BOOTLOADER_MAGIC)
HLT();
BootloaderInfo bootloader_info_local = parse_mbi((uintptr_t)boot_info);
Memory::setup();
// maping ramdisk to virtual memory
uintptr_t ustar_fs = reinterpret_cast<uintptr_t>(Memory::map(bootloader_info_local.ramdisk.start, //
bootloader_info_local.ramdisk.size, //
MEMORY_TYPE::KERNEL | MEMORY_TYPE::WRITABLE));
bootloader_info_local.ramdisk.start = ustar_fs;
memcpy(&bootloader_info, &bootloader_info_local, sizeof(BootloaderInfo));
// Set new stack for high memory kernel.
uintptr_t new_stack = uintptr_t(Memory::alloc(STACK_SIZE, MEMORY_TYPE::KERNEL | MEMORY_TYPE::WRITABLE));
SET_STACK(new_stack + STACK_SIZE);
CALL(kernel_init, &bootloader_info)
ASSERT_NOT_REACHABLE();
return;
}
const char* mmap_entry_type_text[] = {"Unknown" //
"AVAILABLE", //
"RESERVED", //
"ACPI_RECLAIMABLE", //
"NVS", //
"BAD_RAM"};
BootloaderInfo parse_mbi(uintptr_t multiboot_info)
{
BootloaderInfo bootloader_info_local;
multiboot_tag* current_tag = (multiboot_tag*)(multiboot_info + sizeof(multiboot_tag_start));
while (current_tag->type != MULTIBOOT_TAG_TYPE_END) {
switch (current_tag->type) {
case MULTIBOOT_TAG_TYPE_MODULE: {
multiboot_tag_module* tag = (multiboot_tag_module*)current_tag;
// if (strcmp(tag->cmdline, "ramdisk") == 0) {
bootloader_info_local.ramdisk.start = tag->mod_start;
bootloader_info_local.ramdisk.size = tag->mod_end - tag->mod_start;
//}
break;
}
case MULTIBOOT_TAG_TYPE_MMAP: {
multiboot_tag_mmap* tag2 = (multiboot_tag_mmap*)current_tag;
size_t i = 0;
// info() << "Memory Map:\n";
while (tag2->entries[i].type != 0) {
// info() << "Addr: " << Hex(tag2->entries[i].addr) << " Size: " << tag2->entries[i].len
// << " Type: " << mmap_entry_type_text[tag2->entries[i].type] << "\n";
i++;
}
break;
}
}
current_tag = (multiboot_tag*)(uintptr_t(current_tag) + align_to(current_tag->size, MULTIBOOT_INFO_ALIGN));
}
return bootloader_info_local;
}
inline uintptr_t align_to(uintptr_t size, unsigned alignment)
{
if (size == 0)
return alignment;
else if ((size % alignment) == 0)
return size;
else
return size + alignment - (size % alignment);
}<file_sep>/kernel/Filesystem/Ustar/INode.h
#pragma once
#include "Filesystem/FSNode.h"
#include "Tasking/SpinLock.h"
#include "Utils/List.h"
#include "Utils/Result.h"
#include "Utils/String.h"
#include "Utils/Types.h"
class INode : public FSNode
{
private:
char* m_data;
Spinlock m_lock;
List<INode> m_children;
public:
explicit INode(const StringView& name, NodeType type, size_t size, char* data);
INode& operator=(const INode& other) = delete;
INode& operator=(INode&& other) = delete;
~INode();
Result<void> open(OpenMode mode, OpenFlags flags) override;
Result<void> close() override;
Result<void> read(void* buff, size_t offset, size_t size) override;
Result<bool> can_read() override;
Result<FSNode&> dir_lookup(const StringView& file_name) override;
friend class TarFS;
};<file_sep>/kernel/Filesystem/Ustar/TarFS.cpp
#include "TarFS.h"
#include "Tasking/ScopedLock.h"
#include "Utils/ErrorCodes.h"
#include "Utils/Stack.h"
#include "Utils/Stl.h"
UniquePointer<FSNode> TarFS::alloc(const StringView& name, void* tar_address, size_t size)
{
return UniquePointer<FSNode>(new TarFS(name, tar_address, size));
}
TarFS::TarFS(const StringView& name, void* tar_address, size_t size) :
INode{name, NodeType::Root, 0, nullptr},
m_tar_address(static_cast<TarHeader*>(tar_address))
{
ASSERT(tar_address);
ASSERT(strncmp(m_tar_address->magic, "ustar", 5) == 0);
parse_ustar(size);
}
TarFS::~TarFS()
{
}
INode& TarFS::add_child_node(INode& parent, const StringView& name, char type, const size_t size, char* data)
{
NodeType node_type;
if (type == USTARFileType::DIRECTORY) {
node_type = NodeType::Folder;
} else {
node_type = NodeType::File;
}
return parent.m_children.emplace_back(name, node_type, size, data);
}
void TarFS::parse_ustar(size_t size)
{
TarHeader* tar_parser = m_tar_address;
Stack<INode*> directories(10);
directories.queue(this);
while (uintptr_t(tar_parser) < (uintptr_t(m_tar_address) + size)) {
if (!tar_parser->name[0])
break;
String path = regulate_path(tar_parser->name);
PathParser parser = PathParser(StringView(path));
if (parser.count() > 1) {
while (directories.back()->m_name != (parser.element(parser.count() - 2)) && (directories.size() > 1)) {
directories.dequeue();
}
} else {
while (directories.size() > 1) {
directories.dequeue();
}
}
auto& new_node = add_child_node(
*directories.back(), //
parser.element(parser.count() - 1), //
tar_parser->typeflag, //
octal_to_decimal(tar_parser->size), //
tar_parser->typeflag != USTARFileType::DIRECTORY ? reinterpret_cast<char*>(tar_parser + 1) : nullptr);
if (tar_parser->typeflag == USTARFileType::DIRECTORY) {
directories.queue(&new_node);
}
const uintptr_t aligned_size = align_to(octal_to_decimal(tar_parser->size), TAR_ALIGNMENT);
tar_parser = (TarHeader*)(uintptr_t(tar_parser + 1) + aligned_size);
}
}
size_t TarFS::octal_to_decimal(const char* octal)
{
size_t size = 0;
unsigned current_multiplier = 1;
for (size_t i = TAR_OCTAL_SIZE_LEN - 1; i > 0; i--) {
size += (octal[i - 1] - '0') * current_multiplier;
current_multiplier *= 8;
}
return size;
}
inline uintptr_t TarFS::align_to(uintptr_t size, unsigned alignment)
{
if (!size)
return 0;
else if ((size % alignment) == 0)
return size;
else
return size + alignment - (size % alignment);
}
String TarFS::regulate_path(const char* path)
{
String full_path(path);
full_path.insert(0, "/");
if (full_path[full_path.length() - 1] == '/') {
full_path.pop_back();
}
return full_path;
}
Result<FSNode&> TarFS::dir_lookup(const StringView& file_name)
{
ScopedLock local_lock(m_lock);
for (auto& i : m_children) {
if (i.m_name == file_name) {
return i;
}
}
return ResultError(ERROR_FILE_DOES_NOT_EXIST);
}
<file_sep>/kernel/Filesystem/Pipes/Pipe.h
#pragma once
#include "Filesystem/FSNode.h"
#include "Tasking/WaitQueue.h"
#include "Utils/CircularBuffer.h"
#include "Utils/List.h"
#include "Utils/String.h"
#include "Utils/StringView.h"
#include "Utils/UniquePointer.h"
#include "Utils/Types.h"
class Pipe : public FSNode
{
enum class Direction { Reader, Writer };
private:
const static size_t BUFFER_SIZE = 1024;
List<Pipe> m_children;
CircularBuffer<char> m_buffer;
WaitQueue m_wait_queue;
Spinlock m_lock;
public:
explicit Pipe(const StringView& name);
~Pipe();
Result<void> open(OpenMode mode, OpenFlags flags) override;
Result<void> close() override;
Result<void> read(void* buff, size_t offset, size_t size) override;
Result<void> write(const void* buff, size_t offset, size_t size) override;
Result<bool> can_read() override;
Result<bool> can_write() override;
Result<void> remove() override;
};<file_sep>/kernel/Tasking/Loader/PE.cpp
#include "PE.h"
#include "Lib/Stdlib.h"
#include "Utils/ErrorCodes.h"
#include "VirtualMemory/Memory.h"
Result<uintptr_t> PELoader::load(const char* file, size_t size)
{
ASSERT(file);
ASSERT(size);
// validations
const IMAGE_DOS_HEADER* dos_header = reinterpret_cast<const IMAGE_DOS_HEADER*>(file);
if (dos_header->e_magic != IMAGE_DOS_SIGNATURE)
return ResultError(ERROR_INVALID_EXECUTABLE);
if (!dos_header->e_lfanew)
return ResultError(ERROR_INVALID_EXECUTABLE);
const IMAGE_NT_HEADERS32* nt_header = reinterpret_cast<const IMAGE_NT_HEADERS32*>(file + dos_header->e_lfanew);
if (nt_header->Signature != IMAGE_NT_SIGNATURE)
return ResultError(ERROR_INVALID_EXECUTABLE);
const IMAGE_SECTION_HEADER* section_header = reinterpret_cast<const IMAGE_SECTION_HEADER*>(nt_header + 1);
for (size_t i = 0; i < nt_header->FileHeader.NumberOfSections; i++) {
const uint32_t section_va = section_header[i].VirtualAddress;
const uint32_t section_rd = section_header[i].PointerToRawData;
const uint32_t section_raw_size = section_header[i].SizeOfRawData;
const uint32_t section_vir_size = section_header[i].Misc.VirtualSize;
if (!section_va || !section_rd || !section_vir_size)
return ResultError(ERROR_INVALID_EXECUTABLE);
if ((section_rd + section_raw_size) > size)
return ResultError(ERROR_INVALID_EXECUTABLE);
}
if (!nt_header->OptionalHeader.AddressOfEntryPoint)
return ResultError(ERROR_INVALID_EXECUTABLE);
// Load PE sections
void* start_of_executable = load_pe_sections(file, nt_header);
if (!start_of_executable)
return ResultError(ERROR_LOADING_EXECUTABLE);
return uintptr_t(start_of_executable) + nt_header->OptionalHeader.AddressOfEntryPoint;
}
void* PELoader::load_pe_sections(const char* file, const IMAGE_NT_HEADERS32* nt_header)
{
const IMAGE_SECTION_HEADER* section_header = reinterpret_cast<const IMAGE_SECTION_HEADER*>(nt_header + 1);
const uint32_t section_alignment = nt_header->OptionalHeader.SectionAlignment;
// Load headers
void* start_of_executable = Memory::alloc(reinterpret_cast<void*>(nt_header->OptionalHeader.ImageBase),
nt_header->OptionalHeader.SectionAlignment, MEMORY_TYPE::WRITABLE);
if (!start_of_executable)
return nullptr;
memset(start_of_executable, 0, section_alignment);
memcpy(start_of_executable, file, nt_header->OptionalHeader.SizeOfHeaders);
// load sections
for (size_t i = 0; i < nt_header->FileHeader.NumberOfSections; i++) {
const uint32_t section_va = section_header[i].VirtualAddress;
const uint32_t section_rd = section_header[i].PointerToRawData;
const uint32_t section_raw_size = section_header[i].SizeOfRawData;
const uint32_t section_vir_size = align_to(section_header[i].Misc.VirtualSize, section_alignment);
void* current_section_address = reinterpret_cast<void*>(uintptr_t(start_of_executable) + section_va);
current_section_address = Memory::alloc(current_section_address, section_vir_size, MEMORY_TYPE::WRITABLE);
if (!current_section_address)
return nullptr;
memcpy(current_section_address, file + section_rd, section_raw_size);
}
return start_of_executable;
}
inline uintptr_t PELoader::align_to(uintptr_t size, size_t alignment)
{
if (size == 0)
return alignment;
else if ((size % alignment) == 0)
return size;
else
return size + alignment - (size % alignment);
}
<file_sep>/kernel/Kernel_init.h
#pragma once
#include "Utils/Types.h"
struct Module {
uintptr_t start;
uintptr_t size;
};
struct BootloaderInfo {
Module ramdisk;
};
extern "C" void kernel_init(BootloaderInfo* boot_info);<file_sep>/kernel/Tasking/Scheduler.cpp
#include "Scheduler.h"
#include "Arch/x86/Asm.h"
#include "Arch/x86/Isr.h"
#include "Devices/Timer/Pit.h"
#include "Filesystem/VirtualFilesystem.h"
#include "Loader/PE.h"
#include "ScopedLock.h"
#include "SystemCall.h"
#include "Utils/Assert.h"
#include "VirtualMemory/Memory.h"
StaticSpinlock Scheduler::lock;
void Scheduler::setup()
{
lock.init();
ISR::register_isr_handler(schedule_handler, SCHEDULE_IRQ);
SystemCall::setup();
Process::setup();
Thread::setup();
}
void Scheduler::schedule(ISRContextFrame* current_context, ScheduleType type)
{
// FIXME: schedule idle if there is no ready thread
// TODO: move all unnecessary stuff to a separate thread to be performed later.
ScopedLock local_lock(lock);
if (type == ScheduleType::TIMED)
wake_up_sleepers();
if (Thread::current) {
save_context(current_context, Thread::current);
}
Thread& next_thread = select_next_thread();
if (Thread::current) {
if (next_thread.m_parent.m_pid != Thread::current->m_parent.m_pid) {
switch_page_directory(next_thread.m_parent.m_page_directory);
}
} else {
switch_page_directory(next_thread.m_parent.m_page_directory);
}
Thread::current = &next_thread;
load_context(current_context, &next_thread);
}
Thread& Scheduler::select_next_thread()
{
static size_t rr_index = 0;
Thread* next_thread = nullptr;
size_t threads_index = 0;
Thread::for_each_ready([&](auto& thread) {
if (threads_index++ == rr_index % Thread::number_of_ready_threads()) {
next_thread = &thread;
return IterationDecision::Break;
}
return IterationDecision::Continue;
});
ASSERT(Thread::number_of_ready_threads());
rr_index = (rr_index + 1) % Thread::number_of_ready_threads();
return *next_thread;
}
void Scheduler::wake_up_sleepers()
{
Thread::for_each_sleeping([](Thread& thread) {
if (thread.m_sleep_ticks <= PIT::ticks) {
thread.m_sleep_ticks = 0;
thread.wake_up_from_sleep();
}
return IterationDecision::Continue;
});
}
void Scheduler::load_context(ISRContextFrame* current_context, const Thread* thread)
{
current_context->context_stack = thread->m_kernel_stack_pointer;
Context::switch_task_stack(thread->m_kernel_stack_end);
}
void Scheduler::save_context(const ISRContextFrame* current_context, Thread* thread)
{
thread->m_kernel_stack_pointer = current_context->context_stack;
}
void Scheduler::switch_page_directory(uintptr_t page_directory)
{
Memory::switch_page_directory(page_directory);
}
void Scheduler::schedule_handler(ISRContextFrame* frame)
{
schedule(frame, ScheduleType::FORCED);
}
<file_sep>/kernel/Tasking/Semaphore.cpp
#include "Semaphore.h"
#include "Lib/Stdlib.h"
Semaphore::Semaphore(size_t t_max_count, size_t t_initial_value) :
m_spinlock{},
m_max_count{t_max_count},
m_count{t_initial_value}
{
m_spinlock.init();
}
Semaphore::~Semaphore()
{
}
void Semaphore::acquire()
{
m_spinlock.acquire();
if (m_count < m_max_count) {
m_count++;
m_spinlock.release();
} else {
m_spinlock.release();
Thread::current->wait_on(m_queue);
acquire();
}
}
void Semaphore::release()
{
if (!m_count)
return;
m_spinlock.acquire();
m_queue.wake_up();
m_count--;
m_spinlock.release();
}
<file_sep>/kernel/VirtualMemory/Physical.h
#pragma once
#include "Arch/x86/Paging.h"
#include "Arch/x86/Panic.h"
#include "Kernel_map.h"
#include "Lib/Stdlib.h"
#include "Utils/Assert.h"
#include "Utils/Types.h"
#define MAX_PHYSICAL_4K_PAGES (1024 * 1024)
#define TEST_BIT(value, bit) (((value) >> (bit)) & 1)
class PhysicalMemory
{
private:
static uintptr_t find_pages(uintptr_t start_page, size_t count);
static volatile uint8_t physical_memory_tracer[];
static volatile unsigned physical_memory_size;
public:
static void initialize();
static bool check_free_pages(uintptr_t page_number, unsigned count);
static uintptr_t alloc_page(uintptr_t start);
static uintptr_t alloc_contagious_pages(uintptr_t start, size_t count);
static void free_pages(uintptr_t page_number, unsigned count);
static void set_free_pages(uintptr_t page_number, unsigned count);
static void set_used_pages(uintptr_t page_number, unsigned count);
static unsigned get_physical_memory_size();
};
<file_sep>/kernel/Arch/x86/Idt.h
#pragma once
#include "Gdt.h"
#include "Isr.h"
#include "Kernel_map.h"
#include "Paging.h"
#include "Utils/Types.h"
#define NUMBER_OF_IDT_ENTRIES 256
#define NUMBER_OF_IDT_EXCEPTIONS 32
enum IDT_ENTRY_FLAGS {
PRESENT = 0x80,
RING3 = 0x60,
RING0 = 0x00,
TRAP_GATE = 0x7,
INT_GATE = 0x6,
TASK_GATE = 0x5,
GATE_32 = 0x8,
GATE_16 = 0
};
#pragma pack(1)
struct IDT_DISCRIPTOR {
uint16_t limit;
uint32_t base;
};
struct IDTEntry {
uint16_t offset0_15;
uint16_t segment;
uint8_t zero;
uint8_t type;
uint16_t offset16_31;
};
#pragma pack()
class IDT
{
private:
static void fill_idt(uint32_t base, uint16_t limit);
static void load_idt();
static void fill_idt_entry(uint8_t idt_entry, uint32_t address, uint16_t segment, uint8_t type);
static volatile IDT_DISCRIPTOR idt;
static volatile IDTEntry idt_entries[];
public:
static void setup();
};
<file_sep>/kernel/Tasking/Thread.cpp
#include "Thread.h"
#include "Arch/x86/Context.h"
#include "Devices/Timer/Pit.h"
#include "ScopedLock.h"
#include "Utils/Assert.h"
#include "VirtualMemory/Memory.h"
#include "WaitQueue.h"
IntrusiveList<Thread>* Thread::ready_threads = nullptr;
IntrusiveList<Thread>* Thread::sleeping_threads = nullptr;
Thread* Thread::current = nullptr;
Bitmap* Thread::m_tid_bitmap;
StaticSpinlock Thread::global_lock;
void Thread::setup()
{
global_lock.init();
m_tid_bitmap = new Bitmap(MAX_BITMAP_SIZE);
ready_threads = new IntrusiveList<Thread>;
sleeping_threads = new IntrusiveList<Thread>;
}
Thread& Thread::create_thread(Process& parent_process, thread_function address, uintptr_t argument)
{
ScopedLock local_lock(global_lock);
Thread& new_thread = *new Thread(parent_process, address, argument);
ready_threads->push_back(new_thread);
return new_thread;
}
Thread::Thread(Process& parent_process, thread_function address, uintptr_t argument) :
m_lock{},
m_tid{reserve_tid()},
m_parent{parent_process}
{
m_lock.init();
void* thread_kernel_stack = Memory::alloc(STACK_SIZE, MEMORY_TYPE::WRITABLE | MEMORY_TYPE::KERNEL);
uintptr_t stack_pointer = Context::setup_task_stack_context(thread_kernel_stack, STACK_SIZE, uintptr_t(address), //
uintptr_t(idle), argument);
m_kernel_stack_start = uintptr_t(thread_kernel_stack);
m_kernel_stack_end = m_kernel_stack_start + STACK_SIZE;
m_kernel_stack_pointer = stack_pointer;
m_state = ThreadState::RUNNABLE;
}
Thread::~Thread()
{
}
void Thread::wake_up_from_queue()
{
ScopedLock local_lock(m_lock);
ready_threads->push_back(*this);
m_state = ThreadState::RUNNABLE;
}
void Thread::wake_up_from_sleep()
{
ScopedLock local_lock(m_lock);
sleeping_threads->remove(*this);
ready_threads->push_back(*this);
m_state = ThreadState::RUNNABLE;
}
void Thread::wait_on(WaitQueue& queue)
{
{
ScopedLock local_lock(m_lock);
ready_threads->remove(*this);
queue.enqueue(*this);
m_state = ThreadState::BLOCKED_QUEUE;
}
yield();
}
void Thread::yield()
{
asm volatile("int 0x81");
}
void Thread::idle(_UNUSED_PARAM(uintptr_t))
{
while (1) {
HLT();
}
}
unsigned Thread::reserve_tid()
{
unsigned id = m_tid_bitmap->find_first_unused();
m_tid_bitmap->set_used(id);
return id;
}
void Thread::terminate()
{
ScopedLock local_lock(m_lock);
ASSERT(m_state == ThreadState::RUNNABLE);
ready_threads->remove(*this);
this->~Thread();
}
void Thread::sleep(unsigned ms)
{
{
ScopedLock local_lock(current->m_lock);
current->m_sleep_ticks = PIT::ticks + ms;
current->m_state = ThreadState::BLOCKED_SLEEP;
ready_threads->remove(*current);
sleeping_threads->push_back(*current);
}
yield();
}
unsigned Thread::tid()
{
return m_tid;
}
Process& Thread::parent_process()
{
return m_parent;
}
ThreadState Thread::state()
{
return m_state;
}
size_t Thread::number_of_ready_threads()
{
return ready_threads->size();
}<file_sep>/kernel/Filesystem/FSNode.h
#pragma once
#include "Utils/ErrorCodes.h"
#include "Utils/Result.h"
#include "Utils/String.h"
#include "Utils/StringView.h"
#include "Utils/Types.h"
#define MAX_FILE_NAME 64
enum class OpenFlags { CreateNew, OpenExisting };
enum class OpenMode { Read, Write, ReadWrite };
enum class NodeType { Root, Folder, File, Pipe, Link, Device };
class VirtualFileSystem;
class FSNode
{
public:
String m_name;
int m_permission;
int m_owner;
NodeType m_type;
size_t m_size;
FSNode(const StringView& name, int permission, int owner, NodeType type, size_t size) :
m_name{name},
m_permission{permission},
m_owner{owner},
m_type{type},
m_size{size}
{
}
virtual ~FSNode()
{
}
virtual Result<void> open(OpenMode mode, OpenFlags flags)
{
UNUSED(mode);
UNUSED(flags);
return ResultError(ERROR_INVALID_OPERATION);
}
virtual Result<void> close()
{
return ResultError(ERROR_INVALID_OPERATION);
}
virtual Result<void> read(void* buff, size_t offset, size_t size)
{
UNUSED(buff);
UNUSED(offset);
UNUSED(size);
return ResultError(ERROR_INVALID_OPERATION);
}
virtual Result<void> write(const void* buff, size_t offset, size_t size)
{
UNUSED(buff);
UNUSED(offset);
UNUSED(size);
return ResultError(ERROR_INVALID_OPERATION);
}
virtual Result<bool> can_read()
{
return ResultError(ERROR_INVALID_OPERATION);
}
virtual Result<bool> can_write()
{
return ResultError(ERROR_INVALID_OPERATION);
}
virtual Result<void> remove()
{
return ResultError(ERROR_INVALID_OPERATION);
}
virtual Result<FSNode&> create(const StringView& name, OpenMode mode, OpenFlags flags)
{
UNUSED(name);
UNUSED(mode);
UNUSED(flags);
return ResultError(ERROR_INVALID_OPERATION);
}
virtual Result<void> mkdir(const StringView& name, int flags, int access)
{
UNUSED(name);
UNUSED(flags);
UNUSED(access);
return ResultError(ERROR_INVALID_OPERATION);
}
virtual Result<void> link(FSNode& node)
{
UNUSED(node);
return ResultError(ERROR_INVALID_OPERATION);
}
virtual Result<void> unlink(FSNode& node)
{
UNUSED(node);
return ResultError(ERROR_INVALID_OPERATION);
}
virtual Result<FSNode&> dir_lookup(const StringView& file_name)
{
UNUSED(file_name);
return ResultError(ERROR_INVALID_OPERATION);
}
friend class VFS;
};
<file_sep>/kernel/Utils/Stl.h
#pragma once
template <typename T> struct RemoveReference {
typedef T Type;
};
template <class T> struct RemoveReference<T&> {
typedef T Type;
};
template <class T> struct RemoveReference<T&&> {
typedef T Type;
};
template <typename T> constexpr T&& move(T& t)
{
return static_cast<T&&>(t);
}
template <class T> constexpr T&& forward(typename RemoveReference<T>::Type& param)
{
return static_cast<T&&>(param);
}
<file_sep>/kernel/Arch/x86/Isr.cpp
#include "Isr.h"
static isr_function interrupt_dispatcher_vector[NUMBER_OF_IDT_ENTRIES] __attribute__((aligned(4)));
extern "C" uintptr_t isr_vector[];
void ISR::initiate_isr_dispatcher_vector()
{
for (size_t i = 0; i < NUMBER_OF_IDT_ENTRIES; i++) {
interrupt_dispatcher_vector[i] = 0;
}
}
void ISR::register_isr_handler(isr_function address, uint8_t irq_number)
{
interrupt_dispatcher_vector[irq_number] = (isr_function)address;
}
extern "C" void __attribute__((cdecl)) interrupt_dispatcher(ISRContextFrame info)
{
if (interrupt_dispatcher_vector[info.irq_number]) {
interrupt_dispatcher_vector[info.irq_number](&info);
} else {
ISR::default_interrupt_handler(&info);
}
}
void ISR::default_interrupt_handler(ISRContextFrame* info)
{
if (info->irq_number < 19) {
// printf("Exception: ");
// printf(exception_messages[info->irq_number]);
// printf("\nContext Dump:\n");
// printf("EIP=%X\t CS=%X\t ESP=%X\t\n", info->eip, info->cs, info->context_stack);
} else if (info->irq_number < NUMBER_OF_IDT_EXCEPTIONS) {
// printf("Reserved Exception Number\n");
} else {
// printf("Undefined IRQ Number (IRQ %d)\n", info->irq_number);
}
HLT();
}
const char* ISR::exception_messages[19] = {"Division by zero",
"Debug",
"Non-maskable interrupt",
"Breakpoint",
"Detected overflow",
"Out-of-bounds",
"Invalid opcode",
"No coprocessor",
"Double fault",
"Coprocessor segment overrun",
"Bad TSS",
"Segment not present",
"Stack fault",
"General protection fault",
"Page fault",
"Unknown interrupt",
"Coprocessor fault",
"Alignment check",
"Machine check"};<file_sep>/kernel/Filesystem/Ustar/TarFS.h
#pragma once
#include "INode.h"
#include "Lib/Stdlib.h"
#include "Utils/Assert.h"
#include "Utils/ErrorCodes.h"
#include "Utils/PathParser.h"
#include "Utils/Result.h"
#include "Utils/Types.h"
#include "Utils/UniquePointer.h"
#define MAX_TAR_FILE_NAME 100
#define TAR_ALIGNMENT 512
#define TAR_OCTAL_SIZE_LEN 12
enum USTARFileType {
NORMAL = '0',
HARD_LINK = '1',
SYMBOLIC_LINK = '2',
CHARACTER_DEVICE = '3',
BLOCK_DEVICE = '4',
DIRECTORY = '5',
NAMED_PIPE = '6'
};
struct TarHeader { /* byte offset */
char name[MAX_TAR_FILE_NAME]; /* 0 */
char mode[8]; /* 100 */
char uid[8]; /* 108 */
char gid[8]; /* 116 */
char size[TAR_OCTAL_SIZE_LEN]; /* 124 */
char mtime[12]; /* 136 */
char chksum[8]; /* 148 */
char typeflag; /* 156 */
char linkname[100]; /* 157 */
char magic[6]; /* 257 */
char version[2]; /* 263 */
char uname[32]; /* 265 */
char gname[32]; /* 297 */
char devmajor[8]; /* 329 */
char devminor[8]; /* 337 */
char prefix[167]; /* 345 */
/* 500 */
};
class TarFS : public INode
{
public:
static UniquePointer<FSNode> alloc(const StringView& name, void* tar_address, size_t size);
Result<FSNode&> dir_lookup(const StringView& file_name) override;
~TarFS() override;
private:
TarHeader* m_tar_address;
explicit TarFS(const StringView& name, void* tar_address, size_t size);
INode& add_child_node(INode& parent, const StringView& name, char type, const size_t size, char* data);
String regulate_path(const char* path);
size_t octal_to_decimal(const char* octal);
inline uintptr_t align_to(uintptr_t address, unsigned alignment);
void parse_ustar(size_t size);
};<file_sep>/kernel/Filesystem/VirtualFilesystem.cpp
#include "VirtualFilesystem.h"
#include "Arch/x86/Panic.h"
#include "Tasking/ScopedLock.h"
#include "Tasking/Thread.h"
#include "Utils/Assert.h"
#include "Utils/ErrorCodes.h"
List<UniquePointer<FSNode>>* VFS::fs_roots;
Spinlock VFS::lock;
void VFS::setup()
{
// lock the VFS and nodes.
fs_roots = new List<UniquePointer<FSNode>>;
lock.init();
}
Result<UniquePointer<FileDescription>> VFS::open(const StringView& path, OpenMode mode, OpenFlags flags)
{
auto node = open_node(path, mode, flags);
if (node.error()) {
return ResultError(node.error());
}
auto open_ret = node.value().open(mode, flags);
if (open_ret.is_error()) {
return ResultError(open_ret.error());
}
return UniquePointer<FileDescription>::make_unique(node.value());
}
Result<void> VFS::mount(UniquePointer<FSNode>&& new_fs_root)
{
if (fs_roots->contains([&](UniquePointer<FSNode>& node) {
if (node->m_name == new_fs_root->m_name)
return true;
return false;
})) {
return ResultError(ERROR_FS_ALREADY_EXISTS);
}
fs_roots->push_back(move(new_fs_root));
return ResultError(ERROR_SUCCESS);
}
Result<void> VFS::unmount()
{
return ResultError(ERROR_INVALID_PARAMETERS);
}
Result<void> VFS::remove()
{
return ResultError(ERROR_INVALID_PARAMETERS);
}
Result<void> VFS::make_directory()
{
return ResultError(ERROR_INVALID_PARAMETERS);
}
Result<void> VFS::remove_directory()
{
return ResultError(ERROR_INVALID_PARAMETERS);
}
Result<void> VFS::rename()
{
return ResultError(ERROR_INVALID_PARAMETERS);
}
Result<void> VFS::chown()
{
return ResultError(ERROR_INVALID_PARAMETERS);
}
Result<void> VFS::make_link()
{
return ResultError(ERROR_INVALID_PARAMETERS);
}
Result<void> VFS::remove_link()
{
return ResultError(ERROR_INVALID_PARAMETERS);
}
Result<FSNode&> VFS::traverse_parent_node(const StringView& path)
{
PathParser parser(path);
size_t path_element_count = parser.count();
if (path_element_count == 0) {
return ResultError(ERROR_FILE_DOES_NOT_EXIST);
}
return traverse_node_deep(parser, path_element_count - 1);
}
Result<FSNode&> VFS::traverse_node(const StringView& path)
{
PathParser parser(path);
size_t path_element_count = parser.count();
if (path_element_count == 0)
ResultError(ERROR_FILE_DOES_NOT_EXIST);
return traverse_node_deep(parser, path_element_count);
}
Result<FSNode&> VFS::traverse_node_deep(PathParser& parser, size_t depth)
{
if (fs_roots->size() == 0)
return ResultError(ERROR_NO_ROOT_NODE);
FSNode* current = get_root_node(parser.element(0));
if (!current)
return ResultError(ERROR_FILE_DOES_NOT_EXIST);
for (size_t i = 1; i < depth; i++) {
auto next_node = current->dir_lookup(parser.element(i));
if (next_node.is_error())
return ResultError(next_node.error());
current = &next_node.value();
}
return *current;
}
Result<FSNode&> VFS::open_node(const StringView& path, OpenMode mode, OpenFlags flags)
{
auto node = traverse_node(path);
FSNode* open_node = nullptr;
if ((node.error() != ERROR_FILE_DOES_NOT_EXIST) && (flags == OpenFlags::CreateNew)) {
return ResultError(ERROR_FILE_ALREADY_EXISTS);
} else if ((node.error() == ERROR_FILE_DOES_NOT_EXIST) && (flags == OpenFlags::CreateNew)) {
// FIXME: we already went though parent! any optimization ?
auto parent_node = traverse_parent_node(path);
ASSERT(!parent_node.is_error());
PathParser parser(path);
auto new_node = parent_node.value().create(parser.element(parser.count() - 1), mode, flags);
if (new_node.is_error()) {
return ResultError(new_node.error());
}
open_node = &new_node.value();
} else if (node.is_error()) {
return ResultError(node.error());
} else {
open_node = &node.value();
}
if (open_node->m_type == NodeType::Folder) {
return ResultError(ERROR_INVALID_OPERATION);
}
return *open_node;
}
FSNode* VFS::get_root_node(const StringView& root_name)
{
for (auto&& i : *fs_roots) {
if (i->m_name == root_name) {
return i.ptr();
}
}
return nullptr;
}<file_sep>/test/CMakeLists.txt
cmake_minimum_required(VERSION 3.0.0)
#set(CMAKE_CXX_STANDARD 17)
include_directories("../kernel")
enable_testing()
add_compile_definitions("__UNIT_TESTS")
SET(This "tests")
file(GLOB_RECURSE SOURCES_TESTS "*.cpp")
file(GLOB SOURCES "../kernel/Utils/String.cpp"
"../kernel/Utils/StringView.cpp"
"../kernel/Utils/Bitmap.cpp"
"../kernel/Utils/PathParser.cpp")
add_executable(${This} ${SOURCES} ${SOURCES_TESTS})
target_link_libraries(${This} PUBLIC gtest_main)
add_test(
NAME ${This}
COMMAND ${This}
)<file_sep>/kernel/Utils/String.h
#pragma once
#include "Types.h"
class StringView;
class String
{
private:
size_t m_size = 0;
char* m_data = nullptr;
void cleanup();
public:
String(const StringView& str);
String(const char* str);
String(const char* str, size_t len);
String(String&& other);
String(const String& other);
String& operator=(String&& other);
String& operator=(const String& other);
String& operator=(const char* other);
~String();
String& operator+=(const String& other);
String& operator+=(const char* other);
String& operator+=(char other);
String operator+(const String& other) const;
char operator[](size_t off) const;
String& push_back(char c);
String& pop_back();
String& insert(size_t pos, const String& str);
String& insert(size_t pos, const String& str, size_t subpos, size_t sublen);
String& insert(size_t pos, const char* str);
String& insert(size_t pos, const char* str, size_t subpos, size_t sublen);
bool operator==(const StringView& other) const;
bool operator==(const String& other) const;
bool operator==(const char* other) const;
bool operator!=(const StringView& other) const;
bool operator!=(const String& other) const;
bool operator!=(const char* other) const;
String substr(size_t pos, size_t len) const;
size_t find(const String& str, size_t pos = 0) const;
size_t find(const char* s, size_t pos = 0) const;
size_t find(char c, size_t pos = 0) const;
size_t rfind(const String& str, size_t pos = END) const;
size_t rfind(const char* s, size_t pos = END) const;
size_t rfind(char c, size_t pos = END) const;
const char* c_str() const;
size_t length() const;
static const size_t END;
static const size_t NOT_FOUND;
friend class StringView;
};<file_sep>/kernel/Utils/Algorithm.h
#pragma once
/*
TODO: algorithm functions:
- min max
- align
- swap copy copy_backward move move_backward
- for_each
- sort
- equal_range
- for_adject_pairs for_all_pairs
- copy_if copy_while
- find split
- all_of any_of none_of
- make_heap push_heap pop_heap sort_heap is_heap
- rotate reverse is_sorted
- count accumulate
- equal is_permutation
- uninitialized_fill uninitialized_copy uninitialized_mode
*/
<file_sep>/kernel/Utils/Bitmap.cpp
#include "Bitmap.h"
#ifdef __UNIT_TESTS
#include <assert.h>
#include <stdio.h>
#include <string.h>
#define ASSERT(x) assert(x)
#else
#include "Lib/Stdlib.h"
#include "Utils/Assert.h"
#endif
Bitmap::Bitmap(size_t size) : m_size(size)
{
ASSERT(size <= MAX_BITMAP_SIZE);
m_bitmap_data = new uint8_t[size / 8];
memset(m_bitmap_data, 0, sizeof(size / 8));
}
Bitmap::~Bitmap()
{
delete m_bitmap_data;
}
void Bitmap::set_used(unsigned position)
{
set_used(position, 1);
}
void Bitmap::set_used(unsigned position, unsigned count)
{
if (position > m_size) {
return;
}
uint32_t current_position = position;
for (size_t i = 0; i < count; i++) {
m_bitmap_data[current_position / 8] |= (1 << (current_position % 8));
current_position++;
}
}
void Bitmap::set_unused(unsigned position)
{
set_unused(position, 1);
}
void Bitmap::set_unused(unsigned position, unsigned count)
{
if (position > m_size) {
return;
}
uint32_t current_position = position;
for (size_t i = 0; i < count; i++) {
m_bitmap_data[current_position / 8] &= ~(1 << (current_position % 8));
current_position++;
}
}
unsigned Bitmap::find_first_unused(unsigned count)
{
size_t remaining_count = count;
size_t bit_index = 0;
while (bit_index < m_size) {
if (m_bitmap_data[bit_index / 8] == 0xFF)
bit_index += 8;
if (!CHECK_BIT(m_bitmap_data[bit_index / 8], bit_index % 8))
remaining_count--;
else
remaining_count = count;
if (!remaining_count)
return bit_index - count + 1;
bit_index++;
}
return BITMAP_NO_BITS_LEFT;
}
unsigned Bitmap::find_first_used(unsigned count)
{
size_t remaining_count = count;
size_t bit_index = 0;
while (bit_index < m_size) {
if (m_bitmap_data[bit_index / 8] == 0)
bit_index += 8;
if (CHECK_BIT(m_bitmap_data[bit_index / 8], bit_index % 8))
remaining_count--;
else
remaining_count = count;
if (!remaining_count)
return bit_index - count + 1;
bit_index++;
}
return BITMAP_NO_BITS_LEFT;
}
unsigned Bitmap::find_first_unused()
{
return find_first_unused(1);
}
unsigned Bitmap::find_first_used()
{
return find_first_used(1);
}<file_sep>/kernel/Utils/Result.h
#pragma once
#include "Assert.h"
#include "Stl.h"
class ResultError
{
public:
const unsigned m_error;
explicit ResultError(unsigned error) : m_error(error)
{
}
ResultError(const ResultError& other) : m_error(other.m_error)
{
}
~ResultError()
{
}
};
template <typename T> class Result
{
private:
const ResultError m_error;
union {
T m_storage;
const char m_storage_empty[sizeof(T)];
};
public:
Result(const ResultError& error) : m_error(error)
{
}
Result(const Result& other) : m_error(other.m_error), m_storage(other.m_storage)
{
}
Result(Result&& other) : m_error(other.m_error), m_storage(move(other.m_storage))
{
}
Result(const T& result) : m_error(ResultError(0)), m_storage(result)
{
}
Result(T&& result) : m_error(ResultError(0)), m_storage(move(result))
{
}
bool is_error() const
{
return m_error.m_error != 0;
}
unsigned error() const
{
return m_error.m_error;
}
T& value()
{
ASSERT(!is_error());
return m_storage;
}
~Result()
{
}
};
template <typename T> class Result<T&>
{
private:
const ResultError m_error;
T* const m_storage;
public:
Result(const ResultError& error) : m_error(error), m_storage(nullptr)
{
}
Result(const Result& other) : m_error(other.m_error), m_storage(other.m_storage)
{
}
Result(T& result) : m_error(ResultError(0)), m_storage(&result)
{
}
Result(T&& result) = delete;
bool is_error() const
{
return m_error.m_error != 0;
}
unsigned error() const
{
return m_error.m_error;
}
T& value()
{
ASSERT(!is_error());
return *m_storage;
}
~Result()
{
}
};
template <> class Result<void>
{
private:
const ResultError m_error;
public:
Result(const ResultError& error) : m_error(error)
{
}
Result(const Result& other) : m_error(other.m_error)
{
}
bool is_error() const
{
return m_error.m_error != 0;
}
unsigned error() const
{
return m_error.m_error;
}
~Result()
{
}
};<file_sep>/kernel/Arch/x86/Idt.cpp
#include "Idt.h"
volatile IDT_DISCRIPTOR IDT::idt __attribute__((aligned(4)));
volatile IDTEntry IDT::idt_entries[NUMBER_OF_IDT_ENTRIES] __attribute__((aligned(PAGE_SIZE)));
void IDT::setup()
{
ISR::initiate_isr_dispatcher_vector();
fill_idt((uint32_t)idt_entries, sizeof(IDTEntry) * NUMBER_OF_IDT_ENTRIES);
for (size_t i = 0; i < NUMBER_OF_IDT_ENTRIES; i++)
fill_idt_entry(i, (uint32_t)isr_vector[i], KCS_SELECTOR,
IDT_ENTRY_FLAGS::PRESENT | IDT_ENTRY_FLAGS::GATE_32 | IDT_ENTRY_FLAGS::INT_GATE |
IDT_ENTRY_FLAGS::RING3);
load_idt();
}
void IDT::fill_idt(uint32_t base, uint16_t limit)
{
idt.base = base;
idt.limit = limit;
}
void IDT::fill_idt_entry(uint8_t idt_entry, uint32_t address, uint16_t segment, uint8_t type)
{
idt_entries[idt_entry].offset0_15 = ((uint32_t)address & 0xFFFF);
idt_entries[idt_entry].offset16_31 = ((uint32_t)address & 0xFFFF0000) >> 16;
idt_entries[idt_entry].segment = segment;
idt_entries[idt_entry].type = type;
idt_entries[idt_entry].zero = 0;
}
void IDT::load_idt()
{
asm volatile("LIDT [%0]" : : "r"(&idt));
}
<file_sep>/kernel/Kernel_map.h
#include "Utils/Types.h"
#define KERNEL_SPACE_SIZE 0x40000000
#define KERNEL_BASE 0xC0000000
#define KERNEL_PHYSICAL_ADDRESS 0x00100000
#define KERNEL_VIRTUAL_ADDRESS (KERNEL_BASE + KERNEL_PHYSICAL_ADDRESS)
#define VIR_TO_PHY(x) (x - KERNEL_BASE)
extern uintptr_t KERNEL_START;
extern uintptr_t KERNEL_END;<file_sep>/kernel/Tasking/Process.h
#pragma once
#include "Arch/x86/Spinlock.h"
#include "Filesystem/FileDescriptor.h"
#include "Utils/Bitmap.h"
#include "Utils/List.h"
#include "Utils/Result.h"
#include "Utils/String.h"
#include "Utils/StringView.h"
#include "Utils/Types.h"
#include "Utils/UniquePointer.h"
enum class ProcessState {
RUNNING,
ACTIVE,
BLOCKED,
SUSPENDED,
};
class Process
{
private:
static Bitmap* pid_bitmap;
static List<Process>* processes;
static StaticSpinlock global_lock;
static void initiate_process(uintptr_t pcb);
Spinlock m_lock;
Process(const StringView& name, const StringView& path);
unsigned reserve_pid();
Result<uintptr_t> load_executable(const StringView& path);
public:
static Process& create_new_process(const StringView& name, const StringView& path);
static void setup();
const unsigned m_pid;
const String m_name;
const String m_path;
const uintptr_t m_page_directory;
const ProcessState m_state;
const Process* m_parent;
Descriptor<FileDescription> m_file_descriptors;
~Process();
friend class List<Process>;
};
<file_sep>/kernel/Tasking/SystemCall.cpp
#include "SystemCall.h"
#include "Arch/x86/Isr.h"
#include "Filesystem/VirtualFilesystem.h"
#include "Tasking/Process.h"
#include "Tasking/Thread.h"
#include "Utils/Stl.h"
#pragma GCC diagnostic ignored "-Wcast-function-type"
void SystemCall::setup()
{
ISR::register_isr_handler(systemcall_handler, SYSCALL_IRQ);
}
generic_syscall SystemCall::get_syscall_routine(unsigned syscall_num)
{
if (syscall_num < syscalls_count) {
return systemcalls_routines[syscall_num];
}
return nullptr;
}
void SystemCall::systemcall_handler(ISRContextFrame* frame)
{
dbg() << "System Call " << Context::syscall_num(frame) << " (" << Hex(Context::syscall_param1(frame)) << " ,"
<< Hex(Context::syscall_param2(frame)) << " ," << Hex(Context::syscall_param3(frame)) << " ,"
<< Hex(Context::syscall_param4(frame)) << " ," << Hex(Context::syscall_param5(frame)) << ")";
generic_syscall syscall = get_syscall_routine(Context::syscall_num(frame));
if (!syscall) {
PANIC("undefined systemcall invoked");
}
auto ret = syscall(Context::syscall_param1(frame), Context::syscall_param2(frame), Context::syscall_param3(frame),
Context::syscall_param4(frame), Context::syscall_param5(frame));
Context::set_return_value(frame, ret.error());
if (ret.is_error()) {
Context::set_return_arg1(frame, 0);
} else {
Context::set_return_arg1(frame, ret.value());
}
}
generic_syscall SystemCall::systemcalls_routines[] = {reinterpret_cast<generic_syscall>(OpenFile),
reinterpret_cast<generic_syscall>(ReadFile),
reinterpret_cast<generic_syscall>(WriteFile),
reinterpret_cast<generic_syscall>(CloseFile),
reinterpret_cast<generic_syscall>(CreateThread),
reinterpret_cast<generic_syscall>(CreateRemoteThread), //
reinterpret_cast<generic_syscall>(CreateProcess),
reinterpret_cast<generic_syscall>(Sleep),
reinterpret_cast<generic_syscall>(Yield)};
unsigned SystemCall::syscalls_count = sizeof(systemcalls_routines) / sizeof(generic_syscall);
Result<int> OpenFile(char* path, int mode, int flags)
{
auto file_description = VFS::open(path, static_cast<OpenMode>(mode), static_cast<OpenFlags>(flags));
if (file_description.is_error()) {
return ResultError(file_description.error());
}
unsigned fd = Thread::current->parent_process().m_file_descriptors.add_descriptor(move(file_description.value()));
return fd;
}
Result<int> ReadFile(unsigned descriptor, void* buff, size_t size)
{
// FIXME: check if descriptor exists.
auto& description = Thread::current->parent_process().m_file_descriptors.get_description(descriptor);
auto result = description.read(buff, size);
if (result.is_error()) {
return ResultError(result.error());
}
return 0;
}
Result<int> WriteFile(unsigned descriptor, void* buff, size_t size)
{
// FIXME: check if descriptor exists.
auto& description = Thread::current->parent_process().m_file_descriptors.get_description(descriptor);
auto result = description.read(buff, size);
if (result.is_error()) {
return ResultError(result.error());
}
return 0;
}
Result<int> CloseFile(unsigned descriptor)
{
// FIXME: check if descriptor exists.
auto& description = Thread::current->parent_process().m_file_descriptors.get_description(descriptor);
Thread::current->parent_process().m_file_descriptors.remove_descriptor(descriptor);
return 0;
}
Result<int> CreateThread(void* address, int arg)
{
return 0;
}
Result<int> CreateRemoteThread(int process, void* address, int arg)
{
return 0;
}
Result<int> CreateProcess(char* name, char* path, int flags)
{
UNUSED(flags);
Process::create_new_process(name, path);
return 0;
}
Result<int> Sleep(size_t size)
{
Thread::sleep(size);
return 0;
}
Result<int> Yield()
{
Thread::yield();
return 0;
}
<file_sep>/kernel/Devices/DeviceFS.cpp
#include "DeviceFS.h"
#include "Tasking/ScopedLock.h"
#include "Utils/ErrorCodes.h"
#include "Utils/Stl.h"
List<UniquePointer<FSNode>>* DeviceFS::children = nullptr;
UniquePointer<FSNode> DeviceFS::alloc(const StringView& name)
{
return UniquePointer<FSNode>(new DeviceFS(name));
}
DeviceFS::DeviceFS(const StringView& name) : FSNode{name, 0, 0, NodeType::Root, 0}
{
ASSERT(children == 0);
children = new List<UniquePointer<FSNode>>;
}
DeviceFS::~DeviceFS()
{
}
Result<FSNode&> DeviceFS::dir_lookup(const StringView& file_name)
{
for (auto& i : *children) {
if (i->m_name == file_name) {
return *i;
}
}
return ResultError(ERROR_DEVICE_DOESNOT_EXIST);
}
Result<void> DeviceFS::add_device(UniquePointer<FSNode>&& new_device)
{
if (children->contains([&](UniquePointer<FSNode>& device) {
if (device->m_name == new_device->m_name)
return true;
return false;
})) {
return ResultError(ERROR_DEVICE_ALREADY_EXISTS);
}
children->push_back(move(new_device));
return ResultError(ERROR_SUCCESS);
}
Result<void> DeviceFS::remove_device(const StringView& name)
{
UNUSED(name);
return ResultError(ERROR_INVALID_OPERATION);
}<file_sep>/kernel/Arch/x86/Paging.h
#pragma once
#include "Kernel_map.h"
#include "Lib/Stdlib.h"
#include "Utils/Types.h"
#define NUMBER_OF_PAGE_DIRECOTRY_ENTRIES 1024
#define NUMBER_OF_PAGE_TABLE_ENTRIES 1024
#define FULL_KERNEL_PAGES (NUMBER_OF_PAGE_DIRECOTRY_ENTRIES - GET_NUMBER_OF_DIRECTORIES(KERNEL_BASE))
#define RECURSIVE_ENTRY (NUMBER_OF_PAGE_DIRECOTRY_ENTRIES - 1)
#define CR4_PSE (1 << 4)
#define CR0_PAGING (1 << 31)
#define CR0_WP (1 << 16)
#define GET_FRAME(x) (x >> 12)
#define GET_PTE_INDEX(x) ((x >> 12) & 0x3FF)
#define GET_PDE_INDEX(x) (x >> 22)
#define GET_NUMBER_OF_DIRECTORIES(x) (x >> 22)
#define GET_OFFSET(x) (x & 0xFFF)
#define GET_PAGE_VIRTUAL_ADDRESS(dir_index, page_index) (((dir_index) << 22) | ((page_index) << 12))
#define BOOL(x) ((bool)(x))
#define GET_PAGES(x) (x / PAGE_SIZE + ((x % PAGE_SIZE) == 0 ? 0 : 1))
#define PAGE_ALIGN(x) (GET_PAGES(x) * PAGE_SIZE)
#define PAGE_SIZE 0x1000
#define FIRST_PAGE_ADDRESS 0x1000
#define LAST_PAGE_ADDRESS GET_PAGE_VIRTUAL_ADDRESS(RECURSIVE_ENTRY - 1, NUMBER_OF_PAGE_TABLE_ENTRIES - 1)
#define PAGE_FLAGS_PRESENT 1
#define PAGE_FLAGS_USER 2
#define PAGE_FLAGS_WRITABLE 4
#define PAGE_FLAGS_GLOBAL 8
typedef volatile struct PAGE_TABLE_ENTRY_t {
uint32_t present : 1; // Page present in memory
uint32_t rw : 1; // Read-only if clear, readwrite if set
uint32_t user : 1; // Supervisor level only if clear
uint32_t pwt : 1; // Page-level write-through
uint32_t pcd : 1; // Page-level cache disable
uint32_t accessed : 1; // Has the page been accessed since last refresh?
uint32_t dirty : 1; // Has the page been written to since last refresh?
uint32_t pse : 1; // 4MB Page
uint32_t global : 1; // page is global
uint32_t unused : 3; // Amalgamation of unused and reserved bits
uint32_t frame : 20; // Frame address (shifted right 12 bits)
} PAGE_TABLE_ENTRY;
typedef PAGE_TABLE_ENTRY PAGE_DIRECTORY_ENTRY;
typedef volatile struct PAGE_DIRECTORY_t {
PAGE_DIRECTORY_ENTRY entries[NUMBER_OF_PAGE_DIRECOTRY_ENTRIES];
} PAGE_DIRECTORY;
typedef volatile struct PAGE_TABLE_t {
PAGE_TABLE_ENTRY entries[NUMBER_OF_PAGE_TABLE_ENTRIES];
} PAGE_TABLE;
class Paging
{
private:
static void setup_page_tables();
static void initialize_page_directory(PAGE_DIRECTORY* page_direcotry);
static void initialize_page_table(PAGE_TABLE* page_direcotry);
static void fill_directory_entry(PAGE_DIRECTORY_ENTRY* page_direcotry_entry, uint16_t physical_frame,
uint32_t flags);
static void fill_directory_PSE_entry(PAGE_DIRECTORY_ENTRY* page_direcotry_entry, uint16_t physical_frame,
uint32_t flags);
static void fill_page_table_entry(PAGE_TABLE_ENTRY* page_table_entry, uint16_t physical_frame, uint32_t flags);
static bool check_page_exits_in_table(uint32_t virtual_address);
static void invalidate_page(uint32_t addr);
static void enable_PSE();
static void enable_paging();
static PAGE_DIRECTORY page_direcotry;
static PAGE_TABLE kernel_page_tables[];
static PAGE_TABLE boostrap_page_table[];
public:
static void setup(uint32_t num_kernel_pages);
static void map_pages(uint32_t virtual_address, uint32_t physical_address, uint32_t pages, uint32_t flags);
static void map_boot_pages(uint32_t virtual_address, uint32_t physical_address, uint32_t pages);
static void unmap_pages(uint32_t virtual_address, uint32_t pages);
static bool check_page_present(uint32_t virtual_address);
static bool check_page_table_exists(uint32_t virtual_address);
static uint32_t get_physical_page(uint32_t virtual_address);
static void load_page_directory(uint32_t page_direcotry);
static void map_kernel_pd_entries(uint32_t pd);
static void map_page_table(uint32_t virtual_address, uint32_t pt);
static void map_page(uint32_t virtual_address, uint32_t physical_address, uint32_t flags);
static void unmap_page(uint32_t virtual_address);
};
<file_sep>/kernel/Utils/Stack.h
#pragma once
#include "Utils/Stl.h"
#include "Utils/Types.h"
#ifdef __UNIT_TESTS
#include <assert.h>
#define ASSERT(x) assert(x)
#else
#include "Assert.h"
#endif
template <typename T> class Stack
{
private:
T* m_data;
size_t m_head;
size_t m_size;
const size_t m_capacity;
public:
explicit Stack(const size_t capacity);
void queue(const T&);
void queue(T&&);
T dequeue();
T& back();
bool is_empty();
bool is_full();
size_t capacity();
size_t size();
size_t available_size();
~Stack();
};
template <typename T>
Stack<T>::Stack(const size_t capacity) :
m_data{new T[capacity]}, //
m_head{0},
m_size{0},
m_capacity{capacity}
{
}
template <typename T> void Stack<T>::queue(const T& data_to_queue)
{
ASSERT(!is_full());
m_data[m_head] = data_to_queue;
m_head++;
m_size++;
}
template <typename T> void Stack<T>::queue(T&& data_to_queue)
{
ASSERT(!is_full());
m_data[m_head] = move(data_to_queue);
m_head++;
m_size++;
}
template <typename T> T Stack<T>::dequeue()
{
ASSERT(!is_empty());
T ret_data = move(m_data[m_head - 1]);
m_data[m_head - 1].~T();
m_head--;
m_size--;
return ret_data;
}
template <typename T> T& Stack<T>::back()
{
return m_data[m_head - 1];
}
template <typename T> Stack<T>::~Stack()
{
for (size_t i = 0; i < m_head; i++) {
m_data[i].~T();
}
::operator delete(m_data, sizeof(T) * m_capacity);
}
template <typename T> bool Stack<T>::is_empty()
{
return m_size == 0;
}
template <typename T> bool Stack<T>::is_full()
{
return m_size == m_capacity;
}
template <typename T> size_t Stack<T>::capacity()
{
return m_capacity;
}
template <typename T> size_t Stack<T>::size()
{
return m_size;
}
template <typename T> size_t Stack<T>::available_size()
{
return capacity() - size();
}<file_sep>/kernel/Tasking/Scheduler.h
#pragma once
#include "Arch/x86/Context.h"
#include "Arch/x86/Spinlock.h"
#include "Process.h"
#include "Thread.h"
#include "Utils/Result.h"
#include "Utils/Types.h"
enum class ScheduleType {
FORCED,
TIMED,
};
class Scheduler
{
private:
static StaticSpinlock lock;
static void load_context(ISRContextFrame* current_context, const Thread* thread);
static void switch_page_directory(const uintptr_t page_directory);
static void save_context(const ISRContextFrame* current_context, Thread* thread);
static void wake_up_sleepers();
static void schedule_handler(ISRContextFrame* frame);
static Thread& select_next_thread();
public:
static void schedule(ISRContextFrame* current_context, ScheduleType type);
static void setup();
};<file_sep>/kernel/Filesystem/FileDescription.cpp
#include "FileDescription.h"
#include "FSNode.h"
#include "Utils/ErrorCodes.h"
FileDescription::FileDescription(FSNode& node) : m_node(node)
{
}
FileDescription::~FileDescription()
{
m_node.close();
}
Result<void> FileDescription::read(void* buff, size_t size)
{
size_t reading_size = m_current_position + size;
if (reading_size > m_node.m_size) {
return ResultError(ERROR_EOF);
}
return m_node.read(buff, m_current_position, size);
}
Result<void> FileDescription::write(const void* buff, size_t size)
{
size_t offset = m_current_position + size;
if (offset > m_node.m_size && m_node.m_size != 0) {
return ResultError(ERROR_EOF);
}
return m_node.write(buff, offset, size);
}
Result<void> FileDescription::seek(int offset, SeekOrigin origin)
{
switch (origin) {
case SeekOrigin::SET: {
if (offset < 0)
return ResultError(ERROR_EOF);
if (size_t(offset) > m_node.m_size)
return ResultError(ERROR_EOF);
m_current_position = offset;
break;
}
case SeekOrigin::CURRENT: {
if (((offset > 0) && (size_t(offset) > (m_node.m_size - m_current_position))) ||
((offset < 0) && (size_t(-offset) > m_current_position)))
return ResultError(ERROR_EOF);
m_current_position = offset + m_current_position;
break;
}
case SeekOrigin::END: {
if (offset > 0)
return ResultError(ERROR_EOF);
if (size_t(-offset) > m_node.m_size)
return ResultError(ERROR_EOF);
m_current_position = m_node.m_size + offset;
break;
}
default:
break;
}
return ResultError(ERROR_SUCCESS);
}
Result<FileInfo> FileDescription::fstat()
{
return FileInfo{m_node.m_size};
}
Result<void> FileDescription::ioctl()
{
return ResultError(ERROR_INVALID_PARAMETERS);
}
Result<void> FileDescription::mmap()
{
return ResultError(ERROR_INVALID_PARAMETERS);
}<file_sep>/kernel/VirtualMemory/Virtual.cpp
#include "Virtual.h"
uintptr_t VirtualMemory::find_pages(uint32_t start_address, uint32_t end_address, uint32_t pages_num)
{
uint32_t remaining_pages = pages_num;
uint32_t first_free_page = 0;
uint32_t vAdd = start_address;
while (vAdd < end_address) {
if (!Paging::check_page_present(vAdd)) {
if (remaining_pages == pages_num)
first_free_page = vAdd;
if (!(--remaining_pages))
return uintptr_t(first_free_page);
} else {
remaining_pages = pages_num;
}
vAdd += PAGE_SIZE;
}
PANIC("No virtual memory available!");
ASSERT_NOT_REACHABLE();
return uintptr_t(nullptr);
}
bool VirtualMemory::check_free_pages(uint32_t start_address, uint32_t pages_num)
{
for (size_t i = 0; i < pages_num; i++) {
if (Paging::check_page_present(start_address + (i * PAGE_SIZE))) {
return false;
}
}
return true;
}
uintptr_t VirtualMemory::create_page_table()
{
uintptr_t pt_addr =
(uintptr_t)Memory::_alloc_no_lock(sizeof(PAGE_TABLE), MEMORY_TYPE::KERNEL | MEMORY_TYPE::WRITABLE);
Paging::unmap_pages(pt_addr, GET_PAGES(sizeof(PAGE_TABLE))); // we don't need table to be in virtual memory.
return pt_addr;
}
void VirtualMemory::map_pages(uintptr_t virtual_address, uintptr_t physical_address, uint32_t pages, uint32_t flags)
{
for (size_t i = 0; i < pages; i++) {
if (Paging::check_page_table_exists(virtual_address) == false) {
Paging::map_page_table(virtual_address, create_page_table());
}
Paging::map_page(virtual_address + PAGE_SIZE * i, physical_address + PAGE_SIZE * i, flags);
}
}<file_sep>/kernel/Arch/x86/Gdt.h
#pragma once
#include "Kernel_map.h"
#include "Lib/Stdlib.h"
#include "Paging.h"
#include "Utils/Types.h"
#define GDT_NUMBER_OF_ENTRIES 6
#define SEGMENT_SELECTOR(index, prv_level) (index << 3 | prv_level)
#define SEGMENT_INDEX(segment) (segment >> 3)
#define KCS_SELECTOR SEGMENT_SELECTOR(1, 0)
#define KDS_SELECTOR SEGMENT_SELECTOR(2, 0)
#define UCS_SELECTOR SEGMENT_SELECTOR(3, 3)
#define UDS_SELECTOR SEGMENT_SELECTOR(4, 3)
#define TSS_SELECTOR SEGMENT_SELECTOR(5, 3)
#define SEG_DESCTYPE(x) (((x)&0x01) << 0x04) // Descriptor type (0 for system, 1 for code/data)
#define SEG_PRES(x) (((x)&0x01) << 0x07) // Present
#define SEG_PRIV(x) (((x)&0x03) << 0x05) // Set privilege level (0 - 3)
#define SEG_SAVL(x) ((x) << 0x0C) // Available for system use
#define SEG_LONG(x) ((x) << 0x0D) // Long mode
#define SEG_SIZE(x) ((x) << 0x0E) // Size (0 for 16-bit, 1 for 32)
#define SEG_GRAN(x) ((x) << 0x0F) // Granularity (0 for 1B - 1MB, 1 for 4KB - 4GB)
#define SEG_DATA_RD 0x00 // Read-Only
#define SEG_DATA_RDA 0x01 // Read-Only, accessed
#define SEG_DATA_RDWR 0x02 // Read/Write
#define SEG_DATA_RDWRA 0x03 // Read/Write, accessed
#define SEG_DATA_RDEXPD 0x04 // Read-Only, expand-down
#define SEG_DATA_RDEXPDA 0x05 // Read-Only, expand-down, accessed
#define SEG_DATA_RDWREXPD 0x06 // Read/Write, expand-down
#define SEG_DATA_RDWREXPDA 0x07 // Read/Write, expand-down, accessed
#define SEG_CODE_EX 0x08 // Execute-Only
#define SEG_CODE_EXA 0x09 // Execute-Only, accessed
#define SEG_CODE_EXRD 0x0A // Execute/Read
#define SEG_CODE_EXRDA 0x0B // Execute/Read, accessed
#define SEG_CODE_EXC 0x0C // Execute-Only, conforming
#define SEG_CODE_EXCA 0x0D // Execute-Only, conforming, accessed
#define SEG_CODE_EXRDC 0x0E // Execute/Read, conforming
#define SEG_CODE_EXRDCA 0x0F // Execute/Read, conforming, accessed
#define SEG_TSS_AVAILABLE 0x9
#define GDT_CODE_PL0 SEG_DESCTYPE(1) | SEG_PRES(1) | SEG_PRIV(0) | SEG_CODE_EXRDA
#define GDT_DATA_PL0 SEG_DESCTYPE(1) | SEG_PRES(1) | SEG_PRIV(0) | SEG_DATA_RDWR
#define GDT_CODE_PL3 SEG_DESCTYPE(1) | SEG_PRES(1) | SEG_PRIV(3) | SEG_CODE_EXRDA
#define GDT_DATA_PL3 SEG_DESCTYPE(1) | SEG_PRES(1) | SEG_PRIV(3) | SEG_DATA_RDWR
#define GDT_TSS_PL3 SEG_DESCTYPE(0) | SEG_PRES(1) | SEG_PRIV(3) | SEG_TSS_AVAILABLE
#pragma pack(1)
struct GDT_DESCRIPTOR {
uint16_t limit;
uint32_t base;
};
struct GDT_ENTRY {
uint16_t lim0_15;
uint16_t base0_15;
uint8_t base16_23;
uint8_t access;
uint8_t lim16_19 : 4;
uint8_t flags : 4;
uint8_t base24_31;
};
struct TSS_ENTRY {
uint32_t prev_tss;
uint32_t esp0;
uint32_t ss0;
uint32_t esp1;
uint32_t ss1;
uint32_t esp2;
uint32_t ss2;
uint32_t cr3;
uint32_t eip;
uint32_t eflags;
uint32_t eax;
uint32_t ecx;
uint32_t edx;
uint32_t ebx;
uint32_t esp;
uint32_t ebp;
uint32_t esi;
uint32_t edi;
uint32_t es;
uint32_t cs;
uint32_t ss;
uint32_t ds;
uint32_t fs;
uint32_t gs;
uint32_t ldt;
uint16_t trap;
uint16_t iomap_base;
};
#pragma pack()
class GDT
{
private:
static void fill_gdt(uint32_t base, uint16_t limit);
static void load_segments(uint16_t code_segment, uint16_t data_segment);
static void load_gdt();
static void fill_gdt_entry(uint32_t gdt_entry, uint32_t base, uint32_t limit, uint8_t access, uint8_t flags);
static void load_tss(uint16_t tss);
static volatile GDT_DESCRIPTOR gdt;
static volatile GDT_ENTRY gdt_entries[];
static volatile TSS_ENTRY tss_entry;
public:
static void setup();
static void setup_tss(uint32_t kernel_stack);
static void set_tss_stack(uint32_t kernel_stack);
};
<file_sep>/CMakeLists.txt
cmake_minimum_required(VERSION 3.0.0)
set(CMAKE_ASM_NASM_OBJECT_FORMAT win32)
enable_language(ASM_NASM)
project(CyanOS VERSION 0.1.0)
SET(OUTPUT_FILE "kernel")
SET(OUTPUT_IMAGE ${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_FILE}.img)
SET(BINS_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/apps)
SET(DRVS_DIRECTORY ${BINS_DIRECTORY}/Drivers)
SET(USER_DIRECTORY ${BINS_DIRECTORY}/UserBinary)
SET(ROOT_DIRECTORY "CyanOS_root")
SET(OUTPUT_ISO "CyanOS.iso")
SET(QEMU qemu-system-i386)
SET(QEMU_FLAGS -serial stdio -serial file:CON -no-reboot -no-shutdown -m 128 -d cpu_reset -boot d -cdrom)
SET(QEMU_FLAGS_DEBUG -serial stdio -serial file:CON -S -gdb tcp::5555)
file(MAKE_DIRECTORY ${BINS_DIRECTORY} ${DRVS_DIRECTORY} ${USER_DIRECTORY})
#set(CMAKE_CXX_CLANG_TIDY "clang-tidy;-checks=*")
add_subdirectory("kernel")
add_custom_command(
OUTPUT ${OUTPUT_ISO}
MAIN_DEPENDENCY ${OUTPUT_FILE}
COMMAND python ../utils/make_bootable_iso.py ${OUTPUT_IMAGE} ${BINS_DIRECTORY} ${ROOT_DIRECTORY} ${OUTPUT_ISO}
COMMENT "Creating ISO file..."
)
add_custom_target(compile ALL DEPENDS ${OUTPUT_ISO})
add_custom_target(debug
DEPENDS ${OUTPUT_ISO}
COMMAND ${QEMU} ${QEMU_FLAGS} ${OUTPUT_ISO} ${QEMU_FLAGS_DEBUG}
)
add_custom_target(run
DEPENDS ${OUTPUT_ISO}
COMMAND ${QEMU} ${QEMU_FLAGS} ${OUTPUT_ISO}
)
enable_testing()
add_subdirectory("googletest")
add_subdirectory("test")
include(CTest)
set(CPACK_PROJECT_NAME ${PROJECT_NAME})
set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})
include(CPack)
<file_sep>/kernel/Arch/x86/Spinlock.cpp
#include "Spinlock.h"
void StaticSpinlock::init()
{
m_value = 0;
}
void StaticSpinlock::acquire()
{
m_eflags = eflags_read();
DISABLE_INTERRUPTS();
while (test_and_set(&m_value) != 0) {
}
}
void StaticSpinlock::release()
{
m_value = 0;
eflags_write(m_eflags);
}
<file_sep>/kernel/Tasking/Loader/PE.h
#pragma once
#include "Utils/Result.h"
#include "Utils/Types.h"
#include "Winnt.h"
class PELoader
{
private:
static uintptr_t align_to(uintptr_t size, size_t alignment);
static void* load_pe_sections(const char* file, const IMAGE_NT_HEADERS32* nt_header);
public:
static Result<uintptr_t> load(const char* file, size_t size);
PELoader() = delete;
~PELoader() = delete;
};
<file_sep>/kernel/Kernel_init.cpp
#include "Kernel_init.h"
#include "Arch/x86/Asm.h"
#include "Arch/x86/Gdt.h"
#include "Arch/x86/Idt.h"
#include "Arch/x86/Paging.h"
#include "Arch/x86/Panic.h"
#include "Arch/x86/Pic.h"
#include "Devices/Console/Console.h"
#include "Devices/DebugPort/DebugPort.h"
#include "Devices/DebugPort/Logger.h"
#include "Devices/DeviceFS.h"
#include "Devices/Keyboard/Keyboard.h"
#include "Devices/RTC/Rtc.h"
#include "Devices/Timer/Pit.h"
#include "Filesystem/Pipes/PipeFS.h"
#include "Filesystem/Ustar/TarFS.h"
#include "Tasking/Process.h"
#include "Tasking/Scheduler.h"
#include "Tasking/Semaphore.h"
#include "Tasking/Thread.h"
#include "Tests.h"
#include "Utils/Assert.h"
#include "Utils/Stl.h"
#include "Utils/UniquePointer.h"
#include "VirtualMemory/Heap.h"
#include "VirtualMemory/Memory.h"
void display_time()
{
while (1) {
DATE_TIME date;
RTC::get_time(&date);
// printf("Time is %d:%d:%d %d-%d-20%d\n", date.year, date.minutes, date.seconds, date.day_of_month,
// date.month,
// date.year);
// Scheduler::sleep(500);
// removeLine();
}
}
extern "C" void kernel_init(BootloaderInfo* boot_info)
{
Logger::init();
Logger(DebugColor::Bright_Cyan) << "Welcome To CyanOS.";
info() << "Setting up core components... ";
GDT::setup();
IDT::setup();
Memory::setup_stage2();
Heap::setup();
Scheduler::setup();
PIC::setup();
PIT::setup();
info() << "\bDone!";
info() << "Setting up file systems... ";
VFS::setup();
VFS::mount(TarFS::alloc("Tar", reinterpret_cast<void*>(boot_info->ramdisk.start), boot_info->ramdisk.size));
VFS::mount(PipeFS::alloc("Pipes"));
VFS::mount(DeviceFS::alloc("Devices"));
info() << "\bDone!";
info() << "Setting up devices... ";
DeviceFS::add_device(Keyboard::alloc("keyboard"));
DeviceFS::add_device(Console::alloc("console"));
info() << "\bDone!";
info() << "Starting the first process.";
Process& proc = Process::create_new_process("test_process", "/Tar/Drivers/open_file.exe");
Thread::create_thread(proc, test_console, 0);
Thread::create_thread(proc, test_keyboard, 0);
Thread::create_thread(proc, test_keyboard2, 0);
Thread::yield();
while (1) {
HLT();
}
ASSERT_NOT_REACHABLE();
}<file_sep>/README.md
<p align="center">
<img width="400" height="80" src="https://i.imgur.com/KVBFGI0.png">
</p>
# CyanOS: A Hobbyist Operating System [](https://travis-ci.com/AymenSekhri/CyanOS)
## What's is this ?
It's a x86 monolithic kernel operating system, coded in C++ 17 and few lines of x86 Assembly.
## Why ?
Why a new half working operating systems? you might ask, And the answer: because it's fun. This is my biggest project so far and I'm really learning a lot of new stuff on the way and enjoying every line I write (until I face a race condition bug, I would hate my life by then). I'm trying my best to work out a clean architecture for this project and maintaining a readable & scalable code base as far as i can (it might far from perfect right now).
## What can it do ?
- Virtual Memory.
- Heap Allocator.
- Concurrency in terms of Threads & Processes.
- Basic Windows PE loader
- Task Synchronization (Spinlocks, Semaphores and Mutex)
- Inter-process communication (using pipes)
- Virtual File System.
- User Space.
- PIC Driver.
- Keyboard Driver.
## Building CyanOS
#### Requirements
```
sudo apt-get update
sudo apt-get install build-essential g++-multilib nasm python cmake grub2 xorriso mtools qemu
```
For Windows users, you can build and run the system on WSL1/WSL2 (Windows Subsystem for Linux). Or you can build it using [msys2](http://repo.msys2.org/distrib/x86_64/), [nasm](https://www.nasm.us/) and [CMake](https://cmake.org/download) and run it using [qemu](https://www.qemu.org/download/), though it still needs WSL to make a bootable ISO using `grub2-rescue` command.
#### Building
```
git clone --recursive https://github.com/AymenSekhri/CyanOS.git
cd ./CyanOS
mkdir build && cd build
cmake ..
make && make test
```
And you can boot up the OS in Qemu using:
```
make run
```
## You have a question or suggestion ?
Add an issue, and I will be happy to answer you.
## Acknowledgement
I would like to thank [<NAME>](https://github.com/awesomekling), I leant so much from his [youtube channel](https://www.youtube.com/c/AndreasKling/) and his great open source project [SerenityOS](https://github.com/SerenityOS/serenity).
## Useful resources
* Operating Systems: Internals And Design Principles By <NAME>.
* Operating Systems: Design and Implementation By <NAME> and <NAME>.
* [Brokenthorn Tutorials](http://www.brokenthorn.com/Resources)
* [littleosbook Tutorials](https://littleosbook.github.io)
* [<NAME> Tutorials](http://www.jamesmolloy.co.uk/tutorial_html)
* [How to Make a Computer Operating System](https://samypesse.gitbook.io/how-to-create-an-operating-system/)
* [OSDev](https://wiki.osdev.org/Main_Page)
* [Intel Manual](https://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-vol-3a-part-1-manual.pdf)
<file_sep>/kernel/Filesystem/FileDescription.h
#pragma once
#include "FSNode.h"
#include "Utils/Result.h"
#include "Utils/Types.h"
enum class SeekOrigin { SET, CURRENT, END };
struct FileInfo {
size_t size;
};
class FileDescription
{
private:
FSNode& m_node;
size_t m_current_position = 0;
int m_type = 0;
bool m_has_changed = false;
public:
FileDescription(FSNode& node);
~FileDescription();
Result<void> read(void* buff, size_t size);
Result<void> write(const void* buff, size_t size);
Result<void> seek(int offset, SeekOrigin origin);
Result<FileInfo> fstat();
Result<void> ioctl();
Result<void> mmap();
};<file_sep>/kernel/VirtualMemory/Heap.h
#pragma once
#include "Arch/x86/Spinlock.h"
#include "Lib/Stdlib.h"
#include "Memory.h"
#include "Utils/Types.h"
#define ADDR_TO_HEADER(x) ((unsigned)x - sizeof(BlockHeader))
#define HEADER_TO_ADDR(x) ((unsigned)x + sizeof(BlockHeader))
#define NEXT_NEIGHBOR_BLOCK(current_block) ((unsigned)current_block + sizeof(BlockHeader) + current_block->size)
#define MALLOC_PAGE_SIZE PAGE_SIZE
#define MAX_SIZE (MALLOC_PAGE_SIZE - sizeof(BlockHeader) * 2 - sizeof(PageFrameBlock))
struct BlockHeader {
unsigned size;
BlockHeader *next, *previous;
};
struct PageFrameBlock {
unsigned size;
PageFrameBlock *next, *previous;
};
class Heap
{
private:
static StaticSpinlock lock;
static PageFrameBlock* create_new_page();
static PageFrameBlock* get_last_page();
static BlockHeader* initiate_first_block(PageFrameBlock* new_page);
static BlockHeader* find_free_block(unsigned size);
static void link_block(BlockHeader* current_block, BlockHeader* new_block);
static void unlink_block(BlockHeader* current_block);
static volatile PageFrameBlock* malloc_mem;
public:
static void setup();
static void* kmalloc(unsigned size, unsigned flags);
static void kfree(void* addr);
};
<file_sep>/kernel/Devices/DebugPort/Logger.cpp
#include "Logger.h"
#include "Lib/Stdlib.h"
StaticSpinlock Logger::lock;
void Logger::init()
{
lock.init();
}
Logger::Logger(DebugColor color) : m_color{color}
{
lock.acquire();
}
Logger::~Logger()
{
DebugPort::write("\n", m_color);
lock.release();
}
Logger& Logger::operator<<(const char* str)
{
DebugPort::write(str, m_color);
return *this;
}
Logger& Logger::operator<<(const String& str)
{
DebugPort::write(str.c_str(), m_color);
return *this;
}
Logger& Logger::operator<<(const char str)
{
DebugPort::write(&str, m_color);
return *this;
}
Logger& Logger::operator<<(uint64_t num)
{
char buf[5];
itoa(buf, num & 0xFFFFFFFF, 16);
toupper(buf);
DebugPort::write(buf, m_color);
itoa(buf, num & 0xFFFFFFFF00000000, 16);
toupper(buf);
DebugPort::write(buf, m_color);
return *this;
}
Logger& Logger::operator<<(int num)
{
char buf[11];
if (num < 0) {
num = 0 - num;
DebugPort::write("-", m_color);
}
itoa(buf, num, 10);
toupper(buf);
DebugPort::write(buf, m_color);
return *this;
}
Logger& Logger::operator<<(unsigned num)
{
char buf[11];
itoa(buf, num, 10);
toupper(buf);
DebugPort::write(buf, m_color);
return *this;
}
Logger& Logger::operator<<(Hex num)
{
char buf[5];
itoa(buf, num.m_data, 16);
toupper(buf);
DebugPort::write("0x", m_color);
DebugPort::write(buf, m_color);
return *this;
}
Logger& Logger::operator<<(void* ptr)
{
char buf[5];
itoa(buf, (int)ptr, 16);
toupper(buf);
DebugPort::write("0x", m_color);
DebugPort::write(buf, m_color);
return *this;
}<file_sep>/kernel/Utils/UniquePointer.h
#pragma once
#include "Assert.h"
#include "Stl.h"
template <typename T> class UniquePointer
{
public:
template <class... Args> static UniquePointer<T> make_unique(Args&&... args)
{
return UniquePointer(new T{forward<Args>(args)...});
}
explicit UniquePointer(T* ptr) : m_storage{ptr}
{
ASSERT(m_storage);
}
UniquePointer(UniquePointer&& other) : m_storage{other.m_storage}
{
other.m_storage = nullptr;
}
UniquePointer& operator=(UniquePointer&& other)
{
ASSERT(this != &other);
delete m_storage;
m_storage = other.m_storage;
other.m_storage = nullptr;
return *this;
}
UniquePointer(const UniquePointer& other) = delete;
UniquePointer& operator=(const UniquePointer& other) = delete;
~UniquePointer()
{
destroy();
}
T& operator*()
{
return *m_storage;
}
T* operator->()
{
return m_storage;
}
bool operator==(const UniquePointer& other)
{
return (m_storage == other.m_storage);
}
bool operator!=(const UniquePointer& other)
{
return (m_storage != other.m_storage);
}
T* release()
{
m_storage = nullptr;
return m_storage;
}
T* reset()
{
T* tmp = m_storage;
destroy();
return tmp;
}
T* ptr()
{
return m_storage;
}
private:
T* m_storage;
void destroy()
{
delete m_storage;
m_storage = nullptr;
}
};<file_sep>/kernel/Devices/DebugPort/Logger.h
#pragma once
#include "Arch/x86/Spinlock.h"
#include "DebugPort.h"
#include "Utils/String.h"
#include "Utils/StringView.h"
#include "Utils/Types.h"
class Hex;
class Logger
{
private:
static StaticSpinlock lock;
protected:
DebugColor m_color;
public:
static void init();
Logger(DebugColor color = DebugColor::White);
~Logger();
Logger& operator<<(const char* str);
Logger& operator<<(const String& str);
Logger& operator<<(const char str);
Logger& operator<<(int num);
Logger& operator<<(unsigned num);
Logger& operator<<(uint64_t num);
Logger& operator<<(Hex num);
Logger& operator<<(void* ptr);
};
class dbg : public Logger
{
public:
dbg() : Logger{DebugColor::Green}
{
}
};
class info : public Logger
{
public:
info() : Logger{DebugColor::Bright_Blue}
{
}
};
class warn : public Logger
{
public:
warn() : Logger{DebugColor::Yellow}
{
}
};
class err : public Logger
{
public:
err() : Logger{DebugColor::Red}
{
}
};
class Hex
{
private:
int m_data;
public:
Hex(int num) : m_data(num)
{
}
friend class Logger;
};<file_sep>/kernel/Filesystem/Pipes/PipeFS.cpp
#include "PipeFS.h"
#include "Tasking/ScopedLock.h"
#include "Utils/ErrorCodes.h"
#include "Utils/PathParser.h"
UniquePointer<FSNode> PipeFS::alloc(const StringView& name)
{
return UniquePointer<FSNode>(new PipeFS(name));
}
PipeFS::PipeFS(const StringView& name) :
FSNode(name, 0, 0, NodeType::Root, 0), //
m_children{},
m_lock{}
{
// FIXME: multiple writers, one reader.
m_lock.init();
}
PipeFS::~PipeFS()
{
}
Result<FSNode&> PipeFS::create(const StringView& name, OpenMode mode, OpenFlags flags)
{
UNUSED(mode);
UNUSED(flags);
return m_children.emplace_back(name);
}
Result<FSNode&> PipeFS::dir_lookup(const StringView& file_name)
{
for (auto& i : m_children) {
if (i.m_name == file_name) {
return i;
}
}
return ResultError(ERROR_FILE_DOES_NOT_EXIST);
}
<file_sep>/test/PathParser.cpp
#ifdef __STRICT_ANSI__
#undef __STRICT_ANSI__
#endif
#include "Utils/PathParser.h"
#include <gtest/gtest.h>
#define MAX_PATH_ELEMENT 256
TEST(PathParser_Test, ElementsCounting)
{
PathParser path("/mnt/c/user/goku/rocks");
EXPECT_EQ(path.count(), 5);
}
TEST(PathParser_Test, GettingElements)
{
PathParser path("/mnt/fat32/c/users/goku/rocks");
EXPECT_TRUE(path.element(0) == "mnt");
EXPECT_TRUE(path.element(1) == "fat32");
EXPECT_TRUE(path.element(2) == "c");
EXPECT_TRUE(path.element(3) == "users");
EXPECT_TRUE(path.element(4) == "goku");
EXPECT_TRUE(path.element(5) == "rocks");
}<file_sep>/test/CircularBuffer.cpp
#ifdef __STRICT_ANSI__
#undef __STRICT_ANSI__
#endif
#include "Utils/CircularBuffer.h"
#include <gtest/gtest.h>
TEST(CircularBuffer_Test, Initialization)
{
const int size = 10;
CircularBuffer<int> cb(size);
EXPECT_EQ(cb.capacity(), 10);
EXPECT_EQ(cb.size(), 0);
EXPECT_TRUE(cb.is_empty());
EXPECT_FALSE(cb.is_full());
}
TEST(CircularBuffer_Test, QueueingAndDequeueing)
{
const int size = 10;
CircularBuffer<int> cb(size);
cb.queue(1);
cb.queue(2);
cb.queue(3);
EXPECT_FALSE(cb.is_empty());
EXPECT_FALSE(cb.is_full());
EXPECT_EQ(cb.size(), 3);
EXPECT_EQ(cb.dequeue(), 1);
EXPECT_FALSE(cb.is_empty());
EXPECT_FALSE(cb.is_full());
EXPECT_EQ(cb.size(), 2);
EXPECT_EQ(cb.dequeue(), 2);
EXPECT_FALSE(cb.is_empty());
EXPECT_FALSE(cb.is_full());
EXPECT_EQ(cb.size(), 1);
EXPECT_EQ(cb.dequeue(), 3);
EXPECT_TRUE(cb.is_empty());
EXPECT_FALSE(cb.is_full());
EXPECT_EQ(cb.size(), 0);
}
TEST(CircularBuffer_Test, Wraping)
{
const int size = 5;
CircularBuffer<int> cb(size);
cb.queue(1);
cb.queue(2);
cb.queue(3);
cb.queue(4);
cb.queue(5);
EXPECT_FALSE(cb.is_empty());
EXPECT_TRUE(cb.is_full());
EXPECT_EQ(cb.size(), 5);
EXPECT_EQ(cb.dequeue(), 1);
EXPECT_FALSE(cb.is_empty());
EXPECT_FALSE(cb.is_full());
EXPECT_EQ(cb.size(), 4);
cb.queue(6);
EXPECT_FALSE(cb.is_empty());
EXPECT_TRUE(cb.is_full());
EXPECT_EQ(cb.size(), 5);
EXPECT_EQ(cb.dequeue(), 2);
EXPECT_EQ(cb.dequeue(), 3);
EXPECT_EQ(cb.dequeue(), 4);
EXPECT_EQ(cb.dequeue(), 5);
EXPECT_FALSE(cb.is_empty());
EXPECT_FALSE(cb.is_full());
EXPECT_EQ(cb.size(), 1);
EXPECT_EQ(cb.dequeue(), 6);
EXPECT_TRUE(cb.is_empty());
EXPECT_FALSE(cb.is_full());
}<file_sep>/kernel/Utils/List.h
#pragma once
#include "Rule5.h"
#include "Stl.h"
#include "Types.h"
#ifdef __UNIT_TESTS
#include <assert.h>
#define ASSERT(x) assert(x)
#else
#include "Assert.h"
#endif
template <class T> class List
{
private:
struct Node {
T data;
Node *next, *prev;
};
Node* m_head;
Node* m_tail;
size_t m_count;
void remove_node(Node& new_node);
void append_node(Node& new_node, Node* node);
void prepend_node(Node& new_node, Node* node);
class Iterator
{
private:
Node* m_current;
public:
Iterator(Node* t_head, size_t index);
explicit Iterator(Node* t_list);
Iterator(const Iterator& other);
void operator=(const List<T>::Iterator& other);
~Iterator() = default;
Iterator operator++(int);
Iterator& operator++();
bool operator!=(const List<T>::Iterator& other);
bool operator==(const List<T>::Iterator& other);
T* operator->();
T& operator*();
friend List<T>;
};
public:
NON_COPYABLE(List);
NON_MOVABLE(List);
List();
~List();
Iterator begin();
Iterator end();
template <typename... U> T& emplace_back(U&&... u);
template <typename... U> T& emplace_front(U&&... u);
T& push_back(const T& new_data);
T& push_front(const T& new_data);
T& push_back(T&& new_data);
T& push_front(T&& new_data);
void pop_back();
void pop_front();
void insert(const Iterator& node, const T& new_node);
void erase(const Iterator&);
template <class Predicate> bool remove_if(Predicate predicate);
template <class Predicate> bool contains(Predicate predicate);
void clear();
void splice(List<T>& list, const Iterator& itr);
bool is_empty() const;
size_t size() const;
T& head() const;
T& tail() const;
T& operator[](size_t index) const;
};
template <class T> List<T>::Iterator::Iterator(Node* t_head, size_t index) : m_current{t_head}
{
while (index--) {
m_current = m_current->next;
}
}
template <class T> List<T>::Iterator::Iterator(const Iterator& other) : m_current{other.m_current}
{
}
template <class T> List<T>::Iterator::Iterator(Node* t_node) : m_current{t_node}
{
}
template <class T> typename List<T>::Iterator List<T>::Iterator::operator++(int arg)
{
UNUSED(arg);
Iterator old{*this};
m_current = m_current->next;
return old;
}
template <class T> typename List<T>::Iterator& List<T>::Iterator::operator++()
{
m_current = m_current->next;
return *this;
}
template <class T> bool List<T>::Iterator::operator!=(const List<T>::Iterator& other)
{
return m_current != other.m_current;
}
template <class T> bool List<T>::Iterator::operator==(const List<T>::Iterator& other)
{
return m_current == other.m_current;
}
template <class T> void List<T>::Iterator::operator=(const List<T>::Iterator& other)
{
m_current = other->m_current;
}
template <class T> T& List<T>::Iterator::operator*()
{
return m_current->data;
}
template <class T> T* List<T>::Iterator::operator->()
{
return &m_current->data;
}
template <class T> List<T>::List() : m_head{nullptr}, m_tail{nullptr}, m_count{0}
{
}
template <class T> List<T>::~List()
{
clear();
}
template <class T> void List<T>::clear()
{
Node* node_iterator = m_head;
while (node_iterator) {
Node* next = node_iterator->next;
delete node_iterator;
node_iterator = next;
}
m_head = nullptr;
m_count = 0;
}
template <class T> void List<T>::splice(List<T>& list, const Iterator& itr)
{
remove_node(*itr.m_current);
list.append_node(*itr.m_current, list.m_tail);
}
template <class T> void List<T>::remove_node(Node& node)
{
if ((m_head == &node) && (m_tail == &node)) {
m_head = m_tail = nullptr;
} else if (m_head == &node) {
m_head = node.next;
node.next->prev = nullptr;
} else if (m_tail == &node) {
m_tail = node.prev;
node.prev->next = nullptr;
} else {
node.prev->next = node.next;
node.next->prev = node.prev;
}
m_count--;
}
template <class T> void List<T>::append_node(Node& new_node, Node* node)
{
if (!m_head) {
new_node.prev = nullptr;
new_node.next = nullptr;
m_head = m_tail = &new_node;
} else {
new_node.prev = node;
new_node.next = node->next;
if (node->next) {
node->next->prev = &new_node;
} else {
m_tail = &new_node;
}
node->next = &new_node;
}
m_count++;
}
template <class T> void List<T>::prepend_node(Node& new_node, Node* node)
{
if (!m_head) {
new_node.prev = nullptr;
new_node.next = nullptr;
m_head = m_tail = &new_node;
} else {
new_node.prev = node->prev;
new_node.next = node;
if (node->prev) {
node->prev->next = &new_node;
} else {
m_head = &new_node;
}
node->prev = &new_node;
}
m_count++;
}
template <class T> typename List<T>::Iterator List<T>::begin()
{
return Iterator(m_head);
}
template <class T> typename List<T>::Iterator List<T>::end()
{
return Iterator(nullptr);
}
template <class T> template <typename... U> T& List<T>::emplace_back(U&&... u)
{
Node* new_node = new Node{T{forward<U>(u)...}, nullptr, nullptr}; // FIXME: remove T{}
append_node(*new_node, m_tail);
return new_node->data;
}
template <class T> template <typename... U> T& List<T>::emplace_front(U&&... u)
{
Node* new_node = new Node{T{forward<U>(u)...}, nullptr, nullptr};
prepend_node(*new_node, m_head);
return new_node->data;
}
template <class T> template <class Predicate> bool List<T>::remove_if(Predicate predicate)
{
bool is_removed = false;
auto&& i = begin();
while (i != end()) {
auto iterator_copy = i++;
if (predicate(*iterator_copy)) {
erase(iterator_copy);
is_removed = true;
}
}
return is_removed;
}
template <class T> template <class Predicate> bool List<T>::contains(Predicate predicate)
{
for (auto&& i : *this) {
if (predicate(i)) {
return true;
}
}
return false;
}
template <class T> T& List<T>::push_back(const T& new_data)
{
Node* new_node = new Node{new_data, nullptr, nullptr};
append_node(*new_node, m_tail);
return new_node->data;
}
template <class T> T& List<T>::push_front(const T& new_data)
{
Node* new_node = new Node{new_data, nullptr, nullptr};
prepend_node(*new_node, m_head);
return new_node->data;
}
template <class T> T& List<T>::push_back(T&& new_data)
{
Node* new_node = new Node{move(new_data), nullptr, nullptr};
append_node(*new_node, m_tail);
return new_node->data;
}
template <class T> T& List<T>::push_front(T&& new_data)
{
Node* new_node = new Node{move(new_data), nullptr, nullptr};
prepend_node(*new_node, m_head);
return new_node->data;
}
template <class T> void List<T>::pop_back()
{
ASSERT(m_tail);
remove_node(*m_tail);
delete m_tail;
}
template <class T> void List<T>::pop_front()
{
ASSERT(m_head);
remove_node(*m_head);
delete m_head;
}
template <class T> void List<T>::insert(const Iterator& pos, const T& new_data)
{
Node* new_node = new Node{new_data, nullptr, nullptr};
append_node(*new_node, pos.m_current);
}
template <class T> void List<T>::erase(const Iterator& itr)
{
ASSERT(itr.m_current);
remove_node(*itr.m_current);
delete itr.m_current;
}
template <class T> T& List<T>::head() const
{
ASSERT(m_head);
return m_head->data;
}
template <class T> T& List<T>::tail() const
{
ASSERT(m_head);
return m_tail->data;
}
template <class T> T& List<T>::operator[](size_t index) const
{
ASSERT(index < m_count);
Iterator itr(m_head, index);
return *itr;
}
template <class T> bool List<T>::is_empty() const
{
return !size();
}
template <class T> size_t List<T>::size() const
{
return m_count;
}<file_sep>/kernel/Tests.h
#pragma once
#include "Devices/DebugPort/Logger.h"
#include "Devices/Timer/Pit.h"
#include "Filesystem/FileDescription.h"
#include "Filesystem/VirtualFilesystem.h"
#include "Tasking/Loader/PE.h"
#include "Tasking/Scheduler.h"
#include "Tasking/Semaphore.h"
#include "Utils/Bitmap.h"
#include "Utils/PathParser.h"
#include "VirtualMemory/Memory.h"
Semaphore* sem_lock;
void test_semaphore_thread2(uintptr_t arg)
{
UNUSED(arg);
// printf("Thread2:\n");
sem_lock->acquire();
// printf("Semaphore acquired by thread2\n");
Thread::sleep(1000);
sem_lock->release();
// printf("Semaphore released by thread2\n");
while (1) {
HLT();
}
}
void test_semaphore(uintptr_t arg)
{
UNUSED(arg);
// printf("Thread1:\n");
sem_lock = new Semaphore(1);
sem_lock->acquire();
Thread::create_thread(Thread::current->parent_process(), test_semaphore_thread2, 0);
// printf("Semaphore acquired by thread1\n");
Thread::sleep(3000);
// printf("wakeup thread1\n");
sem_lock->release();
// printf("Semaphore released by thread1\n");
while (1) {
HLT();
}
}
/*void thread_test(uintptr_t arg)
{
//printf("Thread %d\n", arg);
for (size_t i = 0; i < 3; i++) {
//printf("Thread %d:Hello %d\n", arg, i);
}
}
void test_threading(uintptr_t arg)
{
//printf("Main thread: creating other threads\n");
for (size_t i = 0; i < 3; i++) {
//printf("Main thread: Creating thread%d\n", i);
Scheduler::create_new_thread(0, thread_test, i);
}
}*/
void test_pipe1(uintptr_t arg)
{
UNUSED(arg);
auto fd = VFS::open("/fs/my_pipe2", OpenMode::Read, OpenFlags::CreateNew);
if (fd.is_error()) {
warn() << "error opening the file, error: " << fd.error();
HLT();
return;
}
char* buff = (char*)Memory::alloc(0xc00, MEMORY_TYPE::KERNEL | MEMORY_TYPE::WRITABLE);
memset(buff, 0, 4096);
auto result = fd.value()->read(buff, 12);
dbg() << "got it, read";
dbg() << buff;
if (result.is_error())
warn() << "error reading the file " << result.error();
}
void test_pipe2(uintptr_t arg)
{
UNUSED(arg);
Thread::sleep(1000);
auto fd = VFS::open("/fs/my_pipe", OpenMode::Write, OpenFlags::OpenExisting);
if (fd.is_error()) {
warn() << "error opening the file, error: " << fd.error();
HLT();
return;
}
char* buff = (char*)Memory::alloc(0xc00, MEMORY_TYPE::KERNEL | MEMORY_TYPE::WRITABLE);
memset(buff, 0, 4096);
auto result = fd.value()->write(static_cast<const void*>("Hello there"), 12);
dbg() << "got it, write";
dbg() << buff;
if (result.is_error())
warn() << "error writing the file " << result.error();
}
void test_keyboard(uintptr_t arg)
{
UNUSED(arg);
auto fd = VFS::open("/Devices/keyboard", OpenMode::ReadWrite, OpenFlags::OpenExisting);
if (fd.is_error()) {
warn() << "error opening the file, error: " << fd.error();
HLT();
return;
}
char buff[1];
while (true) {
auto result = fd.value()->read(buff, 1);
Logger(DebugColor::Cyan) << buff;
}
}
void test_keyboard2(uintptr_t arg)
{
UNUSED(arg);
auto fd = VFS::open("/Devices/keyboard", OpenMode::ReadWrite, OpenFlags::OpenExisting);
if (fd.is_error()) {
warn() << "error opening the file, error: " << fd.error();
HLT();
return;
}
char buff[1];
while (true) {
auto result = fd.value()->read(buff, 1);
Logger(DebugColor::Red) << buff;
}
}
void test_console(uintptr_t arg)
{
UNUSED(arg);
auto fd = VFS::open("/Devices/console", OpenMode::Write, OpenFlags::OpenExisting);
if (fd.is_error()) {
warn() << "error opening the file, error: " << fd.error();
HLT();
return;
}
auto result = fd.value()->write("Hello there", 12);
}<file_sep>/test/Bitmap_Test.cpp
#ifdef __STRICT_ANSI__
#undef __STRICT_ANSI__
#endif
#include "Utils/Bitmap.h"
#include <gtest/gtest.h>
TEST(Bitmap_Test, SearchForUsed)
{
Bitmap bm(10);
EXPECT_EQ(bm.find_first_used(5), BITMAP_NO_BITS_LEFT);
bm.set_used(2);
EXPECT_EQ(bm.find_first_used(5), BITMAP_NO_BITS_LEFT);
bm.set_used(3, 4);
EXPECT_EQ(bm.find_first_used(5), 2);
bm.set_unused(2, 5);
EXPECT_EQ(bm.find_first_used(5), BITMAP_NO_BITS_LEFT);
bm.set_used(3);
bm.set_used(6);
EXPECT_EQ(bm.find_first_used(4), BITMAP_NO_BITS_LEFT);
}
TEST(Bitmap_Test, SearchForUnused)
{
Bitmap bm(10);
EXPECT_EQ(bm.find_first_unused(5), 0);
bm.set_used(2);
EXPECT_EQ(bm.find_first_unused(5), 3);
bm.set_used(3, 4);
EXPECT_EQ(bm.find_first_unused(5), BITMAP_NO_BITS_LEFT);
bm.set_unused(2, 5);
EXPECT_EQ(bm.find_first_unused(5), 0);
bm.set_used(3);
bm.set_used(6);
EXPECT_EQ(bm.find_first_unused(4), BITMAP_NO_BITS_LEFT);
}<file_sep>/kernel/Utils/PathParser.cpp
#include "PathParser.h"
#ifdef __UNIT_TESTS
#include <assert.h>
#include <stdio.h>
#include <cstring>
#define ASSERT(x) assert(x)
#else
#include "Lib/Stdlib.h"
#include "Utils/Assert.h"
#endif
PathParser::PathParser(const StringView& path) : m_path{path}, m_count{calc_count()}
{
ASSERT(is_valid());
}
PathParser::~PathParser()
{
}
size_t PathParser::count()
{
return m_count;
}
StringView PathParser::element(size_t index)
{
ASSERT(index < count());
size_t pos = 0;
size_t cur = index;
while (cur--) {
pos = m_path.find(SPLITER, pos + 1);
}
size_t len = [&]() {
if (index == count() - 1) {
return m_path.length() - pos - 1;
} else {
return m_path.find(SPLITER, pos + 1) - pos - 1;
}
}();
return m_path.substr(pos + 1, len);
}
bool PathParser::is_valid()
{
if (m_path.length() == 0)
return false;
if (m_path[0] != SPLITER)
return false;
if (m_path[m_path.length() - 1] == SPLITER)
return false;
return true;
}
size_t PathParser::calc_count()
{
size_t count = 0;
size_t last_found = 0;
do {
last_found = m_path.find(SPLITER, last_found + 1);
++count;
} while (last_found != StringView::NOT_FOUND);
return count;
}<file_sep>/kernel/VirtualMemory/Memory.h
#pragma once
#include "Arch/x86/Isr.h"
#include "Arch/x86/Paging.h"
#include "Arch/x86/Panic.h"
#include "Arch/x86/Spinlock.h"
#include "Physical.h"
#include "Utils/Assert.h"
#include "Utils/Types.h"
#include "Virtual.h"
enum MEMORY_TYPE {
KERNEL = 1,
WRITABLE = 2,
COPY_ON_WRITE = 4,
};
#define AVAILABLE_PAGES_START (GET_FRAME(0x100000))
class Memory
{
private:
static StaticSpinlock lock;
static void page_fault_handler(ISRContextFrame* isr_info);
static uint32_t parse_flags(uint32_t mem_flags);
static void* _alloc_no_lock(uint32_t size, uint32_t flags);
static void* _alloc_no_lock(void* virtual_address, uint32_t size, uint32_t flags);
static void _free_no_lock(void* virtual_address, uint32_t size, uint32_t flags);
static void* _map_no_lock(uintptr_t physical_address, uint32_t size, uint32_t flags);
static void _unmap_no_lock(void* virtual_address, uint32_t size, uint32_t flags);
static void setup_page_fault_handler();
public:
static unsigned get_kernel_pages();
static void setup();
static void setup_stage2();
static void* alloc(uint32_t size, uint32_t flags);
static void* alloc(void* virtual_address, uint32_t size, uint32_t flags);
static void free(void* virtual_address, uint32_t size, uint32_t flags);
static void* map(uintptr_t physical_address, uint32_t size, uint32_t flags);
static void unmap(void* virtual_address, uint32_t size, uint32_t flags);
static void switch_page_directory(uintptr_t physical_address);
static uintptr_t create_new_virtual_space();
static unsigned virtual_memory_size();
static unsigned physical_memory_size();
friend class VirtualMemory;
};
<file_sep>/kernel/Tasking/ScopedLock.h
#pragma once
#include "Utils/Rule5.h"
template <typename T> class ScopedLock
{
private:
T& m_lock;
public:
NON_COPYABLE(ScopedLock)
NON_MOVABLE(ScopedLock)
explicit ScopedLock(T& lock) : m_lock{lock}
{
acquire();
}
~ScopedLock()
{
release();
}
void release()
{
m_lock.release();
}
void acquire()
{
m_lock.acquire();
}
};
<file_sep>/kernel/Filesystem/FileDescriptor.h
#pragma once
#include "Filesystem/FileDescription.h"
#include "Tasking/ScopedLock.h"
#include "Tasking/SpinLock.h"
#include "Utils/List.h"
#include "Utils/Types.h"
#include "Utils/UniquePointer.h"
#include "Utils/Stl.h"
template <class T> class Descriptor
{
private:
Spinlock m_lock;
List<UniquePointer<T>> m_file_description_table; // FIXME:should be vector.
public:
Descriptor();
~Descriptor();
unsigned add_descriptor(UniquePointer<T>&& file_description);
void remove_descriptor(unsigned);
T& get_description(unsigned);
};
template <class T> unsigned Descriptor<T>::add_descriptor(UniquePointer<T>&& file_description)
{
ScopedLock local_lock(m_lock);
m_file_description_table.emplace_back(move(file_description));
return m_file_description_table.size() - 1;
}
template <class T> void Descriptor<T>::remove_descriptor(unsigned file_descriptor)
{
UNUSED(file_descriptor);
ScopedLock local_lock(m_lock);
// file_description_table.remove(file_descriptor);//FIXME:you can't just remove them.
}
template <class T> T& Descriptor<T>::get_description(unsigned file_descriptor)
{
return *m_file_description_table[file_descriptor];
}
template <class T> Descriptor<T>::Descriptor() : m_lock{}, m_file_description_table{}
{
m_lock.init();
}
template <class T> Descriptor<T>::~Descriptor()
{
}<file_sep>/kernel/Arch/x86/Context.h
#pragma once
#include "Gdt.h"
#include "Isr.h"
#include "Utils/Types.h"
class Context
{
private:
struct InitialTaskContext {
ISRContextFrame isr_frame;
uintptr_t return_address;
uintptr_t argument;
};
static const uint32_t EFLAGS_IF_ENABLE = 0x202;
public:
static uint32_t setup_task_stack_context(void* stack, uint32_t stack_size, uint32_t start_function,
uint32_t return_function, uint32_t argument);
static void switch_task_stack(uint32_t task_stack_start);
static void enter_usermode(uintptr_t thread_address, uintptr_t thread_stack);
static void set_return_value(ISRContextFrame* frame, uint32_t value);
static void set_return_arg1(ISRContextFrame* frame, uint32_t value);
static void set_return_arg2(ISRContextFrame* frame, uint32_t value);
static void set_return_arg3(ISRContextFrame* frame, uint32_t value);
static uint32_t syscall_num(ISRContextFrame* frame);
static uint32_t syscall_param1(ISRContextFrame* frame);
static uint32_t syscall_param2(ISRContextFrame* frame);
static uint32_t syscall_param3(ISRContextFrame* frame);
static uint32_t syscall_param4(ISRContextFrame* frame);
static uint32_t syscall_param5(ISRContextFrame* frame);
};
<file_sep>/kernel/Filesystem/VirtualFilesystem.h
#pragma once
#include "FSNode.h"
#include "FileDescription.h"
#include "FileDescriptor.h"
#include "Utils/List.h"
#include "Utils/PathParser.h"
#include "Utils/Result.h"
#include "Utils/Types.h"
#include "Utils/UniquePointer.h"
class VFS
{
private:
static List<UniquePointer<FSNode>>* fs_roots;
static Spinlock lock;
static Result<FSNode&> traverse_parent_node(const StringView& path);
static Result<FSNode&> traverse_node(const StringView& path);
static Result<FSNode&> traverse_node_deep(PathParser& parser, size_t depth);
static Result<FSNode&> open_node(const StringView& path, OpenMode mode, OpenFlags flags);
static FSNode* get_root_node(const StringView& root_name);
public:
static void setup();
static Result<UniquePointer<FileDescription>> open(const StringView& path, OpenMode mode, OpenFlags flags);
static Result<void> mount(UniquePointer<FSNode>&& fs_root);
static Result<void> unmount();
static Result<void> remove();
static Result<void> make_directory();
static Result<void> remove_directory();
static Result<void> rename();
static Result<void> chown();
static Result<void> make_link();
static Result<void> remove_link();
};
<file_sep>/kernel/Utils/Types.h
#pragma once
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#define _UNUSED_PARAM(x) x tmp __attribute__((__unused__))
#define UNUSED(expr) (void)(expr)<file_sep>/kernel/Filesystem/Pipes/Pipe.cpp
#include "Pipe.h"
#include "Tasking/ScopedLock.h"
#include "Utils/ErrorCodes.h"
#include "Utils/PathParser.h"
Pipe::Pipe(const StringView& name) :
FSNode(name, 0, 0, NodeType::Pipe, BUFFER_SIZE),
m_children{},
m_buffer{BUFFER_SIZE},
m_wait_queue{},
m_lock{}
{
m_lock.init();
// FIXME: multiple writers, one reader.
}
Pipe::~Pipe()
{
}
Result<void> Pipe::open(OpenMode mode, OpenFlags flags)
{
UNUSED(mode);
UNUSED(flags);
return ResultError(ERROR_SUCCESS);
}
Result<void> Pipe::close()
{
return ResultError(ERROR_SUCCESS);
}
Result<void> Pipe::read(void* buff, size_t offset, size_t size)
{
UNUSED(offset);
ScopedLock local_lock(m_lock);
while (m_buffer.size() < size) {
local_lock.release();
Thread::current->wait_on(m_wait_queue);
local_lock.acquire();
}
char* _buf = static_cast<char*>(buff);
for (size_t i = 0; i < size; i++) {
_buf[i] = m_buffer.dequeue();
}
m_wait_queue.wake_up();
return ResultError(ERROR_SUCCESS);
}
Result<void> Pipe::write(const void* buff, size_t offset, size_t size)
{
UNUSED(offset);
ScopedLock local_lock(m_lock);
if (m_buffer.available_size() < size) {
local_lock.release();
Thread::current->wait_on(m_wait_queue);
local_lock.acquire();
}
const char* _buf = static_cast<const char*>(buff);
for (size_t i = 0; i < size; i++) {
m_buffer.queue(_buf[i]);
}
m_wait_queue.wake_up();
return ResultError(ERROR_SUCCESS);
}
Result<bool> Pipe::can_read()
{
return m_buffer.is_empty();
}
Result<bool> Pipe::can_write()
{
return m_buffer.is_full();
}
Result<void> Pipe::remove()
{
return ResultError(ERROR_INVALID_OPERATION);
}
<file_sep>/kernel/Tasking/WaitQueue.cpp
#include "WaitQueue.h"
WaitQueue::WaitQueue() : m_lock{}, m_threads{}
{
}
WaitQueue::~WaitQueue()
{
}
void WaitQueue::enqueue(Thread& thread)
{
m_threads.push_back(thread);
}
void WaitQueue::wake_up()
{
if (!m_threads.size()) {
return;
}
auto* thread_to_wake = m_threads.pop_front();
if (thread_to_wake)
thread_to_wake->wake_up_from_queue();
}
void WaitQueue::wake_up(size_t num)
{
while ((num--) && (!m_threads.is_empty())) {
wake_up();
}
}
void WaitQueue::wake_up_all()
{
while (!m_threads.is_empty()) {
wake_up();
}
}<file_sep>/kernel/Devices/Keyboard/Keyboard.cpp
#include "Keyboard.h"
#include "Arch/x86/Asm.h"
#include "Tasking/ScopedLock.h"
#include "Tasking/SpinLock.h"
#include "Utils/ErrorCodes.h"
Keyboard* Keyboard::current_instance = nullptr;
UniquePointer<FSNode> Keyboard::alloc(const StringView& name)
{
return UniquePointer<FSNode>(new Keyboard(name));
}
Keyboard::Keyboard(const StringView& name) :
FSNode{name, 0, 0, NodeType::Device, 1024},
m_lock{},
m_wait_queue{},
m_buffer{1024},
pressed_keys{false, false, false}
{
ASSERT(current_instance == nullptr);
current_instance = this;
m_lock.init();
PIC::enable_irq(PIC_KEYBOARD);
ISR::register_isr_handler(keyboard_driver_handler, PIC_KEYBOARD + PIC1_IDT_OFFSET);
}
Keyboard::~Keyboard()
{
}
Result<void> Keyboard::open(OpenMode mode, OpenFlags flags)
{
UNUSED(mode);
UNUSED(flags);
return ResultError(ERROR_SUCCESS);
}
Result<void> Keyboard::close()
{
return ResultError(ERROR_SUCCESS);
}
Result<void> Keyboard::read(void* buff, size_t offset, size_t size)
{
UNUSED(offset);
ScopedLock local_lock(m_lock);
while (m_buffer.size() < size) {
local_lock.release();
Thread::current->wait_on(m_wait_queue);
local_lock.acquire();
}
char* _buf = static_cast<char*>(buff);
for (size_t i = 0; i < size; i++) {
_buf[i] = m_buffer.dequeue();
}
return ResultError(ERROR_SUCCESS);
}
Result<bool> Keyboard::can_read()
{
ScopedLock local_lock(m_lock);
return m_buffer.is_empty();
}
void Keyboard::enqueue_keystoke(unsigned char data)
{
ScopedLock local_lock(m_lock);
if (data == 0x2A) // SHIFT Pressed
{
pressed_keys[0] = 1;
} else if (data == 0xAA) { // SHIFT Released
pressed_keys[0] = 0;
} else if ((data & 0x80) == 0) {
if (m_buffer.is_full()) {
m_buffer.dequeue(); // memory is full get rid of old keyboard strokes.
}
m_buffer.queue(asccode[data][pressed_keys[0]]);
m_wait_queue.wake_up_all();
}
}
void Keyboard::keyboard_driver_handler(ISRContextFrame* frame)
{
UNUSED(frame);
current_instance->enqueue_keystoke(in8(KBD_DATA_PORT));
PIC::acknowledge_pic(PIC_PIT);
}<file_sep>/kernel/VirtualMemory/Memory.cpp
#include "Memory.h"
#include "Tasking/ScopedLock.h"
StaticSpinlock Memory::lock;
void Memory::setup()
{
lock.init();
Paging::setup(get_kernel_pages());
PhysicalMemory::initialize();
PhysicalMemory::set_used_pages(GET_FRAME(KERNEL_PHYSICAL_ADDRESS), get_kernel_pages());
}
void Memory::setup_stage2()
{
setup_page_fault_handler();
}
void Memory::setup_page_fault_handler()
{
ISR::register_isr_handler(page_fault_handler, IRQ_NUMBER::PF);
}
void Memory::page_fault_handler(ISRContextFrame* isr_info)
{
// printf("Page= %X EIP=%X\t CS=%X\t ESP=%X \t\n", get_faulted_page(), isr_info->eip, isr_info->cs,
// isr_info->registers.esp);
if (!PF_PRESENT(isr_info->error_code)) {
PANIC("Page fault due accessing non-present page.");
} else if (PF_US(isr_info->error_code)) {
PANIC("Page fault due accessing kernel page from user mode.");
} else if (PF_WR(isr_info->error_code)) {
PANIC("Page fault due writing to read only page.");
}
}
void* Memory::alloc(uint32_t size, uint32_t flags)
{
ScopedLock local_lock(lock);
void* vAdd = _alloc_no_lock(size, flags);
return vAdd;
}
void* Memory::alloc(void* virtual_address, uint32_t size, uint32_t flags)
{
ScopedLock local_lock(lock);
void* vAdd = _alloc_no_lock(virtual_address, size, flags);
return vAdd;
}
void Memory::free(void* virtual_address, uint32_t size, uint32_t flags)
{
ScopedLock local_lock(lock);
_free_no_lock(virtual_address, size, flags);
}
void* Memory::map(uintptr_t physical_address, uint32_t size, uint32_t flags)
{
ScopedLock local_lock(lock);
void* vAdd = _map_no_lock(physical_address, size, flags);
return vAdd;
}
void Memory::unmap(void* virtual_address, uint32_t size, uint32_t flags)
{
ScopedLock local_lock(lock);
_unmap_no_lock(virtual_address, size, flags);
}
uintptr_t Memory::create_new_virtual_space()
{
uintptr_t page_directory = (uintptr_t)alloc(sizeof(PAGE_DIRECTORY), MEMORY_TYPE::WRITABLE | MEMORY_TYPE::KERNEL);
ScopedLock local_lock(lock);
Paging::map_kernel_pd_entries(page_directory);
Paging::unmap_pages(page_directory,
GET_PAGES(sizeof(PAGE_DIRECTORY))); // unmap pd from virtual memory but keep it in physical
uintptr_t physical_address = Paging::get_physical_page(page_directory) * PAGE_SIZE;
return physical_address;
}
unsigned Memory::virtual_memory_size()
{
ScopedLock local_lock(lock);
ASSERT_NOT_REACHABLE();
return 0;
}
unsigned Memory::physical_memory_size()
{
ScopedLock local_lock(lock);
return PhysicalMemory::get_physical_memory_size();
}
unsigned Memory::get_kernel_pages()
{
uintptr_t kernel_size = uintptr_t(&KERNEL_END) - uintptr_t(&KERNEL_START) - 1;
return GET_PAGES(kernel_size);
}
uint32_t Memory::parse_flags(uint32_t mem_flags)
{
uint32_t page_flags = PAGE_FLAGS_PRESENT;
if (mem_flags & MEMORY_TYPE::WRITABLE) {
page_flags |= PAGE_FLAGS_WRITABLE;
}
if (!(mem_flags & MEMORY_TYPE::KERNEL)) {
page_flags |= PAGE_FLAGS_USER;
}
return page_flags;
}
void Memory::switch_page_directory(uintptr_t physical_address)
{
Paging::load_page_directory(physical_address);
}
void* Memory::_map_no_lock(uintptr_t physical_address, uint32_t size, uint32_t flags)
{
uintptr_t vAdd;
uintptr_t padding = physical_address % PAGE_SIZE;
uintptr_t aligned_physical_address = physical_address - padding;
uintptr_t pAdd = GET_FRAME((uintptr_t)aligned_physical_address);
size_t pages_num = GET_PAGES(size);
if (padding)
pages_num++;
if (!size) {
return nullptr;
}
if (!PhysicalMemory::check_free_pages(pAdd, pages_num))
return nullptr;
if (flags & MEMORY_TYPE::KERNEL) {
vAdd = VirtualMemory::find_pages(KERNEL_VIRTUAL_ADDRESS, LAST_PAGE_ADDRESS, pages_num);
} else {
vAdd = VirtualMemory::find_pages(FIRST_PAGE_ADDRESS, KERNEL_VIRTUAL_ADDRESS,
pages_num); // skip first page to detect null pointer
}
PhysicalMemory::set_used_pages(pAdd, pages_num);
VirtualMemory::map_pages(vAdd, aligned_physical_address, GET_PAGES(size), parse_flags(flags));
return (void*)(vAdd + padding);
}
void Memory::_unmap_no_lock(void* virtual_address, uint32_t size, uint32_t flags)
{
_free_no_lock(virtual_address, size, flags);
}
void Memory::_free_no_lock(void* virtual_address, uint32_t size, uint32_t flags)
{
UNUSED(flags);
unsigned pages_num = GET_PAGES(size);
uintptr_t pAdd = Paging::get_physical_page((uintptr_t)virtual_address);
PhysicalMemory::free_pages(pAdd, pages_num);
Paging::unmap_pages((uintptr_t)virtual_address, pages_num);
}
void* Memory::_alloc_no_lock(void* virtual_address, uint32_t size, uint32_t flags)
{
uintptr_t vAdd;
unsigned pages_num = GET_PAGES(size);
vAdd = (uintptr_t)virtual_address;
if (!VirtualMemory::check_free_pages(vAdd, pages_num)) {
return nullptr;
}
for (size_t i = 0; i < pages_num; i++) {
uintptr_t pAdd = PhysicalMemory::alloc_page(AVAILABLE_PAGES_START);
VirtualMemory::map_pages(vAdd + (PAGE_SIZE * i), pAdd, 1, parse_flags(flags));
}
return (void*)vAdd;
}
void* Memory::_alloc_no_lock(uint32_t size, uint32_t flags)
{
uintptr_t vAdd;
unsigned pages_num = GET_PAGES(size);
if (flags & MEMORY_TYPE::KERNEL) {
vAdd = VirtualMemory::find_pages(KERNEL_VIRTUAL_ADDRESS, LAST_PAGE_ADDRESS, pages_num);
} else {
vAdd = VirtualMemory::find_pages(FIRST_PAGE_ADDRESS, KERNEL_VIRTUAL_ADDRESS,
pages_num); // skip first page to detect null pointer
}
for (size_t i = 0; i < pages_num; i++) {
uintptr_t pAdd = PhysicalMemory::alloc_page(AVAILABLE_PAGES_START);
VirtualMemory::map_pages(vAdd + (PAGE_SIZE * i), pAdd, 1, parse_flags(flags));
}
return (void*)vAdd;
}<file_sep>/kernel/Tasking/SystemCall.h
#pragma once
#include "Arch/x86/Context.h"
#include "Utils/Result.h"
#include "Utils/Types.h"
typedef Result<int> (*generic_syscall)(int arg0, int arg1, int arg2, int arg3, int arg4);
class SystemCall
{
private:
static generic_syscall systemcalls_routines[];
static unsigned syscalls_count;
static generic_syscall get_syscall_routine(unsigned syscall_num);
static void systemcall_handler(ISRContextFrame* frame);
public:
static void setup();
};
Result<int> OpenFile(char* path, int mode, int flags);
Result<int> ReadFile(unsigned descriptor, void* buff, size_t size);
Result<int> WriteFile(unsigned descriptor, void* buff, size_t size);
Result<int> CloseFile(unsigned descriptor);
Result<int> CreateThread(void* address, int arg);
Result<int> CreateRemoteThread(int process, void* address, int arg);
Result<int> CreateProcess(char* name, char* path, int flags);
Result<int> Sleep(size_t size);
Result<int> Yield();<file_sep>/kernel/Utils/Bitmap.h
#pragma once
#include "Types.h"
#define MAX_BITMAP_SIZE 24576
#define CHECK_BIT(value, bit) ((value >> bit) & 1)
#define BITMAP_NO_BITS_LEFT 0xFFFFFFFF
class Bitmap
{
private:
uint8_t* m_bitmap_data;
size_t m_size;
public:
Bitmap(size_t size);
~Bitmap();
void set_used(unsigned position);
void set_unused(unsigned position);
void set_used(unsigned position, unsigned count);
void set_unused(unsigned position, unsigned count);
unsigned find_first_unused(unsigned count);
unsigned find_first_used(unsigned count);
unsigned find_first_unused();
unsigned find_first_used();
};
<file_sep>/kernel/Arch/x86/Gdt.cpp
#include "Gdt.h"
volatile GDT_DESCRIPTOR GDT::gdt __attribute__((aligned(8)));
volatile GDT_ENTRY GDT::gdt_entries[GDT_NUMBER_OF_ENTRIES] __attribute__((aligned(PAGE_SIZE)));
volatile TSS_ENTRY GDT::tss_entry __attribute__((aligned(PAGE_SIZE)));
void GDT::setup()
{
memset((void*)&tss_entry, 0, sizeof(TSS_ENTRY));
memset((void*)&gdt_entries, 0, sizeof(GDT_ENTRY) * GDT_NUMBER_OF_ENTRIES);
fill_gdt((uint32_t)&gdt_entries, GDT_NUMBER_OF_ENTRIES * sizeof(GDT_ENTRY) - 1);
// Empty Entry
fill_gdt_entry(0, 0, 0, 0, 0);
// Kernel Segments
fill_gdt_entry(SEGMENT_INDEX(KCS_SELECTOR), 0, 0xFFFFF, GDT_CODE_PL0, 0x0D);
fill_gdt_entry(SEGMENT_INDEX(KDS_SELECTOR), 0, 0xFFFFF, GDT_DATA_PL0, 0x0D);
// User Entries
fill_gdt_entry(SEGMENT_INDEX(UCS_SELECTOR), 0, 0xFFFFF, GDT_CODE_PL3, 0x0D);
fill_gdt_entry(SEGMENT_INDEX(UDS_SELECTOR), 0, 0xFFFFF, GDT_DATA_PL3, 0x0D);
// TSS
fill_gdt_entry(SEGMENT_INDEX(TSS_SELECTOR), uint32_t(&tss_entry), sizeof(TSS_ENTRY), GDT_TSS_PL3, 0);
load_gdt();
load_segments(KCS_SELECTOR, KDS_SELECTOR);
setup_tss(0);
}
void GDT::set_tss_stack(uint32_t kernel_stack)
{
memset((void*)&tss_entry, 0, sizeof(TSS_ENTRY));
tss_entry.esp0 = kernel_stack;
tss_entry.ss0 = KDS_SELECTOR;
}
void GDT::setup_tss(uint32_t kernel_stack)
{
set_tss_stack(kernel_stack);
load_tss(TSS_SELECTOR);
}
void GDT::fill_gdt_entry(uint32_t gdt_entry, uint32_t base, uint32_t limit, uint8_t access, uint8_t flags)
{
gdt_entries[gdt_entry].base0_15 = base & 0x0000FFFF;
gdt_entries[gdt_entry].base16_23 = (base & 0x00FF0000) >> 16;
gdt_entries[gdt_entry].base24_31 = (base & 0xFF000000) >> 24;
gdt_entries[gdt_entry].lim0_15 = limit & 0xFFFF;
gdt_entries[gdt_entry].lim16_19 = (limit & 0x0F0000) >> 16;
gdt_entries[gdt_entry].access = access;
gdt_entries[gdt_entry].flags = flags;
}
void GDT::fill_gdt(uint32_t base, uint16_t limit)
{
gdt.base = base;
gdt.limit = limit;
}
void GDT::load_gdt()
{
asm volatile("LGDT [%0]" : : "r"(&gdt));
}
void GDT::load_tss(uint16_t tss)
{
asm volatile("LTR %0" : : "a"(tss));
}
void GDT::load_segments(uint16_t code_segment, uint16_t data_segment)
{
asm volatile("MOV %%ds,%0;"
"MOV %%es,%0;"
"MOV %%ss,%0;"
"MOV %%fs,%0;"
"MOV %%gs,%0;"
:
: "r"(data_segment));
asm volatile("PUSH %0;"
"PUSH OFFSET far_jmp;"
"RETF;"
"far_jmp:"
:
: "r"((uint32_t)code_segment));
}
<file_sep>/kernel/Utils/PathParser.h
#pragma once
#include "Utils/StringView.h"
#define SPLITER '/'
class PathParser
{
private:
const StringView m_path;
const size_t m_count;
size_t calc_count();
public:
explicit PathParser(const StringView& path);
~PathParser();
size_t count();
StringView element(size_t index);
bool is_valid();
};<file_sep>/kernel/Arch/x86/Context.cpp
#include "Context.h"
uint32_t Context::setup_task_stack_context(void* stack, uint32_t stack_size, uint32_t start_function,
uint32_t return_function, uint32_t argument)
{
InitialTaskContext* context =
reinterpret_cast<InitialTaskContext*>(uintptr_t(stack) + stack_size - sizeof(InitialTaskContext));
context->return_address = return_function;
context->argument = argument;
context->isr_frame.eip = start_function;
context->isr_frame.cs = KCS_SELECTOR;
context->isr_frame.eflags = EFLAGS_IF_ENABLE;
return uint32_t(&context->isr_frame) + 4;
}
void Context::switch_task_stack(uint32_t task_stack_start)
{
GDT::set_tss_stack(task_stack_start);
}
void Context::enter_usermode(uintptr_t address, uintptr_t stack)
{
asm volatile("MOV %%ds,%0;"
"MOV %%es,%0;"
"MOV %%fs,%0;"
"MOV %%gs,%0;"
"PUSH %0;"
"PUSH %1;"
"PUSH %2;"
"PUSH %3;"
"PUSH %4;"
"IRET;"
:
: "r"(uint16_t{UDS_SELECTOR}), "r"(uint32_t{stack}), "i"(uint32_t{EFLAGS_IF_ENABLE}),
"r"(uint32_t{UCS_SELECTOR}), "r"(uint32_t{address}));
}
void Context::set_return_value(ISRContextFrame* frame, uint32_t value)
{
frame->registers.eax = value;
}
void Context::set_return_arg1(ISRContextFrame* frame, uint32_t value)
{
frame->registers.ecx = value;
}
void Context::set_return_arg2(ISRContextFrame* frame, uint32_t value)
{
frame->registers.edx = value;
}
void Context::set_return_arg3(ISRContextFrame* frame, uint32_t value)
{
frame->registers.ebx = value;
}
uint32_t Context::syscall_num(ISRContextFrame* frame)
{
return frame->registers.eax;
}
uint32_t Context::syscall_param1(ISRContextFrame* frame)
{
return frame->registers.ecx;
}
uint32_t Context::syscall_param2(ISRContextFrame* frame)
{
return frame->registers.edx;
}
uint32_t Context::syscall_param3(ISRContextFrame* frame)
{
return frame->registers.ebx;
}
uint32_t Context::syscall_param4(ISRContextFrame* frame)
{
return frame->registers.esi;
}
uint32_t Context::syscall_param5(ISRContextFrame* frame)
{
return frame->registers.edi;
} | d6f47656616b48d9241db28b439185edb0883479 | [
"Markdown",
"C",
"CMake",
"C++"
] | 88 | C++ | doytsujin/CyanOS | bef23f340c119fb234e91287bcb6372609fd7ba3 | 28e7f2bb7e41ae5f2cb5ed8a0ddcd1983ef1dc0d | |
refs/heads/main | <repo_name>sunakan/todo-actixweb<file_sep>/Dockerfile
FROM rust:1-slim as builder
WORKDIR /var/local/app
COPY ./Cargo.* ./
RUN mkdir -p ./src && touch ./src/lib.rs
RUN cargo build --release
COPY ./src ./src
RUN cargo build --release
FROM debian:buster-slim
COPY --from=builder /var/local/app/target/release/todo-actixweb /usr/local/bin/todo-actixweb
CMD ["todo-actixweb"]
<file_sep>/Makefile
################################################################################
# 変数
################################################################################
HEROKU_APP_NAME := todo-actixweb
################################################################################
# タスク
################################################################################
.PHONY: heroku-login
heroku-login: ## heroku login
heroku login --interactive
.PHONY: heroku-create-app
heroku-create-app: ## heroku create ${HEROKU_APP_NAME}
(heroku apps | grep ${HEROKU_APP_NAME}) || heroku create ${HEROKU_APP_NAME}
.PHONY: heroku-container-login
heroku-container-login: ## heroku container:login
heroku container:login
.PHONY: heroku-build
heroku-build: ## heroku用のtagを付けたDocker imageをbuild
docker build . --tag registry.heroku.com/${HEROKU_APP_NAME}/web
.PHONY: heroku-push
heroku-push: ## heroku用のtagを付けたDocker imageをpush
docker push registry.heroku.com/${HEROKU_APP_NAME}/web
.PHONY: heroku-release
heroku-release: ## heroku で release
heroku container:release web
.PHONY: docker-build
docker-build: ## docker-compose build
docker-compose build
.PHONY: up
up: ## docker-compose up
docker-compose up
.PHONY: bash
bash: ## docker-compose run --rm --service-ports app bash
docker-compose run --rm --service-ports app bash
.PHONY: chown
chown: ## sudo chown -R ${USER}:${USER} ./
sudo chown -R ${USER}:${USER} ./
.PHONY: down
down: ## docker-compose down
docker-compose down
.PHONY: deploy
deploy: ## docker-compose down
git subtree push --prefix build/ origin gh-pages
################################################################################
# マクロ
################################################################################
# Makefileの中身を抽出してhelpとして1行で出す
# $(1): Makefile名
define help
grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(1) \
| grep --invert-match "## non-help" \
| awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
endef
################################################################################
# タスク
################################################################################
.PHONY: help
help: ## Make タスク一覧
@echo '######################################################################'
@echo '# Makeタスク一覧'
@echo '# $$ make XXX'
@echo '# or'
@echo '# $$ make XXX --dry-run'
@echo '######################################################################'
@echo $(MAKEFILE_LIST) \
| tr ' ' '\n' \
| xargs -I {included-makefile} $(call help,{included-makefile})
<file_sep>/src/main.rs
use actix_web::{App, HttpServer, Responder, web};
use std::{env, io};
use serde::{ Serialize, Deserialize };
use actix_web::http::StatusCode;
#[derive(Serialize)]
struct Status {
status: String,
}
#[derive(Serialize)]
struct GainedTodo {
id: u32,
title: String,
done: bool,
}
#[derive(Deserialize)]
struct TodoBeforeSave {
title: String,
}
#[derive(Serialize, Deserialize)]
struct SavedTodo {
id: u32,
title: String,
done: bool,
}
#[derive(Serialize)]
struct DeletedTodo {
id: u32,
}
async fn status() -> impl Responder {
web::HttpResponse::Ok().json(Status {
status: "Up".to_string(),
})
}
async fn todos() -> impl Responder {
let todos : Vec::<GainedTodo> = vec![];
web::HttpResponse::Ok().json(todos)
}
async fn create_todo(todo: web::Json<TodoBeforeSave>) -> impl Responder {
web::HttpResponse::Ok().json(SavedTodo {
id: 1,
title: todo.title.to_string(),
done: false,
}).with_status(StatusCode::CREATED)
}
async fn get_todo(id: web::Path<u32,>) -> impl Responder {
web::HttpResponse::Ok().json(SavedTodo {
id: id.0,
title: "dummy".to_string(),
done: false,
}).with_status(StatusCode::OK)
}
async fn done_todo(id: web::Path<u32,>) -> impl Responder {
web::HttpResponse::Ok().json(SavedTodo {
id: id.0,
title: "dummy".to_string(),
done: true,
}).with_status(StatusCode::OK)
}
async fn delete_todo(id: web::Path<u32,>) -> impl Responder {
web::HttpResponse::Ok().body("".to_string())
.with_status(StatusCode::NO_CONTENT)
}
#[actix_web::main]
async fn main() -> io::Result<()> {
let port = env::var("PORT")
.unwrap_or_else(|_| "8080".to_string())
.parse()
.expect("PORT must be a number");
HttpServer::new(move || {
App::new()
.route("/", web::get().to(status))
.route("/todos{_:/?}", web::get().to(todos))
.route("/todos{_:/?}", web::post().to(create_todo))
.route("/todos/{id}", web::get().to(get_todo))
.route("/todos/{id}", web::post().to(done_todo))
.route("/todos/{id}", web::delete().to(delete_todo))
})
.bind(("0.0.0.0", port))?
.run()
.await
}
| 50d6e45ebcbf69dd63389667b0c44b9cd0ee95d7 | [
"Rust",
"Makefile",
"Dockerfile"
] | 3 | Dockerfile | sunakan/todo-actixweb | 30d2f6b3c1d9c0e9b426502b347c6f0da6745e21 | 1d97eecce60eb75a788cfdf29c647bee9b747af3 | |
refs/heads/master | <file_sep>#include<iostream>
using namespace std;
int main()
{
int a[10],n;
cout<<"\nEnter size of array : ";
cin>>n;
cout<<"\nEnter the array : ";
for(int i=0;i<n;i++)
cin>>a[i];
//sorting the array implementing selection sort
for(int i=0;i<n-1;i++)
{
int min = i;
for(int j=i+1;j<n;j++)
{
if(a[j] < a[min])
min = j;
}
int temp = a[i];
a[i] = a[min];
a[min] = temp;
}
//the sorted array
cout<<"\n The Sorted array : ";
for(int i=0;i<n;i++)
cout<<a[i]<<" ";
return 0;
}<file_sep>#include<iostream>
using namespace std;
/*
Function Name: merge
Inputs: int arr[], int begin, int mid, int end
Logic:
"Merges" and sorts two subarrays of arr[] in ascending order.
The sub arrays are (begin, mid) and (mid+1, end)
Example Call: merge(arr, 0, 2, 4) Merges the first 5 elements of arr in acending order
*/
void merge(int arr[], int begin, int mid, int end) {
int i, j, k; // Looping Variables
int n1 = mid - begin + 1; // Number of elements in first sub-array
int n2 = end - mid; // Number of elements in second sub-array
// Create Temporary Arrays
int L[n1], R[n2];
// Copy data from array to temp arrays
for(i = 0; i < n1; i++) {
L[i] = arr[i+begin];
}
for(i = 0; i < n2; i++) {
R[i] = arr[i + mid + 1];
}
// Merge the arrays in ascending order
i = 0, j = 0, k = begin;
while(i < n1 && j < n2) {
if(L[i] <= R[j]) {
arr[k++] = L[i++];
} else {
arr[k++] = R[j++];
}
}
// Copy left over elements in L
while(i < n1) {
arr[k++] = L[i++];
}
// Copy left over elements in R
while(j < n2) {
arr[k++] = R[j++];
}
}
/*
Function name: mergeSort
Inputs: int arr[], int begin, int end
Logic: Sorts the given array recursively and using the merge function
Example Call: mergeSort(arr, 0, 3) sorts the first 4 elements of arr
*/
void mergeSort(int arr[], int begin, int end) {
if(begin < end) { // Run only if more than one element needs to be sorted.
// Find Midpoint to split array
int m = begin + (end - begin)/2; // Avoids overflow
//Sort first and second half arrays recursively
mergeSort(arr, begin, m);
mergeSort(arr, m+1, end);
//Merge the two half arrays
merge(arr, begin, m, end);
}
}
/*
Function name: printArray
Inputs: int A[], int size
Logic: Function to print an array
Example call: printArray(arr, 5) prints first 5 elements of arr
*/
void printArray(int A[], int size) {
for (int i=0; i < size; i++) {
cout << A[i] << " ";
}
cout << endl;
}
/*
Main Function
*/
int main() {
// Initialise Temporary Array, program may be modified later to input an array
int arr[] = {12, 11, 13, 5, 6, 7};
int arr_size = sizeof(arr)/sizeof(arr[0]);
cout << "Given Array is:\n";
printArray(arr, arr_size);
// Sort using mergeSort
mergeSort(arr, 0, arr_size - 1);
cout << "\nSorted array is \n";
printArray(arr, arr_size);
return 0;
}
<file_sep># Spider-0.2-Algo-Implementation | 61a45f81b78f60612ea776a06580254137bf81a0 | [
"Markdown",
"C++"
] | 3 | C++ | sidvenu/Spider-0.2-Algo-Implementation | d1e216c2dc5256bfab4f443403bf86fb3e1d4521 | e59114fdbbe29badb1a17a04ada96f612d84a434 | |
refs/heads/master | <repo_name>oanaucs/statistische_verfahren_2018<file_sep>/Statistische_Verfahren_03/Inseln.R
######## Blattläuse auf Inseln P3 ##########
data = read.csv('data/islands.csv')
laeuse = data$mf.presence + data$mt.presence
plot(data$no.ramet, laeuse)
plot(data$size, laeuse) # makes sense
plot(data$dist.isl.MF, data$mf.presence)
plot(data$dist.isl.MF, data$mt.presence)
plot(data$no.hab, laeuse) # useable
plot(data$dens.group, laeuse) #useable
plot(data$no.ramet, data$no.group)
# histogramm für trees und läuse
plot(data$mean.height, laeuse) # useable
plot(data$dist.group, laeuse) #useable
plot(data$mt.presence, data$mf.presence) # anders plotten
<file_sep>/README.md
# statistische_verfahren_2018
_________
Useful links:
https://www.datacamp.com/community/tutorials/logistic-regression-R
https://cran.r-project.org/doc/contrib/Faraway-PRA.pdf
| c1fabaed6c07362a8ee62dfe25db1e831d2424b5 | [
"Markdown",
"R"
] | 2 | R | oanaucs/statistische_verfahren_2018 | 2e6689ed35d91f97196af50914b9aa77cab5b5bf | eb9ec5457697d2fd14261030956aff4110596490 | |
refs/heads/master | <file_sep>var gulp = require('gulp');
var browserify = require('browserify');
var source = require('vinyl-source-stream');
var buffer = require('vinyl-buffer');
var uglify = require('gulp-uglify');
var config = require('../config');
gulp.task('javascript', ['clean'], function () {
var bundle = browserify(config.js.src, { debug: config.debug }).bundle().pipe(source(config.js.outName));
if (!config.debug) {
bundle = bundle.pipe(buffer()).pipe(uglify());
}
return bundle.pipe(gulp.dest(config.js.outDir));
});
<file_sep>var path = require('path');
var pkg = require('../package.json');
var prefix = pkg.name + '-' + pkg.version;
var target = 'dist';
var js = {
src: 'src/index.js',
outDir: target,
outName: prefix + '.js'
};
var less = {
src: 'src/index.less',
outDir: target,
outName: prefix + '.css'
};
module.exports = {
target: target,
debug: process.env.NODE_ENV !== 'production',
js: js,
less: less
};
<file_sep>Frontend Module Snippet
=======================
Build configuration placed in gulp-config/config.js
Development build `npm install`
Production build `NODE_ENV=production npm install`
<file_sep>var gulp = require('gulp');
var less = require('gulp-less');
var minifyCss = require('gulp-minify-css');
var sourceMaps = require('gulp-sourcemaps');
var rename = require('gulp-rename');
var config = require('../config');
gulp.task('styles', ['clean'], function () {
var bundle = gulp.src(config.less.src);
if (config.debug) {
bundle = bundle.pipe(sourceMaps.init()).
pipe(less()).
pipe(sourceMaps.write());
} else {
bundle = bundle.pipe(less()).
pipe(minifyCss());
}
return bundle.pipe(rename(config.less.outName)).
pipe(gulp.dest(config.less.outDir));
});
| af488c92b2bc253efc8a4525ae5161c922195b77 | [
"JavaScript",
"Markdown"
] | 4 | JavaScript | tkusto/frontend-seed | 65b46433fdf284d3fe06a4482e8a3a57d20cac56 | bfb9af8ff675263b8e81b2d71fadef81880e597c | |
refs/heads/master | <file_sep>**Grade:** 98/100
## Comments
Problem 1:
--- Part A: 2/2
--- Part B: 3/3
--- Part C: 5/5
--- Part D: 5/5
--- Part E: 5/5
--- Part F: 5/5
Problem 2:
--- Part A: 4/4
--- Part B: 4/4
--- Part C: 4/4
--- Part D: 4/4
--- Part E: 4/4
Problem 3:
--- Part A: 10/10
--- Part B: 8/8
--- Part C: 7/7
--- Part D: 5/5
Problem 4:
--- Part A: 1/3
--- Part B: 2/2
--- Part C: 5/5
--- Part D: 5/5
--- Part E: 5/5
--- Part F: 5/5
--- Comments: Wrong text model.
<file_sep>**Grade:** 100/100
## Comments
Problem 1:
--- Part A: 3/3
--- Part B: 4/4
--- Part C: 3/3
Problem 2:
--- Part A: 12/12
--- Part B: 12/12
--- Part C: 6/6
Problem 3:
--- Part A: 5/5
--- Part B: 10/10
--- Part C: 5/5
--- Part D: 5/5
--- Part E: 5/5
Problem 4:
--- Part A: 5/5
--- Part B: 10/10
--- Part C: 10/10
--- Part D: 5/5
<file_sep># Markov Chain Examples!!!
Before you go and get your hands dirty in my code, I'd suggest running the following command:
```sh
pip install -r requirements.txt
```
Have fun!
<file_sep><p align="center">
<h1 align="center">CSCI 4622 - Undergraduate Machine Learning</h1>
</p>
**Warning:** For all jupyter notebooks, they might look funny because GitHub has a crappy jupyter rendering system. I'd suggest cloning the repo and opening the notebooks.
**Notes:** This class was a special topics course, in Spring 2018, which covered a variety of stuff, but only section 002, taught by <NAME>, taught undergraduate ML. Also, this course will most likely be renamed **CSCI 4622** in future semesters, but when I took it, it had the course number of **CSCI 4831**.
This is a code dump for this class... Don't cheat!
<file_sep># Imports + Styles
import sys
import pickle, gzip
import numpy as np
import pandas as pd
from tqdm import tqdm
import matplotlib.pylab as plt
plt.style.use('bmh')
# Get the command line argument passed into the program
args = list(sys.argv[1:])
type_of_network = args[0]
print('You have chosen a', type_of_network, 'neural network')
# Import the correct network class
if type_of_network == 'basic':
from network import Network as Network
if type_of_network == 'tanh':
from network import tanhNetwork as Network
# Load the data
X_train, y_train, X_valid, y_valid = pickle.load(gzip.open("neural-nets-data/mnist21x21_3789_one_hot.pklz", "rb"))
# Train
etas = [0.01, 0.25, 1.5]
accuracies = []
for eta in etas:
print('Training the network with eta =', eta)
my_neural_network = Network([441, 100, 4])
my_neural_network.train(X_train, y_train, X_valid, y_valid, eta=eta, num_epochs=50, isPrint=False)
accuracies.append(my_neural_network.saved_valid_accuracies)
print('For eta = ', eta, ', the accuracy is ', my_neural_network.accuracy(X_valid, y_valid), ' on the validation data', sep='')
<file_sep># Imports + Styles
import pickle, gzip
import numpy as np
import pandas as pd
from tqdm import trange
import matplotlib.pylab as plt
plt.style.use('bmh')
# basic network class definition
class Network:
def __init__(self, sizes):
"""
Initialize the neural network
:param sizes: a list of the number of neurons in each layer
"""
# save the number of layers in the network
self.L = len(sizes)
# store the list of layer sizes
self.sizes = sizes
# initialize the bias vectors for each hidden and output layer
self.b = [np.random.randn(n) for n in self.sizes[1:]]
# initialize the matrices of weights for each hidden and output layer
self.W = [np.random.randn(n, m) for (m,n) in zip(self.sizes[:-1], self.sizes[1:])]
# initialize the derivatives of biases for backprop
self.db = [np.zeros(n) for n in self.sizes[1:]]
# initialize the derivatives of weights for backprop
self.dW = [np.zeros((n, m)) for (m,n) in zip(self.sizes[:-1], self.sizes[1:])]
# initialize the activities on each hidden and output layer
self.z = [np.zeros(n) for n in self.sizes]
# initialize the activations on each hidden and output layer
self.a = [np.zeros(n) for n in self.sizes]
# initialize the deltas on each hidden and output layer
self.delta = [np.zeros(n) for n in self.sizes]
# initialize the arrays that will contain the accuracies
self.saved_train_accuracies = []
self.saved_valid_accuracies = []
def g(self, z):
"""
sigmoid activation function
:param z: vector of activities to apply activation to
"""
z = np.clip(z, -20, 20)
return 1.0/(1.0 + np.exp(-z))
def g_prime(self, z):
"""
derivative of sigmoid activation function
:param z: vector of activities to apply derivative of activation to
"""
return self.g(z) * (1.0 - self.g(z))
def gradC(self, a, y):
"""
evaluate gradient of cost function for squared-loss C(a,y) = (a-y)^2/2
:param a: activations on output layer
:param y: vector-encoded label
"""
return (a - y)
def forward_prop(self, x):
"""
take an feature vector and propagate through network
:param x: input feature vector
"""
# Initialize activation on initial layer to x
self.a[0] = x
# Loop over layers and compute activities and activations
for ll in range(self.L-1):
self.z[ll+1] = np.dot(self.W[ll], self.a[ll]) + self.b[ll]
self.a[ll+1] = self.g(self.z[ll+1])
def predict(self, X):
"""
Predicts on the the data in X. Assume at least two output neurons so predictions
are one-hot encoded vectorized labels.
:param X: a matrix of data to make predictions on
:return y: a matrix of vectorized labels
"""
yhat = np.zeros((X.shape[0], self.sizes[-1]), dtype=int)
# Populate yhat with one-hot-coded predictions
for i, row in enumerate(X):
for ll in range(self.L-1):
z = np.dot(self.W[ll], row) + self.b[ll]
row = self.g(z)
yhat[i][np.argmax(row)] = 1
return yhat
def accuracy(self, X, y):
"""
compute accuracy on labeled training set
:param X: matrix of features
:param y: matrix of vectorized true labels
"""
yhat = self.predict(X)
return np.sum(np.all(np.equal(yhat, y), axis=1)) / X.shape[0]
def back_prop(self, x, y):
"""
Back propagation to get derivatives of C wrt weights and biases for given training example
:param x: training features
:param y: vector-encoded label
"""
# Forward prop training example to fill in activities and activations
self.forward_prop(x)
# Compute deltas on output layer
self.delta[-1] = self.gradC(self.a[-1], y)*self.g_prime(self.z[-1])
# Loop backward through layers, backprop deltas, compute dWs and dbs
for ll in range(self.L-2, -1, -1):
self.dW[ll] = np.outer(self.delta[ll+1], self.a[ll])
self.db[ll] = self.delta[ll+1]
self.delta[ll] = np.dot(self.W[ll].T, self.delta[ll+1])*self.g_prime(self.z[ll])
def train(self, X_train, y_train, X_valid=None, y_valid=None, eta=0.25, lam=0.0, num_epochs=10, isPrint=True):
"""
Train the network with SGD
:param X_train: matrix of training features
:param y_train: matrix of vector-encoded training labels
:param X_train: optional matrix of validation features
:param y_train: optional matrix of vector-encoded validation labels
:param eta: learning rate
:param lam: regularization strength
:param num_epochs: number of epochs to run
:param isPrint: flag indicating to print training progress or not
"""
# initialize shuffled indices
shuffled_inds = list(range(X_train.shape[0]))
# loop over training epochs
for ep in trange(num_epochs):
# shuffle indices
np.random.shuffle(shuffled_inds)
# loop over training examples
for ind in shuffled_inds:
# back prop to get derivatives
self.back_prop(X_train[ind, :], y_train[ind, :])
# update weights and biases
self.W = [Wll - eta*(dWll + lam*Wll) for Wll, dWll in zip(self.W, self.dW)]
self.b = [bll - eta*dbll for bll, dbll in zip(self.b, self.db)]
# occasionally print accuracy
if isPrint and ((ep+1)%5)==1:
self.epoch_report(ep, num_epochs, X_train, y_train, X_valid, y_valid)
# print final accuracy
if isPrint:
self.epoch_report(ep, num_epochs, X_train, y_train, X_valid, y_valid)
def epoch_report(self, ep, num_epochs, X_train, y_train, X_valid, y_valid):
"""
Print the accuracy for the given epoch on training and validation data
:param ep: the current epoch
:param num_epochs: the total number of epochs
:param X_train: matrix of training features
:param y_train: matrix of vector-encoded training labels
:param X_train: optional matrix of validation features
:param y_train: optional matrix of vector-encoded validation labels
"""
print("epoch {:3d}/{:3d}: ".format(ep+1, num_epochs), end="")
print(" train acc: {:8.3f}".format(self.accuracy(X_train, y_train)), end="")
self.saved_train_accuracies.append(self.accuracy(X_train, y_train))
if X_valid is not None: print(" valid acc: {:8.3f}".format(self.accuracy(X_valid, y_valid)))
else: print("")
if X_valid is not None: self.saved_valid_accuracies.append(self.accuracy(X_valid, y_valid))
# tanh network class definition
class tanhNetwork:
def __init__(self, sizes):
"""
Initialize the neural network
:param sizes: a list of the number of neurons in each layer
"""
# save the number of layers in the network
self.L = len(sizes)
# store the list of layer sizes
self.sizes = sizes
# initialize the bias vectors for each hidden and output layer
self.b = [np.random.randn(n) for n in self.sizes[1:]]
# initialize the matrices of weights for each hidden and output layer
self.W = [np.random.randn(n, m) for (m,n) in zip(self.sizes[:-1], self.sizes[1:])]
# initialize the derivatives of biases for backprop
self.db = [np.zeros(n) for n in self.sizes[1:]]
# initialize the derivatives of weights for backprop
self.dW = [np.zeros((n, m)) for (m,n) in zip(self.sizes[:-1], self.sizes[1:])]
# initialize the activities on each hidden and output layer
self.z = [np.zeros(n) for n in self.sizes]
# initialize the activations on each hidden and output layer
self.a = [np.zeros(n) for n in self.sizes]
# initialize the deltas on each hidden and output layer
self.delta = [np.zeros(n) for n in self.sizes]
# initialize the arrays that will contain the accuracies
self.saved_train_accuracies = []
self.saved_valid_accuracies = []
def g(self, z):
"""
sigmoid activation function
:param z: vector of activities to apply activation to
"""
# z = np.clip(z, -20, 20)
return np.tanh(z)
def g_prime(self, z):
"""
derivative of sigmoid activation function
:param z: vector of activities to apply derivative of activation to
"""
return 1 - self.g(z)**2
def gradC(self, a, y):
"""
evaluate gradient of cost function for squared-loss C(a,y) = (a-y)^2/2
:param a: activations on output layer
:param y: vector-encoded label
"""
return (a - y)
def forward_prop(self, x):
"""
take an feature vector and propagate through network
:param x: input feature vector
"""
# Initialize activation on initial layer to x
self.a[0] = x
# Loop over layers and compute activities and activations
for ll in range(self.L-1):
self.z[ll+1] = np.dot(self.W[ll], self.a[ll]) + self.b[ll]
self.a[ll+1] = self.g(self.z[ll+1])
def predict(self, X):
"""
Predicts on the the data in X. Assume at least two output neurons so predictions
are one-hot encoded vectorized labels.
:param X: a matrix of data to make predictions on
:return y: a matrix of vectorized labels
"""
yhat = np.zeros((X.shape[0], self.sizes[-1]), dtype=int)
# Populate yhat with one-hot-coded predictions
for i, row in enumerate(X):
for ll in range(self.L-1):
z = np.dot(self.W[ll], row) + self.b[ll]
row = self.g(z)
yhat[i][np.argmax(row)] = 1
return yhat
def accuracy(self, X, y):
"""
compute accuracy on labeled training set
:param X: matrix of features
:param y: matrix of vectorized true labels
"""
yhat = self.predict(X)
return np.sum(np.all(np.equal(yhat, y), axis=1)) / X.shape[0]
def back_prop(self, x, y):
"""
Back propagation to get derivatives of C wrt weights and biases for given training example
:param x: training features
:param y: vector-encoded label
"""
# Forward prop training example to fill in activities and activations
self.forward_prop(x)
# Compute deltas on output layer
self.delta[-1] = self.gradC(self.a[-1], y)*self.g_prime(self.z[-1])
# Loop backward through layers, backprop deltas, compute dWs and dbs
for ll in range(self.L-2, -1, -1):
self.dW[ll] = np.outer(self.delta[ll+1], self.a[ll])
self.db[ll] = self.delta[ll+1]
self.delta[ll] = np.dot(self.W[ll].T, self.delta[ll+1])*self.g_prime(self.z[ll])
def train(self, X_train, y_train, X_valid=None, y_valid=None, eta=0.25, lam=0.0, num_epochs=10, isPrint=True):
"""
Train the network with SGD
:param X_train: matrix of training features
:param y_train: matrix of vector-encoded training labels
:param X_train: optional matrix of validation features
:param y_train: optional matrix of vector-encoded validation labels
:param eta: learning rate
:param lam: regularization strength
:param num_epochs: number of epochs to run
:param isPrint: flag indicating to print training progress or not
"""
# initialize shuffled indices
shuffled_inds = list(range(X_train.shape[0]))
# loop over training epochs
for ep in trange(num_epochs):
# shuffle indices
np.random.shuffle(shuffled_inds)
# loop over training examples
for ind in shuffled_inds:
# back prop to get derivatives
self.back_prop(X_train[ind, :], y_train[ind, :])
# update weights and biases
self.W = [Wll - eta*(dWll + lam*Wll) for Wll, dWll in zip(self.W, self.dW)]
self.b = [bll - eta*dbll for bll, dbll in zip(self.b, self.db)]
# occasionally print accuracy
if isPrint and ((ep+1)%5)==1:
self.epoch_report(ep, num_epochs, X_train, y_train, X_valid, y_valid)
# print final accuracy
if isPrint:
self.epoch_report(ep, num_epochs, X_train, y_train, X_valid, y_valid)
def epoch_report(self, ep, num_epochs, X_train, y_train, X_valid, y_valid):
"""
Print the accuracy for the given epoch on training and validation data
:param ep: the current epoch
:param num_epochs: the total number of epochs
:param X_train: matrix of training features
:param y_train: matrix of vector-encoded training labels
:param X_train: optional matrix of validation features
:param y_train: optional matrix of vector-encoded validation labels
"""
print("epoch {:3d}/{:3d}: ".format(ep+1, num_epochs), end="")
print(" train acc: {:8.3f}".format(self.accuracy(X_train, y_train)), end="")
self.saved_train_accuracies.append(self.accuracy(X_train, y_train))
if X_valid is not None: print(" valid acc: {:8.3f}".format(self.accuracy(X_valid, y_valid)))
else: print("")
if X_valid is not None: self.saved_valid_accuracies.append(self.accuracy(X_valid, y_valid))
<file_sep># Imports
import markovify
# Get the data from a text file containing past senate bills
with open("senate-bills.txt") as f:
text = f.read()
# Initialize the Markov Chain with the senate bills data
text_model = markovify.Text(text)
# Print five randomly-generated sentences
print('RANDOMLY GENERATING 5 SENTENCES')
for i in range(5):
print('Sentence', i+1, '-', text_model.make_sentence())
# Print three randomly-generated sentences of no more than 140 characters
print('RANDOMLY GENERATING 3 SENTENCES THAT OR NO MORE THAN 140 CHARACTERS LONG')
for i in range(3):
print('Sentence', i+1, '-', text_model.make_short_sentence(140))
<file_sep>**Grade:** 95/100
## Comments
Problem 1:
--- Part A: 2/2
--- Part B: 2/2
--- Part C: 2/2
--- Part D: 2/2
--- Part E: 7/7
Problem 2:
--- Part A: 3/3
--- Part B: 12/12
--- Part C: 9/9
--- Part D: 3/3
--- Part E: 6/8
--- Comments: No commentary on optimal K in E.
Problem 3:
--- Part A: 8/8
--- Part B: 4/4
--- Part B: 3/3
Problem 4:
--- Part A: 5/5
--- Part B: 15/15
--- Part C: 5/5
--- Part D: 7/10
--- Comments: No commentary in part D.
<file_sep>**Grade:** 96/100
## Comments
Problem 1:
--- Part A: 5/5
--- Part B: 10/10
Problem 2:
--- Part A: 3/3
--- Part B: 5/5
--- Part C: 7/7
--- Part D: 5/5
Problem 3:
--- Part A: 5/5
--- Part B: 8/8
--- Part C: 10/10
--- Part D: 10/10
--- Part E: 7/7
Problem 4:
--- Part A: 5/5
--- Part B: 5/5
--- Part C: 3/5
--- Part D: 3/5
--- Part E: 3/5
--- Comments: C-E: No commentary.
Extra Credit: 2/10
--- Comments: No commentary.
<file_sep>**Grade:** 100/100
## Comments
Problem 1:
--- Part A: 2/2
--- Part B: 8/8
--- Part C: 5/5
Problem 2:
--- Part A: 15/15
--- Part B: 15/15
--- Part C: 5/5
Problem 3:
--- Part A: 5/5
--- Part B: 5/5
--- Part C: 10/10
--- Part D: 10/10
Problem 4:
--- Part A: 10/10
--- Part B: 10/10
| 71b517434f9e08c2b3c89076092a6576e42c1f33 | [
"Markdown",
"Python"
] | 10 | Markdown | johnletey/MachineLearning | 5d77c9726b573768e865cfc5f712b519baf1fa3a | 7e28629531ec25c0a48dc88ca99fbe206baf1bc0 | |
refs/heads/master | <repo_name>ContentCoderJian/RatingBarDemo2<file_sep>/app/src/main/java/com/example/mirsfang/ratingbardemo/MainActivity.java
package com.example.mirsfang.ratingbardemo;
import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
public class MainActivity extends Activity {
private static final String TAG="MyRatingBar";
Double a = 1.5;
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
RatingBar mRatingBar = (RatingBar) findViewById(R.id.ratingbar);
//点击之后的回调
mRatingBar.setOnRatingChangeListener(
new RatingBar.OnRatingChangeListener() {
@Override
public void onRatingChange(float RatingCount) {
Log.e(TAG,RatingCount+"");
}
}
);
//优先设置一定数量下的星星样式
RatingBar.Changed changed=mRatingBar.getChanged();
changed.setPosintion(2);
changed.setChangeDrawable(getResources().getDrawable(R.drawable.grabhb_yellow));
changed.setChangeHarlfDrawable(getResources().getDrawable(R.drawable.grabhb_yellowhalf));
mRatingBar.setChanged(changed);
//设置星星
mRatingBar.setStar(a.floatValue());
//设置正常下的星星的样式
mRatingBar.setmClickable(true);
mRatingBar.setStarImageSize(16f);
mRatingBar.setStarFillDrawable(getResources().getDrawable(R.drawable.grabhb_red));
mRatingBar.setStarHalfDrawable(getResources().getDrawable(R.drawable.grabhb_halfred));
}
}
<file_sep>/README.md
# RatingBarDemo2
自定义RatingBar,可以根据设置星星的数量改变样式
能设置在哪个星星哪里改变样式,能自由控制大小,更换图片

| f9511ad5b8bf129479ecbd4f8f74baa33c29aebc | [
"Markdown",
"Java"
] | 2 | Java | ContentCoderJian/RatingBarDemo2 | 20d7cdb460f38abf200add8e57aeb7b5c228f1ea | d261ca14aa4c7ddae95a35e61f8802296ae0b99e | |
refs/heads/master | <file_sep>package smp.presenters.buttons;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import javafx.beans.property.BooleanProperty;
import javafx.beans.property.DoubleProperty;
import javafx.beans.property.IntegerProperty;
import javafx.beans.property.ObjectProperty;
import javafx.beans.property.StringProperty;
import javafx.collections.ObservableList;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.image.ImageView;
import javafx.scene.input.MouseEvent;
import javafx.stage.Stage;
import javafx.stage.StageStyle;
import smp.models.staff.StaffNoteLine;
import smp.models.staff.StaffSequence;
import smp.models.stateMachine.ProgramState;
import smp.models.stateMachine.StateMachine;
import smp.models.stateMachine.Variables;
import smp.presenters.api.button.ImagePushButton;
import smp.views.OptionsWindowController;
/**
* This is the options button. It currently doesn't do anything.
*
* @author RehdBlob
* @since 2013.12.25
*/
public class OptionsButtonPresenter extends ImagePushButton {
//TODO: auto-add these model comments
//====Models====
private ObjectProperty<StaffSequence> theSequence;
private IntegerProperty defaultVelocity;
private StringProperty currentSoundset;
private BooleanProperty songModified;
/**
* Default constructor.
*
* @param optionsButton
* The image that we want to link this to.
* @param ct
* The FXML controller object.
* @param im
* The Image loader object.
*/
public OptionsButtonPresenter(ImageView optionsButton) {
super(optionsButton);
this.defaultVelocity = Variables.defaultVelocity;
this.theSequence = Variables.theSequence;
this.currentSoundset = StateMachine.getCurrentSoundset();
this.songModified = StateMachine.getSongModified();
}
@Override
protected void reactPressed(MouseEvent event) {
ProgramState curr = StateMachine.getState().get();
if (curr == ProgramState.EDITING)
try {
options();
} catch (IOException e) {
e.printStackTrace();
}
}
@Override
protected void reactReleased(MouseEvent event) {
// do nothing.
}
/** Opens up an options dialog.
* @throws IOException */
private void options() throws IOException {
final Stage dialog = new Stage();
initializeDialog(dialog);
FXMLLoader loader = new FXMLLoader();
OptionsWindowController owc = new OptionsWindowController();
loader.setController(owc);
loader.setLocation(new File(owc.getFXML()).toURI().toURL());
Scene scene1 = new Scene((Parent) loader.load());
dialog.setScene(scene1);
dialog.showAndWait();
while (dialog.isShowing()) {
try {
Thread.sleep(1);
} catch (InterruptedException e) {
// Do nothing
}
}
updateValues();
}
/**
* Sets the height, width, and other basic properties of this dialog box.
*
* @param dialog
* The dialog box that we are setting up.
*/
private void initializeDialog(Stage dialog) {
dialog.setHeight(280);
dialog.setWidth(250);
dialog.setResizable(false);
dialog.setTitle("Options");
dialog.initStyle(StageStyle.UTILITY);
}
/** Updates the different values of this program. */
private void updateValues() {
changeDefaultVol();
multiplyTempo();
changeSoundfont();
}
/** Updates the default volume of the program notes. */
private void changeDefaultVol() {
int vol = Variables.optionsDefaultVolume.get();
this.defaultVelocity.set(vol >= 128 ? 127 : vol);
}
/** Updates the tempo from the options dialog. */
private void multiplyTempo() {
String txt = Variables.optionsTempoMultiplier.get();
if (txt != null) {
int num = 1;
try {
num = Integer.parseInt(txt);
} catch (NumberFormatException e) {
return;
}
if (num <= 1)
return;
ObservableList<StaffNoteLine> s = this.theSequence.get().getTheLines();
ArrayList<StaffNoteLine> n = new ArrayList<StaffNoteLine>();
for (int i = 0; i < s.size(); i++) {
n.add(s.get(i));
for (int j = 0; j < num - 1; j++)
n.add(new StaffNoteLine());
}
s.clear();
s.addAll(n);
DoubleProperty tempo = this.theSequence.get().getTempo();
tempo.set(tempo.get() * num);
//TODO:
// controller.getModifySongManager().execute(new MultiplyTempoCommand(theStaff, num));
// controller.getModifySongManager().record();
}
}
/** Updates the program's soundfont, bind to song if checked. */
private void changeSoundfont() {
//TODO:
// SoundfontLoader sfLoader = controller.getSoundfontLoader();
// String selectedSoundfont = soundfontsMenu.getSelectionModel().getSelectedItem();
// try {
// sfLoader.loadFromAppData(selectedSoundfont);
// } catch (InvalidMidiDataException | IOException | MidiUnavailableException e) {
// e.printStackTrace();
// }
String newSoundset = Variables.optionsBindedSoundfont.get();
if(!theSequence.get().getSoundset().get().equals(newSoundset)) {
theSequence.get().setSoundset(newSoundset);
songModified.set(true);
}
}
}
<file_sep>package smp.components.buttons;
import javafx.scene.image.ImageView;
import javafx.scene.input.MouseEvent;
import javafx.scene.text.Text;
import smp.ImageLoader;
import smp.components.general.ImageToggleButton;
import smp.fx.SMPFXController;
import smp.stateMachine.ProgramState;
import smp.stateMachine.StateMachine;
/**
* The button that changes the mode of Super Mario Paint between arranger and
* song modes.
*
* @author RehdBlob
* @since 2014.05.21
*/
public class ModeButton extends ImageToggleButton {
/**
* This is the text field that displays the current mode of the program.
*/
private Text modeDisp;
/**
* This creates a new ModeButton object.
*
* @param i
* This <code>ImageView</code> object that you are trying to link
* this button with.
* @param ct
* The FXML controller object.
* @param im
* The Image loader object.
*/
public ModeButton(ImageView i, Text t, SMPFXController ct, ImageLoader im) {
super(i, ct, im);
modeDisp = t;
modeDisp.setText("Song");
}
@Override
public void reactPressed(MouseEvent event) {
ProgramState curr = StateMachine.getState();
if (curr != ProgramState.ARR_PLAYING && curr != ProgramState.SONG_PLAYING) {
if (curr == ProgramState.EDITING) {
modeDisp.setText("Arr");
theStaff.setArrangerMode(true);
controller.getClipboardLabel().setVisible(false);
controller.getClipboardButton().setVisible(false);
} else if (curr == ProgramState.ARR_EDITING) {
modeDisp.setText("Song");
theStaff.setArrangerMode(false);
controller.getClipboardLabel().setVisible(true);
controller.getClipboardButton().setVisible(true);
}
}
}
}
<file_sep>package smp.models.stateMachine;
/**
* These are the time signatures that we can select when using Super Mario
* Paint.
*
* @author RehdBlob
* @since 2013.06.28
*/
public enum TimeSignature {
/**
* These are different time signatures that we can have for the program.
*/
TWO_FOUR("2/4"), THREE_FOUR("3/4"), FOUR_FOUR("4/4"), SIX_FOUR("6/4"), THREE_EIGHT(
"3/8"), SIX_EIGHT("6/8"), TWELVE_EIGHT("12/8");
/** The number on the top. */
private int top;
/** The number on the bottom. */
private int bottom;
/** What happens when you try to display the time signature. */
private String displayName;
/** Sets up the display name of the time signature type. */
private TimeSignature(String disp) {
displayName = disp;
top = Integer.parseInt(disp.substring(0, disp.indexOf("/")));
bottom = Integer.parseInt(disp.substring(disp.indexOf("/") + 1));
}
/** @return The integer on the top. */
public int top() {
return top;
}
/** @return The integer on the bottom. */
public int bottom() {
return bottom;
}
@Override
public String toString() {
return displayName;
}
}
<file_sep>package smp;
import java.io.File;
import com.sun.javafx.application.LauncherImpl;
import javafx.application.Application;
import javafx.application.Platform;
import javafx.application.Preloader.ProgressNotification;
import javafx.application.Preloader.StateChangeNotification;
import javafx.beans.property.BooleanProperty;
import javafx.beans.property.SimpleBooleanProperty;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.concurrent.Task;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.fxml.FXMLLoader;
import javafx.geometry.Pos;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.scene.layout.FlowPane;
import javafx.scene.layout.VBox;
import javafx.stage.Stage;
import javafx.stage.StageStyle;
import javafx.stage.WindowEvent;
import smp.components.Values;
import smp.fx.SplashScreen;
import smp.stateMachine.Settings;
import smp.stateMachine.StateMachine;
import smp.views.MainWindowController;
/**
* Super Mario Paint <br>
* Based on the old SNES game from 1992, Mario Paint <br>
* Inspired by:<br>
* MarioSequencer (2002) <br>
* TrioSequencer <br>
* <NAME>'s Mario Paint Composer 1.0 / 2.0 (2007-2008) <br>
* FordPrefect's Advanced Mario Sequencer (2009) <br>
* The GUI is primarily written with JavaFX <br>
*
* Dev team:
* RehdBlob (2012 - current)
* j574y923 (2017 - current)
*
*
* @author RehdBlob
* @author j574y923
*
* @since 2012.08.16
* @version 1.1.1
*/
public class TestMain extends Application {
/**
* Location of the Main Window fxml file.
*/
private String mainFxml = "./MainWindow.fxml";
/**
* Location of the Advanced Mode (super secret!!) fxml file.
*/
@SuppressWarnings("unused")
private String advFxml = "./AdvWindow.fxml";
/**
* The number of threads that are running to load things for Super Mario
* Paint.
*/
private static final int NUM_THREADS = 2;
/**
* Loads all the sprites that will be used in Super Mario Paint.
*/
public static Loader imgLoader = new ImageLoader();
/**
* Loads the soundfonts that will be used in Super Mario Paint.
*/
public static Loader sfLoader = new SoundfontLoader();
/** Image Loader thread. */
private Thread imgLd;
/** Soundfont loader thread. */
private Thread sfLd;
/** This is the main application stage. */
private Stage primaryStage;
/** This is the primary Scene on the main application stage. */
private Scene primaryScene;
/** This is the loaded FXML file. */
private Parent root;
/**
* The controller class for the FXML.
*/
private MainWindowController controller = new MainWindowController();
/** Whether we are done loading the application or not. */
private BooleanProperty ready = new SimpleBooleanProperty(false);
/**
* This should hopefully get something up on the screen quickly. This is
* taken from http://docs.oracle.com/javafx/2/deployment/preloaders.htm
*/
private void longStart() {
// long init in background
Task<Void> task = new Task<Void>() {
@Override
protected Void call() throws Exception {
sfLd.start();
imgLd.start();
do {
try {
Thread.sleep(1);
} catch (InterruptedException e) {
e.printStackTrace();
}
double imgStatus = imgLoader.getLoadStatus();
double sfStatus = sfLoader.getLoadStatus();
double ld = (imgStatus + sfStatus) * 100 / NUM_THREADS
* 0.5;
notifyPreloader(new ProgressNotification(ld));
} while (imgLd.isAlive() || sfLd.isAlive());
FXMLLoader loader = new FXMLLoader();
loader.setController(controller);
loader.setLocation(new File(controller.getFXML()).toURI().toURL());
root = (Parent) loader.load();
ready.setValue(Boolean.TRUE);
return null;
}
};
new Thread(task).start();
}
/** Explicitly create constructor without arguments. */
public TestMain() {
}
/**
* Starts three <code>Thread</code>s. One of them is currently a dummy
* splash screen, the second an <code>ImageLoader</code>, and the third one
* a <code>SoundfontLoader</code>.
*
* @see ImageLoader
* @see SoundfontLoader
* @see SplashScreen
*/
@Override
public void init() {
imgLd = new Thread(imgLoader);
sfLd = new Thread(sfLoader);
}
/**
* Starts the application and loads the FXML file that contains a lot of the
* class hierarchy.
*
* @param primaryStage
* The primary stage that will be showing the main window of
* Super Mario Paint.
*/
@Override
public void start(Stage ps) {
primaryStage = ps;
longStart();
ready.addListener(new ChangeListener<Boolean>() {
@Override
public void changed(ObservableValue<? extends Boolean> ov,
Boolean t, Boolean t1) {
if (Boolean.TRUE.equals(t1)) {
Platform.runLater(new Runnable() {
@Override
public void run() {
try {
primaryStage.setTitle("Super Mario Paint " + Settings.version);
setupCloseBehaviour(primaryStage);
primaryStage.setResizable(false);
primaryStage.setHeight(Values.DEFAULT_HEIGHT);
primaryStage.setWidth(Values.DEFAULT_WIDTH);
primaryScene = new Scene(root, 800, 600);
primaryStage.setScene(primaryScene);
new KeyboardListeners(primaryStage);
notifyPreloader(new ProgressNotification(1));
notifyPreloader(new StateChangeNotification(
StateChangeNotification.Type.BEFORE_START));
primaryStage.show();
} catch (Exception e) {
e.printStackTrace();
System.exit(1);
}
}
});
}
}
});
;
}
/**
* Protip for JavaFX users: Make sure you define your application close
* behavior.
*/
@Override
public void stop() {
// Platform.exit();
System.exit(0);
}
/**
* Got this off of https://community.oracle.com/thread/2247058?tstart=0 This
* appears quite useful as a 'really exit?' type thing. This dialog
* currently needs some work, so we're not going to include it in the alpha
* release.
*
* @param primaryStage
* The main stage of interest.
*/
private void setupCloseBehaviour(final Stage primaryStage) {
primaryStage.setOnCloseRequest(new EventHandler<WindowEvent>() {
@Override
public void handle(WindowEvent event) {
if (StateMachine.isSongModified()
|| StateMachine.isArrModified()) {
final Stage dialog = new Stage();
dialog.setHeight(100);
dialog.setWidth(300);
dialog.setResizable(false);
dialog.initStyle(StageStyle.UTILITY);
Label label = new Label();
label.setMaxWidth(300);
label.setWrapText(true);
if (StateMachine.isSongModified()
&& StateMachine.isArrModified()) {
label.setText("The song and arrangement have\n"
+ "both not been saved! Really exit?");
} else if (StateMachine.isSongModified()) {
label.setText("The song has not been saved! "
+ "Really exit?");
} else if (StateMachine.isArrModified()) {
label.setText("The arrangement has not been saved! "
+ "Really exit?");
}
Button okButton = new Button("Yes");
okButton.setOnAction(new EventHandler<ActionEvent>() {
@Override
public void handle(ActionEvent event) {
dialog.close();
stop();
}
});
Button cancelButton = new Button("No");
cancelButton.setOnAction(new EventHandler<ActionEvent>() {
@Override
public void handle(ActionEvent event) {
dialog.close();
}
});
FlowPane pane = new FlowPane(10, 10);
pane.setAlignment(Pos.CENTER);
pane.getChildren().addAll(okButton, cancelButton);
VBox vBox = new VBox(10);
vBox.setAlignment(Pos.CENTER);
vBox.getChildren().addAll(label, pane);
Scene scene1 = new Scene(vBox);
dialog.setScene(scene1);
dialog.show();
} else {
stop();
}
event.consume();
}
});
}
/**
* Launches the application.
*
* @param args
* Sets debug options on or off.
*/
public static void main(String[] args) {
if (args.length == 0) {
try {
LauncherImpl.launchApplication(TestMain.class,
SplashScreen.class, args);
} catch (Exception e) {
e.printStackTrace();
}
} else if (args.length > 0
&& (args[0].equals("--debug") || args[0].equals("--d"))) {
if (args[1] != null) {
try {
Settings.setDebug(Integer.parseInt(args[1]));
} catch (NumberFormatException e) {
Settings.setDebug(1);
}
} else {
Settings.setDebug(1);
}
try {
LauncherImpl.launchApplication(TestMain.class,
SplashScreen.class, args);
} catch (Exception e) {
e.printStackTrace();
}
}
}
}
<file_sep>package smp.presenters.staff;
import java.util.ArrayList;
import javafx.beans.property.DoubleProperty;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.scene.Node;
import javafx.scene.image.ImageView;
import javafx.scene.layout.HBox;
import smp.ImageIndex;
import smp.ImageLoader;
import smp.models.stateMachine.StateMachine;
public class StaffPlayBarsPresenter {
// TODO: auto-add these model comments
// ====Models====
private DoubleProperty measureLineNumber;
private HBox staffPlayBars;
private ArrayList<ImageView> staffPlayBarsIV;
// TODO: set
private ImageLoader il;
public StaffPlayBarsPresenter(HBox staffPlayBars) {
this.staffPlayBars = staffPlayBars;
initializeStaffPlayBars(this.staffPlayBars);
this.measureLineNumber = StateMachine.getMeasureLineNum();
setupViewUpdater();
}
/**
* Sets up the note highlighting functionality.
*
* @param staffPlayBars
* The bars that move to highlight different notes.
*/
private void initializeStaffPlayBars(HBox playBars) {
staffPlayBarsIV = new ArrayList<ImageView>();
for (Node n : playBars.getChildren()) {
ImageView i = (ImageView) n;
i.setImage(il.getSpriteFX(ImageIndex.PLAY_BAR1));
i.setVisible(false);
staffPlayBarsIV.add(i);
}
}
private void setupViewUpdater() {
this.measureLineNumber.addListener(new ChangeListener<Number>() {
@Override
public void changed(ObservableValue<? extends Number> observable, Number oldValue, Number newValue) {
// TODO:
}
});
}
}
<file_sep>package smp.presenters.buttons;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.StreamCorruptedException;
import java.text.ParseException;
import javafx.beans.property.BooleanProperty;
import javafx.beans.property.ObjectProperty;
import javafx.beans.property.StringProperty;
import javafx.scene.image.ImageView;
import javafx.scene.input.MouseEvent;
import javafx.stage.FileChooser;
import smp.fx.Dialog;
import smp.models.staff.StaffArrangement;
import smp.models.staff.StaffSequence;
import smp.models.stateMachine.ProgramState;
import smp.models.stateMachine.StateMachine;
import smp.models.stateMachine.Variables;
import smp.presenters.api.button.ImagePushButton;
import smp.presenters.api.load.MPCDecoder;
import smp.presenters.api.load.Utilities;
/**
* This is the button that loads a song.
*
* @author RehdBlob
* @since 2013.09.28
*/
public class LoadButtonPresenter extends ImagePushButton {
//TODO: auto-add these model comments
//====Models====
private ObjectProperty<StaffSequence> theSequence;
private ObjectProperty<StaffArrangement> theArrangement;
private StringProperty theSequenceName;
private BooleanProperty songModified;
private BooleanProperty arrModified;
private ObjectProperty<File> currentDirectory;
private StringProperty theArrangementName;
private ObjectProperty<ProgramState> programState;
/**
* Default constructor.
*
* @param loadButton
* This is the <code>ImageView</code> object that will house the
* Load button.
* @param ct
* The FXML controller object.
* @param im
* The Image loader object.
*/
public LoadButtonPresenter(ImageView loadButton) {
super(loadButton);
this.theSequenceName = Variables.theSequenceName;
this.theSequence = Variables.theSequence;
this.theArrangementName = Variables.theArrangementName;
this.theArrangement = Variables.theArrangement;
this.songModified = StateMachine.getSongModified();
this.arrModified = StateMachine.getArrModified();
this.currentDirectory = StateMachine.getCurrentDirectory();
this.programState = StateMachine.getState();
}
@Override
protected void reactPressed(MouseEvent event) {
load();
}
@Override
protected void reactReleased(MouseEvent event) {
// do nothing.
}
/** This loads the song or arrangement. */
private void load() {
ProgramState curr = this.programState.get();
if (curr == ProgramState.EDITING)
loadSong();
else if (curr == ProgramState.ARR_EDITING)
loadArrangement();
}
/** This loads a song. */
private void loadSong() {
boolean cont = true;
if (this.songModified.get())
cont = Dialog
.showYesNoDialog("The current song has been modified!\n"
+ "Load anyway?");
File inputFile = null;
if (cont) {
try {
FileChooser f = new FileChooser();
f.setInitialDirectory(this.currentDirectory.get());
inputFile = f.showOpenDialog(null);
if (inputFile == null)
return;
this.currentDirectory.set(new File(inputFile.getParent()));
loadSong(inputFile);
} catch (Exception e) {
Dialog.showDialog("Not a valid song file.");
e.printStackTrace();
}
}
}
/** This loads a song, given a file. */
private void loadSong(File inputFile) {
//TODO: only set a new staffsequence for the theSequence model,
//TODO: let all the other presenters update themselves...
try {
StaffSequence loaded = null;
try {
loaded = MPCDecoder.decode(inputFile);
} catch (ParseException e1) {
loaded = Utilities.loadSong(inputFile);
}
if (loaded == null) {
throw new IOException();
}
// String fname = Utilities.populateStaff(loaded, inputFile, false,
// theStaff, controller);
boolean mpc = false;
String fname = inputFile.getName();
if (mpc)
fname = fname.substring(0, fname.lastIndexOf(']'));
else
fname = fname.substring(0, fname.lastIndexOf("."));
this.theSequence.set(loaded);
this.theSequenceName.set(fname);
this.songModified.set(false);
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
Dialog.showDialog("Problem loading file!");
e.printStackTrace();
} catch (Exception e) {
Dialog.showDialog("Not a valid song file.");
e.printStackTrace();
}
}
/** This loads an arrangement. */
private void loadArrangement() {
//TODO: only set a new staffarrangement for the theArrangement model,
//TODO: let all the other presenters update themselves...
boolean cont = true;
if (this.songModified.get() || this.arrModified.get()) {
if (this.songModified.get() && this.arrModified.get()) {
cont = Dialog
.showYesNoDialog("The current song and arrangement\n"
+ "have both been modified!\nLoad anyway?");
} else if (this.songModified.get()) {
cont = Dialog
.showYesNoDialog("The current song has been modified!\n"
+ "Load anyway?");
} else if (this.arrModified.get()) {
cont = Dialog
.showYesNoDialog("The current arrangement has been\n"
+ "modified! Load anyway?");
}
}
File inputFile = null;
if (cont) {
try {
FileChooser f = new FileChooser();
f.setInitialDirectory(this.currentDirectory.get());
inputFile = f.showOpenDialog(null);
if (inputFile == null)
return;
this.currentDirectory.set(new File(inputFile.getParent()));
StaffArrangement loaded = Utilities.loadArrangement(inputFile);
Utilities.normalizeArrangement(loaded, inputFile);
// Utilities.populateStaffArrangement(loaded, inputFile, false,
// theStaff, controller);
this.theArrangement.set(loaded);
this.theArrangementName.set(inputFile.getName());
this.songModified.set(false);
this.arrModified.set(false);
} catch (ClassNotFoundException | StreamCorruptedException
| NullPointerException e) {
try {
StaffArrangement loaded = MPCDecoder
.decodeArrangement(inputFile);
StateMachine.setCurrentDirectory(new File(inputFile.getParent()));
Utilities.normalizeArrangement(loaded, inputFile);
// Utilities.populateStaffArrangement(loaded, inputFile, true,
// theStaff, controller);
this.theArrangement.set(loaded);
this.theArrangementName.set(inputFile.getName());
this.songModified.set(false);
} catch (Exception e1) {
e1.printStackTrace();
Dialog.showDialog("Not a valid arrangement file.");
}
} catch (IOException e) {
e.printStackTrace();
}
}
}
}
<file_sep>package smp.presenters.api.clipboard;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.scene.control.Slider;
import javafx.scene.layout.Pane;
import javafx.scene.paint.Color;
import javafx.scene.shape.Rectangle;
import javafx.scene.text.Text;
import smp.components.Values;
import smp.stateMachine.StateMachine;
/**
* The rubber band is just a rectangle that gets resized by the mouse. It is a
* model to hold boundary information. The bounds can then be used to represent
* a region encapsulating notes useful for clipboard functions like copy.
*
* Adapted from https://github.com/varren/JavaFX-Resizable-Draggable-Node
*/
public class StaffRubberBand extends Rectangle {
private double xOrigin;
private double yOrigin;
private double lineMinBound = 0;
private double lineMaxBound = 0;
private double positionMinBound = 0;
private double positionMaxBound = 0;
private double volumeYMaxCoord = 0;
private double lineSpacing = 0;
private double positionSpacing = 0;
private double marginVertical = 0;
private double marginHorizontal = 0;
private int scrollOffset = 0;
private int originLine = 0;
private Text outsideBoundText = new Text();
public StaffRubberBand() {
super();
this.setFill(StaffClipboard.HIGHLIGHT_FILL);
outsideBoundText.setFill(Color.RED);
}
/**
* Adds a change listener to slider. Every change that occurs will
* horizontally resize the rubberband.
*
* @param slider
*/
public void setScrollBarResizable(Slider slider) {
slider.valueProperty().addListener(new ChangeListener<Number>() {
@Override
public void changed(ObservableValue<? extends Number> arg0, Number oldVal, Number newVal) {
// only xOrigin will move so we need to get the other x bound that will remain the same
double sameEndX = 0;
if (getTranslateX() < xOrigin) {
sameEndX = getTranslateX();
} else {// if (rbRef.getTranslateX() == xOrigin)
sameEndX = getTranslateX() + getWidth();
}
int change = newVal.intValue() - oldVal.intValue();
applyScroll(change);
// resizeBand(sameEndX, getTranslateY()); doesn't work for some reason...
// do this instead
if (sameEndX >= xOrigin) {
setTranslateX(xOrigin);
setWidth(sameEndX - xOrigin);
} else {
setTranslateX(sameEndX);
setWidth(xOrigin - sameEndX);
}
displayBoundsText();
}
});
}
/**
* Displays bounds text at either the left or right edge of the rubberband,
* whichever is cut off. This tells us where the line bound is. Adds the out
* of bounds text in the rubberBandLayer if bound goes off the window.
* Removes the out of bounds text if in the window.
*/
public void displayBoundsText() {
Pane rubberBandLayer = (Pane) getParent();
if (rubberBandLayer == null)
return;
int relativeScrollOffset = scrollOffset + originLine;
if (relativeScrollOffset < 0 || Values.NOTELINES_IN_THE_WINDOW < relativeScrollOffset) {
if (!rubberBandLayer.getChildren().contains(outsideBoundText)) {
rubberBandLayer.getChildren().add(outsideBoundText);
double transX = relativeScrollOffset < 0 ? getTranslateX() + 10 : getTranslateX() + getWidth() - 40;
outsideBoundText.setTranslateX(transX);
outsideBoundText.setTranslateY(getTranslateY() + getHeight());
}
if(relativeScrollOffset < 0){
int outsideBoundLineNum = (relativeScrollOffset + StateMachine.getMeasureLineNum()) / 4 + 1;
int numerator = (relativeScrollOffset + StateMachine.getMeasureLineNum()) % 4 + 1;
outsideBoundText.setText(outsideBoundLineNum + " " + getFraction(numerator) + " . . .");
} else {
int outsideBoundLineNum = (relativeScrollOffset + StateMachine.getMeasureLineNum() - 1) / 4 + 1;
int numerator = (relativeScrollOffset + StateMachine.getMeasureLineNum() - 1) % 4 + 1;
outsideBoundText.setText(". . . " + outsideBoundLineNum + " " + getFraction(numerator));
}
} else {
rubberBandLayer.getChildren().remove(outsideBoundText);
}
}
private String getFraction(int numerator) {
char numeratorCharacter;
switch (numerator) {
case 1:
numeratorCharacter = '\u2071';
break;
case 2:
numeratorCharacter = '\u00B2';
break;
case 3:
numeratorCharacter = '\u00B3';
break;
case 4:
numeratorCharacter = '\u2074';
break;
default:
numeratorCharacter = '\u2071';
break;
}
//return "x/4"
return numeratorCharacter + "\u2044\u2084";
}
/**
* Updates scrollOffset with change then updates xOrigin.
*
* @param change scroll delta
*/
public void applyScroll(int change) {
//note -change because xOrigin moves other way
int begPos = scrollOffset + originLine;
int endPos = scrollOffset - change + originLine;
int xOriginChange = Math.max(0, Math.min(endPos, Values.NOTELINES_IN_THE_WINDOW))
- Math.max(0, Math.min(begPos, Values.NOTELINES_IN_THE_WINDOW));
xOrigin = Math.max(lineMinBound, Math.min(xOrigin + lineSpacing * xOriginChange, lineMaxBound));
//if xOrigin moves out of bounds still, set min and max bound positioning
if(xOriginChange == 0) {
if(Values.NOTELINES_IN_THE_WINDOW < endPos)
xOrigin = lineMaxBound;
else if(endPos < 0)
xOrigin = lineMinBound;
}
scrollOffset -= change;
}
/**
* Makes rubber band visible. First, call this to begin drawing the rubber
* band.
*
* @param x
* x-coord to begin rectangle shape at
* @param y
* y-coord to begin rectangle shape at
*/
public void begin(double x, double y) {
if (x < lineMinBound - marginHorizontal || x > lineMaxBound + marginHorizontal
|| y < positionMinBound - marginVertical
|| y > Math.max(volumeYMaxCoord, positionMaxBound + marginVertical)) {
return;
}
this.setWidth(0);
this.setHeight(0);
this.setTranslateX(x);
this.setTranslateY(y);
this.setVisible(true);
xOrigin = x;
yOrigin = y;
scrollOffset = 0;
originLine = getLineBegin();
}
/**
* Redraws the rubber band to a new size. Second call this.
*
* Note: this method isn't called resize because the JavaFX API uses a
* function of that name.
*
* @param x
* x-coord to resize to
* @param y
* y-coord to resize to
*/
public void resizeBand(double x, double y) {
if (x > lineMaxBound + marginHorizontal) {
x = lineMaxBound + marginHorizontal;
} else if (x < lineMinBound - marginHorizontal) {
x = lineMinBound - marginHorizontal;
}
if (y > Math.max(volumeYMaxCoord, positionMaxBound + marginVertical)) {
y = Math.max(volumeYMaxCoord, positionMaxBound + marginVertical);
} else if (y < positionMinBound - marginVertical) {
y = positionMinBound - marginVertical;
}
if (x >= xOrigin) {
this.setTranslateX(xOrigin);
this.setWidth(x - xOrigin);
} else {
this.setTranslateX(x);
this.setWidth(xOrigin - x);
}
if (y >= yOrigin) {
this.setTranslateY(yOrigin);
this.setHeight(y - yOrigin);
} else {
this.setTranslateY(y);
this.setHeight(yOrigin - y);
}
}
/**
* Second call this to redraw the rubber band to a new size. Alters only x
* dimension.
*
* @param x x-coord to resize to
*/
@Deprecated
public void resizeX(double x){
// if (x > Constants.WIDTH_DEFAULT) {
// x = Constants.WIDTH_DEFAULT;
// } else if (x < 0) {
// x = 0;
// }
if (x >= xOrigin) {
this.setTranslateX(xOrigin);
this.setWidth(x - xOrigin);
} else {
this.setTranslateX(x);
this.setWidth(xOrigin - x);
}
}
/**
* Second call this to redraw the rubber band to a new size. Alters only y
* dimension.
*
* @param y y-coord to resize to
*/
@Deprecated
public void resizeY(double y){
// if (y > Constants.HEIGHT_DEFAULT) {
// y = Constants.HEIGHT_DEFAULT;
// } else if (y < 0) {
// y = 0;
// }
if (y >= yOrigin) {
this.setTranslateY(yOrigin);
this.setHeight(y - yOrigin);
} else {
this.setTranslateY(y);
this.setHeight(yOrigin - y);
}
}
/**
* Ends drawing the rubber band and hide it. Sets rubber band invisible.
* Lastly call this.
*/
public void end() {
this.setVisible(false);
Pane rubberBandLayer = (Pane)this.getParent();
if(rubberBandLayer != null)
rubberBandLayer.getChildren().remove(outsideBoundText);
}
/**
*
* @return beginning line of rubberband relative to the current frame of lines
*/
public int getLineBegin() {
return scrollOffset < 0 ? getLineBeginRaw() + scrollOffset + originLine : getLineBeginRaw();
}
private int getLineBeginRaw() {
double bandMinX = this.getTranslateX();
if (bandMinX < lineMinBound + lineSpacing / 2) {
return 0;
} else if (bandMinX > lineMaxBound - lineSpacing / 2) {
return Values.NOTELINES_IN_THE_WINDOW;
} else {
double firstLineX = (lineMinBound + lineSpacing / 2);
return (int) ((bandMinX - firstLineX) / lineSpacing) + 1;
}
}
/**
*
* @return ending line of rubberband relative to the current frame of lines
*/
public int getLineEnd() {
return scrollOffset > 0 ? getLineEndRaw() + scrollOffset + originLine : getLineEndRaw();
}
private int getLineEndRaw() {
double bandMaxX = this.getTranslateX() + this.getWidth();
if (bandMaxX < lineMinBound + lineSpacing / 2) {
return -1;
} else if (bandMaxX > lineMaxBound - lineSpacing / 2) {
return Values.NOTELINES_IN_THE_WINDOW - 1;
} else {
double firstLineX = (lineMinBound + lineSpacing / 2);
return (int) ((bandMaxX - firstLineX) / lineSpacing);
}
}
public int getPositionBegin() {
double bandBottomPosY = this.getTranslateY() + this.getHeight();
if (bandBottomPosY < positionMinBound + positionSpacing / 2) {
return Values.NOTES_IN_A_LINE - 1;
} else if (bandBottomPosY > positionMaxBound - positionSpacing / 2) {
return 0;//-1;
} else {
double firstPosY = positionMinBound;// + positionSpacing / 2;
//this is half because positions overlap one another
double positionHalfSpacing = positionSpacing / 2;
return Values.NOTES_IN_A_LINE - (int)((bandBottomPosY - firstPosY) / positionHalfSpacing);// - 1;
}
}
public int getPositionEnd() {
double bandTopPosY = this.getTranslateY();
if (bandTopPosY < positionMinBound + positionSpacing / 2) {
return Values.NOTES_IN_A_LINE - 1;
} else if (bandTopPosY > positionMaxBound - positionSpacing / 2) {
return 0;//0;
} else {
double firstPosY = positionMinBound;// + positionSpacing / 2;
//this is half because positions overlap one another
double positionHalfSpacing = positionSpacing / 2;
return Values.NOTES_IN_A_LINE - (int)((bandTopPosY - firstPosY) / positionHalfSpacing) - 1;
}
}
public void setLineMinBound(double x) {
lineMinBound = x;
}
public void setLineMaxBound(double x) {
lineMaxBound = x;
}
public void setPositionMinBound(double y) {
positionMinBound = y;
}
public void setPositionMaxBound(double y) {
positionMaxBound = y;
}
public void setVolumeYMaxCoord(double y) {
volumeYMaxCoord = y;
}
public void setLineSpacing(double dx) {
lineSpacing = dx;
}
public void setPositionSpacing(double dy) {
positionSpacing = dy;
}
public void setMarginVertical(double m) {
marginVertical = m;
}
public void setMarginHorizontal(double m) {
marginHorizontal = m;
}
}
<file_sep>package smp.presenters;
import javafx.beans.property.ObjectProperty;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.scene.text.Text;
import smp.models.staff.StaffSequence;
import smp.models.stateMachine.Variables;
import smp.presenters.api.reattachers.SequenceReattacher;
public class TempoIndicatorPresenter {
//TODO: auto-add these model comments
//====Models====
private ObjectProperty<StaffSequence> theSequence;
private Text tempoIndicator;
private SequenceReattacher sequenceReattacher;
public TempoIndicatorPresenter(Text tempoIndicator) {
this.tempoIndicator = tempoIndicator;
this.theSequence = Variables.theSequence;
this.sequenceReattacher = new SequenceReattacher(this.theSequence);
setupViewUpdater();
}
private void setupViewUpdater() {
tempoIndicator.textProperty().bind(theSequence.get().getTempo().asString());
sequenceReattacher.setOnReattachListener(new ChangeListener<StaffSequence>() {
@Override
public void changed(ObservableValue<? extends StaffSequence> observable, StaffSequence oldValue,
StaffSequence newValue) {
StaffSequence newSequence = (StaffSequence) newValue;
tempoIndicator.textProperty().unbind();
tempoIndicator.textProperty().bind(newSequence.getTempo().asString());
}
});
}
}
<file_sep>package smp.components.buttons;
import javafx.scene.image.ImageView;
import javafx.scene.input.MouseEvent;
import smp.ImageIndex;
import smp.ImageLoader;
import smp.components.general.ImageRadioButton;
import smp.fx.SMPFXController;
import smp.stateMachine.ProgramState;
import smp.stateMachine.StateMachine;
/**
* Wrapper class for an ImageView that holds the stop button image. Pressing the
* button changes the image and also changes the state of the program.
*
* @author RehdBlob
* @since 2012.09.14
*/
public class StopButton extends ImageRadioButton {
/**
* Instantiates the stop button.
*
* @param i
* The ImageView that will be manipulated by this class.
* @param ct
* The FXML controller object.
* @param im
* The Image loader object.
*/
public StopButton(ImageView i, SMPFXController ct, ImageLoader im) {
super(i, ct, im);
getImages(ImageIndex.STOP_PRESSED, ImageIndex.STOP_RELEASED);
pressImage();
isPressed = true;
}
@Override
public void reactPressed(MouseEvent e) {
if (e != null) {
theStaff.stopSounds();
}
if (isPressed)
return;
super.reactPressed(e);
if (StateMachine.getState() == ProgramState.SONG_PLAYING) {
StateMachine.setState(ProgramState.EDITING);
theStaff.stopSong();
} else if (StateMachine.getState() == ProgramState.ARR_PLAYING) {
StateMachine.setState(ProgramState.ARR_EDITING);
theStaff.stopSong();
}
}
}
<file_sep>package smp.presenters;
import java.util.ArrayList;
import javafx.beans.property.BooleanProperty;
import javafx.beans.property.ObjectProperty;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.collections.ObservableList;
import javafx.event.EventHandler;
import javafx.scene.Node;
import javafx.scene.image.ImageView;
import javafx.scene.input.MouseEvent;
import javafx.scene.layout.HBox;
import javax.sound.midi.MidiChannel;
import smp.ImageIndex;
import smp.ImageLoader;
import smp.SoundfontLoader;
import smp.TestMain;
import smp.components.Values;
import smp.components.InstrumentIndex;
import smp.components.staff.sequences.Note;
import smp.models.staff.StaffSequence;
import smp.models.stateMachine.Settings;
import smp.models.stateMachine.Variables;
import smp.presenters.api.reattachers.SequenceReattacher;
/**
* The line of buttons that appear for the Instrument Line at the top of the
* user interface for Super Mario Paint. The user selects the instrument that
* they're using here. Clicking on a portrait causes a sound to play while the
* active instrument is changed.
*
* @author RehdBlob
* @since 2012.08.21
*/
public class InstLinePresenter {
//TODO: auto-add these model comments
//====Models====
private ObjectProperty<StaffSequence> theSequence;
private ObjectProperty<InstrumentIndex> selectedInstrument;
/**
* The default note number.
*/
private static int DEFAULT_NOTE;
/**
* An ArrayList of ImageView objects being used as buttons.
*/
private ArrayList<ImageView> buttons = new ArrayList<ImageView>();
/** This is a list of names for the different instrument line instruments. */
private ArrayList<String> instrumentLineImages = new ArrayList<String>();
/** This is the image loader class. */
private ImageLoader il = (ImageLoader) TestMain.imgLoader;
/**
* The MidiChannel array objects that will be holding references for
* sound-playing capabilities.
*/
private MidiChannel[] chan;
private SequenceReattacher sequenceReattacher;
/**
* Initializes the ImageView ArrayList.
*
* @param i
* An ArrayList of ImageView references intended to be displayed
* as an instrument line.
*/
public InstLinePresenter(HBox instLine) {
for (Node i : instLine.getChildren())
buttons.add((ImageView) i);
setupButtons();
DEFAULT_NOTE = Note.A3.getKeyNum();
/*
* For some reason, the piranha and coin are flipped in all soundfonts.
* The solution here is unfortunately to just flip the images.
*/
ObservableList<Node> n = instLine.getChildren();
Node nd = n.remove(15);
n.add(16, nd);
this.theSequence = Variables.theSequence;
this.selectedInstrument = Variables.selectedInstrument;
this.sequenceReattacher = new SequenceReattacher(this.theSequence);
setupViewUpdater();
}
/**
* Initializes the buttons with event handlers.
*/
public void setupButtons() {
int ind = 0;
for (final InstrumentIndex i : InstrumentIndex.values()) {
if (ind > Values.NUMINSTRUMENTS - 1) {
break;
}
instrumentLineImages.add(i.toString());
buttons.get(i.getChannel() - 1).setOnMousePressed(
new EventHandler<MouseEvent>() {
@Override
public void handle(MouseEvent event) {
if (event.isShiftDown()) {
toggleNoteExtension(i);
event.consume();
} else {
selectedInstrument.set(i);
playSound(i);
event.consume();
}
}
});
ind++;
}
try {
chan = SoundfontLoader.getChannels();
} catch (NullPointerException e) {
System.err.println("Unable to load soundfont channels.");
System.exit(1);
}
}
/**
* Plays the default "A" sound when selecting an instrument.
*
* @param i
* The InstrumentIndex for the instrument
*/
public void playSound(InstrumentIndex i) {
int ind = i.getChannel() - 1;
if (chan[ind] != null) {
chan[ind].noteOn(DEFAULT_NOTE, Values.MAX_VELOCITY);
if (Settings.debug > 0)
System.out.println("Channel " + (ind + 1) + " Instrument: "
+ i.name());
}
}
/**
* Updates the note extensions display at the instrument selection line.
*/
@Deprecated
public void updateNoteExtensions() {
for (int j = 0; j < Values.NUMINSTRUMENTS; j++) {
// changePortrait(j, ext[j].get());
}
}
/**
* Sets the selected instrument to extend mode.
*
* @param i
* The instrument that we are trying to set to extend.
*/
private void toggleNoteExtension(InstrumentIndex i) {
BooleanProperty[] ext = this.theSequence.get().getNoteExtensions();
ext[i.getChannel() - 1].set(!ext[i.getChannel() - 1].get());
}
/**
* Toggles the portrait display of the instrument index.
*
* @param i
* The index at which we want to modify.
* @param b
* If we want note extensions, the box will be of a different
* color.
*/
private void changePortrait(int i, boolean b) {
if (!b) {
buttons.get(i).setImage(
il.getSpriteFX(ImageIndex.valueOf(instrumentLineImages
.get(i) + "_SM")));
} else {
buttons.get(i).setImage(
il.getSpriteFX(ImageIndex.valueOf(
instrumentLineImages.get(i) + "_SM").alt()));
}
}
/**
* @param n
* The Note that all of the InstrumentLine instruments will play
* when clicked on.
*/
public void setDefaultNote(Note n) {
DEFAULT_NOTE = n.getKeyNum();
}
private void setupViewUpdater() {
for (int i = 0; i < Values.NUMINSTRUMENTS; i++) {
final int index = i;
this.sequenceReattacher.setNewNoteExtensionListener(index, new ChangeListener<Boolean>() {
@Override
public void changed(ObservableValue<? extends Boolean> observable, Boolean oldValue, Boolean newValue) {
changePortrait(index, newValue.booleanValue());
}
});
}
this.sequenceReattacher.setOnReattachListener(new ChangeListener<StaffSequence>() {
@Override
public void changed(ObservableValue<? extends StaffSequence> observable, StaffSequence oldValue,
StaffSequence newValue) {
BooleanProperty[] ext = newValue.getNoteExtensions();
for (int i = 0; i < Values.NUMINSTRUMENTS; i++) {
changePortrait(i, ext[i].get());
}
}
});
}
}<file_sep>package smp.presenters.buttons;
import java.io.File;
import javafx.beans.property.BooleanProperty;
import javafx.beans.property.IntegerProperty;
import javafx.beans.property.ObjectProperty;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.collections.ObservableList;
import javafx.scene.image.ImageView;
import javafx.scene.input.MouseEvent;
import smp.models.staff.StaffArrangement;
import smp.models.staff.StaffSequence;
import smp.models.stateMachine.ProgramState;
import smp.models.stateMachine.Settings;
import smp.models.stateMachine.StateMachine;
import smp.models.stateMachine.Variables;
import smp.presenters.api.button.ImagePushButton;
/**
* This is a button that moves a song on an arrangement.
*
* @author RehdBlob
* @since 2014.07.27
*/
public class DownButtonPresenter extends ImagePushButton {
//TODO: auto-add these model comments
//====Models====
private IntegerProperty arrangementListSelectedIndex;
private BooleanProperty arrModified;
private ObjectProperty<StaffArrangement> theArrangement;
private ObjectProperty<ProgramState> programState;
/** The amount to move a song up or down. */
private int moveAmt = 0;
/**
* Default constructor.
*
* @param downButton
* The <code>ImageView</code> object that we are going to make
* into a button.
* @param ct
* The FXML controller object.
* @param im
* The Image loader object.
*/
public DownButtonPresenter(ImageView downButton) {
super(downButton);
moveAmt = -1;
this.arrangementListSelectedIndex = Variables.arrangementListSelectedIndex;
this.arrModified = StateMachine.getArrModified();
this.theArrangement = Variables.theArrangement;
this.programState = StateMachine.getState();
setupViewUpdater();
}
@Override
protected void reactPressed(MouseEvent event) {
ProgramState curr = StateMachine.getState().get();
if (curr != ProgramState.ARR_PLAYING) {
if ((Settings.debug & 0b100000) != 0)
System.out.println("Move song " + moveAmt);
ObservableList<String> l = this.theArrangement.get().getTheSequenceNames();
int x = this.arrangementListSelectedIndex.get();
if (x != -1) {
this.arrModified.set(true);
Object[] o = this.theArrangement.get().remove(x);
String s = l.remove(x);
StaffSequence ss = (StaffSequence) o[0];
File f = (File) o[1];
int moveTo = x - moveAmt;
if (moveTo > l.size())
moveTo = l.size();
if (moveTo < 0)
moveTo = 0;
l.add(moveTo, s);
this.theArrangement.get().add(moveTo, ss, f);
this.arrangementListSelectedIndex.set(moveTo);
}
}
}
@Override
protected void reactReleased(MouseEvent event) {
}
private void setupViewUpdater() {
theImage.setVisible(false);
this.programState.addListener(new ChangeListener<Object>() {
@Override
public void changed(ObservableValue<? extends Object> observable, Object oldValue, Object newValue) {
if (newValue.equals(ProgramState.EDITING))
theImage.setVisible(false);
else if (newValue.equals(ProgramState.ARR_EDITING))
theImage.setVisible(true);
}
});
}
}
<file_sep>package smp.models.stateMachine;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.Serializable;
/**
* A loadable settings file that determines whatever is supposed
* to display eventually on the screen.
* @author RehdBlob
* @since 2012.08.28
*/
public class Settings {
/** The current version number of this program. */
public final static String version = "v1.1.2";
/** The name of the file that we write to. */
private final static String settingsFile = "settings.data";
/** Change this to true for old functionality of serializing objects. */
public final static boolean SAVE_OBJECTS = false;
/**
* Classic debug on/off. Level 1.
* 0b10000 - Print staff value every time it changes.
* Set to -1 for max debug.
*/
public static int debug = 0;
/**
* If Advanced mode is unlocked, this is set to <b>true</b>
*/
private static boolean advModeUnlocked = false;
/**
* Limit the number of notes per line to 5.
*/
public static boolean LIM_NOTESPERLINE = true;
/**
* Limit the number of measures to 96.
*/
public static boolean LIM_96_MEASURES = true;
/**
* Limit the number of volume control lines to
* 1 per line.
*/
public static boolean LIM_VOLUME_LINE = true;
/**
* Enable or disable the Low A note as a usable
* note. Default is disabled.
*/
public static boolean LIM_LOWA = true;
/**
* Enable or disable the High D note as a usable
* note. Default is disabled.
*/
public static boolean LIM_HIGHD = true;
/**
* Turn on the Low A Glitch or not.
*/
public static boolean LOW_A_ON = true;
/**
* Cause fun things to happen when negative tempo is
* entered. Otherwise, the tempo will be set to ludicrous
* speeds if this is not enabled.
*/
public static boolean NEG_TEMPO_FUN = false;
/**
* Turn tempo gaps on or off. Most likely people won't want this
* and maybe it'll be removed.
*/
public static boolean LIM_TEMPO_GAPS = false;
/**
* Be able to resize the window to get to the Secret Button.
*/
public static boolean RESIZE_WIN = false;
/**
* Advanced mode. All of these options don't matter when this is pressed
* because a completely different interface is loaded when this is set to
* true...
*/
public static boolean ADV_MODE = false;
/**
* Sets whether we want to see debug mode or not.
* @param b Debug level.
*/
public static void setVerbose(int b) {
debug = b;
}
/** Used to save settings via object serialization. */
private static class SettingsSaver implements Serializable {
/**
* Generated Serial ID.
*/
private static final long serialVersionUID = -3844082395768911493L;
/** The number of setting types that we have. */
private transient final int NUM_SETTINGS = 11;
/** The array of settings that we are going to initialize. */
public boolean[] set = new boolean[NUM_SETTINGS];
/** Initializes all of the fields in here. */
public SettingsSaver() {
set[0] = advModeUnlocked;
set[1] = LIM_NOTESPERLINE;
set[2] = LIM_96_MEASURES;
set[3] = LIM_VOLUME_LINE;
set[4] = LIM_LOWA;
set[5] = LIM_HIGHD;
set[6] = LOW_A_ON;
set[7] = NEG_TEMPO_FUN;
set[8] = LIM_TEMPO_GAPS;
set[9] = RESIZE_WIN;
set[10] = ADV_MODE;
}
}
/**
* Saves the settings of the program.
* @throws IOException If we can't write the object.
*/
public static void save() throws IOException {
FileOutputStream f_out = new
FileOutputStream(settingsFile);
ObjectOutputStream o_out = new
ObjectOutputStream(f_out);
SettingsSaver s = new SettingsSaver();
o_out.writeObject(s);
o_out.close();
f_out.close();
}
/**
* Unserializes this Settings file.
* @throws IOException If for some reason we can't load
* the settings.
* @throws ClassNotFoundException If for some reason we can't find
* the settings file file.
*/
public static void load()
throws IOException, ClassNotFoundException {
FileInputStream f_in = new
FileInputStream (settingsFile);
ObjectInputStream o_in = new
ObjectInputStream(f_in);
SettingsSaver loaded = (SettingsSaver) o_in.readObject();
advModeUnlocked = loaded.set[0];
LIM_NOTESPERLINE = loaded.set[1];
LIM_96_MEASURES = loaded.set[2];
LIM_VOLUME_LINE = loaded.set[3];
LIM_LOWA = loaded.set[4];
LIM_HIGHD = loaded.set[5];
LOW_A_ON = loaded.set[6];
NEG_TEMPO_FUN = loaded.set[7];
LIM_TEMPO_GAPS = loaded.set[8];
RESIZE_WIN = loaded.set[9];
ADV_MODE = loaded.set[10];
o_in.close();
f_in.close();
}
/**
* Sets the debug switch on or off.
* @param b Debug level.
*/
public static void setDebug(int b) {
debug = b;
}
}
<file_sep>package smp.models.stateMachine;
import java.io.File;
import java.util.HashSet;
import javafx.beans.property.BooleanProperty;
import javafx.beans.property.DoubleProperty;
import javafx.beans.property.ObjectProperty;
import javafx.beans.property.SimpleBooleanProperty;
import javafx.beans.property.SimpleDoubleProperty;
import javafx.beans.property.SimpleObjectProperty;
import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;
import javafx.collections.FXCollections;
import javafx.collections.ObservableSet;
import javafx.scene.input.KeyCode;
import smp.components.Values;
import smp.models.staff.StaffSequence;
/**
* This is the state machine that keeps track of what state the main window is
* in. This class keeps track of a bunch of variables that the program generally
* uses.
*
* @author RehdBlob
* @since 2012.08.07
*/
public class StateMachine {
/** This tells us whether we have modified the song or not. */
private static BooleanProperty modifiedSong = new SimpleBooleanProperty(false);
/** This tells us whether we have modified the arrangement or not. */
private static BooleanProperty modifiedArr = new SimpleBooleanProperty(false);
/** This keeps track of whether we have pressed the loop button or not. */
private static BooleanProperty loopPressed = new SimpleBooleanProperty(false);
/** This keeps track of whether we have pressed the mute button or not. */
private static BooleanProperty mutePressed = new SimpleBooleanProperty(false);
/**
* This keeps track of whether we have pressed the low A mute button or not.
*/
private static BooleanProperty muteAPressed = new SimpleBooleanProperty(false);
/**
* This keeps track of whether we have pressed the clipboard button or not.
*/
private static BooleanProperty clipboardPressed = new SimpleBooleanProperty(false);
/**
* The file directory that we are currently located in. We'll start in the
* user directory.
*/
private static ObjectProperty<File> currentDirectory = new SimpleObjectProperty<>(new File(System.getProperty("user.dir")));
/** Set of currently-pressed buttons. */
private static ObservableSet<KeyCode> buttonsPressed = FXCollections
.synchronizedObservableSet(FXCollections.observableSet(new HashSet<KeyCode>()));
/**
* The default state that the program is in is the EDITING state, in which
* notes are being placed on the staff.
*/
private static ObjectProperty<ProgramState> currentState = new SimpleObjectProperty<>(ProgramState.EDITING);
/**
* The default time signature that we start out with is 4/4 time.
*/
private static ObjectProperty<TimeSignature> currentTimeSignature = new SimpleObjectProperty<>(TimeSignature.FOUR_FOUR);
public static class CurrentLineProperty extends SimpleDoubleProperty {
//TODO: auto-add these model comments
//====Models====
private ObjectProperty<StaffSequence> theSequence;
public CurrentLineProperty(double initialValue) {
super(initialValue);
this.theSequence = Variables.theSequence;
}
@Override
public void set(double value) {
value = value > 0 ? value : 0;
int max = this.theSequence.get().getTheLinesSize().get() - Values.NOTELINES_IN_THE_WINDOW;
value = value < max ? value : max;
super.set(value);
}
}
/**
* The current measure line number that the program is on. Typically a
* number between 0 and 383. This is zero by default.
*/
private static DoubleProperty currentLine = new CurrentLineProperty(0);
/**
* The current soundset name. This should change when a new soundfont is
* loaded.
*/
private static StringProperty currentSoundset = new SimpleStringProperty(Values.DEFAULT_SOUNDFONT);
/**
* Do not make an instance of this class! The implementation is such that
* several classes may check the overall state of the program, so there
* should only ever be just the class and its static variables and methods
* around.
*
* @deprecated
*/
private StateMachine() {
}
/**
* Get the current <code>State</code> of the <code>StateMachine</code>
*
* @return The current <code>State</code>.
*/
public static ObjectProperty<ProgramState> getState() {
return currentState;
}
/**
* @param s
* Set the <code>StateMachine</code> to a certain State.
*/
public static void setState(ProgramState s) {
currentState.set(s);
}
/**
* Sets the state back to "Editing" by default.
*/
public static void resetState() {
currentState.set(ProgramState.EDITING);
}
/**
* @return The current time signature that we are running at.
*/
public static ObjectProperty<TimeSignature> getTimeSignature() {
return currentTimeSignature;
}
/**
* Sets the time signature to whatever that we give this method.
*
* @param t
* The new time signature.
*/
public static void setTimeSignature(TimeSignature t) {
currentTimeSignature.set(t);
}
/** Sets the time signature back to "4/4" by default. */
public static void resetTimeSignature() {
currentTimeSignature.set(TimeSignature.FOUR_FOUR);
}
/**
* Gets the current line number that we're on. Typically a value between 0
* and 383 for most files unless you've done fun stuff and removed the
* 96-measure limit.
*
* @return The current line number (left justify)
*/
public static DoubleProperty getMeasureLineNum() {
return currentLine;
}
/**
* Sets the current line number to whatever is given to this method.
*
* @param num
* The number that we're trying to set our current line number
* to.
*/
public static void setMeasureLineNum(int num) {
currentLine.set(num);
}
/** Sets that the song is now loop-enabled. */
public static void setLoopPressed(boolean b) {
loopPressed.set(b);
}
/** @return Whether the loop button is pressed or not. */
public static BooleanProperty getLoopPressed() {
return loopPressed;
}
/** Sets the fact that mute notes are now enabled. */
public static void setMutePressed(boolean b) {
mutePressed.set(b);
}
/** @return Whether the mute button is pressed or not. */
public static BooleanProperty getMutePressed() {
return mutePressed;
}
/**
* Sets the modified flag to true or false.
*
* @param b
* Whether we have modified a song or not.
*/
public static void setSongModified(boolean b) {
modifiedSong.set(b);
}
/**
* @return Whether we have modified the current song or not.
*/
public static BooleanProperty getSongModified() {
return modifiedSong;
}
/**
* @param b
* Whether we have modified an arrangement or not.
*/
public static void setArrModified(boolean b) {
modifiedArr.set(b);
}
/**
* @return Whether we have modified the current arrangement or not.
*/
public static BooleanProperty getArrModified() {
return modifiedArr;
}
/**
* @param b
* Whether we have pressed the low A mute button.
*/
public static void setMuteAPressed(boolean b) {
muteAPressed.set(b);
}
/**
* @return Whether our mute-all button is pressed or not.
*/
public static BooleanProperty getMuteAPressed() {
return muteAPressed;
}
/**
* @since 08.2017
*/
public static void setClipboardPressed(boolean b) {
clipboardPressed.set(b);
}
public static BooleanProperty getClipboardPressed() {
return clipboardPressed;
}
/**
* @return Set of currently-pressed buttons.
*/
public static ObservableSet<KeyCode> getButtonsPressed() {
return buttonsPressed;
}
/**
* Clears the set of key presses in this program.
*/
public static void clearKeyPresses() {
buttonsPressed.clear();
}
/** @return Last directory we accessed. */
public static ObjectProperty<File> getCurrentDirectory() {
return currentDirectory;
}
/** @param cDir Set current directory to this. */
public static void setCurrentDirectory(File cDir) {
StateMachine.currentDirectory.set(cDir);
}
/**
* @return The current soundset name.
* @since v1.1.2
*/
public static StringProperty getCurrentSoundset() {
return currentSoundset;
}
/**
* @param soundset
* Set current soundset to this.
* @since v1.1.2
*/
public static void setCurrentSoundset(String soundset) {
StateMachine.currentSoundset.set(soundset);
}
}
<file_sep>Super Mario Paint
==========
* Current Version: 1.4.2
Help would be very much appreciated! If you manage to debug something, submit a pull request and I'll review it and (hopefully) merge it in.
Based off of the original Mario Paint on the SNES from 1992, MarioSequencer (2002), TrioSequencer, Mario Paint Composer 1.0 / 2.0 (<NAME>, 2007-2008), and FordPrefect86's Advanced Mario Sequencer (2009). This will be a free program when completed, open to those who want to download it.
Accepting cryptocurrency donations!
* Bitcoin (BTC): 1TyycsRVPUMgW1QDgafNSUpB2emh3p4TL
* Litecoin (LTC): LX35qPaA7NAdWNjUnWcugZqd8zbNkMvpia
Major Releases:
-----
See "Version History.txt" for semantic versioning and more release notes.
* June 7, 2020 - v1.4.1 release with some backend upgrades carried over from v1.3.0
* June 2, 2020 - v1.4.0 release 'Giant Mario Paint', second major functionality upgrade
* March 2019 - Addition of team members Seymour & CyanSMP64
* March 9, 2019 - v1.3.0 release
* March 4, 2019 - v1.2.1 release
* February 4, 2018 - v1.1.1 release
* January 29, 2018 - First relatively major functionality upgrade, v1.1.0
* June 2017 - Addition of team member j574y923
* March 14, 2016 - First full functionality release, v1.0.0
* January 5, 2015 - v0.95~0.951 - Beta Release
* January 1-3, 2015 - v0.94~0.942 - Pre-Beta (Arranger)
* December 31, 2014 - v0.921 - Alpha (Mac + Windows)
* December 30, 2014 - v0.92 - Alpha (Stability Release + Java 7u71 / Java 8u25)
* January 4, 2014 - v0.91 - Alpha (Update Release)
* December 25, 2013 - v0.90 - Initial Alpha Release
* August 7, 2012 - Project started
Confirmed Operating System Configurations:
* Windows 7 + Java 8u25
* Windows 7 + Java 8u73
* Windows 8.1 + Java 8u25
* Windows 10 + Java 8u73
* Windows 10 + Java 8u161
* Windows 10 + Java 8u251
* Mac OSX 10.9.5 + Java 8u25
* Ubuntu 14.04-18.04 + Java 8
Deprecated Operating System Configurations:
-----
Java 7 is no longer supported as of v1.1.0
* Windows 7 + Java 7u71
* Windows Vista + Java 7u71
* Mac OSX 10.9.5 + Java 7u71
Contributors to Operating Systems / Tests
-----
* SomeonePlaymc
* VolcanBrimstone
* Pokesonicddrninja
* Adolfobaez
* Cakewut
* SupraTheHedgehog
* The Mario Paint Community
* Many others...
Tasklist:
-----
* Build user's guide... probably on this README or bundled with releases
* Build contributor's guide... probably also on this README
* Import AMS songs
* Speedmarks
* Bookmarks
* SoundFont creator
* Fix audio desync error when returning to program after sleep
* Mario Paint Recorder?
* Update for JDK14? (optional)
* Merge backend between Super Mario Paint & Giant Mario Paint (done - June 2, 2020)
* Splash screen animation and other extras (done - May 30, 2020)
* More aesthetic buttons and button layout (done - March 4, 2019)
* Hotkey for mute note/instrument and others (done - March 4, 2019)
* More advanced Options dialog (done - January 29, 2018)
* Instrument replacing option (done - January 29, 2018)
* Undo/redo (done - January 19, 2018)
* Release SMP v1.0.0 (done - March 14, 2016)
* Aesthetic program edits, stability checks, arranger file stability check (done - March 13, 2016)
* Solve some song playing thread stability issues (done - February 28, 2016)
* Human-readable arranger files (done - February 27, 2016)
* Human-readable save files (done - May 27, 2015)
* Release to a test group (v0.95 - **Beta Release** - January 5, 2015)
* Staff ledger lines (done - January 4, 2015)
* Push new version of StaffSequence with note extensions - Maintain backwards compatibility (done - January 4, 2015)
* Fix measure addition and subtraction (done - January 4, 2015)
* Import MPC arrangements (done - January 4, 2015)
* Arrangement files use relative paths (uses the ol' "Prefs" folder) (done - January 4, 2015)
* Import MPC songs (done - January 3, 2015)
* Arranger mode (done - January 1, 2015)
* Splash screen is actually a splash screen (done - December 31, 2014)
* Test run on more operating systems (done - December 31, 2014)
* Tempo changing option (done - February 14, 2014)
* Rudimentary Options dialog (done - January 19, 2014)
* End-of-File Behaviour fix (done - January 3, 2014)
* Remove limit on song length (done - January 1, 2014)
* Tempo selector interface (done - December 27, 2013)
* Measure line numbers (done - December 27, 2013)
* Release to a test group (v0.9 - **Alpha Release** - December 25, 2013)
* Loop button loops the song (done - December 18, 2013)
* Save & Load songs (done - December 18, 2013)
* Volume bars implemented (done - December 17, 2013)
* Release to a small test group (v0.70-0.73 - obsolete)
* Play back notes on the staff reliably (done - September 28, 2013)
* Play and stop buttons start and stop the song (done - September 28, 2013)
* Play, stop, and loop buttons are able to be pressed (done - August 29, 2013)
* Play, stop, and loop buttons appear (done - August 29, 2013)
* Navigate the staff (done - August 23, 2013)
* Staff navigation framework (done - August 23, 2013)
* Images display normally on the staff (done - August 13, 2013)
* Instruments stack on the staff (done - August 6, 2013)
* Flats and sharps implemented on the staff (done - August 4, 2013)
* Hear notes played on the staff (done - July 26, 2013)
* Place notes on the staff (done - July 26, 2013)
* Staff notes images framework (done - May 31, 2013)
* Settings framework (done - October 31, 2012)
* Latency fix (done - September 6, 2012)
* Sprites rework (done - August 30, 2012)
* User interface draft II (done - August 22, 2012)
* Sounds play (done - August 22, 2012)
* User interface draft (done - August 17, 2012)
* JavaFX migration (done - August 17, 2012)
* Window appears (done - August 12, 2012)
<file_sep>package smp.components.buttons;
import javafx.event.EventHandler;
import javafx.scene.image.ImageView;
import javafx.scene.input.KeyCode;
import javafx.scene.input.KeyEvent;
import javafx.scene.input.MouseEvent;
import smp.ImageIndex;
import smp.ImageLoader;
import smp.components.general.ImageToggleButton;
import smp.fx.SMPFXController;
import smp.stateMachine.StateMachine;
/**
* This is a button that allows us to mute all of one type of instrument, much
* like the low A glitch note in MPC.
*
* @author RehdBlob
* @since 2013.12.24
*/
public class MuteInstButton extends ImageToggleButton {
/** The mute button that is linked to this button. */
private MuteButton mt;
/**
* This creates a new MuteButton object.
*
* @param i
* This <code>ImageView</code> object that you are trying to link
* this button with.
* @param ct
* The FXML controller object.
* @param im
* The Image loader object.
*/
public MuteInstButton(ImageView i, SMPFXController ct, ImageLoader im) {
super(i, ct, im);
getImages(ImageIndex.MUTE_A_PRESSED, ImageIndex.MUTE_A_RELEASED);
releaseImage();
isPressed = false;
// TODO: create getMuteInstButton() somewhere so adding a hotkey can be done elsewhere
// @since v1.1.2 per request of seymour schlong
ct.getBasePane().addEventHandler(KeyEvent.KEY_PRESSED, new EventHandler<KeyEvent>() {
@Override
public void handle(KeyEvent event) {
if (controller.getNameTextField().focusedProperty().get()) return; // Disable while textfield is focused
if(event.getCode() == KeyCode.M)
reactPressed(null);
}
});
}
@Override
protected void reactClicked(MouseEvent event) {
// Do nothing
}
@Override
public void reactPressed(MouseEvent event) {
if (isPressed) {
isPressed = false;
releaseImage();
StateMachine.setMuteAPressed(false);
} else {
if (mt.isPressed())
mt.reactPressed(null);
isPressed = true;
pressImage();
StateMachine.setMuteAPressed(true);
}
}
/**
* @param im
* The mute button that we want to set.
*/
public void setMuteButton(MuteButton im) {
mt = im;
}
/** @return The mute button that this muteA button is linked to. */
public ImageToggleButton getMuteButton() {
return mt;
}
}
<file_sep>package smp.presenters.buttons;
import javafx.beans.property.BooleanProperty;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.scene.image.ImageView;
import javafx.scene.input.MouseEvent;
import smp.ImageIndex;
import smp.models.stateMachine.StateMachine;
import smp.presenters.api.button.ImageToggleButton;
/**
* This is the button that, when pressed, toggles whether you are placing a mute
* note or not.
*
* @author RehdBlob
* @since 2013.11.10
*
*/
public class MutePresenter extends ImageToggleButton {
//TODO: auto-add these model comments
//====Models====
private BooleanProperty mutePressed;
private BooleanProperty muteAPressed;
/**
* This creates a new MuteButton object.
*
* @param mute
* This <code>ImageView</code> object that you are trying to link
* this button with.
* @param ct
* The FXML controller object.
* @param im
* The Image loader object.
*/
public MutePresenter(ImageView mute) {
super(mute);
getImages(ImageIndex.MUTE_PRESSED, ImageIndex.MUTE_RELEASED);
releaseImage();
isPressed = false;
//TODO: add hotkeys in standalone hotkeys class
// TODO: create getMuteButton() somewhere so adding a hotkey can be done elsewhere
// @since v1.1.2 per request of seymour schlong
// ct.getBasePane().addEventHandler(KeyEvent.KEY_PRESSED, new EventHandler<KeyEvent>() {
//
// @Override
// public void handle(KeyEvent event) {
// /** alt+n is for deselecting notes @see <code>StaffRubberBandEventHandler</code> */
// if(event.isAltDown())
// return;
// if(event.getCode() == KeyCode.N)
// reactPressed(null);
// }
// });
this.mutePressed = StateMachine.getMutePressed();
this.muteAPressed = StateMachine.getMuteAPressed();
setupViewUpdater();
}
private void setupViewUpdater() {
muteAPressed.addListener(new ChangeListener<Boolean>() {
@Override
public void changed(ObservableValue<? extends Boolean> observable, Boolean oldValue, Boolean newValue) {
if (newValue.equals(true)) {
isPressed = false;
releaseImage();
mutePressed.set(false);
}
}
});
}
@Override
protected void reactClicked(MouseEvent event) {
// Do nothing
}
@Override
public void reactPressed(MouseEvent event) {
if (isPressed) {
isPressed = false;
releaseImage();
this.mutePressed.set(false);
} else {
isPressed = true;
pressImage();
this.mutePressed.set(true);
}
}
}
<file_sep>package smp.components.staff.sequences;
import smp.stateMachine.Settings;
/**
* An event on the Super Mario Paint staff.
* @author RehdBlob
* @since 2012.09.24
*/
public abstract class AbstractStaffEvent implements StaffEvent {
/**
* Generated serial ID.
*/
private static final long serialVersionUID = -6303076919558802033L;
/** The line number that this staff event occurs at. */
protected int lineNum;
/**
* The integer representation of the measure that this staff
* event occurs at.
*/
protected int measureNum;
/**
* Denotes the location of this event within a measure.
*/
protected int measureLineNum;
/**
* Sets up an event at measure <code>num</code>.
* @param num The measure number that we're starting at.
*/
public AbstractStaffEvent(int num) {
lineNum = num;
setMeasureNum(num);
setMeasureLineNum(num);
}
/**
* Sets the measure number of this staff event given
* an integer that denotes the line number that this
* event occurs at.
* @param num An integer representation that denotes
* the location of the event.
*/
protected void setMeasureNum(int num) {
if (isMeasureNumValid(num))
measureNum = num;
}
/**
* Tells us whether this measure number is valid.
* @param num The measure number we want to check.
* @return If the measure number is greater than or equal to 0. If the
* Settings feature for limiting to 96 measures is on, then we check for
* that too.
*/
protected static boolean isMeasureNumValid(int num) {
return (!Settings.LIM_96_MEASURES && num >= 0) || (num >= 0 && num <= 96);
}
/**
* Sets the measure line number of this staff event
* given an integer that denotes the line number
* that this event occurs at.
* @param num An integer representation that denotes the
* location of the event.
*/
protected void setMeasureLineNum(int num) {
;
}
@Override
public int getLineNum() {
return lineNum;
}
@Override
public int getMeasureNum() {
return measureNum;
}
@Override
public int getMeasureLineNum() {
return measureLineNum;
}
}
<file_sep>package smp.presenters.api.clipboard;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import javafx.scene.effect.Blend;
import javafx.scene.effect.BlendMode;
import javafx.scene.effect.ColorInput;
import smp.ImageLoader;
import smp.commandmanager.ModifySongManager;
import smp.commandmanager.commands.AddNoteCommand;
import smp.commandmanager.commands.AddVolumeCommand;
import smp.commandmanager.commands.RemoveNoteCommand;
import smp.commandmanager.commands.RemoveVolumeCommand;
import smp.components.InstrumentIndex;
import smp.components.Values;
import smp.components.staff.Staff;
import smp.components.staff.StaffVolumeEventHandler;
import smp.components.staff.sequences.StaffNote;
import smp.components.staff.sequences.StaffNoteLine;
import smp.stateMachine.StateMachine;
/**
* The API will contain functions for <code>StaffClipboard</code>. These include
* copy, cut, delete, insert, move, paste.
*
* Since v1.1.2, the API will also contain <code>StaffRubberBand</code>
* functions such as resizing.
*
* @author j574y923
*/
public class StaffClipboardAPI {
private Staff theStaff;
private StaffClipboard theStaffClipboard;
private ImageLoader il;
private ModifySongManager commandManager;
/* Corresponds with the first selection line */
private int selectionLineBegin = Integer.MAX_VALUE;
private Blend highlightBlend;
/*
* If false, the selected notes remain in selection but are unhighlighted
* and will not be copied
*/
private boolean selectNotesFlag = true;
/*
* If false, the selected volumes remain in selection but are unhighlighted
* and will not be copied but there WILL still be volume data.
* ignoreVolumesFlag will toggle on telling not to paste those volumes in
* copy().
*/
private boolean selectVolumesFlag = true;
/*
* Because there is always volume data, this flag will indicate when to
* ignore pasting those volumes. If !selectVolumesFlag then toggle on when
* copying and toggle off when clearing copiedData.
*/
private boolean ignoreVolumesFlag = false;
public StaffClipboardAPI(StaffClipboard sc, Staff st, ImageLoader i, ModifySongManager cm) {
theStaffClipboard = sc;
theStaff = st;
il = i;
commandManager = cm;
highlightBlend = new Blend(
BlendMode.SRC_OVER,
null,
new ColorInput(
0,
0,
il.getSpriteFX(InstrumentIndex.BOAT.imageIndex()).getWidth(),
il.getSpriteFX(InstrumentIndex.BOAT.imageIndex()).getHeight(),
StaffClipboard.HIGHLIGHT_FILL
)
);
}
/**
* Get all notes from selection and copy them into data. lines are relative
* to selectionLineBegin. they are not absolute.
*
* also copy volumes.
*/
public void copy() {
//if there's something new selected, make way for new data
//else just use old data
if(!theStaffClipboard.getSelection().isEmpty() && (selectNotesFlag || selectVolumesFlag))
clearCopiedData();
for (Map.Entry<Integer, StaffNoteLine> noteLine : theStaffClipboard.getSelection().entrySet()) {
int line = noteLine.getKey();
ArrayList<StaffNote> ntList = noteLine.getValue().getNotes();
if (selectNotesFlag)
for(StaffNote note : ntList)
//relative index
copyNote(line - selectionLineBegin, note);
if (selectVolumesFlag)
copyVolume(line - selectionLineBegin, noteLine.getValue().getVolume());
}
if (!selectVolumesFlag)
ignoreVolumesFlag = true;
}
/**
* Copy selected notes and volumes and delete selected notes.
*/
public void cut() {
copy();
delete();
}
/**
* Delete selected notes (only notes, not volume).
*/
public void delete() {
for (Map.Entry<Integer, StaffNoteLine> noteLine : theStaffClipboard.getSelection().entrySet()) {
int line = noteLine.getKey();
ArrayList<StaffNote> ntList = noteLine.getValue().getNotes();
StaffNoteLine lineDest = theStaff.getSequence().getLine(line);
for(StaffNote note : ntList){
lineDest.remove(note);
StateMachine.setSongModified(true);
commandManager.execute(new RemoveNoteCommand(lineDest, note));
if (lineDest.isEmpty() && 0 <= line - StateMachine.getMeasureLineNum()
&& line - StateMachine.getMeasureLineNum() < Values.NOTELINES_IN_THE_WINDOW) {
StaffVolumeEventHandler sveh = theStaff.getNoteMatrix()
.getVolHandler(line - StateMachine.getMeasureLineNum());
sveh.setVolumeVisible(false);
commandManager.execute(new RemoveVolumeCommand(lineDest, lineDest.getVolume()));
}
}
// idk why but redraw needs to be called every line or else weird
// stuff happens (like some notes don't get added)
theStaff.redraw();
}
clearSelection();
commandManager.record();
}
/**
* Paste copied notes and volumes.
*
* @param lineMoveTo starting line to paste data at
*/
public void paste(int lineMoveTo) {
HashMap<Integer, StaffNoteLine> copiedData = theStaffClipboard.getCopiedData();
for (Map.Entry<Integer, StaffNoteLine> lineCopy : copiedData.entrySet()) {
int line = lineMoveTo + lineCopy.getKey();
StaffNoteLine lineDest = theStaff.getSequence().getLine(line);
StaffNoteLine lineSrc = lineCopy.getValue();
for(StaffNote note : lineSrc.getNotes()) {
// see StaffInstrumentEventHandler's placeNote function
StaffNote theStaffNote = new StaffNote(note.getInstrument(), note.getPosition(), note.getAccidental());
theStaffNote.setMuteNote(note.muteNoteVal());
if (theStaffNote.muteNoteVal() == 0) {
theStaffNote.setImage(il.getSpriteFX(note.getInstrument().imageIndex()));
} else if (theStaffNote.muteNoteVal() == 1) {
theStaffNote.setImage(il.getSpriteFX(note.getInstrument().imageIndex().alt()));
} else if (theStaffNote.muteNoteVal() == 2) {
theStaffNote.setImage(il.getSpriteFX(note.getInstrument().imageIndex()
.silhouette()));
}
if (lineDest.isEmpty()) {
lineDest.setVolumePercent(((double) Values.DEFAULT_VELOCITY) / Values.MAX_VELOCITY);
if (line - StateMachine.getMeasureLineNum() < Values.NOTELINES_IN_THE_WINDOW) {
StaffVolumeEventHandler sveh = theStaff.getNoteMatrix()
.getVolHandler(line - StateMachine.getMeasureLineNum());
sveh.updateVolume();
}
commandManager.execute(new AddVolumeCommand(lineDest, Values.DEFAULT_VELOCITY));
}
if (!lineDest.contains(theStaffNote)) {
lineDest.add(theStaffNote);
StateMachine.setSongModified(true);
commandManager.execute(new AddNoteCommand(lineDest, theStaffNote));
}
}
// paste volume
if(!ignoreVolumesFlag) {
commandManager.execute(new RemoveVolumeCommand(lineDest, lineDest.getVolume()));
lineDest.setVolume(lineSrc.getVolume());
commandManager.execute(new AddVolumeCommand(lineDest, lineDest.getVolume()));
if (line - StateMachine.getMeasureLineNum() < Values.NOTELINES_IN_THE_WINDOW) {
StaffVolumeEventHandler sveh = theStaff.getNoteMatrix()
.getVolHandler(line - StateMachine.getMeasureLineNum());
sveh.updateVolume();
}
StateMachine.setSongModified(true);
}
}
theStaff.redraw();
commandManager.record();
}
/**
* get all notes in the line and position bounds that are filtered and put
* them into the selection map
*
* @param lineBegin
* @param positionBegin
* (<= positionEnd, i.e. positionBegin could be lower notes)
* @param lineEnd
* @param positionEnd
* (>= positionBegin, i.e. positionEnd could be higher notes)
*/
public void select(int lineBegin, int positionBegin, int lineEnd, int positionEnd) {
StaffClipboardFilter instFilter = theStaffClipboard.getInstrumentFilter();
for (int line = lineBegin; line <= lineEnd; line++) {
StaffNoteLine lineSrc = theStaff.getSequence().getLine(line);
ArrayList<StaffNote> ntList = lineSrc.getNotes();
for (StaffNote note : ntList) {
if (positionBegin <= note.getPosition() && note.getPosition() <= positionEnd
&& instFilter.isFiltered(note.getInstrument())) {
// store the copied note at the relative line
selectNote(line, note);
// store the staffnoteline's volume at the relative line
selectVolume(line, lineSrc.getVolume());
updateSelectionLineBegin(line);
}
}
}
}
public void clearCopiedData() {
theStaffClipboard.getCopiedData().clear();
ignoreVolumesFlag = false;
}
/**
* Unhighlight all notes and volumes and clear the selection map.
*/
public void clearSelection() {
//unhighlight notes
HashMap<Integer, StaffNoteLine> selection = theStaffClipboard.getSelection();
for(StaffNoteLine line : selection.values())
for(StaffNote note : line.getNotes())
highlightNote(note, false);
//unhighlight volumes
theStaffClipboard.getHighlightedVolumes().clear();
theStaffClipboard.getHighlightedVolumesRedrawer().changed(null, 0, StateMachine.getMeasureLineNum());
selection.clear();
selectionLineBegin = Integer.MAX_VALUE;
selectNotesFlag = true;
selectVolumesFlag = true;
}
/**
* set selectionLineBegin to line if line < selectionLineBegin.
* selectionLineBegin gets subtracted from copied data lines to get relative
* bounds.
*
*
* make selection line lower to copy more blank lines before actual content.
*
* @param line
* to update selectionLineBegin to
*/
public void updateSelectionLineBegin(int line) {
if (line < selectionLineBegin)
selectionLineBegin = line;
}
public int getSelectionLineBegin() {
return selectionLineBegin;
}
/**
* Copy information from note. Add new note into copiedData.
*
* Note: the line information is where the note occurs in copiedData, NOT
* where it occurs in the staff.
*
* @param line
* where the note will be placed in copiedData
* @param note
* info to be copied
*/
public void copyNote(int line, StaffNote note) {
StaffNote newNote = new StaffNote(note.getInstrument(), note.getPosition(), note.getAccidental());
newNote.setMuteNote(note.muteNoteVal());
HashMap<Integer, StaffNoteLine> copiedData = theStaffClipboard.getCopiedData();
if(!copiedData.containsKey(line))
copiedData.put(line, new StaffNoteLine());
copiedData.get(line).add(newNote);
}
/**
* Select note. Add existing note into selection. Highlight note.
*
* @param line
* where the note occurs
* @param note
* that will be placed into selection
*/
public void selectNote(int line, StaffNote note) {
HashMap<Integer, StaffNoteLine> selection = theStaffClipboard.getSelection();
if(!selection.containsKey(line))
selection.put(line, new StaffNoteLine());
selection.get(line).add(note);
highlightNote(note, true);
}
public void highlightNote(StaffNote note, boolean highlight) {
if(highlight)
note.setEffect(highlightBlend);
else
note.setEffect(null);
}
public void copyVolume(int line, int volume) {
HashMap<Integer, StaffNoteLine> copiedData = theStaffClipboard.getCopiedData();
if(!copiedData.containsKey(line))
copiedData.put(line, new StaffNoteLine());
copiedData.get(line).setVolume(volume);
}
public void selectVolume(int line, int volume) {
HashMap<Integer, StaffNoteLine> selection = theStaffClipboard.getSelection();
if(!selection.containsKey(line))
selection.put(line, new StaffNoteLine());
selection.get(line).setVolume(volume);
highlightVolume(line, true);
}
public void highlightVolume(int line, boolean highlight) {
if(highlight)
theStaffClipboard.getHighlightedVolumes().add(line);
else
theStaffClipboard.getHighlightedVolumes().remove(line);
// trigger the ChangeListener that will set the highlight effect
if (StateMachine.getMeasureLineNum() <= line
&& line < StateMachine.getMeasureLineNum() + Values.NOTELINES_IN_THE_WINDOW)
theStaffClipboard.getHighlightedVolumesRedrawer().changed(null, 0, StateMachine.getMeasureLineNum());
}
public void selectNotesToggle(boolean selectNotes) {
selectNotesFlag = selectNotes;
if(selectNotesFlag) {
//highlight notes
for(StaffNoteLine line : theStaffClipboard.getSelection().values())
for(StaffNote note : line.getNotes())
highlightNote(note, true);
} else {
//unhighlight notes
for(StaffNoteLine line : theStaffClipboard.getSelection().values())
for(StaffNote note : line.getNotes())
highlightNote(note, false);
}
}
public void selectVolumesToggle(boolean selectVolumes) {
selectVolumesFlag = selectVolumes;
if(selectVolumesFlag) {
for(Integer line : theStaffClipboard.getSelection().keySet())
highlightVolume(line, true);
} else {
//unhighlight volumes
theStaffClipboard.getHighlightedVolumes().clear();
theStaffClipboard.getHighlightedVolumesRedrawer().changed(null, 0, StateMachine.getMeasureLineNum());
}
}
public boolean isSelectNotesOn() {
return selectNotesFlag;
}
public boolean isSelectVolumesOn() {
return selectVolumesFlag;
}
/**
* Begins the first point for the clipboard's rubberband at the specified x
* and y coords. Adds the rubberband to the rubberBandLayer so it actually
* shows up.
*
* @param x
* the first x coord
* @param y
* the first y coord
* @since v1.1.2
*/
public void beginBand(double x, double y) {
StaffRubberBand rubberBand = theStaffClipboard.getRubberBand();
theStaffClipboard.getRubberBandLayer().getChildren().add(rubberBand);
rubberBand.begin(x, y);
}
/**
* Draws and resizes the rubberband from the first point from beginBand() to
* the next point specified by x and y. beginBand() should be called before
* this.
*
* @param x
* the second x coord
* @param y
* the second y coord
* @since v1.1.2
*/
public void resizeBand(double x, double y) {
theStaffClipboard.getRubberBand().resizeBand(x, y);
}
/**
* Ends the band and selects all notes inside the region. Notes selected are
* modified by the <code>StaffClipboardFilter</code>. resizeBand() should be
* called before this.
*
* @since v1.1.2
*/
public void endBand() {
StaffRubberBand rubberBand = theStaffClipboard.getRubberBand();
rubberBand.end();
theStaffClipboard.getRubberBandLayer().getChildren().remove(rubberBand);
int lb = rubberBand.getLineBegin() + StateMachine.getMeasureLineNum();
int pb = rubberBand.getPositionBegin();
int le = rubberBand.getLineEnd() + StateMachine.getMeasureLineNum();
int pe = rubberBand.getPositionEnd();
select(lb, pb, le, pe);
}
/**
* @return if rubberband is in the rubberbandlayer
* @since v1.1.2
*/
public boolean isRubberBandActive() {
return theStaffClipboard.getRubberBandLayer().getChildren().contains(theStaffClipboard.getRubberBand());
}
}
<file_sep>package smp.components.general;
import java.util.ArrayList;
import smp.ImageLoader;
import smp.fx.SMPFXController;
import javafx.scene.image.ImageView;
import javafx.scene.input.MouseEvent;
/**
* Image radio button that toggles between a list
* of buttons. This class holds a list of references
* to other ImageRadioButtons that it's linked to.
* @author RehdBlob
* @since 2012.08.30
*/
public abstract class ImageRadioButton extends AbstractImageButton {
/**
* The list of radio buttons that are linked to this button.
*/
protected ArrayList<ImageRadioButton> linkedButtons;
/**
* @param i The ImageView passed to the Button
* wrapper.
* @param controller The FXML controller object.
*/
public ImageRadioButton(ImageView i, SMPFXController controller, ImageLoader im) {
super(i, controller, im);
linkedButtons = new ArrayList<ImageRadioButton>();
}
/**
* Links the ImageRadioButton to another ImageRadioButton
* such that if it is depressed, the other buttons in the list will
* be reverted to an unpressed state.
* @param b The <code>ImageRadioButton</code> to link this
* <code>ImageRadioButton</code> to.
*/
public void link(ImageRadioButton b) {
linkedButtons.add(b);
}
/**
* Sets this button's <code>isPressed</code> to true and also presses
* the button image down.
*/
@Override
protected void reactPressed(MouseEvent e) {
pressImage();
isPressed = true;
for (ImageRadioButton i : linkedButtons) {
i.releaseImage();
i.isPressed = false;
}
}
}
<file_sep>package smp.presenters.staff;
import java.util.ArrayList;
import javafx.beans.property.DoubleProperty;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.scene.Node;
import javafx.scene.layout.HBox;
import javafx.scene.text.Text;
import smp.components.Values;
import smp.models.stateMachine.StateMachine;
public class StaffMeasureNumbersPresenter {
// TODO: auto-add these model comments
// ====Models====
private DoubleProperty measureLineNumber;
private HBox staffMeasureNumbers;
ArrayList<Text> measureNums;
public StaffMeasureNumbersPresenter(HBox staffMeasureNumbers) {
this.staffMeasureNumbers = staffMeasureNumbers;
this.measureLineNumber = StateMachine.getMeasureLineNum();
initializeStaffMeasureNums(this.staffMeasureNumbers);
setupViewUpdater();
}
/**
* These are the numbers above each successive measure.
*/
private void initializeStaffMeasureNums(HBox mNums) {
ArrayList<HBox> measureNumBoxes = new ArrayList<HBox>();
measureNums = new ArrayList<Text>();
for (Node num : mNums.getChildren())
measureNumBoxes.add((HBox) num);
int counter = 1;
for (int i = 0; i < measureNumBoxes.size(); i++) {
HBox theBox = measureNumBoxes.get(i);
Text t = new Text();
theBox.getChildren().add(t);
measureNums.add(t);
if (i % Values.TIMESIG_BEATS == 0) {
t.setText(String.valueOf(counter));
counter++;
} else
continue;
}
}
/**
* @see smp.components.staff.StaffImages.updateStaffMeasureLines(int)
*/
public void setupViewUpdater() {
this.measureLineNumber.addListener(new ChangeListener<Number>() {
@Override
public void changed(ObservableValue<? extends Number> observable, Number oldValue, Number newValue) {
int currLine = newValue.intValue();
int counter = 0;
for (int i = 0; i < measureNums.size(); i++) {
Text currText = measureNums.get(i);
if ((currLine + i) % Values.TIMESIG_BEATS == 0) {
currText.setText(String.valueOf((int) (Math.ceil(currLine
/ (double) Values.TIMESIG_BEATS) + 1 + counter)));
counter++;
} else {
currText.setText("");
}
}
}
});
}
}
<file_sep>package smp.models.staff;
import java.io.Serializable;
import javafx.beans.property.BooleanProperty;
import javafx.beans.property.DoubleProperty;
import javafx.beans.property.ObjectProperty;
import javafx.beans.property.ReadOnlyIntegerProperty;
import javafx.beans.property.SimpleBooleanProperty;
import javafx.beans.property.SimpleDoubleProperty;
import javafx.beans.property.SimpleListProperty;
import javafx.beans.property.SimpleObjectProperty;
import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import smp.components.Values;
import smp.models.stateMachine.TimeSignature;
/**
* We might not even need MIDI to do this sequencing stuff. This class keeps
* track of whatever is displaying on the staff right now.
*
* @author RehdBlob
* @since 2013.08.23
*/
public class StaffSequence implements Serializable {
/**
* Generated serial ID.
*/
private static final long serialVersionUID = 5752285850525402081L;
/**
* The tempo of this sequence.
*/
private DoubleProperty tempo = new SimpleDoubleProperty(Values.DEFAULT_TEMPO);
/** These are all of the lines on the staff. */
private ObservableList<StaffNoteLine> theLines = FXCollections.observableArrayList();
/** @since v1.1.3*/
private ReadOnlyIntegerProperty theLinesSize = new SimpleListProperty<>(theLines).sizeProperty();
/** This tells us which notes are extended (green highlight) or not. */
private BooleanProperty[] noteExtensions = new BooleanProperty[Values.NUMINSTRUMENTS];
/** The time signature of this sequence. */
private ObjectProperty<TimeSignature> t = new SimpleObjectProperty<TimeSignature>(TimeSignature.FOUR_FOUR);
/** The soundset bound to and should be loaded for this sequence. */
private StringProperty soundsetBinding = new SimpleStringProperty("");
/** Default constructor. Makes an empty song. */
public StaffSequence() {
for (int i = 0; i < Values.DEFAULT_LINES_PER_SONG; i++)
theLines.add(new StaffNoteLine());
for (int i = 0; i < Values.NUMINSTRUMENTS; i++)
noteExtensions[i] = new SimpleBooleanProperty();
}
/**
* @param i
* The index that we want to get some line from.
* @return Gets a <code>StaffNoteLine</code> that resides at index i.
*/
public StaffNoteLine getLine(int i) {
try {
return theLines.get(i);
} catch (IndexOutOfBoundsException e) {
theLines.add(new StaffNoteLine());
try {
return theLines.get(i);
} catch (IndexOutOfBoundsException e2) {
return getLine(i);
}
}
}
/**
* @return The entire list of the StaffNoteLines of this song.
*/
public ObservableList<StaffNoteLine> getTheLines() {
return theLines;
}
/**
* @param i
* The index that we want to modify.
* @param s
* The StaffNoteLine that we want to place at this index.
*/
public void setLine(int i, StaffNoteLine s) {
theLines.set(i, s);
}
/**
* Adds a line into this sequence.
*
* @param s
* The StaffNoteLine that we want to add.
*/
public void addLine(StaffNoteLine s) {
theLines.add(s);
}
/**
* Adds a line into this sequence.
*
* @param i
* The index at which we want to add this line.
* @param s
* The StaffNoteLine that we want to add.
*/
public void addLine(int i, StaffNoteLine s) {
theLines.add(i, s);
}
/**
* Removes a line from this sequence.
*
* @param s
* The StaffNoteLine that we want to delete.
*/
public void deleteLine(StaffNoteLine s) {
theLines.remove(s);
}
/**
* Removes a line from this sequence.
*
* @param i
* The line index we want to delete from.
*/
public void deleteLine(int i) {
theLines.remove(i);
}
/** @return The tempo of this sequence. */
public DoubleProperty getTempo() {
return tempo;
}
/**
* Sets the tempo of this sequence.
*
* @param t
* The tempo of this sequence.
*/
public void setTempo(double t) {
tempo.set(t);
}
/**
* @param i
* The note extensions bitfield that we want to set.
*/
public void setNoteExtensions(boolean[] i) {
for(int idx = 0; idx < Values.NUMINSTRUMENTS; idx++)
noteExtensions[idx].set(i[idx]);
}
/**
* @param i
* The note extensions bitfield that we want to set.
*/
public void setNoteExtensions(BooleanProperty[] i) {
for(int idx = 0; idx < Values.NUMINSTRUMENTS; idx++)
noteExtensions[idx].set(i[idx].get());
}
/** @return The bitfield denoting which notes are extended. */
public BooleanProperty[] getNoteExtensions() {
return noteExtensions;
}
/**
* @param s
* The time signature to set this <code>StaffSequence</code> to.
*/
public void setTimeSignature(String s) {
int top = Integer.parseInt(s.substring(0, s.indexOf("/")));
int bottom = Integer.parseInt(s.substring(s.indexOf("/") + 1));
for (TimeSignature tSig : TimeSignature.values()) {
if (tSig.bottom() == bottom && tSig.top() == top) {
t.set(tSig);
break;
}
}
if (t.get() == null) {
t.set(TimeSignature.FOUR_FOUR);
}
}
/** @return The time signature of this sequence. */
public ObjectProperty<TimeSignature> getTimeSignature() {
return t;
}
/**
* Sets the soundset for this sequence which should be loaded with the
* sequence.
* @since v1.1.2
*/
public void setSoundset(String soundset) {
soundsetBinding.set(soundset);
}
/**
* @return The soundset bound to this sequence.
* @since v1.1.2
*/
public StringProperty getSoundset() {
return soundsetBinding;
}
/**
* @return IntegerProperty of theLines's size
* @since v1.1.3
*/
public ReadOnlyIntegerProperty getTheLinesSize() {
return theLinesSize;
}
@Override
public String toString() {
StringBuilder out = new StringBuilder();
out.append("Tempo = " + tempo + "\n");
out.append("Extensions = " + noteExtensions + "\n");
out.append(theLines.toString() + "\n");
return out.toString();
}
}
<file_sep>package smp.components.buttons;
import javafx.scene.image.ImageView;
import javafx.scene.input.MouseEvent;
import smp.ImageIndex;
import smp.ImageLoader;
import smp.components.general.ImageRadioButton;
import smp.fx.SMPFXController;
import smp.stateMachine.ProgramState;
import smp.stateMachine.StateMachine;
/**
* Wrapper class for an ImageView that holds the play button image. Pressing the
* button changes the image and also changes the state of the program.
*
* @author RehdBlob
* @since 2012.08.28
*/
public class PlayButton extends ImageRadioButton {
/**
* Instantiates the Play button on the staff
*
* @param i
* The ImageView object that will be manipulated by this class.
* @param ct
* The FXML controller object.
* @param im
* The Image loader object.
*/
public PlayButton(ImageView i, SMPFXController ct, ImageLoader im) {
super(i, ct, im);
getImages(ImageIndex.PLAY_PRESSED, ImageIndex.PLAY_RELEASED);
releaseImage();
isPressed = false;
}
@Override
public void reactPressed(MouseEvent e) {
if (isPressed)
return;
super.reactPressed(e);
if (StateMachine.getState() == ProgramState.EDITING) {
StateMachine.setState(ProgramState.SONG_PLAYING);
theStaff.startSong();
} else if (StateMachine.getState() == ProgramState.ARR_EDITING) {
StateMachine.setState(ProgramState.ARR_PLAYING);
theStaff.startArrangement();
}
}
}
<file_sep>package smp.components.staff.sounds;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import javax.sound.midi.Instrument;
import javax.sound.midi.MidiChannel;
import javax.sound.midi.MidiSystem;
import javax.sound.midi.MidiUnavailableException;
import javax.sound.midi.Patch;
import javax.sound.midi.Receiver;
import javax.sound.midi.Soundbank;
import javax.sound.midi.Synthesizer;
import javax.sound.midi.Transmitter;
import javax.sound.midi.VoiceStatus;
import com.sun.media.sound.SoftSynthesizer;
/**
* Class for multiple synthesizers in one class.
* Should make it simpler to call synthesizers with more than
* 16 MIDI channels. One can add multiple different types of
* Synthesizers into this class because of the abstraction
* that was implemented; this class holds Synthesizer type
* objects.
* @author RehdBlob
* @since 2012.08.24
*/
public class MultiSynthesizer implements Synthesizer {
/**
* Indicates whether this Synthesizer is actually initialized
* or not. Many methods will not work if this is not <b>True</b>.
*/
protected boolean initialized;
/**
* The list of synthesizers that this class holds.
*/
protected ArrayList<Synthesizer> theSynths;
/**
* Initializes the ArrayList of Synthesizers and adds the default
* Synthesizer into the ArrayList.
* @throws MidiUnavailableException If MidiSystem.getSynthesizer()
* fails.
*/
public MultiSynthesizer() throws MidiUnavailableException {
theSynths = new ArrayList<Synthesizer>();
addDefaultSynthesizer();
initialized = true;
}
/**
* Add a synthesizer to the list of synthesizers for this
* aggregate class.
* @param s1 The Synthesizer to be added.
* @throws MidiUnavailableException If the MultiSynthesizer isn't
* initialized.
*/
public void addSynths(Synthesizer s1) throws MidiUnavailableException {
if (!initialized || !isOpen())
throw new MidiUnavailableException();
for (Instrument i : s1.getLoadedInstruments())
s1.unloadInstrument(i);
for (Instrument inst : this.getLoadedInstruments())
s1.loadInstrument(inst);
theSynths.add(s1);
}
/**
* Adds synthesizers to the list of synthesizers for this
* aggregate class.
* @param s1 The first Synthesizer to be added.
* @param s2 The second Synthesizer to be added.
* @throws MidiUnavailableException If the MultiSynthesizer is not
* initialized.
*/
public void addSynths(Synthesizer s1, Synthesizer s2)
throws MidiUnavailableException {
addSynths(s1);
addSynths(s2);
}
/**
* Adds synthesizers to the list of synthesizers for this
* aggregate class.
* @param s1 The first Synthesizer to be added.
* @param s2 The second Synthesizer to be added.
* @param s As many more Synthesizer objects as needed.
* @throws MidiUnavailableException If the MultiSynthesizer is not
* initialized.
*/
public void addSynths(Synthesizer s1, Synthesizer s2, Synthesizer... s)
throws MidiUnavailableException {
addSynths(s1);
addSynths(s2);
for (Synthesizer more : s)
addSynths(more);
}
/**
* Adds the default Synthesizer into the list of Synthesizers, and also
* unloads all of the instruments that are by default included.
* @throws MidiUnavailableException If the MidiSystem.getSynthesizer()
* call fails.
*/
private void addDefaultSynthesizer() throws MidiUnavailableException {
Synthesizer s = MidiSystem.getSynthesizer();
theSynths.add(s);
}
/**
* Gets the device info of the first Synthesizer in the Synthesizer list.
*/
@Override
public Info getDeviceInfo() {
return theSynths.get(0).getDeviceInfo();
}
/**
* Opens all of the Synthesizers in the list.
* @throws MidiUnavailableException If for some reason any of the .open()
* calls doesn't work, or if the MultiSynthesizer is not initialized.
*/
@Override
public void open() throws MidiUnavailableException {
if (!initialized)
throw new MidiUnavailableException();
for (Synthesizer s : theSynths)
s.open();
}
/**
* Closes all of the Synthesizers in the Synthesizer list.
*/
@Override
public void close() {
for (Synthesizer s : theSynths)
s.close();
}
/**
* Checks if all of the Synthesizers are open.
*/
@Override
public boolean isOpen() {
for (Synthesizer s : theSynths)
if (!s.isOpen())
return false;
return true;
}
/**
* Gets the microsecond position of the first Synthesizer in the
* Synthesizer list.
*/
@Override
public long getMicrosecondPosition() {
return theSynths.get(0).getMicrosecondPosition();
}
/**
* @return The maximum number of receivers that the Synthesizers in the
* list can hold, determined by the Synthesizer that can hold the least
* number of Receivers.
*/
@Override
public int getMaxReceivers() {
ArrayList<Integer> numbers = new ArrayList<Integer>();
for (Synthesizer s : theSynths)
numbers.add(s.getMaxReceivers());
Collections.sort(numbers);
return numbers.get(numbers.size() - 1);
}
/**
* @return The maximum number of Transmitters that the Synthesizers in the
* list can hold, determined by the Synthesizer that can hold the least
* number of Transmitters.
*/
@Override
public int getMaxTransmitters() {
ArrayList<Integer> numbers = new ArrayList<Integer>();
for (Synthesizer s : theSynths)
numbers.add(s.getMaxTransmitters());
Collections.sort(numbers);
return numbers.get(numbers.size() - 1);
}
/**
* @return The Receiver of the first Synthesizer in the list of
* Synthesizers. Not useful in the context of multiple Synthesizers.
*/
@Deprecated
@Override
public Receiver getReceiver() throws MidiUnavailableException {
return theSynths.get(0).getReceiver();
}
/**
* @return All of the Receivers of all of the Synthesizers in the list
* of Synthesizers.
*/
@Override
public List<Receiver> getReceivers() {
ArrayList<Receiver> all = new ArrayList<Receiver>();
for (Synthesizer s : theSynths)
all.addAll(s.getReceivers());
return all;
}
/**
* @return the Transmitter of the first Synthesizer in the list of
* Synthesizers. Not useful in the context of multiple Synthesizers.
* @throws MidiUnavailableException If the MultiSynthesizer is not open
* or if something goes wrong in getting the Trasnmitter.
*/
@Deprecated
@Override
public Transmitter getTransmitter() throws MidiUnavailableException {
if (!initialized)
throw new MidiUnavailableException();
return theSynths.get(0).getTransmitter();
}
/**
* @return All of the Transmitters of all of the Synthesizers in the list
* of Synthesizers.
*/
@Override
public List<Transmitter> getTransmitters() {
ArrayList<Transmitter> all = new ArrayList<Transmitter>();
for (Synthesizer s : theSynths)
all.addAll(s.getTransmitters());
return all;
}
/**
* @return The maximum polyphony of the set of Synthesizers,
* determined by the Synthesizer with the minimum polyphony.
*/
@Override
public int getMaxPolyphony() {
ArrayList<Integer> nums = new ArrayList<Integer>();
for (Synthesizer s : theSynths)
nums.add(s.getMaxPolyphony());
Collections.sort(nums);
return nums.get(nums.size() - 1);
}
/**
* @return The latency of the set of Synthesizers,
* determined by the Synthesizer with the highest latency.
*/
@Override
public long getLatency() {
ArrayList<Long> nums = new ArrayList<Long>();
for (Synthesizer s : theSynths)
nums.add(s.getLatency());
Collections.sort(nums);
return nums.get(0);
}
/**
* @return An array of MidiChannel objects. Elements 0-15 are from the first
* synthesizer, elements 16-31 are from the second synthesizer, and so on.
*/
@Override
public MidiChannel[] getChannels() {
ArrayList<MidiChannel> all = new ArrayList<MidiChannel>();
if (theSynths.size() == 1)
return theSynths.get(0).getChannels();
else {
for (Synthesizer s : theSynths) {
MidiChannel[] temp = s.getChannels();
for (MidiChannel m : temp)
all.add(m);
}
}
MidiChannel[] ret = new MidiChannel[all.size()];
for (int i = 0; i < all.size(); i++)
ret[i] = all.get(i);
return ret;
}
/**
* @return the VoiceStatus of all of the Synthesizer objects.
*/
@Override
public VoiceStatus[] getVoiceStatus() {
VoiceStatus[] all;
if (theSynths.size() == 1)
all = theSynths.get(0).getVoiceStatus();
else {
all = new VoiceStatus[0];
for (Synthesizer s : theSynths) {
VoiceStatus[] temp = s.getVoiceStatus();
VoiceStatus[] concat =
new VoiceStatus[all.length + temp.length];
for (int i = 0; i < concat.length; i++) {
if (i < all.length)
concat[i] = all[i];
else
concat[i] = temp[i-all.length];
}
all = concat;
}
}
return all;
}
/**
* @return <b>True</b> if the given Soundbank is supported by ALL of
* the Synthesizers in the list of Synthesizers, <b>False</b> otherwise.
*/
@Override
public boolean isSoundbankSupported(Soundbank soundbank) {
for (Synthesizer s : theSynths)
if (!s.isSoundbankSupported(soundbank))
return false;
return true;
}
/**
* Loads instruments into all of the Synthesizers in the list.
* @return <b>True</b> if the Instrument is successfully loaded into
* ALL of the Synthesizers in the list of Synthesizers, <b>False</b>
* otherwise.
*/
@Override
public boolean loadInstrument(Instrument instrument) {
boolean isLoadedCorrectly = true;;
for (Synthesizer s : theSynths)
if (!s.loadInstrument(instrument))
isLoadedCorrectly = false;;
return isLoadedCorrectly;
}
/**
* Unloads the specified instrument from ALL of the Synthesizers in the
* list of Synthesizers.
* @param instrument The Instrument to unload.
*/
@Override
public void unloadInstrument(Instrument instrument) {
for (Synthesizer s : theSynths)
s.unloadInstrument(instrument);
}
/**
* @return <b>True</b> if the Instrument remapping was successful in ALL
* of the Synthesizer objects in the Synthesizer list, <b>False</b>
* otherwise.
*/
@Override
public boolean remapInstrument(Instrument from, Instrument to) {
boolean didItWork = true;
for (Synthesizer s : theSynths)
if (!s.remapInstrument(from, to))
didItWork = false;
return didItWork;
}
/**
* @return The default soundbank of the first Synthesizer element in
* the list of Synthesizers.
*/
@Override
public Soundbank getDefaultSoundbank() {
return theSynths.get(0).getDefaultSoundbank();
}
/**
* Theoretically, the available instruments in all of the
* Synthesizers should be equivalent, but that may not be the case.
* Will implement an intersection algorithm sometime, but for now,
* we will just keep it simple.
* @return The available instruments of the first Synthesizer object
* in the list of Synthesizers.
*/
@Override
public Instrument[] getAvailableInstruments() {
return theSynths.get(0).getAvailableInstruments();
}
/**
* At some point, an intersection algorithm will determine the
* common loaded instruments in all of the Synthesizers in the list.
* For now, it will be kept simple.
* @return The loaded instruments of the first Synthesizer object in
* the list of Synthesizers.
*/
@Override
public Instrument[] getLoadedInstruments() {
return theSynths.get(0).getLoadedInstruments();
}
/**
* Loads all of the instruments of a Soundbank into ALL of the Synthesizers
* in the list of Synthesizers.
* @return <b>True</b> if the load was successful, <b>False</b> otherwise.
*/
@Override
public boolean loadAllInstruments(Soundbank soundbank) {
boolean success = true;
for (Synthesizer s : theSynths)
if (!s.loadAllInstruments(soundbank))
success = false;
return success;
}
/**
* Unloads all of the instruments of a Soundbank from ALL of the
* Synthesizers in the list of Synthesizers.
*/
@Override
public void unloadAllInstruments(Soundbank soundbank) {
for (Synthesizer s : theSynths)
s.unloadAllInstruments(soundbank);
}
/**
* Loads the specified instruments from a soundbank into ALL of the
* Synthesizers in the list of Synthesizers.
* @return <b>True</b> if it succeeded, <b>False</b> otherwise.
*/
@Override
public boolean loadInstruments(Soundbank soundbank, Patch[] patchList) {
boolean success = true;
for (Synthesizer s : theSynths)
if (!s.loadInstruments(soundbank, patchList))
success = false;
return success;
}
/**
* Unloads the specified instruments from ALL of the Synthesizers in the
* list of Synthesizers.
*/
@Override
public void unloadInstruments(Soundbank soundbank, Patch[] patchList) {
for (Synthesizer s : theSynths)
s.unloadInstruments(soundbank, patchList);
}
/**
* Adds SoftSynthesizer objects to the MultiSynthesizer such that
* it has enough Synthesizers to accommodate the number of channels
* that one wishes to have.
* @param i The number of channels that one wishes to have.
* @throws MidiUnavailableException If the MultiSynthesizer isn't
* initialized.
*/
public void ensureCapacity(int i) throws MidiUnavailableException {
if (!initialized)
throw new MidiUnavailableException();
int repeat = (int) Math.floor((double)i / 16);
for (int j = 0; j < repeat; j++) {
Synthesizer s = new SoftSynthesizer();
s.open();
for (Instrument inst : s.getLoadedInstruments())
s.unloadInstrument(inst);
for (Instrument inst : this.getLoadedInstruments())
s.loadInstrument(inst);
theSynths.add(s);
}
}
}
<file_sep>package smp.models.staff;
import java.io.Serializable;
import java.text.ParseException;
import smp.components.Values;
import smp.components.InstrumentIndex;
/**
* A note on the Staff, to be added to the noteMatrix of the Staff.
*
* @author RehdBlob
* @since 2012.08.31
*/
public class StaffNote implements Serializable {
/**
* Generated serial ID.
*/
private static final long serialVersionUID = 6827248837281952104L;
/**
* This is the location on the matrix where the note exists. (y-axis). One
* can recover the note that you are supposed to actually play by adding a
* constant offset to this position value.
*/
private int position;
/** The offset that this note will have. */
private int accidental = 0;
/** This is the volume of the note. */
private int volume = Values.DEFAULT_VELOCITY;
/**
* Whether this is a mute note or not. 0 indicates no. 1 indicates a note
* mute type. 2 indicates an instrument mute type.
*/
private int muteNote;
/**
* The Instrument that the note on the staff is to use.
*/
private InstrumentIndex theInstrument;
/**
* Default constructor that makes the note by default at half volume.
*
* @param theInd
* The instrument that this StaffNote will play.
* @param position
* The physical location of this note on the staff.
* @param acc
* The sharp / flat / whatever that we are offsetting this note
* by.
*/
public StaffNote(InstrumentIndex theInd, int pos, int acc) {
this(theInd, pos, acc, Values.HALF_VELOCITY);
}
/**
* @param theInd
* The instrument that this StaffNote will play.
* @param position
* The physical location of this note on the staff.
* @param acc
* The sharp / flat / whatever that we are offsetting this note
* by.
* @param vol
* The volume that we want this note to play at.
*/
public StaffNote(InstrumentIndex theInd, int pos, int acc, int vol) {
theInstrument = theInd;
accidental = acc;
position = pos;
volume = vol;
}
/**
* Construct a <code>StaffNote</code> given its printed
* <code>toString()</code>
*
* @param spl
* The String to attempt to convert to a <code>StaffNote</code>
* @throws ParseException
* In case we are trying to parse an invalid string.
*/
public StaffNote(String spl) throws ParseException {
String[] sp = spl.split(" ");
if (sp.length != 2) {
throw new ParseException("Invalid note", 0);
}
theInstrument = InstrumentIndex.valueOf(sp[0]);
for (int i = 0; i < Values.staffNotes.length; i++) {
if (sp[1].contains(Values.staffNotes[i].name())) {
position = i;
}
}
// Single-note volumes not implemented yet.
volume = Values.HALF_VELOCITY;
switch (sp[1].length()) {
case 2:
accidental = 0;
muteNote = 0;
break;
case 3:
accidental = decodeAccidental(sp[1].charAt(2));
muteNote = 0;
break;
case 4:
accidental = 0;
muteNote = Integer.parseInt("" + sp[1].charAt(sp[1].length() - 1));
break;
case 5:
accidental = decodeAccidental(sp[1].charAt(2));
muteNote = Integer.parseInt("" + sp[1].charAt(sp[1].length() - 1));
break;
default:
accidental = 0;
muteNote = 0;
break;
}
}
/**
* Given character <code>c</code>, decode it as a doublesharp, sharp, flat,
* or doubleflat.
*
* @param c
* The character to decode.
* @return The accidental to set.
*/
private int decodeAccidental(char c) {
switch (c) {
case 'X':
return 2;
case '#':
return 1;
case 'b':
return -1;
case 'B':
return -2;
default:
return 0;
}
}
/**
* Sets the accidental of this note to whatever <code>a</code> is.
*
* @param a
* The accidental that we're trying to set this note to.
*/
public void setAccidental(int a) {
accidental = a;
}
@Override
public boolean equals(Object o) {
if (!(o instanceof StaffNote)) {
return false;
} else {
StaffNote other = (StaffNote) o;
return other.position == position
&& other.theInstrument == theInstrument
&& other.accidental == accidental
&& other.muteNote == muteNote;
}
}
/** @return The offset from the actual note that we have here. */
public int getAccidental() {
return accidental;
}
/** @return The numerical position that this note is located at. */
public int getPosition() {
return position;
}
/** @return The numerical volume of this note. */
public int volume() {
return volume;
}
/**
* Sets the volume to some number that we give to this method.
*
* @param v
* The volume we want to set.
*/
public void setVolume(int v) {
if (v >= Values.MIN_VELOCITY && v <= Values.MAX_VELOCITY)
volume = v;
}
/** @return The instrument that this StaffNote is. */
public InstrumentIndex getInstrument() {
return theInstrument;
}
/**
* @return The mute note type that this note is.
*/
public int muteNoteVal() {
return muteNote;
}
/**
* Sets the StaffNote to a specific type of mute note. 1 indicates a mute
* note that mutes a single note. 2 indicates a mute note that mutes an
* entire instrument.
*
* @param m
* What type of mute note this is.
*/
public void setMuteNote(int m) {
muteNote = m;
}
@Override
public String toString() {
String noteName = Values.staffNotes[position].name();
String noteAcc = "";
switch (accidental) {
case 2:
noteAcc = "X";
break;
case 1:
noteAcc = "#";
break;
case -1:
noteAcc = "b";
break;
case -2:
noteAcc = "B";
break;
default:
break;
}
if (muteNote == 2) {
return theInstrument.toString() + " " + noteName + noteAcc + "m2";
} else if (muteNote == 1) {
return theInstrument.toString() + " " + noteName + noteAcc + "m1";
} else {
return theInstrument.toString() + " " + noteName + noteAcc;
}
}
}
<file_sep>package smp.presenters.staff;
import java.util.ArrayList;
import javafx.beans.property.DoubleProperty;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.scene.Node;
import javafx.scene.image.ImageView;
import javafx.scene.layout.HBox;
import smp.ImageIndex;
import smp.ImageLoader;
import smp.TestMain;
import smp.components.Values;
import smp.models.stateMachine.StateMachine;
public class StaffMeasureLinesPresenter {
// TODO: auto-add these model comments
// ====Models====
private DoubleProperty measureLineNumber;
private HBox staffMeasureLines;
private ArrayList<ImageView> measureLines;
// TODO: set
private ImageLoader il = (ImageLoader) TestMain.imgLoader;
public StaffMeasureLinesPresenter(HBox staffMeasureLines) {
this.staffMeasureLines = staffMeasureLines;
this.measureLineNumber = StateMachine.getMeasureLineNum();
initializeStaffMeasureLines(this.staffMeasureLines);
setupViewUpdater();
}
/**
* These are the lines that divide up the staff.
*
* @param staffMLines
* The measure lines that divide the staff.
*/
private void initializeStaffMeasureLines(HBox mLines) {
measureLines = new ArrayList<ImageView>();
for (Node n : mLines.getChildren())
measureLines.add((ImageView) n);
for (int i = 0; i < measureLines.size(); i++) {
if (i % Values.TIMESIG_BEATS == 0)
measureLines.get(i).setImage(
il.getSpriteFX(ImageIndex.STAFF_MLINE));
else
measureLines.get(i).setImage(
il.getSpriteFX(ImageIndex.STAFF_LINE));
}
}
private void setupViewUpdater() {
this.measureLineNumber.addListener(new ChangeListener<Number>() {
@Override
public void changed(ObservableValue<? extends Number> observable, Number oldValue, Number newValue) {
int currLine = newValue.intValue();
for (int i = 0; i < measureLines.size(); i++) {
ImageView currImage = measureLines.get(i);
if ((currLine + i) % Values.TIMESIG_BEATS == 0) {
currImage.setImage(il.getSpriteFX(ImageIndex.STAFF_MLINE));
} else {
currImage.setImage(il.getSpriteFX(ImageIndex.STAFF_LINE));
}
}
}
});
}
}
<file_sep>package smp.models.staff;
import java.io.Serializable;
import javafx.beans.property.IntegerProperty;
import javafx.beans.property.ReadOnlyIntegerProperty;
import javafx.beans.property.SimpleIntegerProperty;
import javafx.beans.property.SimpleListProperty;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import smp.components.Values;
/**
* A line of notes on the staff. This can include
* notes, bookmarks, etc.
* @author RehdBlob
* @since 2012.09.19
*/
public class StaffNoteLine implements Serializable {
/**
* Generated serial ID
*/
private static final long serialVersionUID = 3876410979457142750L;
/**
* This is the list of note volumes (we will use this later as an extension
* to the usual volume-bar-sets-the-volume-of-the-whole-line thing.
*/
private ObservableList<IntegerProperty> volumes;
/** This is the volume of the entire <code>StaffNoteLine</code> */
private IntegerProperty volume = new SimpleIntegerProperty(Values.DEFAULT_VELOCITY);
/** This ArrayList holds staff notes inside it. */
private ObservableList<StaffNote> notes = FXCollections.observableArrayList();
/** @since v1.1.3*/
private ReadOnlyIntegerProperty notesSize = new SimpleListProperty<>(notes).sizeProperty();
/** This ArrayList holds staff events in it. */
private ObservableList<StaffEvent> marks = FXCollections.observableArrayList();
/**
* Creates a new staff note line with the specified
* line number.
*/
public StaffNoteLine() {
}
/**
* Adds a note to the staff note line.
* @param n The note to add to this StaffNoteLine.
*/
public void add(StaffNote n) {
notes.add(n);
}
/**
* Adds an event to this staff note line.
* @param e The event that we are trying to add.
*/
public void addEvent(StaffEvent e) {
marks.add(e);
}
/**
* Deletes a note from the staff.
* @param n The note to delete.
* @return True if we successfully removed the note.
*/
public boolean remove(StaffNote n) {
return notes.remove(n);
}
/**
* Deletes a note from the staff.
* @param index The index which we are deleting from.
* @return The deleted element.
*/
public StaffNote remove(int index) {
return notes.remove(index);
}
/**
* Deletes an event from this staff note line.
* @param e The event that we are trying to remove.
* @return True if we successfully removed the event.
*/
public boolean removeEvent(StaffEvent e) {
return marks.remove(e);
}
/** @return Whether this StaffNoteLine contains the staff note already. */
public boolean contains(StaffNote theNote) {
return notes.contains(theNote);
}
/** @return The number of notes that are in this StaffNoteLine. */
public int size() {
return notes.size();
}
/** @return Whether the StaffNoteLine has any notes or not. */
public boolean isEmpty() {
return notes.isEmpty();
}
/**
* @return The list of notes that this <code>StaffNoteLine</code> contains.
*/
public ObservableList<StaffNote> getNotes() {
return notes;
}
/** @return The list of volumes of the different notes. */
public ObservableList<IntegerProperty> getVolumes() {
return volumes;
}
/** @return The volume of this <code>StaffNoteLine</code>. */
public IntegerProperty getVolume() {
return volume;
}
/**
* @param y The volume that we want to set this note line to.
*/
public void setVolume(double y) {
if (volume.get() >= Values.MIN_VELOCITY &&
volume.get() <= Values.MAX_VELOCITY)
volume.set((int) y);
}
/**
* @param vol A percentage (between 0 and 1) that we want
* to scale this volume by.
*/
public void setVolumePercent(double vol) {
if (vol >= 0 && vol <= 1)
volume.set((int) (vol * Values.MAX_VELOCITY));
}
/**
* @return The percent volume of this StaffNoteLine.
*/
public double getVolumePercent() {
return volume.doubleValue() / Values.MAX_VELOCITY;
}
public ReadOnlyIntegerProperty getNotesSize() {
return notesSize;
}
@Override
public String toString() {
return notes.toString();
}
}
<file_sep>package smp.presenters;
import javafx.beans.property.ObjectProperty;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.scene.image.ImageView;
import smp.models.stateMachine.ProgramState;
import smp.models.stateMachine.StateMachine;
public class ClipboardLabelPresenter {
//TODO: auto-add these model comments
//====Models====
private ObjectProperty<ProgramState> programState;
private ImageView clipboardLabel;
public ClipboardLabelPresenter(ImageView clipboardLabel) {
this.clipboardLabel = clipboardLabel;
this.programState = StateMachine.getState();
setupViewUpdater();
}
private void setupViewUpdater() {
this.programState.addListener(new ChangeListener<Object>() {
@Override
public void changed(ObservableValue<? extends Object> observable, Object oldValue, Object newValue) {
if (newValue.equals(ProgramState.EDITING))
clipboardLabel.setVisible(true);
else if (newValue.equals(ProgramState.ARR_EDITING))
clipboardLabel.setVisible(false);
}
});
}
}
<file_sep>package smp.components.staff.sequences;
import java.io.Serializable;
import java.util.ArrayList;
import smp.components.Values;
/**
* A line of notes on the staff. This can include
* notes, bookmarks, etc.
* @author RehdBlob
* @since 2012.09.19
*/
public class StaffNoteLine implements Serializable {
/**
* Generated serial ID
*/
private static final long serialVersionUID = 3876410979457142750L;
/**
* This is the list of note volumes (we will use this later as an extension
* to the usual volume-bar-sets-the-volume-of-the-whole-line thing.
*/
private ArrayList<Integer> volumes;
/** This is the volume of the entire <code>StaffNoteLine</code> */
private int volume;
/** This ArrayList holds staff notes inside it. */
private ArrayList<StaffNote> notes;
/** This ArrayList holds staff events in it. */
private ArrayList<StaffEvent> marks;
/**
* Creates a new staff note line with the specified
* line number.
*/
public StaffNoteLine() {
notes = new ArrayList<StaffNote>();
marks = new ArrayList<StaffEvent>();
}
/**
* Adds a note to the staff note line.
* @param n The note to add to this StaffNoteLine.
*/
public void add(StaffNote n) {
notes.add(n);
}
/**
* Adds an event to this staff note line.
* @param e The event that we are trying to add.
*/
public void addEvent(StaffEvent e) {
marks.add(e);
}
/**
* Deletes a note from the staff.
* @param n The note to delete.
* @return True if we successfully removed the note.
*/
public boolean remove(StaffNote n) {
return notes.remove(n);
}
/**
* Deletes a note from the staff.
* @param index The index which we are deleting from.
* @return The deleted element.
*/
public StaffNote remove(int index) {
return notes.remove(index);
}
/**
* Deletes an event from this staff note line.
* @param e The event that we are trying to remove.
* @return True if we successfully removed the event.
*/
public boolean removeEvent(StaffEvent e) {
return marks.remove(e);
}
/** @return Whether this StaffNoteLine contains the staff note already. */
public boolean contains(StaffNote theNote) {
return notes.contains(theNote);
}
/** @return The number of notes that are in this StaffNoteLine. */
public int size() {
return notes.size();
}
/** @return Whether the StaffNoteLine has any notes or not. */
public boolean isEmpty() {
return notes.isEmpty();
}
/**
* @return The list of notes that this <code>StaffNoteLine</code> contains.
*/
public ArrayList<StaffNote> getNotes() {
return notes;
}
/** @return The list of volumes of the different notes. */
public ArrayList<Integer> getVolumes() {
return volumes;
}
/** @return The volume of this <code>StaffNoteLine</code>. */
public int getVolume() {
return volume;
}
/**
* @param y The volume that we want to set this note line to.
*/
public void setVolume(double y) {
if (volume >= Values.MIN_VELOCITY &&
volume <= Values.MAX_VELOCITY)
volume = (int) y;
}
/**
* @param vol A percentage (between 0 and 1) that we want
* to scale this volume by.
*/
public void setVolumePercent(double vol) {
if (vol >= 0 && vol <= 1)
volume = (int) (vol * Values.MAX_VELOCITY);
}
/**
* @return The percent volume of this StaffNoteLine.
*/
public double getVolumePercent() {
return ((double) volume) / Values.MAX_VELOCITY;
}
@Override
public String toString() {
return notes.toString();
}
}
<file_sep>package smp.presenters.api.reattachers;
import java.util.ArrayList;
import javafx.beans.property.BooleanProperty;
import javafx.beans.property.ObjectProperty;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.collections.ListChangeListener;
import smp.components.Values;
import smp.models.staff.StaffNoteLine;
import smp.models.staff.StaffSequence;
/**
* This will reattach listeners to the StaffSequence's member properties when a
* new sequence gets set.
*
* @author J
*
*/
public class SequenceReattacher {
// ====(not a Model)====
private ObjectProperty<StaffSequence> theSequence;
public ChangeListener<Number> tempoListener;
public ChangeListener<String> soundsetListener;
public ListChangeListener<StaffNoteLine> theLinesListener;
public ChangeListener<Number> theLinesSizeListener;
public ArrayList<ChangeListener<Boolean>> noteExtensionsListeners = new ArrayList<ChangeListener<Boolean>>();
public ChangeListener<Object> timeSignatureListener;
/**
* The listener for when a new sequence is set. For instance, a new sequence
* is set: the new sequence's tempo should be listened for and the tempo
* view updated.
*/
public ChangeListener<StaffSequence> onReattachListener;
public SequenceReattacher(ObjectProperty<StaffSequence> theSequence) {
this.theSequence = theSequence;
for (int i = 0; i < Values.NUMINSTRUMENTS; i++)
noteExtensionsListeners.add(null);
setupReattacher();
}
private void setupReattacher() {
this.theSequence.addListener(new ChangeListener<Object>() {
@Override
public void changed(ObservableValue<? extends Object> observable, Object oldValue, Object newValue) {
StaffSequence oldSequence = (StaffSequence) oldValue;
BooleanProperty[] noteExtensions = oldSequence.getNoteExtensions();
for (int i = 0; i < noteExtensions.length; i++)
if (noteExtensionsListeners.get(i) != null)
noteExtensions[i].removeListener(noteExtensionsListeners.get(i));
if (soundsetListener != null)
oldSequence.getSoundset().removeListener(soundsetListener);
if (tempoListener != null)
oldSequence.getTempo().removeListener(tempoListener);
if (theLinesListener != null)
oldSequence.getTheLines().removeListener(theLinesListener);
if (theLinesSizeListener != null)
oldSequence.getTheLinesSize().removeListener(theLinesSizeListener);
if (timeSignatureListener != null)
oldSequence.getTimeSignature().removeListener(timeSignatureListener);
StaffSequence newSequence = (StaffSequence) newValue;
noteExtensions = newSequence.getNoteExtensions();
for (int i = 0; i < noteExtensions.length; i++)
if (noteExtensionsListeners.get(i) != null)
noteExtensions[i].addListener(noteExtensionsListeners.get(i));
if (soundsetListener != null)
newSequence.getSoundset().addListener(soundsetListener);
if (tempoListener != null)
newSequence.getTempo().addListener(tempoListener);
if (theLinesListener != null)
newSequence.getTheLines().addListener(theLinesListener);
if (theLinesSizeListener != null)
newSequence.getTheLinesSize().addListener(theLinesSizeListener);
if (timeSignatureListener != null)
newSequence.getTimeSignature().addListener(timeSignatureListener);
}
});
}
public void setNewTempoListener(ChangeListener<Number> tempoListener) {
if (this.tempoListener != null)
this.theSequence.get().getTempo().removeListener(this.tempoListener);
this.tempoListener = tempoListener;
this.theSequence.get().getTempo().addListener(this.tempoListener);
}
public void setNewSoundsetListener(ChangeListener<String> soundsetListener) {
if (this.soundsetListener != null)
this.theSequence.get().getSoundset().removeListener(this.soundsetListener);
this.soundsetListener = soundsetListener;
this.theSequence.get().getSoundset().addListener(this.soundsetListener);
}
public void setNewTheLinesListener(ListChangeListener<StaffNoteLine> theLinesListener) {
if (this.theLinesListener != null)
this.theSequence.get().getTheLines().removeListener(this.theLinesListener);
this.theLinesListener = theLinesListener;
this.theSequence.get().getTheLines().addListener(this.theLinesListener);
}
public void setNewTheLinesSizeListener(ChangeListener<Number> theLinesSizeListener) {
if (this.theLinesSizeListener != null)
this.theSequence.get().getTheLinesSize().removeListener(this.theLinesSizeListener);
this.theLinesSizeListener = theLinesSizeListener;
this.theSequence.get().getTheLinesSize().addListener(this.theLinesSizeListener);
}
public void setNewNoteExtensionListener(int index, ChangeListener<Boolean> noteExtensionsListener) {
if (this.noteExtensionsListeners.get(index) != null)
this.theSequence.get().getNoteExtensions()[index].removeListener(this.noteExtensionsListeners.get(index));
this.noteExtensionsListeners.set(index, noteExtensionsListener);
this.theSequence.get().getNoteExtensions()[index].addListener(this.noteExtensionsListeners.get(index));
}
public void setNewTimeSignatureListener(ChangeListener<Object> timeSignatureListener) {
if (this.timeSignatureListener != null)
this.theSequence.get().getTimeSignature().removeListener(this.timeSignatureListener);
this.timeSignatureListener = timeSignatureListener;
this.theSequence.get().getTimeSignature().addListener(this.timeSignatureListener);
}
public void setOnReattachListener(ChangeListener<StaffSequence> onReattachListener) {
this.onReattachListener = onReattachListener;
this.theSequence.addListener(onReattachListener);
}
}
<file_sep>package smp;
import java.io.File;
import java.io.FilenameFilter;
import java.io.IOException;
import java.nio.file.Files;
import java.util.HashMap;
import java.util.Map;
import javax.sound.midi.Instrument;
import javax.sound.midi.InvalidMidiDataException;
import javax.sound.midi.MidiChannel;
import javax.sound.midi.MidiSystem;
import javax.sound.midi.MidiUnavailableException;
import javax.sound.midi.Soundbank;
import javax.sound.midi.Synthesizer;
import smp.components.Values;
import smp.components.InstrumentIndex;
import smp.components.staff.sequences.Note;
import smp.components.staff.sounds.SMPSynthesizer;
import smp.stateMachine.Settings;
import smp.stateMachine.StateMachine;
/**
* Loads the soundfonts that will be used to play sounds.
* Also holds a Synthesizer and Soundbank that will be used
* to play more sounds.
* @author RehdBlob
* @author j574y923
* @since 2012.08.14
*/
public class SoundfontLoader implements Loader {
/**
* A number between 0 and 1 that indicates the
* completion of the loading Thread's tasks.
*/
private double loadStatus = 0.0;
/**
* The sound synthesizer used to hold as many instruments as needed.
*/
private static SMPSynthesizer theSynthesizer;
/**
* The MIDI channels associated with the MultiSynthsizer.
*/
private static MidiChannel [] chan;
/**
* The soundbank that will hold the sounds that we're trying to play.
*/
private static Soundbank bank;
/**
* The cache that will contain all soundbanks. Each soundbank is indexed by
* its filename.
*/
private static Map<String, Soundbank> bankCache = new HashMap<>();
/**
* Initializes a MultiSynthesizer with the soundfont.
*/
@Override
public void run() {
try {
File f = new File("./" + Values.DEFAULT_SOUNDFONT);
bank = MidiSystem.getSoundbank(f);
theSynthesizer = new SMPSynthesizer();
theSynthesizer.open();
setLoadStatus(0.1);
/* if (advanced mode on)
* theSynthesizer.ensureCapacity(50);
* else
*/
theSynthesizer.ensureCapacity(45);
for (Instrument i : theSynthesizer.getLoadedInstruments()) {
theSynthesizer.unloadInstrument(i);
try {
Thread.sleep(1);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
setLoadStatus(0.2);
theSynthesizer.loadAllInstruments(bank);
setLoadStatus(0.3);
if (Settings.debug > 0){
System.out.println("Loaded Instruments: ");
for (Instrument j : theSynthesizer.getLoadedInstruments())
System.out.println(j.getName());
}
int ordinal = 0;
chan = theSynthesizer.getChannels();
for (InstrumentIndex i : InstrumentIndex.values()) {
setLoadStatus(0.3 + 0.7
* ordinal / InstrumentIndex.values().length);
chan[ordinal].programChange(ordinal);
chan[ordinal].controlChange(Values.REVERB, 0);
ordinal++;
System.out.println("Initialized Instrument: "
+ i.toString());
try {
Thread.sleep(1);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
if (Settings.debug > 0)
System.out.println(
"Synth Latency: " + theSynthesizer.getLatency());
setLoadStatus(1);
} catch (MidiUnavailableException e) {
// Can't recover.
e.printStackTrace();
System.exit(0);
} catch (InvalidMidiDataException e) {
// Can't recover.
e.printStackTrace();
System.exit(0);
} catch (IOException e) {
// Can't recover.
e.printStackTrace();
System.exit(0);
}
}
/**
* Creates soundfonts folder in AppData if it doesn't already exist. Next,
* copies over the default soundfont soundset3.sf2 if it isn't already in
* the folder.
*
* @since v1.1.2
*/
public void ensureSoundfontsFolderExists() {
// windows only for now, TODO: linux and mac
// 1. Let's make sure the folder exists
File soundfontsFolder = new File(Values.SOUNDFONTS_FOLDER);
if(!soundfontsFolder.exists()) {
if(!soundfontsFolder.mkdirs())
System.out.println("Error: failed to create " + Values.SOUNDFONTS_FOLDER);
}
// 2. Let's copy soundset3.sf2 if it's not already in there
File soundfontsFolderSoundset = new File(Values.SOUNDFONTS_FOLDER + Values.DEFAULT_SOUNDFONT);
if (!soundfontsFolderSoundset.exists()) {
try {
Files.copy(new File("./" + Values.DEFAULT_SOUNDFONT).toPath(), soundfontsFolderSoundset.toPath());
} catch (IOException e) {
e.printStackTrace();
}
}
}
/**
* @return The list of filenames *.sf2 in the soundfonts folder.
* @since v1.1.2
*/
public String[] getSoundfontsList() {
File soundfontsFolder = new File(Values.SOUNDFONTS_FOLDER);
if(!soundfontsFolder.exists()) {
System.out.println("Error: no such directory " + Values.SOUNDFONTS_FOLDER);
return null;
}
return soundfontsFolder.list(new FilenameFilter() {
@Override
public boolean accept(File dir, String name) {
return name.toLowerCase().endsWith(".sf2");
}
});
}
/**
* Takes in the absolute path of a soundfont file and constructs a new
* soundbank with all the soundfont's instruments loaded in. The
* MultiSynthesizer will then use the new soundbank.
*
* @param path
* the soundfont file
* @throws IOException
* @throws InvalidMidiDataException
* @throws MidiUnavailableException
* @since v1.1.2
*/
public void loadSoundfont(String path) throws InvalidMidiDataException, IOException, MidiUnavailableException {
File f = new File(path);
if(f.getName().isEmpty())
return;
if (!f.getName().equals(StateMachine.getCurrentSoundset())) {
bank = MidiSystem.getSoundbank(f);
theSynthesizer.loadAllInstruments(bank);
StateMachine.setCurrentSoundset(f.getName());
}
}
/**
* Loads the passed-in filename from AppData.
*
* @param soundset
* The soundfont name
* @throws InvalidMidiDataException
* @throws IOException
* @throws MidiUnavailableException
* @since v1.1.2
*/
public void loadFromAppData(String soundset) throws InvalidMidiDataException, IOException, MidiUnavailableException {
//TODO: check linux or mac, choose platform-specific folder
if(soundset.isEmpty())
return;
loadSoundfont(Values.SOUNDFONTS_FOLDER + soundset);
}
/**
* Copies the soundfont file to AppData.
*
* @param path
* Path to the soundfont
* @return if soundfont exists in AppData now
* @since v1.1.2
*/
public boolean addSoundfont(String path) {
return addSoundfont(new File(path));
}
/**
* Copies the soundfont file to AppData.
*
* @param sf
* The soundfont file.
* @return if soundfont exists in AppData now
* @since v1.1.2
*/
public boolean addSoundfont(File sf) {
String sfName = sf.getName();
if(sfName.isEmpty())
return false;
File destSf = new File(Values.SOUNDFONTS_FOLDER + sfName);
if(!destSf.exists()) {
try {
Files.copy(sf.toPath(), destSf.toPath());
} catch (IOException e) {
e.printStackTrace();
return false;
}
}
return true;
}
/**
* Stores the current soundbank in cache for quick loading.
*
* @since v1.1.2
*/
public void storeInCache() {
String currentSoundset = StateMachine.getCurrentSoundset();
if(!bankCache.containsKey(currentSoundset))
bankCache.put(currentSoundset, bank);
}
/**
* Loads the soundset from AppData and stores the soundbank in cache for
* quick loading. This will not change the program's current soundbank.
*
* @param soundset
* The soundfont name
* @throws IOException
* @throws InvalidMidiDataException
* @since v1.1.2
*/
public void loadToCache(String soundset) throws InvalidMidiDataException, IOException {
//TODO: check linux or mac, choose platform-specific folder
if(soundset.isEmpty())
return;
File f = new File(Values.SOUNDFONTS_FOLDER + soundset);
if(!bankCache.containsKey(soundset)) {
Soundbank sb = MidiSystem.getSoundbank(f);
bankCache.put(soundset, sb);
}
}
/**
* Loads the Soundbank with the soundset name from bankCache and sets it as
* the program's MultiSynthesizer's current soundfont. This is the fast way
* to set the program's soundfont.
*
* @param soundset
* The soundset name (e.g. soundset3.sf2)
* @return if program's current soundset successfully set to soundset
* @since v1.1.2
*/
public boolean loadFromCache(String soundset) {
if(StateMachine.getCurrentSoundset().equals(soundset))
return true;
if(bankCache.containsKey(soundset)) {
bank = bankCache.get(soundset);
theSynthesizer.loadAllInstruments(bank);
StateMachine.setCurrentSoundset(soundset);
return true;
}
return false;
}
/**
* Clears the bankCache.
*
* @since v1.1.2
*/
public void clearCache() {
bankCache.clear();
}
/**
* @return The Soundbank cache that holds a map of soundbanks.
* @since v1.1.2
*/
public static Map<String, Soundbank> getBankCache() {
return bankCache;
}
/**
* @return The current MultiSynthesizer that holds a list of Synthesizers.
*/
public static Synthesizer getSynth() {
return theSynthesizer;
}
/**
* @return An Array of references for MidiChannel objects needed to
* play sounds.
*/
public static MidiChannel[] getChannels() {
return chan;
}
/**
* Closes the synthesizers.
*/
public void close() {
theSynthesizer.close();
}
/**
* @return A double value between 0 and 1, representing the
* load status of this class.
*/
@Override
public double getLoadStatus() {
return loadStatus;
}
/**
* Set the load status of the SoundfontLoader.
* @param d A double value between 0 and 1 that represents the
* load state of this class.
*/
@Override
public void setLoadStatus(double d) {
if (d >= 0 && d <= 1)
loadStatus = d;
}
/**
* Plays a certain sound given a Note and some instrument.
* @param n The Note to play
* @param i The Instrument to play it with.
*/
public static void playSound(Note n, InstrumentIndex i) {
playSound(n.getKeyNum(), i, 0);
}
/**
* Plays a certain sound given a Note and some instrument, along with the
* accidental we are supposed to play it with.
* @param i The note index we are supposed to play this note at.
* @param theInd The InstrumentIndex.
* @param acc The accidental that we are given.
*/
public static void playSound(int i, InstrumentIndex theInd, int acc) {
playSound(i, theInd, acc, Values.MAX_VELOCITY);
}
/**
* Plays a certain sound given a Note and some instrument, along with the
* accidental we are supposed to play it with and the volume with which we are
* trying to play at.
* @param i The note index we are supposed to play this note at.
* @param theInd The InstrumentIndex.
* @param acc The accidental that we are given.
* @param vel The velocity of the note that we are given.
*/
public static void playSound(int i, InstrumentIndex theInd, int acc, int vel) {
int ind = theInd.getChannel() - 1;
chan[ind].noteOn(i + acc, vel);
}
/**
* Stops a certain sound given a Note and some instrument, along with the
* accidental we are supposed to play it with and the volume with which we are
* trying to play at.
* @param i The note index we are supposed to play this note at.
* @param theInd The InstrumentIndex.
* @param acc The accidental that we are given.
*/
public static void stopSound(int i, InstrumentIndex theInd, int acc) {
int ind = theInd.getChannel() - 1;
chan[ind].noteOff(i + acc);
}
/**
* Stops a certain sound given a Note and some instrument, along with the
* accidental we are supposed to play it with and the volume with which we are
* trying to play at.
* @param i The note index we are supposed to play this note at.
* @param theInd The InstrumentIndex.
* @param acc The accidental that we are given.
* @param vel The note-off velocity.
*/
public static void stopSound(int i, InstrumentIndex theInd, int acc, int vel) {
int ind = theInd.getChannel() - 1;
chan[ind].noteOff(i + acc, vel);
}
}
<file_sep>package smp;
import java.io.File;
import java.util.ArrayList;
import java.util.EnumSet;
import com.sun.javafx.application.LauncherImpl;
import javafx.application.Application;
import javafx.application.Platform;
import javafx.application.Preloader.ProgressNotification;
import javafx.application.Preloader.StateChangeNotification;
import javafx.beans.property.BooleanProperty;
import javafx.beans.property.SimpleBooleanProperty;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.concurrent.Task;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.fxml.FXMLLoader;
import javafx.geometry.Pos;
import javafx.scene.ImageCursor;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.scene.image.Image;
import javafx.scene.input.KeyCode;
import javafx.scene.input.KeyEvent;
import javafx.scene.input.MouseButton;
import javafx.scene.input.MouseEvent;
import javafx.scene.input.ScrollEvent;
import javafx.scene.layout.FlowPane;
import javafx.scene.layout.VBox;
import javafx.stage.Stage;
import javafx.stage.StageStyle;
import javafx.stage.WindowEvent;
import smp.components.Values;
import smp.components.InstrumentIndex;
import smp.components.staff.StaffInstrumentEventHandler;
import smp.fx.SMPFXController;
import smp.fx.SplashScreen;
import smp.stateMachine.ProgramState;
import smp.stateMachine.Settings;
import smp.stateMachine.StateMachine;
/**
* Super Mario Paint <br>
* Based on the old SNES game from 1992, Mario Paint <br>
* Inspired by:<br>
* MarioSequencer (2002) <br>
* TrioSequencer <br>
* <NAME>'s Mario Paint Composer 1.0 / 2.0 (2007-2008) <br>
* FordPrefect's Advanced Mario Sequencer (2009) <br>
* The GUI is primarily written with JavaFX <br>
*
* Dev team:
* RehdBlob (2012 - current)
* j574y923 (2017 - current)
* CyanSMP64 (2019 - current)
* seymour (2020 - current)
*
* @author RehdBlob
* @author j574y923
* @author CyanSMP64
* @author seymour
*
* @since 2012.08.16
* @version 1.4.2
*/
public class SuperMarioPaint extends Application {
/**
* Location of the Main Window fxml file.
*/
private String mainFxml = "./MainWindow.fxml";
/**
* Location of the Advanced Mode (super secret!!) fxml file.
*/
@SuppressWarnings("unused")
private String advFxml = "./AdvWindow.fxml";
/**
* The number of threads that are running to load things for Super Mario
* Paint.
*/
private static final int NUM_THREADS = 2;
/**
* Loads all the sprites that will be used in Super Mario Paint.
*/
private Loader imgLoader = new ImageLoader();
/**
* Loads the soundfonts that will be used in Super Mario Paint.
*/
private Loader sfLoader = new SoundfontLoader();
/** Image Loader thread. */
private Thread imgLd;
/** Soundfont loader thread. */
private Thread sfLd;
/** This is the main application stage. */
private Stage primaryStage;
/** This is the primary Scene on the main application stage. */
private Scene primaryScene;
/** This is the loaded FXML file. */
private Parent root;
/**
* The controller class for the FXML.
*/
private SMPFXController controller = new SMPFXController();
/** Whether we are done loading the application or not. */
private BooleanProperty ready = new SimpleBooleanProperty(false);
/**
* This should hopefully get something up on the screen quickly. This is
* taken from http://docs.oracle.com/javafx/2/deployment/preloaders.htm
*/
private void longStart() {
// long init in background
Task<Void> task = new Task<Void>() {
@Override
protected Void call() throws Exception {
sfLd.start();
imgLd.start();
do {
try {
Thread.sleep(1);
} catch (InterruptedException e) {
e.printStackTrace();
}
double imgStatus = imgLoader.getLoadStatus();
double sfStatus = sfLoader.getLoadStatus();
double ld = (imgStatus + sfStatus) * 100 / NUM_THREADS
* 0.5;
notifyPreloader(new ProgressNotification(ld));
} while (imgLd.isAlive() || sfLd.isAlive());
FXMLLoader loader = new FXMLLoader();
loader.setController(controller);
loader.setLocation(new File(mainFxml).toURI().toURL());
root = (Parent) loader.load();
notifyPreloader(new ProgressNotification(0.75));
ready.setValue(Boolean.TRUE);
return null;
}
};
new Thread(task).start();
}
/** Explicitly create constructor without arguments. */
public SuperMarioPaint() {
}
/**
* Starts three <code>Thread</code>s. One of them is currently a dummy
* splash screen, the second an <code>ImageLoader</code>, and the third one
* a <code>SoundfontLoader</code>.
*
* @see ImageLoader
* @see SoundfontLoader
* @see SplashScreen
*/
@Override
public void init() {
imgLd = new Thread(imgLoader);
sfLd = new Thread(sfLoader);
controller.setImageLoader((ImageLoader) imgLoader);
controller.setSoundfontLoader((SoundfontLoader) sfLoader);
}
/**
* Starts the application and loads the FXML file that contains a lot of the
* class hierarchy.
*
* @param primaryStage
* The primary stage that will be showing the main window of
* Super Mario Paint.
*/
@Override
public void start(Stage ps) {
primaryStage = ps;
longStart();
ready.addListener(new ChangeListener<Boolean>() {
@Override
public void changed(ObservableValue<? extends Boolean> ov,
Boolean t, Boolean t1) {
if (Boolean.TRUE.equals(t1)) {
Platform.runLater(new Runnable() {
@Override
public void run() {
try {
primaryStage.setTitle("Super Mario Paint " + Settings.version);
setupCloseBehaviour(primaryStage);
primaryStage.setResizable(false);
primaryStage.setHeight(Values.DEFAULT_HEIGHT);
primaryStage.setWidth(Values.DEFAULT_WIDTH);
primaryScene = new Scene(root, 1024, 768);
primaryStage.setScene(primaryScene);
makeKeyboardListeners(primaryScene);
notifyPreloader(new ProgressNotification(1));
notifyPreloader(new StateChangeNotification(
StateChangeNotification.Type.BEFORE_START));
// @since 2020.4.28 - seymour
// Changes the cursor image
setCursor(0);
// Changes the app icon (gives the option to use a given icon OR a random icon from all instruments)
if (new File("./sprites/ICON.png").exists())
setIcon("./sprites/ICON.png");
else {
int randNum = (int) Math.floor(Math.random() * Values.NUMINSTRUMENTS);
ArrayList<InstrumentIndex> instList = new ArrayList<InstrumentIndex>(
EnumSet.allOf(InstrumentIndex.class));
String instName = instList.get(randNum).name();
setIcon("./sprites/" + instName + "_SM.png");
}
primaryStage.show();
} catch (Exception e) {
e.printStackTrace();
System.exit(1);
}
}
});
}
}
});
;
}
/**
* Protip for JavaFX users: Make sure you define your application close
* behavior.
*/
@Override
public void stop() {
// Platform.exit();
System.exit(0);
}
/**
* Got this off of https://community.oracle.com/thread/2247058?tstart=0 This
* appears quite useful as a 'really exit?' type thing. This dialog
* currently needs some work, so we're not going to include it in the alpha
* release.
*
* @param primaryStage
* The main stage of interest.
*/
private void setupCloseBehaviour(final Stage primaryStage) {
primaryStage.setOnCloseRequest(new EventHandler<WindowEvent>() {
@Override
public void handle(WindowEvent event) {
if (StateMachine.isSongModified()
|| StateMachine.isArrModified()) {
final Stage dialog = new Stage();
dialog.setHeight(100);
dialog.setWidth(300);
dialog.setResizable(false);
dialog.initStyle(StageStyle.UTILITY);
Label label = new Label();
label.setMaxWidth(300);
label.setWrapText(true);
if (StateMachine.isSongModified()
&& StateMachine.isArrModified()) {
label.setText("The song and arrangement have\n"
+ "both not been saved! Really exit?");
} else if (StateMachine.isSongModified()) {
label.setText("The song has not been saved! "
+ "Really exit?");
} else if (StateMachine.isArrModified()) {
label.setText("The arrangement has not been saved! "
+ "Really exit?");
}
Button okButton = new Button("Yes");
okButton.setOnAction(new EventHandler<ActionEvent>() {
@Override
public void handle(ActionEvent event) {
dialog.close();
stop();
}
});
Button cancelButton = new Button("No");
cancelButton.setOnAction(new EventHandler<ActionEvent>() {
@Override
public void handle(ActionEvent event) {
dialog.close();
}
});
FlowPane pane = new FlowPane(10, 10);
pane.setAlignment(Pos.CENTER);
pane.getChildren().addAll(okButton, cancelButton);
VBox vBox = new VBox(10);
vBox.setAlignment(Pos.CENTER);
vBox.getChildren().addAll(label, pane);
Scene scene1 = new Scene(vBox);
dialog.setScene(scene1);
dialog.show();
} else {
stop();
}
event.consume();
}
});
}
/**
* Creates the keyboard listeners that we will be using for various other
* portions of the program. Ctrl, alt, and shift are of interest here, but
* the arrow keys will also be considered.
*
* @param primaryScene
* The main window.
*/
private void makeKeyboardListeners(Scene primaryScene) {
primaryScene.addEventHandler(MouseEvent.ANY, controller.getStaffInstrumentEventHandler());
ArrayList<MouseButton> mouseButtons = new ArrayList<MouseButton>();
// Just a temporary thing to change mouse until i (or someone else) can find out where to put it =P -- seymour
primaryScene.addEventHandler(MouseEvent.MOUSE_PRESSED,
new EventHandler<MouseEvent>() {
@Override
public void handle(MouseEvent m) {
if (!mouseButtons.contains(m.getButton()))
mouseButtons.add(m.getButton());
if (mouseButtons.contains(MouseButton.MIDDLE) || (StateMachine.isClipboardPressed() && m.getButton() != MouseButton.SECONDARY))
setCursor(2);
else if (mouseButtons.contains(MouseButton.PRIMARY))
setCursor(1);
else if (mouseButtons.contains(MouseButton.SECONDARY) && !StateMachine.isClipboardPressed())
setCursor(3);
m.consume();
}
});
primaryScene.addEventHandler(MouseEvent.MOUSE_RELEASED,
new EventHandler<MouseEvent>() {
@Override
public void handle(MouseEvent m) {
// Added to remove the default cursor appearing while other mouse buttons are held
mouseButtons.remove(m.getButton());
if (mouseButtons.contains(MouseButton.MIDDLE) || (StateMachine.isClipboardPressed() && m.getButton() != MouseButton.SECONDARY))
setCursor(2);
else if (mouseButtons.contains(MouseButton.PRIMARY))
setCursor(1);
else if (mouseButtons.contains(MouseButton.SECONDARY) && !StateMachine.isClipboardPressed())
setCursor(3);
if (mouseButtons.isEmpty())
setCursor(0);
m.consume();
}
});
// TODO: move to its own keyhandler
primaryScene.addEventHandler(KeyEvent.KEY_PRESSED,
new EventHandler<KeyEvent>() {
@Override
public void handle(KeyEvent ke) {
switch(ke.getCode()) {
case PAGE_UP:
controller.getStaff().shift(-Values.NOTELINES_IN_THE_WINDOW);
break;
case PAGE_DOWN:
controller.getStaff().shift(Values.NOTELINES_IN_THE_WINDOW);
break;
case HOME:
if(ke.isControlDown())
controller.getStaff().setLocation(0);
break;
case END:
if(ke.isControlDown())
controller.getStaff().setLocation((int)controller.getScrollbar().getMax());
break;
// @since v1.4, adds A and D as controls. move to correct spot later if needed
case A:
if(!ke.isControlDown() && !ke.isShiftDown())
controller.getStaff().moveLeft();
// @since v1.1.2, requested by seymour
case LEFT:
if (controller.getNameTextField().focusedProperty().get()) // Don't trigger while typing name
break;
if(ke.isControlDown() && ke.isShiftDown())
controller.getStaff().shift(-4);
if((ke.isControlDown() && ke.getCode() != KeyCode.A) || ke.isShiftDown())
controller.getStaff().shift(-4);
break;
case D:
if(!ke.isControlDown() && !ke.isShiftDown())
controller.getStaff().moveRight();
case RIGHT:
if (controller.getNameTextField().focusedProperty().get()) // Don't trigger while typing name
break;
if(ke.isControlDown() && ke.isShiftDown())
controller.getStaff().shift(4);
if(ke.isControlDown() || ke.isShiftDown())
controller.getStaff().shift(4);
break;
// @since 1.4, adds conventional spacebar functionality
// TODO: Make this better please =)
case SPACE:
if (controller.getNameTextField().focusedProperty().get()) // Don't trigger while typing name
break;
if (ke.isControlDown() || ke.isShiftDown())
controller.getStaff().setLocation(0);
if (StateMachine.getState() == ProgramState.SONG_PLAYING) {
StateMachine.setState(ProgramState.EDITING);
controller.getStaff().stopSong();
} else if (StateMachine.getState() == ProgramState.ARR_PLAYING) {
StateMachine.setState(ProgramState.ARR_EDITING);
controller.getStaff().stopSong();
} else if (StateMachine.getState() == ProgramState.EDITING) {
StateMachine.setState(ProgramState.SONG_PLAYING);
controller.getStaff().startSong();
} else if (StateMachine.getState() == ProgramState.ARR_EDITING) {
StateMachine.setState(ProgramState.ARR_PLAYING);
controller.getStaff().startArrangement();
}
break;
default:
}
StateMachine.getButtonsPressed().add(ke.getCode());
StaffInstrumentEventHandler.updateAccidental();
ke.consume();
}
});
primaryScene.addEventHandler(KeyEvent.KEY_RELEASED,
new EventHandler<KeyEvent>() {
@Override
public void handle(KeyEvent ke) {
StateMachine.getButtonsPressed().remove(ke.getCode());
StaffInstrumentEventHandler.updateAccidental();
ke.consume();
}
});
//put this into StateMachine?
primaryScene.addEventHandler(ScrollEvent.ANY, new EventHandler<ScrollEvent>() {
@Override
public void handle(ScrollEvent se) {
if (se.getDeltaY() < 0) {
// if (se.isControlDown())
// controller.getStaff().setLocation((int) controller.getScrollbar().getValue() + 4);
// else
controller.getStaff().moveRight();
} else if (se.getDeltaY() > 0) {
// if (se.isControlDown())
// controller.getStaff().setLocation((int) controller.getScrollbar().getValue() - 4);
// else
controller.getStaff().moveLeft();
}
se.consume();
}
});
primaryStage.focusedProperty().addListener(
new ChangeListener<Boolean>() {
@Override
public void changed(ObservableValue<? extends Boolean> ov,
Boolean t, Boolean t1) {
StateMachine.clearKeyPresses();
}
});
}
/**
* Launches the application.
*
* @param args
* Sets debug options on or off.
*/
public static void main(String[] args) {
if (args.length == 0) {
try {
LauncherImpl.launchApplication(SuperMarioPaint.class,
SplashScreen.class, args);
} catch (Exception e) {
e.printStackTrace();
}
} else if (args.length > 0
&& (args[0].equals("--debug") || args[0].equals("--d"))) {
if (args[1] != null) {
try {
Settings.setDebug(Integer.parseInt(args[1]));
} catch (NumberFormatException e) {
Settings.setDebug(1);
}
} else {
Settings.setDebug(1);
}
try {
LauncherImpl.launchApplication(SuperMarioPaint.class,
SplashScreen.class, args);
} catch (Exception e) {
e.printStackTrace();
}
}
}
/**
* Changes the cursor image.
* TYPES:
* 0 - Default
* 1 - Grab
* 2 - Open (splayed)
* 3 - Eraser
*
* @param isPressed
* Which mouse button is being pressed (if any).
*/
public void setCursor(int type) {
Platform.runLater(new Runnable() {
@Override
public void run() {
ImageCursor im = ((ImageLoader) imgLoader).getCursor(type);
if (im != null) {
primaryScene.setCursor(im);
}
}
});
}
/**
* Changes the icon to the given image location.
*
* @param fileLocation
* The location of the new icon image.
*/
public void setIcon(String fileLocation) {
if (new File(fileLocation).exists())
primaryStage.getIcons().add(new Image("file:" + fileLocation));
}
/**
* Gets the soundfont Loader. This function will probably only be temporary
* if we plan to move the loader to another class.
*
* @return the soundfont Loader
*/
public Loader getSoundfontLoader() {
return sfLoader;
}
}
<file_sep>package smp.presenters.options;
import javafx.beans.property.BooleanProperty;
import javafx.beans.property.StringProperty;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.scene.control.CheckBox;
import smp.models.stateMachine.Variables;
public class BindSoundfontPresenter {
//TODO: auto-add these model comments
//====Models====
private BooleanProperty optionsBindSoundfont;
private StringProperty optionsBindedSoundfont;
private CheckBox bindSoundfont;
public BindSoundfontPresenter(CheckBox bindSoundfont) {
this.bindSoundfont = bindSoundfont;
this.optionsBindSoundfont = Variables.optionsBindSoundfont;
this.optionsBindedSoundfont = Variables.optionsBindedSoundfont;
this.bindSoundfont.selectedProperty().bindBidirectional(optionsBindSoundfont);
if (optionsBindedSoundfont.get().equals(Variables.optionsCurrentSoundfont.get()))
this.bindSoundfont.setSelected(true);
this.bindSoundfont.selectedProperty().addListener(new ChangeListener<Boolean>() {
public void changed(ObservableValue<? extends Boolean> ov, Boolean oldVal, Boolean checked) {
if(checked) {
optionsBindedSoundfont.set(Variables.optionsCurrentSoundfont.get());
} else {
optionsBindedSoundfont.set("");
}
}
});
}
}
<file_sep>package smp.components.buttons;
import javafx.event.EventHandler;
import javafx.scene.control.Slider;
import javafx.scene.image.ImageView;
import javafx.scene.input.KeyCode;
import javafx.scene.input.KeyEvent;
import javafx.scene.input.MouseEvent;
import smp.ImageLoader;
import smp.components.Values;
import smp.components.general.ImagePushButton;
import smp.components.staff.sequences.StaffArrangement;
import smp.components.staff.sequences.StaffSequence;
import smp.fx.Dialog;
import smp.fx.SMPFXController;
import smp.stateMachine.ProgramState;
import smp.stateMachine.StateMachine;
/**
* This is the button that creates a new song.
*
* @author RehdBlob
* @since 2013.12.18
*
*/
public class NewButton extends ImagePushButton {
/**
* Default constructor.
*
* @param i
* This is the <code>ImageView</code> object that will house the
* Load button.
* @param ct
* The FXML controller object.
* @param im
* The Image loader object.
*/
public NewButton(ImageView i, SMPFXController ct, ImageLoader im) {
super(i, ct, im);
// @since v1.4 to accomodate for those with a smaller screen that may not be able to access it.
ct.getBasePane().addEventHandler(KeyEvent.KEY_PRESSED, new EventHandler<KeyEvent>() {
@Override
public void handle(KeyEvent event) {
if (controller.getNameTextField().focusedProperty().get()) return; // Disable while textfield is focused
if(event.isControlDown() && event.getCode() == KeyCode.N)
reactPressed(null);
}
});
}
@Override
protected void reactPressed(MouseEvent event) {
ProgramState curr = StateMachine.getState();
if (curr == ProgramState.EDITING)
newSong();
else if (curr == ProgramState.ARR_EDITING)
newArrangement();
}
@Override
protected void reactReleased(MouseEvent event) {
// do nothing.
}
/**
* Creates a new song and clears the staff of all notes. Make sure you save
* your song first! The action is ignored if the song is playing.
*/
private void newSong() {
boolean cont = true;
if (StateMachine.isSongModified())
cont = Dialog
.showYesNoDialog("The current song has been modified!\n"
+ "Create a new song anyway?");
if (cont) {
theStaff.setSequence(new StaffSequence());
theStaff.setSequenceFile(null);
Slider sc = theStaff.getControlPanel().getScrollbar();
sc.setValue(0);
sc.setMax(Values.DEFAULT_LINES_PER_SONG - 10);
ArrowButton.setEndOfFile(false);
theStaff.getNoteMatrix().redraw();
controller.getNameTextField().clear();
StateMachine.setSongModified(false);
}
}
/**
* Creates a new arrangement and clears the staff of all notes. Make sure
* you save your arrangement first! The action is ignored if an arrangement
* is playing.
*/
private void newArrangement() {
boolean cont = true;
if (StateMachine.isArrModified()) {
cont = Dialog
.showYesNoDialog("The current arrangement has been\n"
+ "modified! Create a new arrangement\nanyway?");
}
if (cont) {
theStaff.setArrangement(new StaffArrangement());
theStaff.setArrangementFile(null);
controller.getNameTextField().clear();
theStaff.getArrangementList().getItems().clear();
StateMachine.setArrModified(false);
}
}
}
<file_sep>package smp.components.staff;
import java.util.ArrayList;
import javafx.collections.ObservableList;
import javafx.event.Event;
import javafx.scene.Node;
import javafx.scene.image.ImageView;
import javafx.scene.layout.HBox;
import javafx.scene.layout.StackPane;
import javafx.scene.layout.VBox;
import javafx.scene.text.Text;
import smp.ImageIndex;
import smp.ImageLoader;
import smp.components.Values;
import smp.components.staff.sequences.StaffNoteLine;
import smp.fx.SMPFXController;
/**
* Wrapper class for all of the images that appear on the Staff of Super Mario
* Paint. Contains the sprite holders for the images that represent notes, the
* ImageView holders for each of the measure lines, the lines that allow one to
* display notes higher than a G or lower than a D on the staff, and the measure
* numbers.
*
* @author RehdBlob
* @since 2012.09.17
*/
public class StaffImages {
/**
* The ArrayList that holds the ImageView objects that the measure lines
* object holds.
*/
private ArrayList<ImageView> measureLines;
/**
* The ArrayList that holds the Text objects that will hold the measure line
* numbers.
*/
private ArrayList<Text> measureNums;
/** These are the bars that highlight notes. */
private ArrayList<ImageView> staffPlayBars;
/** This is the FXML controller class. */
private SMPFXController controller;
/** This is the ImageLoader class. */
private ImageLoader il;
/** The ledger lines. */
private HBox[] staffLLines;
/** The ledger lines at the high C of the staff. */
private ArrayList<Node> highC;
/** The ledger lines at the high A of the staff. */
private ArrayList<Node> highA;
/** The ledger lines at the low C of the staff. */
private ArrayList<Node> lowC;
/** The ledger lines at the low A of the staff. */
private ArrayList<Node> lowA;
/**
* This is the list of lists of the ledger lines, so that we can quickly
* hide everything using a loop, if necessary.
*/
private ArrayList<ArrayList<Node>> theLLines = new ArrayList<ArrayList<Node>>();
/**
* The parent staff object.
*/
private Staff theStaff;
/**
* Constructor that also sets up the staff ledger lines.
*/
public StaffImages(ImageLoader i) {
il = i;
}
/**
* Instantiates this wrapper class with the correct HBox objects such that
* it can begin keeping track of whatever's happening on the staff, at least
* on the measure lines side.
*/
public void initialize() {
initializeStaffMeasureLines(controller.getStaffMeasureLines());
initializeStaffPlayBars(controller.getStaffPlayBars());
initializeStaffMeasureNums(controller.getStaffMeasureNums());
initializeStaffLedgerLines();
initializeStaffInstruments(controller.getStaffInstruments(),
controller.getStaffAccidentals());
initializeVolumeBars(controller.getVolumeBars());
initializeVolumeBarLinks();
}
/**
* Sets up the links between the volume bars display and StaffNoteLines.
*/
private void initializeVolumeBarLinks() {
for (int i = 0; i < Values.NOTELINES_IN_THE_WINDOW; i++) {
StaffVolumeEventHandler sveh = theStaff.getNoteMatrix()
.getVolHandler(i);
StaffNoteLine stl = theStaff.getSequence().getLine(i);
sveh.setStaffNoteLine(stl);
}
}
/**
* Initializes the volume bars in the program.
*
* @param volumeBars
* This is the HBox that holds all of the volume bar
* <code>StackPane</code> objects.
*/
private void initializeVolumeBars(HBox volumeBars) {
ArrayList<StackPane> vol = new ArrayList<StackPane>();
for (Node v : volumeBars.getChildren()) {
StackPane volBar = (StackPane) v;
vol.add(volBar);
StaffVolumeEventHandler sveh = new StaffVolumeEventHandler(volBar,
il, controller.getModifySongManager());
volBar.addEventHandler(Event.ANY, sveh);
theStaff.getNoteMatrix().addVolHandler(sveh);
}
theStaff.getNoteMatrix().setVolumeBars(vol);
}
/**
* These are the numbers above each successive measure.
*/
private void initializeStaffMeasureNums(HBox mNums) {
ArrayList<HBox> measureNumBoxes = new ArrayList<HBox>();
measureNums = new ArrayList<Text>();
for (Node num : mNums.getChildren())
measureNumBoxes.add((HBox) num);
int counter = 1;
for (int i = 0; i < measureNumBoxes.size(); i++) {
HBox theBox = measureNumBoxes.get(i);
Text t = new Text();
theBox.getChildren().add(t);
measureNums.add(t);
if (i % Values.TIMESIG_BEATS == 0) {
t.setText(String.valueOf(counter));
counter++;
} else
continue;
}
}
/**
* Sets up the various note lines of the staff. These are the notes that can
* appear on the staff. This method also sets up sharps, flats, etc.
*
* @param accidentals
* The HBox that holds the framework for the sharps / flats.
* @param instruments
* The HBox that holds the framework for the instruments.
*/
private void initializeStaffInstruments(HBox instruments, HBox accidentals) {
NoteMatrix staffMatrix = theStaff.getNoteMatrix();
ArrayList<VBox> accidentalLines = new ArrayList<VBox>();
for (Node n : accidentals.getChildren())
accidentalLines.add((VBox) n);
ArrayList<VBox> noteLines = new ArrayList<VBox>();
for (Node n : instruments.getChildren())
noteLines.add((VBox) n);
for (int line = 0; line < noteLines.size(); line++) {
VBox verticalHolder = noteLines.get(line);
VBox accVerticalHolder = accidentalLines.get(line);
ObservableList<Node> lineOfNotes = verticalHolder.getChildren();
ObservableList<Node> lineOfAcc = accVerticalHolder.getChildren();
ArrayList<StackPane> notes = new ArrayList<StackPane>();
ArrayList<StackPane> accs = new ArrayList<StackPane>();
for (int pos = 1; pos <= Values.NOTES_IN_A_LINE; pos++) {
StackPane note = (StackPane) lineOfNotes.get(pos - 1);
StackPane acc = (StackPane) lineOfAcc.get(pos - 1);
notes.add(note);
accs.add(acc);
}
staffMatrix.addLine(notes);
staffMatrix.addAccLine(accs);
}
}
/**
* These are the lines that divide up the staff.
*
* @param staffMLines
* The measure lines that divide the staff.
*/
private void initializeStaffMeasureLines(HBox mLines) {
measureLines = new ArrayList<ImageView>();
for (Node n : mLines.getChildren())
measureLines.add((ImageView) n);
for (int i = 0; i < measureLines.size(); i++) {
if (i % Values.TIMESIG_BEATS == 0)
measureLines.get(i).setImage(
il.getSpriteFX(ImageIndex.STAFF_MLINE));
else
measureLines.get(i).setImage(
il.getSpriteFX(ImageIndex.STAFF_LINE));
}
}
/**
* Redraws the staff measure lines and numbers.
*
* @param currLine
* The current line that we are on.
*/
public void updateStaffMeasureLines(int currLine) {
int counter = 0;
for (int i = 0; i < measureLines.size(); i++) {
ImageView currImage = measureLines.get(i);
Text currText = measureNums.get(i);
if ((currLine + i) % Values.TIMESIG_BEATS == 0) {
currImage.setImage(il.getSpriteFX(ImageIndex.STAFF_MLINE));
currText.setText(String.valueOf((int) (Math.ceil(currLine
/ (double) Values.TIMESIG_BEATS) + 1 + counter)));
counter++;
} else {
currImage.setImage(il.getSpriteFX(ImageIndex.STAFF_LINE));
currText.setText("");
}
}
}
/**
* Sets up the note highlighting functionality.
*
* @param staffPlayBars
* The bars that move to highlight different notes.
*/
private void initializeStaffPlayBars(HBox playBars) {
staffPlayBars = new ArrayList<ImageView>();
for (Node n : playBars.getChildren()) {
ImageView i = (ImageView) n;
i.setImage(il.getSpriteFX(ImageIndex.PLAY_BAR1));
i.setVisible(false);
staffPlayBars.add(i);
}
}
/**
* Sets up the staff expansion lines, which are to hold notes that are
* higher than or lower than the regular lines of the staff.
*
* @param staffLLines
* An array of ledger lines. This method expects that there will
* be four of these, two of which indicate the lines above the
* staff and the other of which indicating the lines below the
* staff.
*/
private void initializeStaffLedgerLines() {
highC = new ArrayList<Node>();
highA = new ArrayList<Node>();
lowC = new ArrayList<Node>();
lowA = new ArrayList<Node>();
highC.addAll(staffLLines[0].getChildren());
highA.addAll(staffLLines[1].getChildren());
lowC.addAll(staffLLines[2].getChildren());
lowA.addAll(staffLLines[3].getChildren());
theLLines.add(highC);
theLLines.add(highA);
theLLines.add(lowC);
theLLines.add(lowA);
hideAllLedgerLines();
}
/**
* Hides all of the ledger lines.
*/
public void hideAllLedgerLines() {
for (ArrayList<Node> n : theLLines)
for (Node nd : n)
nd.setVisible(false);
}
/**
* Sets the parent staff object to the specified object.
*
* @param s
* The pointer to the parent staff object.
*/
public void setStaff(Staff s) {
theStaff = s;
}
/**
* @return The list of <code>ImageView</code> objects that holds the bars
* that will highlight the notes that we are playing on the staff.
*/
public ArrayList<ImageView> getPlayBars() {
return staffPlayBars;
}
/**
* Sets the controller class.
*
* @param ct
* The FXML controller class.
*/
public void setController(SMPFXController ct) {
controller = ct;
}
/**
* @param l
* The array of <code>HBox</code>es that contains the rectangles
* for the ledger lines.
*/
public void setLedgerLines(HBox[] l) {
staffLLines = l;
}
/**
* @return The array of <code>HBox</code>es that contains the rectangles for
* the ledger lines.
*/
public HBox[] getLedgerLines() {
return staffLLines;
}
/** @return The ledger lines at position high C. */
public ArrayList<Node> highC() {
return highC;
}
/** @return The ledger lines at position high A. */
public ArrayList<Node> highA() {
return highA;
}
/** @return The ledger lines at position low C. */
public ArrayList<Node> lowC() {
return lowC;
}
/** @return The ledger lines at position low C. */
public ArrayList<Node> lowA() {
return lowA;
}
}
<file_sep>package smp.components.staff.sequences;
/**
* A Bookmark that is placed at some location on the staff, like in
* Advanced Mario Sequencer.
* @author RehdBlob
* @since 2012.09.17
*/
public class Bookmark extends AbstractStaffEvent {
/**
* Generated serial ID.
*/
private static final long serialVersionUID = -5083645250328720866L;
/** Currently does nothing. */
public Bookmark(int num) {
super(num);
}
}
<file_sep>package smp.models.staff;
/**
* Keeps track of the different types of staff events.
* @author RehdBlob
* @since 2013.03.29
*/
public enum StaffEventType {
/** A note. */
NOTE,
/** This changes the tempo of the song. */
SPEEDMARK,
/**
* This is a bookmark that keeps the
* place of whatever it is the user wants.
*/
BOOKMARK;
}
<file_sep>package smp.commandmanager;
import java.util.ArrayList;
import java.util.Deque;
import java.util.List;
import java.util.concurrent.LinkedBlockingDeque;
import smp.components.Values;
/**
* A command manager responsible for recording commands, undoing, and redoing
* commands.
*
* Several commands can be executed then recorded into a list and, when undoing
* or redoing, will undo or redo all those commands together.
*
* @author J
*
*/
public class CommandManager {
protected Deque<List<CommandInterface>> undoStack;
protected Deque<List<CommandInterface>> redoStack;
private List<CommandInterface> nextCommands;
public CommandManager() {
undoStack = new LinkedBlockingDeque<>(Values.MAX_UNDO_REDO_SIZE);
redoStack = new LinkedBlockingDeque<>(Values.MAX_UNDO_REDO_SIZE);
}
public void undo() {
//make sure any current action is recorded before undoing
record();
if (undoStack.isEmpty())
return;
List<CommandInterface> commands = undoStack.pop();
//undo needs reverse order on the commands
for(int i = commands.size() - 1; i >= 0; i--) {
CommandInterface command = commands.get(i);
command.undo();
}
redoStack.push(commands);
System.out.println("...undo..." + undoStack.size() + "/" + (undoStack.size() + redoStack.size()));
}
public void redo() {
if (redoStack.isEmpty())
return;
List<CommandInterface> commands = redoStack.pop();
for(CommandInterface command : commands) {
command.redo();
}
undoStack.push(commands);
System.out.println("...redo..." + undoStack.size() + "/" + (undoStack.size() + redoStack.size()));
}
/**
* This does not literally execute the command. It will put the command into
* a list then you can call record() to put the command list onto the
* undoStack.
*
* @param command
*/
public void execute(CommandInterface command) {
if (nextCommands == null)
nextCommands = new ArrayList<>();
nextCommands.add(command);
}
/**
* record the commands given to execute()
*/
public void record() {
if (nextCommands == null)
return;
if (undoStack.size() >= Values.MAX_UNDO_REDO_SIZE)
undoStack.removeLast();
undoStack.push(nextCommands);
redoStack.clear();
nextCommands = null;
}
public void reset() {
undoStack.clear();
redoStack.clear();
}
}
<file_sep>package smp.presenters.buttons;
import javafx.beans.property.ObjectProperty;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.scene.control.Tooltip;
import javafx.scene.image.ImageView;
import javafx.scene.input.MouseEvent;
import smp.ImageIndex;
import smp.models.stateMachine.ProgramState;
import smp.models.stateMachine.StateMachine;
import smp.presenters.api.button.ImageToggleButton;
/**
* Wrapper class for an ImageView that holds the stop button image. Pressing the
* button changes the image and also changes the state of the program.
*
* @author RehdBlob
* @author j574y923
*
* @since 2018.01.14
*/
public class ClipboardButtonPresenter extends ImageToggleButton {
//TODO: auto-add these model comments
//====Models====
private ObjectProperty<ProgramState> programState;
/**
* Instantiates the clipboard selection button.
*
* @param clipboardButton
* The ImageView that will be manipulated by this class.
* @param ct
* The FXML controller object.
* @param im
* The Image loader object.
*/
public ClipboardButtonPresenter(ImageView clipboardButton) {
super(clipboardButton);
getImages(ImageIndex.CLIPBOARD_PRESSED, ImageIndex.CLIPBOARD_RELEASED);
releaseImage();
Tooltip.install(clipboardButton, new Tooltip("Click (or Shift+R) to toggle region selection\n"
+ "Hover over instrument & press F to filter instrument\n"
+ "Ctrl+A to select all\n"
+ "Ctrl+C to copy notes\n"
+ "Ctrl+V to paste notes\n"
+ "Ctrl+X to cut notes\n"
+ "Delete to delete notes\n"
+ "Alt+N to toggle notes selection\n"
+ "Alt+V to toggle volumes selection"));
// TODO: create getClipboardButton() somewhere so adding a hotkey can be done elsewhere
// ct.getBasePane().addEventHandler(KeyEvent.KEY_PRESSED, new EventHandler<KeyEvent>() {
//
// @Override
// public void handle(KeyEvent event) {
// if(event.isShiftDown() && event.getCode() == KeyCode.R)
// reactPressed(null);
// }
// });
this.programState = StateMachine.getState();
setupViewUpdater();
}
private void setupViewUpdater() {
this.programState.addListener(new ChangeListener<Object>() {
@Override
public void changed(ObservableValue<? extends Object> observable, Object oldValue, Object newValue) {
if (newValue.equals(ProgramState.EDITING))
theImage.setVisible(true);
else if (newValue.equals(ProgramState.ARR_EDITING))
theImage.setVisible(false);
}
});
}
@Override
public void reactPressed(MouseEvent e) {
if (isPressed) {
isPressed = false;
releaseImage();
StateMachine.setClipboardPressed(false);
//TODO: staff, volume presenter
//TODO: make clipboard api more intuitive to mvp
this.controller.getStaffInstruments().setMouseTransparent(false);
this.controller.getVolumeBars().setMouseTransparent(false);
this.controller.getBasePane().getScene().addEventHandler(MouseEvent.ANY,
controller.getStaffInstrumentEventHandler());
} else {
isPressed = true;
pressImage();
StateMachine.setClipboardPressed(true);
this.controller.getStaffInstruments().setMouseTransparent(true);
this.controller.getVolumeBars().setMouseTransparent(true);
this.controller.getBasePane().getScene().removeEventHandler(MouseEvent.ANY,
controller.getStaffInstrumentEventHandler());
}
}
}
<file_sep>package smp;
import java.io.File;
import java.util.ArrayList;
import java.util.Hashtable;
import smp.stateMachine.Settings;
import javafx.scene.ImageCursor;
import javafx.scene.image.Image;
/**
* A class that loads all the necessary images for the program to function when
* the program first starts.
*
* @author RehdBlob
* @since 2012.08.14
*/
public class ImageLoader implements Loader {
/**
* Contains references to all the loaded sprites in JavaFX Image form.
*/
private Hashtable<ImageIndex, Image> spritesFX;
/**
* Contains references to all of the loaded sprites for the cursors in this
* program.
*/
private ArrayList<ImageCursor> cursors;
/**
* The amount of loading that the imageLoader has done, anywhere between 0 to 1.
*/
private static double loadStatus = 0.0;
/**
* The extension of the image files that we are to be loading. An advantage of
* .png files is that they can have transparent pixels.
*/
private String extension = ".png";
/**
* The path where the sprites are located.
*/
private String path = "./sprites/";
/**
* Initializes the sprites hashtables. Will eventually figure out which Image
* class is better: java.awt.Image, or javafx.scene.image.Image.
*/
public ImageLoader() {
cursors = new ArrayList<ImageCursor>();
spritesFX = new Hashtable<ImageIndex, javafx.scene.image.Image>();
}
/**
* Loads all of the image files that will be used in drawing
* the main window and all of the buttons of Super Mario Paint.
* A splash screen runs while this is happening.
*/
@Override
public void run() {
File f;
ImageIndex [] ind = ImageIndex.values();
/** Change this if for some reason we want more cursors. */
int NUM_CURSORS = 4;
for (int i = 0; i < NUM_CURSORS; i++) {
String s = "./sprites/CURSOR_" + i + ".png";
File f2 = new File(s);
if (f2.exists()) {
cursors.add(new ImageCursor(
new Image(f2.toURI().toString()), 0, 0));
if (Settings.debug > 0)
System.out.println(
"Loaded Cursor: " + s);
}
}
for (ImageIndex i : ind) {
setLoadStatus((i.ordinal() + 1.0) / ind.length);
f = new File(path + i.toString() + extension);
try {
Image temp2 =
new Image(f.toURI().toString());
spritesFX.put(i, temp2);
if (Settings.debug > 0)
System.out.println(
"Loaded Image: " + i.toString() + extension);
try {
Thread.sleep(1);
} catch (InterruptedException e) {
e.printStackTrace();
}
} catch (Exception e) {
e.printStackTrace();
}
}
setLoadStatus(1);
}
/**
* Gets an image from whatever <code>ImageIndex</code> that was passed to it.
*
* @param index An ImageIndex, presumably the one that one wants to retreive an
* image with.
* @return An <code>Image</code> that was loaded by the ImageLoader in the
* beginning, linked by the ImageIndex in a Hashtable.
* @throws NullPointerException
*/
public Image getSpriteFX(ImageIndex index) throws NullPointerException {
return spritesFX.get(index);
}
/**
* Gets a cursor from
* @param type
* @return
*/
public ImageCursor getCursor(int type) {
if (type >= cursors.size() || type < 0)
return null;
return cursors.get(type);
}
/**
* @return The current load status, which is anywhere between 0 and 1.
*/
@Override
public double getLoadStatus() {
return loadStatus;
}
/**
* Sets the load status of the Thread version of ImageLoader.
*
* @param d A <b>double</b> that is anywhere between 0 and 1.
*/
@Override
public void setLoadStatus(double d) {
if (d >= 0 && d <= 1)
loadStatus = d;
}
}
<file_sep>package smp.components.buttons;
import java.util.Timer;
import java.util.TimerTask;
import javafx.application.Platform;
import javafx.beans.property.StringProperty;
import javafx.scene.image.ImageView;
import javafx.scene.input.MouseEvent;
import smp.ImageLoader;
import smp.components.Values;
import smp.components.general.ImagePushButton;
import smp.fx.SMPFXController;
import smp.stateMachine.ProgramState;
import smp.stateMachine.StateMachine;
/**
* This is a class that takes care of the adjustment of tempo in Super Mario
* Paint.
*
* @author RehdBlob
* @since 2013.09.28
*/
public class TempoAdjustButton extends ImagePushButton {
/** This is the current tempo. */
private StringProperty currTempo;
/** Tells us whether this is a plus or minus button. */
private boolean isPositive;
/** This is a timer object for click-and-hold. */
private Timer t;
/**
* Default constructor
*
* @param i
* The <code>ImageView</code> object that we want this adjustment
* button to be linked to.
* @param ct
* The FXML controller object.
* @param im
* The Image loader object.
*/
public TempoAdjustButton(ImageView i, SMPFXController ct, ImageLoader im) {
super(i, ct, im);
t = new Timer();
}
/**
* @param b
* Is this a positive button?
*/
public void setPositive(boolean b) {
isPositive = b;
}
/**
* @return Whether this is a positive button.
*/
public boolean isPositive() {
return isPositive;
}
/**
* Sets the String property to display the tempo.
*
* @param s
* This is the StringProperty that displays the tempo.
*/
public void setStringProperty(StringProperty s) {
currTempo = s;
}
@Override
protected void reactPressed(MouseEvent event) {
ProgramState curr = StateMachine.getState();
if (curr == ProgramState.EDITING) {
setPressed();
addTempo(1);
TimerTask tt = new clickHold();
t.schedule(tt, Values.HOLDTIME, Values.REPEATTIME);
}
}
@Override
protected void reactReleased(MouseEvent event) {
t.cancel();
t = new Timer();
resetPressed();
}
/**
* Makes it such that the application thread changes the tempo of the song.
*
* @param add
* The amount of tempo that you want to add. Usually an integer.
*/
private void addTempo(final double add) {
Platform.runLater(new Runnable() {
@Override
public void run() {
double ch = 0;
if (isPositive)
ch = add;
else
ch = -add;
double tempo = StateMachine.getTempo() + ch;
StateMachine.setTempo(tempo);
currTempo.setValue(String.valueOf(tempo));
}
});
}
/**
* This is a timer task that increments the tempo of the song.
*
* @author RehdBlob
* @since 2013.11.10
*/
class clickHold extends TimerTask {
@Override
public void run() {
addTempo(1);
}
}
}
<file_sep>package smp.components.topPanel;
import smp.ImageLoader;
import smp.components.buttons.ModeButton;
import smp.components.staff.Staff;
import smp.fx.SMPFXController;
/**
* Panel buttons that are on the top panel.
* @author RehdBlob
* @since 2014.05.21
*/
public class PanelButtons {
/** The Staff that this is linked to. */
private Staff theStaff;
/** Mode button. */
private ModeButton mButton;
/** The FXML controller class. */
private SMPFXController controller;
/** The Image Loader class. */
private ImageLoader il;
/** The button line, where one selects instruments. */
private ButtonLine bl;
/** Default constructor. */
public PanelButtons(Staff s, SMPFXController ct, ImageLoader im, ButtonLine b) {
il = im;
theStaff = s;
setController(ct);
mButton = new ModeButton(controller.getModeButton(),
controller.getModeText(), controller, il);
mButton.setStaff(theStaff);
bl = b;
}
/**
* Sets the controller class.
* @param ct The FXML controller class.
*/
public void setController(SMPFXController ct) {
controller = ct;
}
/**
* @param b The Button Line that we want to associate with the top panel.
*/
public void setButtonLine(ButtonLine b) {
bl = b;
}
/**
* @return The ButtonLine that is associated with the top panel.
*/
public ButtonLine getButtonLine() {
return bl;
}
}
<file_sep>package smp.components.buttons;
import javafx.scene.image.ImageView;
import javafx.scene.input.MouseEvent;
import smp.ImageIndex;
import smp.ImageLoader;
import smp.components.general.ImageToggleButton;
import smp.fx.SMPFXController;
import smp.stateMachine.ProgramState;
import smp.stateMachine.StateMachine;
/**
* This is the button, that when clicked, toggles the loop function of this
* program.
*
* @author RehdBlob
* @since 2013.08.29
*/
public class LoopButton extends ImageToggleButton {
/**
* This creates a new LoopButton object.
*
* @param i
* This <code>ImageView</code> object that you are trying to link
* this button with.
* @param ct
* The FXML controller object.
* @param im
* The Image loader object.
*/
public LoopButton(ImageView i, SMPFXController ct, ImageLoader im) {
super(i, ct, im);
getImages(ImageIndex.LOOP_PRESSED, ImageIndex.LOOP_RELEASED);
releaseImage();
isPressed = false;
}
/** Releases the loop button. */
public void release() {
if (isPressed)
reactPressed(null);
}
@Override
protected void reactPressed(MouseEvent event) {
ProgramState curr = StateMachine.getState();
if (curr != ProgramState.ARR_EDITING && curr != ProgramState.ARR_PLAYING) {
if (isPressed) {
isPressed = false;
releaseImage();
StateMachine.resetLoopPressed();
} else {
isPressed = true;
pressImage();
StateMachine.setLoopPressed();
}
}
}
}
<file_sep>package smp.presenters;
import java.io.File;
import javafx.beans.property.IntegerProperty;
import javafx.beans.property.ListProperty;
import javafx.beans.property.ObjectProperty;
import javafx.beans.property.SimpleListProperty;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.collections.ObservableList;
import javafx.scene.control.ListView;
import smp.models.staff.StaffArrangement;
import smp.models.staff.StaffSequence;
import smp.models.stateMachine.ProgramState;
import smp.models.stateMachine.StateMachine;
import smp.models.stateMachine.Variables;
import smp.presenters.api.load.Utilities;
import smp.presenters.api.reattachers.ArrangementReattacher;
public class ArrangementListPresenter {
//TODO: auto-add these model comments
//====Models====
private ObjectProperty<StaffArrangement> theArrangement;
private ObjectProperty<ProgramState> programState;
private IntegerProperty arrangementListSelectedIndex;
private ObjectProperty<StaffSequence> theSequence;
private ListView<String> arrangementList;
private ArrangementReattacher arrangementReattacher;
ListProperty<String> listProperty = new SimpleListProperty<>();
public ArrangementListPresenter(ListView<String> arrangementList) {
this.arrangementList = arrangementList;
this.theArrangement = Variables.theArrangement;
this.theSequence = Variables.theSequence;
this.arrangementListSelectedIndex = Variables.arrangementListSelectedIndex;
this.programState = StateMachine.getState();
this.arrangementReattacher = new ArrangementReattacher(this.theArrangement);
initializeArrangementList();
setupViewUpdater();
}
/**
* Adds in the listener behaviour for the arrangement list.
*/
private void initializeArrangementList() {
arrangementList.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<String>() {
@Override
public void changed(ObservableValue<? extends String> observable, String oldValue, String newValue) {
if (programState.get() == ProgramState.ARR_PLAYING)
return;
int x = arrangementList.getSelectionModel().getSelectedIndex();
if (x != -1) {
ObservableList<StaffSequence> s = theArrangement.get().getTheSequences();
ObservableList<File> f = theArrangement.get().getTheSequenceFiles();
theSequence.set(Utilities.loadSequenceFromArrangement(f.get(x)));
s.set(x, theSequence.get());
}
}
});
}
private void setupViewUpdater() {
this.arrangementList.setEditable(true);
this.arrangementList.setStyle("-fx-font: 8pt \"Arial\";");
this.arrangementList.setVisible(false);
this.arrangementReattacher.setOnReattachListener(new ChangeListener<StaffArrangement>() {
@Override
public void changed(ObservableValue<? extends StaffArrangement> observable, StaffArrangement oldValue,
StaffArrangement newValue) {
listProperty.set(theArrangement.get().getTheSequenceNames());
arrangementList.itemsProperty().unbind();
arrangementList.itemsProperty().bind(listProperty);
if(theArrangement.get().getTheSequenceNames().size() > 0)
arrangementList.getSelectionModel().select(0);
}
});
arrangementList.getSelectionModel().selectedIndexProperty().addListener(new ChangeListener<Number>() {
@Override
public void changed(ObservableValue<? extends Number> observable, Number oldValue, Number newValue) {
arrangementListSelectedIndex.set(newValue.intValue());
}
});
this.arrangementListSelectedIndex.addListener(new ChangeListener<Number>() {
@Override
public void changed(ObservableValue<? extends Number> observable, Number oldValue, Number newValue) {
arrangementList.getSelectionModel().select(newValue.intValue());
}
});
this.programState.addListener(new ChangeListener<Object>() {
@Override
public void changed(ObservableValue<? extends Object> observable, Object oldValue, Object newValue) {
if (newValue.equals(ProgramState.EDITING))
arrangementList.setVisible(false);
else if (newValue.equals(ProgramState.ARR_EDITING))
arrangementList.setVisible(true);
}
});
}
}
<file_sep>package smp.commandmanager;
public interface CommandInterface {
public void redo();
public void undo();
}<file_sep>package smp.presenters.staff.VolumeBarsPresenter;
import java.util.ArrayList;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.collections.ObservableList;
import javafx.event.Event;
import javafx.scene.Node;
import javafx.scene.image.ImageView;
import javafx.scene.layout.HBox;
import javafx.scene.layout.StackPane;
import smp.ImageIndex;
import smp.ImageLoader;
import smp.TestMain;
import smp.models.staff.StaffNoteLine;
import smp.models.stateMachine.Variables;
import smp.models.stateMachine.Variables.WindowLines;
import smp.presenters.api.reattachers.NoteLineReattacher;
import smp.presenters.staff.VolumeBarsPresenter.StaffVolumeEventHandler;
public class VolumeBarsPresenter {
// TODO: auto-add these model comments
// ====Models====
private WindowLines windowLines;
private ArrayList<NoteLineReattacher> noteLineReattachers;
private HBox volumeBars;
/** The ImageView objects for each volume bar. */
//j574y923..model-view
private ArrayList<ImageView> theVolBarIVs = new ArrayList<>();
/** The ImageLoader class. */
//TODO:
//j574y923..model-view
private ImageLoader il = (ImageLoader) TestMain.imgLoader;
/**
* This is the list of volume bar handlers on the staff.
*
* @see smp.components.staff.NoteMatrix.volumeBarHandlers
*/
private ArrayList<StaffVolumeEventHandler> volumeBarHandlers;
/**
* This is the list of volume bars on the staff.
*
* @see smp.components.staff.NoteMatrix.volumeBars
*/
private ArrayList<StackPane> volumeBarsSP;
public VolumeBarsPresenter(HBox volumeBars) {
this.volumeBars = volumeBars;
volumeBarHandlers = new ArrayList<StaffVolumeEventHandler>();
this.windowLines = Variables.windowLines;
this.noteLineReattachers = new ArrayList<NoteLineReattacher>();
initializeVolumeBars(this.volumeBars);
initializeVolumeBarIVs(this.volumeBars);
setupViewUpdater();
}
private void initializeVolumeBarIVs(HBox volumeBars) {
for (Node v : volumeBars.getChildren()) {
StackPane st = (StackPane) v;
ImageView theVolBar = (ImageView) st.getChildren().get(0);
theVolBar.setImage(il.getSpriteFX(ImageIndex.VOL_BAR));
theVolBar.setVisible(false);
theVolBarIVs.add(theVolBar);
}
}
/**
* Initializes the volume bars in the program.
*
* @param volumeBars
* This is the HBox that holds all of the volume bar
* <code>StackPane</code> objects.
*/
private void initializeVolumeBars(HBox volumeBars) {
ArrayList<StackPane> vol = new ArrayList<StackPane>();
ObservableList<Node> volumeBarsChildren = volumeBars.getChildren();
for (int i = 0; i < volumeBarsChildren.size(); i++) {
Node v = volumeBarsChildren.get(i);
StackPane volBar = (StackPane) v;
vol.add(volBar);
StaffVolumeEventHandler sveh = new StaffVolumeEventHandler(volBar, windowLines.get(i));
volBar.addEventHandler(Event.ANY, sveh);
volumeBarHandlers.add(sveh);
}
volumeBarsSP = vol;
}
private void setupViewUpdater() {
for (int i = 0; i < windowLines.size(); i++) {
final int index = i;
NoteLineReattacher nlr = new NoteLineReattacher(windowLines.get(i));
nlr.setNewNotesSizeListener(new ChangeListener<Number>() {
@Override
public void changed(ObservableValue<? extends Number> observable, Number oldSize, Number newSize) {
// either old size or new size is empty
// we are observing whether its empty
// we only want to update visibility depending on whether its empty
if((oldSize.intValue() & newSize.intValue()) == 0)
updateVolume(index);
}
});
nlr.setNewVolumeListener(new ChangeListener<Number>() {
@Override
public void changed(ObservableValue<? extends Number> observable, Number oldValue, Number newValue) {
updateVolume(index);
}
});
nlr.setOnReattachListener(new ChangeListener<Object>() {
@Override
public void changed(ObservableValue<? extends Object> observable, Object oldValue, Object newValue) {
updateVolume(index);
}
});
noteLineReattachers.add(nlr);
}
}
/**
* Displays the volume of this note line.
* @param y The volume that we want to show.
*/
public void setVolumeDisplay(int line, double y) {
ImageView theVolBar = theVolBarIVs.get(line);
if (y <= 0) {
theVolBar.setVisible(false);
return;
}
theVolBar.setVisible(true);
theVolBar.setFitHeight(y);
}
/**
* Updates the volume display on this volume displayer.
*/
public void updateVolume(int line) {
StaffNoteLine theLine = this.windowLines.get(line).get();
StackPane stp = volumeBarsSP.get(line);
ImageView theVolBarIV = theVolBarIVs.get(line);
setVolumeDisplay(line, theLine.getVolumePercent() * stp.getHeight());
if (theLine.getVolume().get() == 0 || theLine.isEmpty()) {
theVolBarIV.setVisible(false);
}
}
}
<file_sep>package smp.commandmanager.commands;
import smp.commandmanager.CommandInterface;
import smp.components.staff.sequences.StaffNoteLine;
public class RemoveVolumeCommand implements CommandInterface {
StaffNoteLine theLine;
int theOldVolume;
public RemoveVolumeCommand(StaffNoteLine line, int oldVolume) {
theLine = line;
theOldVolume = oldVolume;
}
@Override
public void redo() {
//do nothing, AddVolumeCommand will handle this
}
@Override
public void undo() {
theLine.setVolume(theOldVolume);
}
}
<file_sep>package smp.commandmanager.commands;
import smp.commandmanager.CommandInterface;
import smp.components.staff.sequences.StaffNote;
import smp.components.staff.sequences.StaffNoteLine;
public class AddNoteCommand implements CommandInterface {
private StaffNoteLine theLine;
private StaffNote theNote;
public AddNoteCommand(StaffNoteLine line, StaffNote note) {
theLine = line;
theNote = note;
}
@Override
public void redo() {
theLine.add(theNote);
}
@Override
public void undo() {
theLine.remove(theNote);
}
}
<file_sep>package smp.stateMachine;
import java.io.File;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
import javafx.scene.input.KeyCode;
import smp.components.Values;
/**
* This is the state machine that keeps track of what state the main window is
* in. This class keeps track of a bunch of variables that the program generally
* uses.
*
* @author RehdBlob
* @since 2012.08.07
*/
public class StateMachine {
/** This tells us whether we have modified the song or not. */
private static boolean modifiedSong = false;
/** This tells us whether we have modified the arrangement or not. */
private static boolean modifiedArr = false;
/** This keeps track of whether we have pressed the loop button or not. */
private static boolean loopPressed = false;
/** This keeps track of whether we have pressed the mute button or not. */
private static boolean mutePressed = false;
/**
* This keeps track of whether we have pressed the low A mute button or not.
*/
private static boolean muteAPressed = false;
/**
* This keeps track of whether we have pressed the clipboard button or not.
*/
private static boolean clipboardPressed = false;
/** The list of values denoting which notes should be extended. */
private static boolean[] noteExtensions = new boolean[Values.NUMINSTRUMENTS];
/**
* The file directory that we are currently located in. We'll start in the
* user directory.
*/
private static File currentDirectory = new File(System.getProperty("user.dir"));
/** Set of currently-pressed buttons. */
private static Set<KeyCode> buttonsPressed =
Collections.synchronizedSet(new HashSet<KeyCode>());
/**
* The default state that the program is in is the EDITING state, in which
* notes are being placed on the staff.
*/
private static ProgramState currentState = ProgramState.EDITING;
/**
* The default time signature that we start out with is 4/4 time.
*/
private static TimeSignature currentTimeSignature = TimeSignature.FOUR_FOUR;
/**
* The current measure line number that the program is on. Typically a
* number between 0 and 383. This is zero by default.
*/
private static int currentLine = 0;
/**
* This is the current tempo that the program is running at.
*/
private static double tempo = Values.DEFAULT_TEMPO;
/**
* The current soundset name. This should change when a new soundfont is
* loaded.
*/
private static String currentSoundset = Values.DEFAULT_SOUNDFONT;
/**
* Do not make an instance of this class! The implementation is such that
* several classes may check the overall state of the program, so there
* should only ever be just the class and its static variables and methods
* around.
*
* @deprecated
*/
private StateMachine() {
}
/**
* Get the current <code>State</code> of the <code>StateMachine</code>
*
* @return The current <code>State</code>.
*/
public static ProgramState getState() {
return currentState;
}
/**
* @param s
* Set the <code>StateMachine</code> to a certain State.
*/
public static void setState(ProgramState s) {
currentState = s;
}
/**
* Sets the state back to "Editing" by default.
*/
public static void resetState() {
currentState = ProgramState.EDITING;
}
/**
* @return The current time signature that we are running at.
*/
public static TimeSignature getTimeSignature() {
return currentTimeSignature;
}
/**
* Sets the time signature to whatever that we give this method.
*
* @param t
* The new time signature.
*/
public static void setTimeSignature(TimeSignature t) {
currentTimeSignature = t;
}
/** Sets the time signature back to "4/4" by default. */
public static void resetTimeSignature() {
currentTimeSignature = TimeSignature.FOUR_FOUR;
}
/**
* @return The tempo that this program is running at.
*/
public static double getTempo() {
return tempo;
}
/**
* Sets the tempo to what we give it here.
*
* @param num
* The tempo we want to set the program to run at.
* @return The current tempo.
*/
public static void setTempo(double num) {
tempo = num;
}
/**
* Gets the current line number that we're on. Typically a value between 0
* and 383 for most files unless you've done fun stuff and removed the
* 96-measure limit.
*
* @return The current line number (left justify)
*/
public static int getMeasureLineNum() {
return currentLine;
}
/**
* Sets the current line number to whatever is given to this method.
*
* @param num
* The number that we're trying to set our current line number
* to.
*/
public static void setMeasureLineNum(int num) {
currentLine = num;
}
/** Sets that the song is now loop-enabled. */
public static void setLoopPressed() {
loopPressed = true;
}
/** Sets that the song is now *not* loop-enabled. */
public static void resetLoopPressed() {
loopPressed = false;
}
/** @return Whether the loop button is pressed or not. */
public static boolean isLoopPressed() {
return loopPressed;
}
/** Sets the fact that mute notes are now enabled. */
public static void setMutePressed() {
mutePressed = true;
}
/** Turns off the fact that we have pressed the mute button. */
public static void resetMutePressed() {
mutePressed = false;
}
/** @return Whether the mute button is pressed or not. */
public static boolean isMutePressed() {
return mutePressed;
}
/**
* Sets the modified flag to true or false.
*
* @param b
* Whether we have modified a song or not.
*/
public static void setSongModified(boolean b) {
modifiedSong = b;
}
/**
* @return Whether we have modified the current song or not.
*/
public static boolean isSongModified() {
return modifiedSong;
}
/**
* @param b
* Whether we have modified an arrangement or not.
*/
public static void setArrModified(boolean b) {
modifiedArr = b;
}
/**
* @return Whether we have modified the current arrangement or not.
*/
public static boolean isArrModified() {
return modifiedArr;
}
/**
* @param b
* Whether we have pressed the low A mute button.
*/
public static void setMuteAPressed(boolean b) {
muteAPressed = b;
}
/**
* @return Whether our mute-all button is pressed or not.
*/
public static boolean isMuteAPressed() {
return muteAPressed;
}
/**
* @since 08.2017
*/
public static void setClipboardPressed() {
clipboardPressed = true;
}
public static void resetClipboardPressed() {
clipboardPressed = false;
}
public static boolean isClipboardPressed() {
return clipboardPressed;
}
/**
* @param set The note extensions that we want to set.
*/
public static void setNoteExtensions(boolean[] set) {
noteExtensions = set;
}
/**
* @return A list of notes that we want to act like the coin.
*/
public static boolean[] getNoteExtensions() {
return noteExtensions;
}
/**
* @return Set of currently-pressed buttons.
*/
public static Set<KeyCode> getButtonsPressed() {
return buttonsPressed;
}
/**
* Clears the set of key presses in this program.
*/
public static void clearKeyPresses() {
buttonsPressed.clear();
}
/** @return Last directory we accessed. */
public static File getCurrentDirectory() {
return currentDirectory;
}
/** @param cDir Set current directory to this. */
public static void setCurrentDirectory(File cDir) {
StateMachine.currentDirectory = cDir;
}
/**
* @return The current soundset name.
* @since v1.1.2
*/
public static String getCurrentSoundset() {
return currentSoundset;
}
/**
* @param soundset
* Set current soundset to this.
* @since v1.1.2
*/
public static void setCurrentSoundset(String soundset) {
StateMachine.currentSoundset = soundset;
}
}
<file_sep>package smp.commandmanager.commands;
import java.util.ArrayList;
import smp.commandmanager.CommandInterface;
import smp.components.Values;
import smp.components.staff.Staff;
import smp.components.staff.sequences.StaffNoteLine;
public class MultiplyTempoCommand implements CommandInterface {
Staff theStaff;
int theMultiplyAmount;
public MultiplyTempoCommand(Staff staff, int multiplyAmount) {
theStaff = staff;
theMultiplyAmount = multiplyAmount;
}
@Override
public void redo() {
ArrayList<StaffNoteLine> s = theStaff.getSequence().getTheLines();
ArrayList<StaffNoteLine> n = new ArrayList<StaffNoteLine>();
for (int i = 0; i < s.size(); i++) {
n.add(s.get(i));
for (int j = 0; j < theMultiplyAmount - 1; j++)
n.add(new StaffNoteLine());
}
s.clear();
s.addAll(n);
// StateMachine.setTempo(theStaff.getSequence().getTempo() * num);
// theStaff.updateCurrTempo();
theStaff.getControlPanel().getScrollbar()
.setMax(s.size() - Values.NOTELINES_IN_THE_WINDOW);
}
@Override
public void undo() {
ArrayList<StaffNoteLine> s = theStaff.getSequence().getTheLines();
ArrayList<StaffNoteLine> n = new ArrayList<StaffNoteLine>();
for (int i = 0; i < s.size(); i+= theMultiplyAmount) {
n.add(s.get(i));
}
s.clear();
s.addAll(n);
// StateMachine.setTempo(theStaff.getSequence().getTempo() * num);
// theStaff.updateCurrTempo();
theStaff.getControlPanel().getScrollbar()
.setMax(s.size() - Values.NOTELINES_IN_THE_WINDOW);
}
}
<file_sep>package smp.presenters.staff;
import java.util.ArrayList;
import javafx.beans.property.ObjectProperty;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.collections.ListChangeListener;
import javafx.scene.Node;
import javafx.scene.layout.HBox;
import smp.components.Values;
import smp.models.staff.StaffNote;
import smp.models.staff.StaffNoteLine;
import smp.models.stateMachine.Variables;
import smp.models.stateMachine.Variables.WindowLines;
import smp.presenters.api.reattachers.NoteLineReattacher;
public class StaffExtLinesLowAPresenter {
// TODO: auto-add these model comments
// ====Models====
private WindowLines windowLines;
private ArrayList<NoteLineReattacher> noteLineReattachers;
private HBox staffExtLinesLowA;
private ArrayList<Node> lowA;
public StaffExtLinesLowAPresenter(HBox staffExtLinesLowA) {
this.staffExtLinesLowA = staffExtLinesLowA;
this.windowLines = Variables.windowLines;
this.noteLineReattachers = new ArrayList<NoteLineReattacher>();
initializeStaffLedgerLines();
setupViewUpdater();
}
private void setupViewUpdater() {
for (int i = 0; i < windowLines.size(); i++) {
final int index = i;
final ObjectProperty<StaffNoteLine> windowLine = windowLines.get(i);
NoteLineReattacher nlr = new NoteLineReattacher(windowLines.get(i));
nlr.setNewNotesListener(new ListChangeListener<StaffNote>() {
@Override
public void onChanged(Change<? extends StaffNote> c) {
populateStaffLedgerLines(windowLine.get(), index);
}
});
nlr.setOnReattachListener(new ChangeListener<Object>() {
@Override
public void changed(ObservableValue<? extends Object> observable, Object oldValue, Object newValue) {
populateStaffLedgerLines((StaffNoteLine) newValue, index);
}
});
noteLineReattachers.add(nlr);
}
}
/**
* Re-draws the staff ledger lines based on the notes present in a
* StaffNoteLine at a certain index. Position 14 & 16 are the positions of
* the high A and high C lines, and positions 0 and 2 are the positions of
* the low A and low C lines.
*
* @param stl
* The <code>StaffNoteLine</code> that we want to check.
* @param index
* The index that we are updating.
*
*/
private void populateStaffLedgerLines(StaffNoteLine stl, int index) {
int low = Values.NOTES_IN_A_LINE;
for (StaffNote n : stl.getNotes()) {
int nt = n.getPosition();
if (nt <= low)
low = nt;
}
lowA.get(index).setVisible(low <= Values.lowA);
}
/**
* Sets up the staff expansion lines, which are to hold notes that are
* higher than or lower than the regular lines of the staff.
*
* @param staffLLines
* An array of ledger lines. This method expects that there will
* be four of these, two of which indicate the lines above the
* staff and the other of which indicating the lines below the
* staff.
*/
private void initializeStaffLedgerLines() {
lowA = new ArrayList<Node>();
lowA.addAll(this.staffExtLinesLowA.getChildren());
hideAllLedgerLines();
}
/**
* Hides all of the ledger lines.
*/
public void hideAllLedgerLines() {
for (Node nd : lowA)
nd.setVisible(false);
}
}
<file_sep>package smp;
import java.util.Set;
import javafx.beans.property.DoubleProperty;
import javafx.beans.property.ObjectProperty;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.event.EventHandler;
import javafx.scene.Scene;
import javafx.scene.input.KeyCode;
import javafx.scene.input.KeyEvent;
import javafx.scene.input.ScrollEvent;
import javafx.stage.Stage;
import smp.components.Values;
import smp.models.staff.StaffSequence;
import smp.models.stateMachine.StateMachine;
import smp.models.stateMachine.Variables;
public class KeyboardListeners {
// TODO: auto-add these model comments
// ====Models====
private DoubleProperty measureLineNum;
private ObjectProperty<StaffSequence> theSequence;
private Set<KeyCode> buttonsPressed;
private Stage primaryStage;
private Scene primaryScene;
/**
* Creates the keyboard listeners that we will be using for various other
* portions of the program. Ctrl, alt, and shift are of interest here, but
* the arrow keys will also be considered.
*
* @param primaryStage
* The main window.
*/
public KeyboardListeners(Stage primaryStage) {
this.primaryStage = primaryStage;
this.primaryScene = primaryStage.getScene();
this.measureLineNum = StateMachine.getMeasureLineNum();
this.theSequence = Variables.theSequence;
this.buttonsPressed = StateMachine.getButtonsPressed();
setupKeyboardListeners();
}
private void setupKeyboardListeners() {
primaryScene.addEventHandler(KeyEvent.KEY_PRESSED, new EventHandler<KeyEvent>() {
@Override
public void handle(KeyEvent ke) {
switch (ke.getCode()) {
case PAGE_UP:
measureLineNum.set(measureLineNum.get() - Values.NOTELINES_IN_THE_WINDOW);
break;
case PAGE_DOWN:
measureLineNum.set(measureLineNum.get() + Values.NOTELINES_IN_THE_WINDOW);
break;
case HOME:
if (ke.isControlDown())
measureLineNum.set(0);
break;
case END:
if (ke.isControlDown())
measureLineNum.set(theSequence.get().getTheLinesSize().get());
break;
// @since v1.1.2, requested by <NAME>
case LEFT:
if (ke.isControlDown())
measureLineNum.set(measureLineNum.get() - 4);
break;
case RIGHT:
if (ke.isControlDown())
measureLineNum.set(measureLineNum.get() + 4);
break;
default:
}
buttonsPressed.add(ke.getCode());
// StaffInstrumentEventHandler.updateAccidental();
ke.consume();
}
});
primaryScene.addEventHandler(KeyEvent.KEY_RELEASED, new EventHandler<KeyEvent>() {
@Override
public void handle(KeyEvent ke) {
buttonsPressed.remove(ke.getCode());
// StaffInstrumentEventHandler.updateAccidental();
ke.consume();
}
});
primaryScene.addEventHandler(ScrollEvent.ANY, new EventHandler<ScrollEvent>() {
@Override
public void handle(ScrollEvent se) {
if (se.getDeltaY() < 0) {
measureLineNum.set(measureLineNum.get() + 1);
} else if (se.getDeltaY() > 0) {
measureLineNum.set(measureLineNum.get() - 1);
}
se.consume();
}
});
primaryStage.focusedProperty().addListener(new ChangeListener<Boolean>() {
@Override
public void changed(ObservableValue<? extends Boolean> ov, Boolean t, Boolean t1) {
buttonsPressed.clear();
}
});
}
}
<file_sep>package smp.views;
import javafx.fxml.FXML;
import javafx.scene.control.Button;
import javafx.scene.control.ListView;
import javafx.scene.control.Slider;
import javafx.scene.control.TextField;
import javafx.scene.image.ImageView;
import javafx.scene.layout.AnchorPane;
import javafx.scene.layout.BorderPane;
import javafx.scene.layout.HBox;
import javafx.scene.layout.Pane;
import javafx.scene.layout.StackPane;
import javafx.scene.paint.Color;
import javafx.scene.text.Font;
import javafx.scene.text.Text;
import smp.presenters.ArrangementListPresenter;
import smp.presenters.InstLinePresenter;
import smp.presenters.ModeTextPresenter;
import smp.presenters.ScrollbarPresenter;
import smp.presenters.SelectedInstPresenter;
import smp.presenters.SongNamePresenter;
import smp.presenters.TempoBoxPresenter;
import smp.presenters.TempoIndicatorPresenter;
import smp.presenters.buttons.AddButtonPresenter;
import smp.presenters.buttons.DeleteButtonPresenter;
import smp.presenters.buttons.DownButtonPresenter;
import smp.presenters.buttons.LeftArrowPresenter;
import smp.presenters.buttons.LeftFastArrowPresenter;
import smp.presenters.buttons.LoadButtonPresenter;
import smp.presenters.buttons.ModeButtonPresenter;
import smp.presenters.buttons.NewButtonPresenter;
import smp.presenters.buttons.OptionsButtonPresenter;
import smp.presenters.buttons.RightArrowPresenter;
import smp.presenters.buttons.RightFastArrowPresenter;
import smp.presenters.buttons.SaveButtonPresenter;
import smp.presenters.buttons.TempoMinusPresenter;
import smp.presenters.buttons.TempoPlusPresenter;
import smp.presenters.buttons.UpButtonPresenter;
import smp.presenters.staff.StaffAccidentalsPresenter;
import smp.presenters.staff.StaffExtLinesHighAPresenter;
import smp.presenters.staff.StaffExtLinesHighCPresenter;
import smp.presenters.staff.StaffExtLinesLowAPresenter;
import smp.presenters.staff.StaffExtLinesLowCPresenter;
import smp.presenters.staff.StaffMeasureLinesPresenter;
import smp.presenters.staff.StaffMeasureNumbersPresenter;
import smp.presenters.staff.StaffInstrumentsPresenter.StaffInstrumentsPresenter;
import smp.presenters.staff.VolumeBarsPresenter.VolumeBarsPresenter;
public class MainWindowController {
/**
* Location of the Options Window fxml file.
* TODO: move fxml string to somewhere in models layer
*/
private String fxml = "./MainWindow.fxml";
@FXML
private HBox staffExtLinesHighC;
@FXML
private ImageView play;
@FXML
private HBox staffExtLinesHighA;
@FXML
private ImageView deleteButton;
@FXML
private HBox controls;
@FXML
private ImageView loadButton;
@FXML
private Text tempoIndicator;
@FXML
private ImageView rightFastArrow;
@FXML
private HBox staffExtLinesLowC;
@FXML
private StackPane tempoBox;
@FXML
private HBox staffExtLinesLowA;
@FXML
private HBox staffInstruments;
@FXML
private HBox scrollbarHolder;
@FXML
private ImageView tempoPlus;
@FXML
private ImageView loop;
@FXML
private HBox volumeBars;
@FXML
private ImageView optionsButton;
@FXML
private ListView<String> arrangementList;
@FXML
private ImageView mute;
@FXML
private ImageView addButton;
@FXML
private ImageView tempoMinus;
@FXML
private ImageView leftFastArrow;
@FXML
private ImageView stop;
@FXML
private ImageView modeButton;
@FXML
private Color x1;
@FXML
private Font x2;
@FXML
private AnchorPane basePane;
@FXML
private ImageView selectedInstHolder;
@FXML
private StackPane staffPane;
@FXML
private TextField songName;
@FXML
private Slider scrollbar;
@FXML
private HBox staffMeasureLines;
@FXML
private HBox staffPlayBars;
@FXML
private HBox topBoxRight;
@FXML
private ImageView upButton;
@FXML
private ImageView clipboardButton;
@FXML
private ImageView downButton;
@FXML
private Pane topPane;
@FXML
private HBox instLine;
@FXML
private HBox staffMeasureNumbers;
@FXML
private Button secretButton;
@FXML
private ImageView saveButton;
@FXML
private ImageView clipboardLabel;
@FXML
private HBox staffAccidentals;
@FXML
private ImageView selectedInst;
@FXML
private ImageView leftArrow;
@FXML
private ImageView rightArrow;
@FXML
private BorderPane mainLayout;
@FXML
private ImageView newButton;
@FXML
private ImageView muteA;
@FXML
private Text modeText;
/**
* Initializes the Controller class for the options window
*/
public void initialize() {
new ArrangementListPresenter(arrangementList);
new InstLinePresenter(instLine);
new ModeTextPresenter(modeText);
new SelectedInstPresenter(selectedInst);
new ScrollbarPresenter(scrollbar);
new SongNamePresenter(songName);
new TempoBoxPresenter(tempoBox);
new TempoIndicatorPresenter(tempoIndicator);
new AddButtonPresenter(addButton);
new DeleteButtonPresenter(deleteButton);
new DownButtonPresenter(downButton);
new LeftArrowPresenter(leftArrow);
new LeftFastArrowPresenter(leftFastArrow);
new LoadButtonPresenter(loadButton);
new ModeButtonPresenter(modeButton);
new NewButtonPresenter(newButton);
new OptionsButtonPresenter(optionsButton);
new RightArrowPresenter(rightArrow);
new RightFastArrowPresenter(rightFastArrow);
new SaveButtonPresenter(saveButton);
new TempoMinusPresenter(tempoMinus);
new TempoPlusPresenter(tempoPlus);
new UpButtonPresenter(upButton);
new StaffAccidentalsPresenter(staffAccidentals);
new StaffExtLinesHighAPresenter(staffExtLinesHighA);
new StaffExtLinesHighCPresenter(staffExtLinesHighC);
new StaffExtLinesLowAPresenter(staffExtLinesLowA);
new StaffExtLinesLowCPresenter(staffExtLinesLowC);
new StaffInstrumentsPresenter(staffInstruments);
new StaffMeasureLinesPresenter(staffMeasureLines);
new StaffMeasureNumbersPresenter(staffMeasureNumbers);
new VolumeBarsPresenter(volumeBars);
}
/**
* @return Location of the Options Window fxml file.
*/
public String getFXML() {
return fxml;
}
}
<file_sep>package smp.presenters.api.clipboard;
import java.util.HashMap;
import java.util.HashSet;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.collections.ObservableList;
import javafx.geometry.Bounds;
import javafx.scene.Node;
import javafx.scene.effect.Blend;
import javafx.scene.effect.BlendMode;
import javafx.scene.effect.ColorInput;
import javafx.scene.image.ImageView;
import javafx.scene.input.MouseEvent;
import javafx.scene.layout.AnchorPane;
import javafx.scene.layout.HBox;
import javafx.scene.layout.Pane;
import javafx.scene.layout.StackPane;
import javafx.scene.layout.VBox;
import javafx.scene.paint.Color;
import smp.ImageLoader;
import smp.components.Values;
import smp.components.staff.Staff;
import smp.components.staff.sequences.StaffNoteLine;
import smp.fx.SMPFXController;
public class StaffClipboard {
public static Color HIGHLIGHT_FILL = new Color(0.5, 0.5, 0.5, 0.5);
private Staff theStaff;
private SMPFXController controller;
private ImageLoader il;
private Pane rubberBandLayer;
private StaffRubberBand rubberBand;
private StaffRubberBandEventHandler rbeh;
private StaffClipboardFilter instFilter;
/** The functions class for copy, cut, paste, etc. */
private StaffClipboardAPI theAPI;
/** The list that keeps track of all the selections' bounds made by the user */
private HashMap<Integer, StaffNoteLine> selection;
/** The list that will keep track of copied notes (and volumes) */
private HashMap<Integer, StaffNoteLine> copiedData;
/** Volumes aren't node references so we keep track of the volumes' lines */
private HashSet<Integer> highlightedVolumes;
/**
* The listener that will update which volume bars are highlighted every
* scrollbar change
*/
private ChangeListener<Number> highlightedVolumesRedrawer;
public StaffClipboard(StaffRubberBand rb, Staff st, SMPFXController ct, ImageLoader im) {
rubberBand = rb;
il = im;
theStaff = st;
controller = ct;
selection = new HashMap<>();
copiedData = new HashMap<>();
//TODO: merge staffclipboard and staffclipboardapi together
theAPI = new StaffClipboardAPI(this, theStaff, im, ct.getModifySongManager());
redrawUI(ct);
rubberBandLayer = controller.getBasePane();
rbeh = new StaffRubberBandEventHandler(rubberBand, controller, rubberBandLayer, this);
initializeRBEH(rbeh, controller);
rubberBandLayer.addEventHandler(MouseEvent.ANY, rbeh);
initializeHighlightedVolumes(ct);
instFilter = new StaffClipboardFilter(ct.getInstLine(), il);
}
private void initializeHighlightedVolumes(SMPFXController ct) {
final ObservableList<Node> volumeBars = ct.getVolumeBars().getChildren();
ImageView theVolBar = (ImageView) ((StackPane)volumeBars.get(0)).getChildren().get(0);
final Blend highlightBlendVolume = new Blend(
BlendMode.SRC_OVER,
null,
new ColorInput(
-theVolBar.getFitWidth(),
0,
theVolBar.getFitWidth() * 3,
theVolBar.getFitHeight(),
StaffClipboard.HIGHLIGHT_FILL
));
highlightedVolumes = new HashSet<>();
highlightedVolumesRedrawer = new ChangeListener<Number>() {
@Override
public void changed(ObservableValue<? extends Number> observable, Number oldValue, Number newValue) {
for(int i = 0; i < Values.NOTELINES_IN_THE_WINDOW; i++) {
// we want the actual volumebar image to highlight
ImageView theVolBar = (ImageView) ((StackPane) volumeBars.get(i)).getChildren().get(0);
if (highlightedVolumes.contains(i + newValue.intValue()))
theVolBar.setEffect(highlightBlendVolume);
else
theVolBar.setEffect(null);
}
}
};
ct.getScrollbar().valueProperty().addListener(highlightedVolumesRedrawer);
}
/**
* trigger layout pass in basePane and all its children. this will
* initialize the bounds for all UI components.
*
* components cannot be modified until this function initializes them.
*
* @param ct
*/
private void redrawUI(SMPFXController ct) {
AnchorPane basePane = ct.getBasePane();
basePane.applyCss();//requestLayout??
basePane.layout();
}
/**
* redrawUI before calling this
*
* @param rbeh
* @param ct
*/
private void initializeRBEH(StaffRubberBandEventHandler rbeh, SMPFXController ct) {
//initialize lineMinBound
HBox staffInstruments = ct.getStaffInstruments();
ObservableList<Node> instrumentLines = staffInstruments.getChildren();
VBox firstLine = (VBox) instrumentLines.get(0);
Bounds firstLineBounds = firstLine.localToScene(firstLine.getBoundsInLocal());
rbeh.initializeLineMinBound(firstLineBounds.getMinX());
//initialize lineMaxBound
VBox lastLine = (VBox) instrumentLines.get(instrumentLines.size() - 1);
Bounds lastLineBounds = lastLine.localToScene(lastLine.getBoundsInLocal());
rbeh.initializeLineMaxBound(lastLineBounds.getMaxX());
//initialize lineSpacing
rbeh.initializeLineSpacing(firstLineBounds.getWidth());
//initialize positionMinBound
ObservableList<Node> positions = firstLine.getChildren();
StackPane firstPosition = (StackPane) positions.get(0);
Bounds firstPositionBounds = firstPosition.localToScene(firstPosition.getBoundsInLocal());
rbeh.initializePositionMinBound(firstPositionBounds.getMinY());
//initialize positionMaxBound
StackPane lastPosition = (StackPane) positions.get(positions.size() - 1);
Bounds lastPositionBounds = lastPosition.localToScene(lastPosition.getBoundsInLocal());
rbeh.initializePositionMaxBound(lastPositionBounds.getMaxY());
//initialize positionSpacing
StackPane secondPosition = (StackPane) positions.get(1);
Bounds secondPositionBounds = secondPosition.localToScene(secondPosition.getBoundsInLocal());
rbeh.initializePositionSpacing((secondPositionBounds.getMinY() - firstPositionBounds.getMinY()) * 2);
//initialize volume YMax coordinate
HBox volumeBars = ct.getVolumeBars();
Bounds volumeBarsBounds = volumeBars.localToScene(volumeBars.getBoundsInLocal());
rbeh.initializeVolumeYMaxCoord(volumeBarsBounds.getMaxY());
//set margins
StackPane staffPane = ct.getStaffPane();
Bounds staffPaneBounds = staffPane.localToScene(staffPane.getBoundsInLocal());
double marginDeltaX = firstLineBounds.getMinX() - staffPaneBounds.getMinX();
double marginDeltaY = firstPositionBounds.getMinY() - staffPaneBounds.getMinY();
rbeh.setMarginVertical(marginDeltaY);
rbeh.setMarginHorizontal(marginDeltaX);
//set scrollbar resizing
rbeh.setScrollBarResizable(controller.getScrollbar());
}
public HashMap<Integer, StaffNoteLine> getSelection() {
return selection;
}
public HashMap<Integer, StaffNoteLine> getCopiedData() {
return copiedData;
}
public HashSet<Integer> getHighlightedVolumes() {
return highlightedVolumes;
}
public ChangeListener<Number> getHighlightedVolumesRedrawer() {
return highlightedVolumesRedrawer;
}
public StaffClipboardFilter getInstrumentFilter() {
return instFilter;
}
// temp? merge the two classes together?
public StaffClipboardAPI getAPI() {
return theAPI;
}
/**
* @return the node the rubberband is added to or removed from
* @since v1.1.2
*/
public Pane getRubberBandLayer() {
return rubberBandLayer;
}
/**
* @return the rubberband
* @since v1.1.2
*/
public StaffRubberBand getRubberBand() {
return rubberBand;
}
}
<file_sep>package smp.components.staff.sequences.ams;
import java.io.File;
import java.text.ParseException;
import java.util.ArrayList;
import smp.components.staff.sequences.Bookmark;
import smp.components.staff.sequences.Speedmark;
import smp.components.staff.sequences.StaffSequence;
import smp.components.staff.sounds.SMPSoundfont;
/**
* A class for decoding Advanced Mario Sequencer songs.
* @author RehdBlob
* @since 2012.09.10
*/
public class AMSDecoder {
public static StaffSequence decode(File file) {
// TODO: Fix this.
return null;
}
/**
* Decodes an Advanced Mario Sequencer song into an SMP-readable format.
* @param in The input String that contains (supposedly) Advanced Mario
* Sequencer data.
* @throws ParseException If someone tries to feed this method an invalid
* text file.
*/
public static StaffSequence decode(String in) throws ParseException {
if (!isValid(in)) {
throw new ParseException("Invalid File", 0);
}
String timeSig = null, tempo = null;
SMPSoundfont soundfont = null;
ArrayList<Speedmark> speedmarks = null;
ArrayList<Bookmark> bookmarks = null;
ArrayList<String> data = new ArrayList<String>();
return populateSequence(timeSig, soundfont, speedmarks,
bookmarks, data, tempo);
}
/**
* Determines whether an input file is a valid Advanced Mario Sequencer
* file.
* @param in The String that is supposedly a representation of the Advanced
* Mario Sequencer file.
* @return <b>True</b> if the file happens to be valid. <b>False</b>
* otherwise.
*/
private static boolean isValid(String in) {
// TODO Auto-generated method stub
return false;
}
/**
* Creates a new Super Mario Paint song
* @param timeSig The time signature of the song.
* @param soundfont The soundfont of the song
* @param speedmarks The speedmarks present in the Advanced Mario Sequencer
* song.
* @param bookmarks The bookmarks present in the Advanced Mario Sequencer
* song.
* @param tempo The tempo that this song is to run at.
* @param data The song data that has been parsed.
* @return A new Super Mario Paint sequence that is to be loaded
* immediately upon creation.
*/
private static StaffSequence populateSequence(String timeSig,
SMPSoundfont soundfont, ArrayList<Speedmark> speedmarks,
ArrayList<Bookmark> bookmarks, ArrayList<String> data,
String tempo) {
return null;
}
}
<file_sep>package smp.advanced;
/**
* Advanced version of Super Mario Paint, a
* hidden mode.
* Currently a skeleton.
* @author RehdBlob
* @since 2012.10.29
*/
public class AdvancedVersion {
}
<file_sep>package smp.components.staff;
import java.util.ArrayList;
import java.util.Set;
import smp.ImageIndex;
import smp.ImageLoader;
import smp.SoundfontLoader;
import smp.commandmanager.ModifySongManager;
import smp.commandmanager.commands.AddNoteCommand;
import smp.commandmanager.commands.AddVolumeCommand;
import smp.commandmanager.commands.RemoveNoteCommand;
import smp.commandmanager.commands.RemoveVolumeCommand;
import smp.components.Values;
import smp.components.InstrumentIndex;
import smp.components.staff.sequences.StaffAccidental;
import smp.components.staff.sequences.StaffNote;
import smp.components.staff.sequences.StaffNoteLine;
import smp.components.topPanel.ButtonLine;
import smp.stateMachine.Settings;
import smp.stateMachine.StateMachine;
import javafx.collections.ObservableList;
import javafx.event.Event;
import javafx.event.EventHandler;
import javafx.scene.Node;
import javafx.scene.image.ImageView;
import javafx.scene.input.KeyCode;
import javafx.scene.input.MouseButton;
import javafx.scene.input.MouseEvent;
import javafx.scene.layout.StackPane;
/**
* THIS IS A MODIFIED VERSION OF REHDBLOB's STAFF EVENT HANDLER. IT IS MADE IN
* RESPONSE TO THE MULTITHREADING ISSUE WITH ARRAYLISTS AND STACKPANES. THERE
* WILL ONLY BE ONE OF THIS EVENT HANDLER AND IT WILL BE ADDED TO THE ENTIRE
* SCENE. WITH THIS HANDLER, ALL STACKPANES ARE DISABLED AND EVENTS WILL BE
* REGISTERED TO THE STACKPANES BY CALCULATING WHICH PANE TO FETCH VIA MOUSE
* POSITION.
*
* A Staff event handler. The StaffImages implementation was getting bulky and
* there are still many many features to be implemented here. This handler
* primarily handles mouse events.
*
* @author RehdBlob
* @author j574y923
* @since 2013.07.27 (2017.06.22)
*/
public class StaffInstrumentEventHandler implements EventHandler<Event> {
/** The line number of this note, on the screen. */
private int line;
/** The position of this note. */
private int position;
/** Whether the mouse is in the frame or not. */
private static boolean focus = false;
/**
* This is the list of image notes that we have. These should all be
* ImageView-type objects.
*/
private static ObservableList<Node> theImages;
/** The StackPane that will display sharps, flats, etc. */
private static ObservableList<Node> accList;
/**
* This is the <code>ImageView</code> object responsible for displaying the
* silhouette of the note that we are about to place on the staff.
*/
private static ImageView silhouette = new ImageView();
/** The pointer to the staff object that this handler is linked to. */
private Staff theStaff;
/**
* This is the <code>ImageView</code> object responsible for displaying the
* silhouette of the sharp / flat of the note that we are about to place on
* the staff.
*/
private static ImageView accSilhouette;
/** The topmost image of the instrument. */
private StaffNote theStaffNote;
/**
* This is the image that holds the different types of sharps/flats etc.
*/
private StaffAccidental accidental;
/** This is the ImageLoader class. */
private static ImageLoader il;
/** This is the amount that we want to sharp / flat / etc. a note. */
private static int acc = 0;
private ModifySongManager commandManager;
/**
* Constructor for this StaffEventHandler. This creates a handler that takes
* a StackPane and a position on the staff.
*
* @param s
* The pointer to the Staff object that this event handler is
* linked to.
* @param ct
* @param i
* The program's image loader.
* @param cm
* The undo/redo manager.
*/
public StaffInstrumentEventHandler(Staff s, ImageLoader i, ModifySongManager cm) {
il = i;
theStaff = s;
accSilhouette = new ImageView();
accSilhouette.setFitWidth(32);
accSilhouette.setFitHeight(32);
silhouette.setFitWidth(32);
silhouette.setFitHeight(36);
commandManager = cm;
if ((Settings.debug & 0b10) == 0b10) {
// System.out.println("Line: " + l);
// System.out.println("Position: " + pos);
}
}
/**
* Disables all the stack panes.
*/
private void disableAllStackPanes() {
for (int index = 0; index < Values.NOTELINES_IN_THE_WINDOW; index++) {
for (int i = 0; i < Values.NOTES_IN_A_LINE; i++) {
StackPane[] noteAndAcc = theStaff.getNoteMatrix().getNote(index, i);
noteAndAcc[0].setDisable(true);
}
}
}
@Override
public void handle(Event event) {
boolean newNote = false;
if(event instanceof MouseEvent){
int lineTmp = getLine(((MouseEvent)event).getX());
int positionTmp = getPosition(((MouseEvent)event).getY());
//invalid
if(!validNote(lineTmp, positionTmp))
return;
//new note
newNote = updateNote(lineTmp, positionTmp);
}
InstrumentIndex theInd = ButtonLine.getSelectedInstrument();
// Drag-add notes, hold e to drag-remove notes
if (event instanceof MouseEvent && ((MouseEvent) event).isPrimaryButtonDown() && newNote) {
leftMousePressed(theInd);
event.consume();
StateMachine.setSongModified(true);
}
// Drag-remove notes
else if (event instanceof MouseEvent && ((MouseEvent) event).isSecondaryButtonDown() && newNote) {
rightMousePressed(theInd);
event.consume();
StateMachine.setSongModified(true);
}
else if (event.getEventType() == MouseEvent.MOUSE_PRESSED) {
MouseButton b = ((MouseEvent) event).getButton();
if (b == MouseButton.PRIMARY)
leftMousePressed(theInd);
else if (b == MouseButton.SECONDARY)
rightMousePressed(theInd);
event.consume();
StateMachine.setSongModified(true);
} else if (event.getEventType() == MouseEvent.MOUSE_MOVED) {
focus = true;
mouseEntered(theInd);
event.consume();
} else if (event.getEventType() == MouseEvent.MOUSE_EXITED) {
focus = false;
mouseExited(theInd);
event.consume();
}
else if (event.getEventType() == MouseEvent.MOUSE_RELEASED) {
mouseReleased();
}
}
private void mouseReleased() {
commandManager.record();
}
/**
* Takes in a line and position and check if they are valid. If the note is
* not valid then it will call mouseExited().
*
* @param lineTmp
* @param positionTmp
* @return if the given line and position are at a valid note.
*/
private boolean validNote(int lineTmp, int positionTmp) {
// MOUSE_EXITED
if (lineTmp < 0 || positionTmp < 0) {
InstrumentIndex theInd = ButtonLine.getSelectedInstrument();
mouseExited(theInd);
return false;
}
return true;
}
/**
* Updates member variables to new note values. Detects if stackpanes are
* disabled and if they aren't this will disable them.
*
* @param lineTmp
* the note's line
* @param positionTmp
* the note's position
* @return success if we updated note to new line or position
*/
private boolean updateNote(int lineTmp, int positionTmp) {
if(line != lineTmp || position != positionTmp){
line = lineTmp;
position = positionTmp;
StackPane[] noteAndAcc = theStaff.getNoteMatrix().getNote(line, position);
if(!noteAndAcc[0].isDisabled())
disableAllStackPanes();
theImages = noteAndAcc[0].getChildren();
accList = noteAndAcc[1].getChildren();
return true;
}
return false;
}
/**
* The method that is called when the left mouse button is pressed. This is
* generally the signal to add an instrument to that line.
*
* @param theInd
* The InstrumentIndex corresponding to what instrument is
* currently selected.
*/
private void leftMousePressed(InstrumentIndex theInd) {
if (StateMachine.getButtonsPressed().contains(KeyCode.E)) {
removeNote();
} else {
placeNote(theInd);
}
}
/**
* Places a note where the mouse currently is.
*
* @param theInd
* The <code>InstrumentIndex</code> that we are going to use to
* place this note.
*/
private void placeNote(InstrumentIndex theInd) {
boolean mute = StateMachine.isMutePressed();
boolean muteA = StateMachine.isMuteAPressed();
if (!mute && !muteA)
playSound(theInd, position, acc);
theStaffNote = new StaffNote(theInd, position, acc);
theStaffNote.setMuteNote(muteA ? 2 : mute ? 1 : 0);
if (!mute && !muteA) {
theStaffNote.setImage(il.getSpriteFX(theInd.imageIndex()));
} else if (mute) {
theStaffNote.setImage(il.getSpriteFX(theInd.imageIndex().alt()));
} else if (muteA) {
theStaffNote.setImage(il.getSpriteFX(theInd.imageIndex()
.silhouette()));
}
accidental = new StaffAccidental(theStaffNote);
accidental.setImage(il.getSpriteFX(Staff.switchAcc(acc)));
accidental.setFitWidth(32);
accidental.setFitHeight(32);
theImages.remove(silhouette);
accList.remove(accSilhouette);
if (!theImages.contains(theStaffNote))
theImages.add(theStaffNote);
if (!accList.contains(accidental))
accList.add(accidental);
StaffNoteLine temp = theStaff.getSequence().getLine(
line + StateMachine.getMeasureLineNum());
if (temp.isEmpty()) {
temp.setVolumePercent(((double) Values.DEFAULT_VELOCITY)
/ Values.MAX_VELOCITY);
commandManager.execute(new AddVolumeCommand(temp, Values.DEFAULT_VELOCITY));
}
if (!temp.contains(theStaffNote)) {
temp.add(theStaffNote);
commandManager.execute(new AddNoteCommand(temp, theStaffNote));
}
StaffVolumeEventHandler sveh = theStaff.getNoteMatrix().getVolHandler(
line);
sveh.updateVolume();
theStaff.redraw();
}
/**
* The method that is called when the right mouse button is pressed. This is
* generally the signal to remove the instrument from that line.
*
* @param theInd
* The InstrumentIndex corresponding to what instrument is
* currently selected. (currently not actually used, but can be
* extended later to selectively remove instruments.
*/
private void rightMousePressed(InstrumentIndex theInd) {
removeNote();
}
/**
* This removes a note.
*/
private void removeNote() {
theImages.remove(silhouette);
accList.remove(accSilhouette);
if (!theImages.isEmpty())
theImages.remove(theImages.size() - 1);
if (!accList.isEmpty())
accList.remove(0);
StaffNoteLine temp = theStaff.getSequence().getLine(
line + StateMachine.getMeasureLineNum());
if (!temp.isEmpty()) {
ArrayList<StaffNote> nt = temp.getNotes();
for (int i = nt.size() - 1; i >= 0; i--) {
StaffNote s = nt.get(i);
if (s.getPosition() == position) {
StaffNote removedNote = nt.remove(i);
commandManager.execute(new RemoveNoteCommand(temp, removedNote));
break;
}
}
}
if (temp.isEmpty()) {
StaffVolumeEventHandler sveh = theStaff.getNoteMatrix()
.getVolHandler(line);
sveh.setVolumeVisible(false);
commandManager.execute(new RemoveVolumeCommand(temp, temp.getVolume()));
}
theStaff.redraw();
}
/**
* The method that is called when the mouse enters the object.
*
* @param theInd
* The InstrumentIndex corresponding to what instrument is
* currently selected.
*/
private void mouseEntered(InstrumentIndex theInd) {
// StateMachine.setFocusPane(this);
// theStaff.getNoteMatrix().setFocusPane(this);
updateAccidental();
silhouette.setImage(il.getSpriteFX(theInd.imageIndex().silhouette()));
if (!theImages.contains(silhouette))
theImages.add(silhouette);
accSilhouette.setImage(il
.getSpriteFX(Staff.switchAcc(acc).silhouette()));
if (!accList.contains(accSilhouette))
accList.add(accSilhouette);
silhouette.setVisible(true);
accSilhouette.setVisible(true);
}
/**
* The method that is called when the mouse exits the object.
*
* @param children
* List of Nodes that we have here, hopefully full of
* ImageView-type objects.
* @param theInd
* The InstrumentIndex corresponding to what instrument is
* currently selected.
*/
private void mouseExited(InstrumentIndex theInd) {
if(silhouette.getImage() != null)
theImages.remove(silhouette);
if(accSilhouette.getImage() != null)
accList.remove(accSilhouette);
}
/**
* Updates how much we want to sharp / flat a note.
*/
public static void updateAccidental() {
if (!focus)
return;
Set<KeyCode> bp = StateMachine.getButtonsPressed();
boolean ctrl = bp.contains(KeyCode.CONTROL);
boolean shift = bp.contains(KeyCode.SHIFT);
boolean alt = bp.contains(KeyCode.ALT) || bp.contains(KeyCode.ALT_GRAPH);
if (alt && ctrl)
acc = -2;
else if (ctrl && shift)
acc = 2;
else if (shift)
acc = 1;
else if (alt || ctrl)
acc = -1;
else
acc = 0;
switch (acc) {
case 2:
accSilhouette.setImage(il.getSpriteFX(ImageIndex.DOUBLESHARP_SIL));
break;
case 1:
accSilhouette.setImage(il.getSpriteFX(ImageIndex.SHARP_SIL));
break;
case -1:
accSilhouette.setImage(il.getSpriteFX(ImageIndex.FLAT_SIL));
break;
case -2:
accSilhouette.setImage(il.getSpriteFX(ImageIndex.DOUBLEFLAT_SIL));
break;
default:
accSilhouette.setVisible(false);
break;
}
if (acc != 0)
accSilhouette.setVisible(true);
if (acc != 0 && !accList.contains(accSilhouette))
accList.add(accSilhouette);
if (acc != 0 && !theImages.contains(silhouette)) {
theImages.add(silhouette);
silhouette.setImage(il.getSpriteFX(ButtonLine
.getSelectedInstrument().imageIndex().silhouette()));
silhouette.setVisible(true);
}
//Cannot use this in a static context... will fix this later
// if ((Settings.debug & 0b01) == 0b01) {
// System.out.println(this);
// }
}
/**
* Called whenever we request a redraw of the staff.
*/
public void redraw() {
if (!focus)
return;
InstrumentIndex ind = ButtonLine.getSelectedInstrument();
mouseExited(ind);
mouseEntered(ind);
}
/**
* Plays a sound given an index and a position.
*
* @param theInd
* The index at which this instrument is located at.
* @param pos
* The position at which this note is located at.
* @param acc
* The sharp / flat that we want to play this note at.
*/
private static void playSound(InstrumentIndex theInd, int pos, int acc) {
SoundfontLoader.playSound(Values.staffNotes[pos].getKeyNum(), theInd,
acc);
}
/**
* Sets the amount that we want to sharp / flat a note.
*
* @param accidental
* Any integer between -2 and 2.
*/
public void setAcc(int accidental) {
acc = accidental;
}
/**
* @return The amount that a note is to be offset from its usual position.
*/
public int getAcc() {
return acc;
}
/**
* @return The line that this handler is located on.
*/
public int getLine() {
return line;
}
/**
* @return Whether the mouse is currently in the frame.
*/
public boolean hasMouse() {
return focus;
}
@Override
public String toString() {
String out = "Line: " + (StateMachine.getMeasureLineNum() + line)
+ "\nPosition: " + position + "\nAccidental: " + acc;
return out;
}
/**
*
* @param x mouse pos
* @return line in the current window based on x coord
*/
private static int getLine(double x){
if(x < 135 || x > 999)
return -1;
return (((int)x - 165) / 64);
}
/**
*
* @param y mouse pos
* @return note position based on y coord
*/
private static int getPosition(double y){
if(y < 66 || y >= 526)
return -1;
return Values.NOTES_IN_A_LINE - (((int)y - 66) / 16) - 1;
}
}
<file_sep>package smp.extras;
/**
* Easter egg...
* @author RehdBlob
* @since 2013.04.02
*/
public class RPG {
/** Displays the main menu of the RPG. */
public void mainMenu() {
}
}
<file_sep>package smp.components.general;
import smp.ImageIndex;
import smp.ImageLoader;
import smp.components.staff.Staff;
import smp.fx.SMPFXController;
import javafx.event.EventHandler;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import javafx.scene.input.DragEvent;
import javafx.scene.input.MouseEvent;
/**
* An image button, to be used as a background-type object.
* To be extended by more concrete classes that use
* images as backgrounds. Updated 2012-August-30 to
* reflect change to JavaFX2.2.
* @author RehdBlob
* @since 2012.08.14
*/
public abstract class AbstractImageButton {
/** This is the staff. */
protected Staff theStaff;
/**
* Indicates whether the button is currently pressed.
*/
protected boolean isPressed;
/**
* The image that displays when the button is not pressed.
*/
protected Image notPressed;
/**
* The image that displays when the button is pressed.
*/
protected Image pressed;
/**
* This is the object that this class will be manipulating
* to act like a button.
*/
protected ImageView theImage;
/** This is the FXML controller class. */
protected SMPFXController controller;
/** This is the image loader class. */
protected ImageLoader il;
/**
* @param i The ImageView passed to the Button
* wrapper.
* @param ct
*/
public AbstractImageButton(ImageView i, SMPFXController ct, ImageLoader im) {
il = im;
setController(ct);
theImage = i;
initializeHandler();
}
/**
* Initializes the button click handler. Every time
* the button is pressed, the react() method in this
* class is called.
*/
private void initializeHandler() {
theImage.setOnMouseClicked(
new EventHandler<MouseEvent>() {
@Override
public void handle(MouseEvent event) {
reactClicked(event);
event.consume();
}
});
theImage.setOnMousePressed(
new EventHandler<MouseEvent>() {
@Override
public void handle(MouseEvent event) {
reactPressed(event);
event.consume();
}
});
theImage.setOnMouseReleased(
new EventHandler<MouseEvent>() {
@Override
public void handle(MouseEvent event) {
reactReleased(event);
event.consume();
}
});
theImage.setOnDragDetected(
new EventHandler<MouseEvent>() {
@Override
public void handle(MouseEvent event) {
reactDragDetected(event);
event.consume();
}
});
theImage.setOnDragDone(
new EventHandler<DragEvent>() {
@Override
public void handle(DragEvent event) {
reactDragDone(event);
event.consume();
}
});
}
/**
* "Presses" the button by setting the image to <code>pressed</code>.
*/
protected void pressImage() {
theImage.setImage(pressed);
}
/**
* "Releases" the button by setting the image to <code>notPressed</code>.
*/
protected void releaseImage() {
theImage.setImage(notPressed);
}
/**
* Sets the <code>isPressed</code> parameter to <b>true</b>
* but does <b>not</b> define what happens afterwards.
*/
protected void setPressed() {
isPressed = true;
}
/**
* Sets the <code>isPressed</code> parameter to <b>false</b>
* but does <b>not</b> define what happens afterwards.
*/
protected void resetPressed() {
isPressed = false;
}
/**
* @return Whether this button is actually pressed or not.
*/
public boolean isPressed() {
return isPressed;
}
/**
* This method is always called when a
* MouseClicked event occurs. Defaults to no action.
* @param event The event that occurred.
*/
protected void reactClicked(MouseEvent event) {
}
/**
* This method is always called when a
* MousePressed event occurs. Defaults to no action.
* @param event The event that occurred.
*/
protected void reactPressed(MouseEvent event){
}
/**
* This method is always called when a
* MouseReleased event occurs. Defaults to no action.
* @param event The event that occurred.
*/
protected void reactReleased(MouseEvent event) {
}
/**
* This method is always called when a Drag event is detected.
* Usually defaults to no action.
* @param event The event that occurred.
*/
protected void reactDragDetected(MouseEvent event) {
}
/**
* This method is always called when a Drag event is completed.
* @param event The event that occurred.
*/
protected void reactDragDone(DragEvent event) {
}
/**
* Gets the images for the <code>pressed</code> and <code>notPressed</code>
* versions of the button.
*/
protected void getImages(ImageIndex pr, ImageIndex notPr) {
pressed = il.getSpriteFX(pr);
notPressed = il.getSpriteFX(notPr);
}
/** @return The <code>ImageView</code> object that this button holds. */
public ImageView getImage() {
return theImage;
}
/**
* Sets the staff that this button is connected to.
* @param s The staff we want to set.
*/
public void setStaff(Staff s) {
theStaff = s;
}
/** @return The staff that this button is connected to. */
public Staff getStaff() {
return theStaff;
}
/**
* Sets the controller class.
* @param ct The FXML controller class.
*/
public void setController(SMPFXController ct) {
controller = ct;
}
}
<file_sep>package smp.components.staff.sequences.mpc;
import java.text.ParseException;
import java.util.ArrayList;
/**
* A class that denotes a line of notes on the MPC staff. Pulled from
* MPCTxtTools 1.07a.
* @author RehdBlob
* @since MPCTxtTools 1.07
* @since 2013.04.08
*/
public class NoteLine {
/** THe number of notes in an MPC song line. There are actually 6 even though
* MPC itself can only play 5 at a time.
*/
private static final int NOTESIZE = 6;
/** List of notes in this line. */
private ArrayList<String> notes;
/** A character (a-q) denoting what volume that this note is played at. */
private char vol;
/** Makes a new note line without anything in it. */
public NoteLine() {
notes = new ArrayList<String>();
vol = 'q';
}
/**
* Makes a new note line from a String that we assume to be a note line.
* @param parse This is the String that we are attempting to parse.
*/
public NoteLine(String parse) throws ParseException {
if (parse.length() < NOTESIZE + 1) {
notes = new ArrayList<String>();
for (int i = 0; i < NOTESIZE; i++)
notes.add("");
vol = 'q';
return;
}
notes = TextUtil.dice(parse);
vol = parse.charAt(parse.length() - 2);
if (!(vol >= 'a' && vol <= 'q'))
vol = 'q';
if (notes.size() != NOTESIZE)
throw new ParseException("Incorrect number of notes in a line!", 0);
}
/**
* @return The volume of the notes in this note line.
*/
public char vol() {
return vol;
}
/**
* @return The list of notes that this note line has.
*/
public ArrayList<String> notes() {
return notes;
}
/**
* Gets a specific note at location x from this note line.
* @param x The index at which we want to grab a note from.
* @return The note at that index.
*/
public String notes(int x) {
if (x < 0 || x > notes.size() - 1)
return null;
return notes.get(x);
}
@Override
public String toString() {
StringBuilder s = new StringBuilder();
int empty = 0;
for (String s1 : notes)
if (s1.isEmpty())
empty++;
if (!(empty >= NOTESIZE && vol == 'q')) {
for (String s1 : notes) {
s.append(s1);
s.append("+");
}
s.append(vol);
}
s.append(":");
return s.toString();
}
}
<file_sep>package smp.presenters.staff;
import java.util.ArrayList;
import javafx.beans.property.BooleanProperty;
import javafx.beans.property.IntegerProperty;
import javafx.beans.property.ObjectProperty;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.collections.ListChangeListener;
import javafx.collections.ObservableList;
import javafx.scene.Node;
import javafx.scene.image.ImageView;
import javafx.scene.layout.HBox;
import javafx.scene.layout.StackPane;
import javafx.scene.layout.VBox;
import smp.ImageIndex;
import smp.ImageLoader;
import smp.TestMain;
import smp.components.Values;
import smp.models.staff.StaffNote;
import smp.models.staff.StaffNoteLine;
import smp.models.stateMachine.Variables;
import smp.models.stateMachine.Variables.WindowLines;
import smp.presenters.api.reattachers.NoteLineReattacher;
public class StaffAccidentalsPresenter {
// TODO: auto-add these model comments
// ====Models====
private WindowLines windowLines;
private IntegerProperty selectedAccidental;
private BooleanProperty accSilhouetteVisible;
private IntegerProperty selectedLine;
private IntegerProperty selectedPosition;
private ArrayList<NoteLineReattacher> noteLineReattachers;
/** This is an HBox of VBoxes. Each VBox is a vertical list of StackPanes. */
private HBox staffAccidentals;
/** This is the matrix of flats / sharps / etc. */
private ArrayList<ArrayList<StackPane>> accMatrix;
/** Pointer to the image loader object. */
private transient ImageLoader il = (ImageLoader) TestMain.imgLoader;
private ImageView accSilhouette = new ImageView();
public StaffAccidentalsPresenter(HBox staffAccidentals) {
this.staffAccidentals = staffAccidentals;
accMatrix = new ArrayList<ArrayList<StackPane>>();
accSilhouette.setImage(il.getSpriteFX(ImageIndex.BLANK));
this.windowLines = Variables.windowLines;
this.selectedAccidental = Variables.selectedAccidental;
this.accSilhouetteVisible = Variables.accSilhouetteVisible;
this.selectedLine = Variables.selectedLine;
this.selectedPosition = Variables.selectedPosition;
this.noteLineReattachers = new ArrayList<NoteLineReattacher>();
initializeStaffInstruments(this.staffAccidentals);
setupViewUpdater();
}
/**
* Sets up the various note lines of the staff. These are the notes that can
* appear on the staff. This method also sets up sharps, flats, etc.
*
* @param accidentals
* The HBox that holds the framework for the sharps / flats.
*/
private void initializeStaffInstruments(HBox accidentals) {
ArrayList<VBox> accidentalLines = new ArrayList<VBox>();
for (Node n : accidentals.getChildren())
accidentalLines.add((VBox) n);
for (int line = 0; line < accidentalLines.size(); line++) {
VBox accVerticalHolder = accidentalLines.get(line);
ObservableList<Node> lineOfAcc = accVerticalHolder.getChildren();
ArrayList<StackPane> accs = new ArrayList<StackPane>();
for (int pos = 1; pos <= Values.NOTES_IN_A_LINE; pos++) {
StackPane acc = (StackPane) lineOfAcc.get(pos - 1);
accs.add(acc);
}
accMatrix.add(accs);
}
}
private void setupViewUpdater() {
for (int i = 0; i < windowLines.size(); i++) {
final int index = i;
final ObjectProperty<StaffNoteLine> windowLine = windowLines.get(i);
NoteLineReattacher nlr = new NoteLineReattacher(windowLine);
nlr.setNewNotesListener(new ListChangeListener<StaffNote>() {
@Override
public void onChanged(Change<? extends StaffNote> c) {
clearNoteDisplay(index);
populateNoteDisplay(windowLine.get(), index);
}
});
nlr.setOnReattachListener(new ChangeListener<Object>() {
@Override
public void changed(ObservableValue<? extends Object> observable, Object oldValue, Object newValue) {
clearNoteDisplay(index);
populateNoteDisplay((StaffNoteLine) newValue, index);
}
});
noteLineReattachers.add(nlr);
}
//INSTRUMENTEVENTHANDLER
this.selectedAccidental.addListener(new ChangeListener<Number>() {
@Override
public void changed(ObservableValue<? extends Number> observable, Number oldValue, Number newValue) {
accSilhouette.setImage(il.getSpriteFX(switchAcc(newValue.intValue()).silhouette()));
}
});
this.accSilhouette.visibleProperty().bindBidirectional(accSilhouetteVisible);
this.selectedLine.addListener(new ChangeListener<Number>(){
@Override
public void changed(ObservableValue<? extends Number> observable, Number oldValue, Number newValue) {
moveAcc();
}
});
this.selectedPosition.addListener(new ChangeListener<Number>(){
@Override
public void changed(ObservableValue<? extends Number> observable, Number oldValue, Number newValue) {
moveAcc();
}
});
}
private void moveAcc() {
if(selectedLine.get() < 0 || selectedPosition.get() < 0)
return;
StackPane stp = getNote(selectedLine.get(), selectedPosition.get());
stp.getChildren().add(accSilhouette);
}
/**
* @param acc
* The offset that we are deciding upon.
* @return An <code>ImageIndex</code> based on the amount of sharp or flat
* we want to implement.
*/
public static ImageIndex switchAcc(int acc) {
switch (acc) {
case 2:
return ImageIndex.DOUBLESHARP;
case 1:
return ImageIndex.SHARP;
case 0:
return ImageIndex.BLANK;
case -1:
return ImageIndex.FLAT;
case -2:
return ImageIndex.DOUBLEFLAT;
default:
return ImageIndex.BLANK;
}
}
/**
* Clears the note display on the staff.
*
* @param index
* The index that we are clearing.
*/
private synchronized void clearNoteDisplay(int index) {
ArrayList<StackPane> ac = accMatrix.get(index);
for (int i = 0; i < Values.NOTES_IN_A_LINE; i++) {
ObservableList<Node> acList = ac.get(i).getChildren();
acList.clear();
}
}
/**
* Repopulates the note display on the staff.
*
* @param stl
* The StaffNoteLine that we are interested in.
* @param index
* The index to repopulate.
*/
private void populateNoteDisplay(StaffNoteLine stl, int index) {
ObservableList<StaffNote> st = stl.getNotes();
for (StaffNote s : st) {
StackPane accSP = getNote(index, s.getPosition());
ImageView accidental = new ImageView();
accidental.setImage(il.getSpriteFX(switchAcc(s.getAccidental())));
accSP.getChildren().add(accidental);
}
}
/**
* Gets you an object based on the coordinate that you give this method.
* This method should help a lot when working on those portions of code that
* ask the entire staff to update its images. Bypassing the individual
* StackPane object links should be a lot easier with this here.
*
* @param x
* The note line number.
* @param y
* The note number.
* @return Index 0 is the <code>StackPane</code> of the note that is located
* at the location. Index 1 is the <code>StackPane</code> of the
* flat / sharp / etc box that it is associated with.
*/
public StackPane getNote(int x, int y) {
return accMatrix.get(x).get(Values.NOTES_IN_A_LINE - y - 1);
}
}
<file_sep>package smp.presenters.api.reattachers;
import javafx.beans.property.ObjectProperty;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.collections.ListChangeListener;
import smp.models.staff.StaffNote;
import smp.models.staff.StaffNoteLine;
/**
* This will reattach listeners to the StaffNoteLine's member properties when a
* new noteline gets set.
*
* @author J
*
*/
public class NoteLineReattacher {
// ====(not a Model)====
private ObjectProperty<StaffNoteLine> noteLine;
public ChangeListener<Number> volumeListener;
public ListChangeListener<StaffNote> notesListener;
public ChangeListener<Number> notesSizeListener;
/**
* The listener for when a new noteLine is set. For instance, a new note
* line is set: the new note line's volume should be listened for and the
* volume view updated.
*/
public ChangeListener<Object> onReattachListener;
public NoteLineReattacher(ObjectProperty<StaffNoteLine> noteLine) {
this.noteLine = noteLine;
setupReattacher();
}
private void setupReattacher() {
this.noteLine.addListener(new ChangeListener<Object>() {
@Override
public void changed(ObservableValue<? extends Object> observable, Object oldValue, Object newValue) {
StaffNoteLine oldNoteLine = (StaffNoteLine) oldValue;
if (volumeListener != null)
oldNoteLine.getVolume().removeListener(volumeListener);
if (notesListener != null)
oldNoteLine.getNotes().removeListener(notesListener);
StaffNoteLine newNoteLine = (StaffNoteLine) newValue;
if (volumeListener != null)
newNoteLine.getVolume().addListener(volumeListener);
if (notesListener != null)
newNoteLine.getNotes().addListener(notesListener);
}
});
}
public void setNewVolumeListener(ChangeListener<Number> volumeListener) {
if (this.volumeListener != null)
this.noteLine.get().getVolume().removeListener(this.volumeListener);
this.volumeListener = volumeListener;
this.noteLine.get().getVolume().addListener(this.volumeListener);
}
public void setNewNotesListener(ListChangeListener<StaffNote> notesListener) {
if (this.notesListener != null)
this.noteLine.get().getNotes().removeListener(this.notesListener);
this.notesListener = notesListener;
this.noteLine.get().getNotes().addListener(this.notesListener);
}
public void setNewNotesSizeListener(ChangeListener<Number> notesSizeListener) {
if (this.notesSizeListener != null)
this.noteLine.get().getNotesSize().removeListener(this.notesSizeListener);
this.notesSizeListener = notesSizeListener;
this.noteLine.get().getNotesSize().addListener(this.notesSizeListener);
}
public void setOnReattachListener(ChangeListener<Object> onReattachListener) {
this.onReattachListener = onReattachListener;
this.noteLine.addListener(onReattachListener);
}
}
<file_sep>package smp.presenters;
import javafx.beans.property.DoubleProperty;
import javafx.beans.property.ObjectProperty;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.scene.control.Slider;
import smp.components.Values;
import smp.models.staff.StaffSequence;
import smp.models.stateMachine.StateMachine;
import smp.models.stateMachine.Variables;
import smp.presenters.api.reattachers.SequenceReattacher;
public class ScrollbarPresenter {
//TODO: auto-add these model comments
//====Models====
private DoubleProperty measureLineNum;
private ObjectProperty<StaffSequence> theSequence;
private Slider scrollbar;
private SequenceReattacher sequenceReattacher;
public ScrollbarPresenter(Slider scrollbar) {
this.scrollbar = scrollbar;
this.measureLineNum = StateMachine.getMeasureLineNum();
this.theSequence = Variables.theSequence;
this.sequenceReattacher = new SequenceReattacher(this.theSequence);
setupViewUpdater();
}
private void setupViewUpdater() {
scrollbar.valueProperty().bindBidirectional(this.measureLineNum);
this.sequenceReattacher.setNewTheLinesSizeListener(new ChangeListener<Number>() {
@Override
public void changed(ObservableValue<? extends Number> arg0, Number oldVal, Number newSize) {
// TODO: confirm that max-checking occurs in the
// StaffSequence OR whatever function is doing the resizing
// Make sure the newVal is not less than the default size.
// int newMax = Math.max(Values.DEFAULT_LINES_PER_SONG,
// newSize.intValue());
scrollbar.setMax(newSize.intValue() - Values.NOTELINES_IN_THE_WINDOW);
}
});
this.sequenceReattacher.setOnReattachListener(new ChangeListener<StaffSequence>() {
@Override
public void changed(ObservableValue<? extends StaffSequence> observable, StaffSequence oldValue,
StaffSequence newValue) {
measureLineNum.set(0);
}
});
}
}
<file_sep>package smp.models.stateMachine;
/**
* This class defines the states that the
* state machine references. Listeners may also check
* these states to determine whether they are allowed
* to react to events.
* @author RehdBlob
* @since 2012.08.12
*/
public enum ProgramState {
/**
* This is the default state of the program, which allows
* the staff to be edited, moved, etc.
*/
EDITING,
/**
* This state denotes that we are currently editing an arrangement file.
*/
ARR_EDITING,
/**
* This state denotes that we are currently playing a song.
*/
SONG_PLAYING,
/**
* Just like the SONG_PLAYING state, except that we are now playiing an
* arrangement.
*/
ARR_PLAYING,
/**
* This state disables all buttons except for the play and the stop
* buttons, since the song is paused in this case.
*/
PAUSE,
/**
* Whenever a menu is open, all buttons are disabled except for those in
* the menu.
*/
MENU_OPEN,
/**
* Easter egg.
*/
RPG;
}
| 816dd1c31a393330eeeef633e618600b6c3f1634 | [
"Markdown",
"Java"
] | 63 | Java | SeymourSchlong/Super-Mario-Paint | 861ffa8559d81f0fe727069e4b73cff09bd53561 | 3e2145e23eddae8e4c1204cb1c16c6bb5a9478f0 | |
refs/heads/main | <file_sep>from pytube import YouTube
# misc
import os
import shutil
import math
import datetime
from time import time
# plots
import matplotlib.pyplot as plt
# %matplotlib inline
# image operation
# import cv2 - python 2 only
#######
def select_stream():
while True:
select_stream = input("Choose the iTag Stream: ")
confirm = input("Confirm the above stream ")
if confirm == "y" or confirm == "Y":
try:
select_stream = int(select_stream)
return select_stream
except:
print("Invalid - try again")
def download_it(itag):
file_path = "./downloads/"
filename = input('choose a file name: \n')
print("Downloading ", itag)
# stream = yt.streams.get_by_itag(itag)
# stream.download()
completed = yt.streams.get_by_itag(itag).download(output_path=file_path, filename_prefix=filename)
return completed
######
yt = YouTube('https://www.youtube.com/watch?v=fUalcwgEYNU')
filtered = yt.streams.filter(file_extension="mp4", adaptive=True)
# audio & video separate, but HQ.
# filtered = yt.streams.filter(file_extension="mp4")
# filtered = yt.streams.filter(progressive=True) #audio & video, but lower Q
for i in filtered:
print(i)
# stream = yt.streams.get_by_itag(select_stream)
itag = select_stream()
result = download_it(itag)
print(result, " Download Completed. ")
"""
def _report_progress(title, curr, total, full_progbar):
frac = curr / total
filled_progbar = round(frac * full_progbar)
print('\r', title + '#' * filled_progbar + '-' * (full_progbar - filled_progbar), '[{:>7.2%}]'.format(frac),
end='')
"""
<file_sep>asgiref==3.3.1
certifi==2020.12.5
chardet==4.0.0
click==7.1.2
Django==3.1.3
Flask==1.1.2
idna==2.10
itsdangerous==1.1.0
Jinja2==2.11.3
MarkupSafe==1.1.1
Pillow==8.0.1
psutil==5.8.0
pygame==2.0.1
python-git==2018.2.1
pytz==2020.4
requests==2.25.1
Send2Trash==1.5.0
sqlparse==0.4.1
urllib3==1.26.2
Werkzeug==1.0.1
| 9fb5b276af0d644d56198ebdc09c9a4fc81fa846 | [
"Python",
"Text"
] | 2 | Python | Landwand/pyTube | 3a9964dfc64da86d6e3d6a0386b8a9b482c517ef | be19218e751a3230d4525358e970e89509156f16 | |
refs/heads/master | <repo_name>StupidYR/MSP430<file_sep>/WDT_PWM.c
#include <msp430f5529.h>
void main(void)
{
WDTCTL = WDTPW + WDTCNTCL + WDTSSEL1 + WDTIS_4;
//WDTCTL:看门狗控制寄存器:16位
//WDTPW:写入命令时,高八位固定为 0x5A(WDTPW)
//WDTCNTCL:看门狗计时器清零
//WDTSSEL1:选择ACLK(32.768 KHZ)作为参考时钟
//WDTIS_4:间隔时间选择 (go to definition查看)
//定时时间 = 参考时钟源周期 / 间隔时间
P1DIR |= BIT0; // 设置P1.0端口为输出
P1OUT ^= BIT0; // 反转P1.0端口状态(与 1 异或)
__bis_SR_register(LPM3_bits + GIE); // 进入低功耗模式3,并启用中断
}
<file_sep>/TimerA_INT.c
#include <msp430f5529.h>
void clock_check();
void main(void)
{
WDTCTL = WDTPW + WDTHOLD;
P1DIR |= BIT0;
P1OUT &= ~BIT0; //P1.0端口输出模式
TA0CCR0 = 62500; //SMCLK -->DCOCLKDIV(1.048576MHZ) ;
//定时周期500ms: 62500 = 500ms / (1 /(f_SMCLK / ID))
// TA0CCR0 最大值为 0xFF(65535)
TA0CTL = TASSEL_2 + ID_3 + MC_1 + TACLR + TAIE;
//SMCLK作为时钟源;ID:8分频;增模式;清除TAR计数器;TAIFG中断使能
clock_check(); //检查时钟源是否稳定
_EINT(); //开启总中断
}
#pragma vector=TIMER0_A1_VECTOR //TIMER0_A1含有CCR1、CCR2和 TAIFG 中断
//TIMER0_A0仅含有CCR0
__interrupt void TIMER0_A1(void) //定义一个名叫TIMER0_A1的中断函数
{
TA0CTL &= ~TAIFG; //清除中断标志位
P1OUT ^= BIT0; //LED闪烁
}
void clock_check()
{
do
{
UCSCTL7 &= ~(XT2OFFG + XT1LFOFFG + DCOFFG);
SFRIFG1 &= ~OFIFG;
}while (SFRIFG1 & OFIFG);
}<file_sep>/Watering_LED.c
#include<msp430f5529.h>
void watering_LED(void);
void main(void)
{
WDTCTL = WDTPW + WDTHOLD;
P1DIR |= BIT0;
P8DIR |= BIT1 + BIT2;
P1DIR |= BIT1 + BIT2+ BIT3 + BIT4 + BIT5;
while(1)
{
P1OUT |= BIT0;
__delay_cycles(3000);
P1OUT &= ~BIT0;
P8OUT |= BIT1;
__delay_cycles(3000);
P8OUT &= ~BIT1;
P8OUT |= BIT2;
__delay_cycles(3000);
P8OUT &= ~BIT2;
void watering_LED(void);
}
}
void watering_LED(void)
{
int i;
for(i=BIT1;i<=BIT5;i++)
{
P1OUT |= i;
__delay_cycles(3000);
P1OUT &= ~i;
}
}<file_sep>/LED_speed.c
#include<msp430f5529.h>
int flag=1;
void choose_delay();
void LED();
int main(void)
{
WDTCTL = WDTPW + WDTHOLD;
P1DIR |= BIT0 + BIT1 + BIT2 + BIT3 + BIT4 + BIT5;
P1OUT &= ~(BIT0 + BIT1 + BIT2 + BIT3 + BIT4 + BIT5);
P8DIR |= BIT1 + BIT2;
P8OUT &= ~(BIT1 + BIT2); //初始化LED的I/O口
P1DIR &= ~BIT7; //设置P1^7口为输入状态
P1OUT |= BIT7; //断后路
P1REN |= BIT7; //将P1^7口接上拉电阻
P1IE |= BIT7; //中断使能
P1IFG &= ~BIT7; //清除中断标志位
P1IES |= BIT7; //置1;设置下降沿触发
__enable_interrupt(); //总中断使能
while(1)
LED(); //LED闪烁函数
}
#pragma vector = PORT1_VECTOR //P1系列端口的总中断函数
__interrupt void port_1(void) //定义一个名为port_1的中断函数
{
while((P1IN & BIT7)==0); //等待按键释放
flag=~flag;
P1IFG &= ~BIT7; //清除中断标志位
}
void choose_delay()
{
if(flag==0)
__delay_cycles(100000);
else
__delay_cycles(200000);
}
void LED()
{
P1OUT |= BIT0;
P1OUT &= ~BIT5;
choose_delay();
P8OUT |= BIT1;
P1OUT &= ~BIT0;
choose_delay();
P8OUT |= BIT2;
P8OUT &= ~BIT1;
choose_delay();
P1OUT |= BIT1;
P8OUT &= ~BIT2;
choose_delay();
P1OUT |= BIT2;
P1OUT &= ~BIT1;
choose_delay();
P1OUT |= BIT3;
P1OUT &= ~BIT2;
choose_delay();
P1OUT |= BIT4;
P1OUT &= ~BIT3;
choose_delay();
P1OUT |= BIT5;
P1OUT &= ~BIT4;
choose_delay();
}
<file_sep>/FLL_DCO.c
/************** DCO:内部数字控制振荡源***************
f_DCOCLK = D * (N + 1) * f_REFCLK / n
f_DCOCLKDIV = (N + 1) * f_REFCLK / n
t_delay = n x 32 x 32 x f_MCLK / f_REFCLK
注:D:FLLD 默认为FLLD_1,此时为二分频,D = 2
N:FLLN 默认为FLLN = 31
FLL的时钟是由REFCLK提供的
f_REFCLK:REFCLK的参考时钟源的频率 默认为 XT1
n:FLLREFDIV 默认为FLLREFDIV_0,此时为一分频,n = 1
*************************END**************************/
#include <msp430f5529.h>
void clock_check();
void IO_Init();
void main(void)
{
WDTCTL = WDTPW + WDTHOLD;
// 配置DCO 为 2.45MHz
UCSCTL3 = SELREF_2; //选择REFO来作为FLL的参考时钟源(REFCLK)
clock_check(); //检测时钟源是否稳定
__bis_SR_register(SCG0); // 关闭FLL控制; 如果不关闭的话,FLL寄存器不会改变
UCSCTL0 = 0; // 配置 DCOx = 0 , MODx = 0 ;
UCSCTL1 = DCORSEL_3; // 配置DCO的频率范围 1.51————6.07
UCSCTL2 = FLLD_0 + 74; // 配置FLL_D:一分频 配置FLL_N:74
__bic_SR_register(SCG0); // 开启FLL控制
__delay_cycles(76563); //
clock_check();
while(1)
{
//do do do something
}
}
void clock_check()
{
while (SFRIFG1 & OFIFG); // 监测振荡器故障标志
{
UCSCTL7 &= ~(XT2OFFG + XT1LFOFFG + DCOFFG); // 清除 XT2,XT1,DCO 的 fault flags
SFRIFG1 &= ~OFIFG; // 清除故障标志
}
}
void IO_Init()
{
P1DIR |= BIT0; // ACLK
P1SEL |= BIT0;
P2DIR |= BIT2; // SMCLK
P2SEL |= BIT2;
P7DIR |= BIT7; // MCLK
P7SEL |= BIT7;
}
<file_sep>/Clock.c
/*****************Clock********************
上电时的默认状态
MCLK:主系统时钟;DCOCLKDIV
SMCLK:子系统时钟;DCOCLKDIV
ACLK:辅助系统时钟;XT1(若XT1无效,则为REFO;其他情况切换为DCO)
系统稳定后,DCOCLK默认为 2.097152MHZ,
FLL默认2分频,则MCLK和SMCLK的频率都为1.048576MHZ。
此外FLL默认参照源为XT1
如果连接XT1和XT2的引脚不进行PxSEL的设置,那么这两个时钟源都是无效的;
REFOCLK、VLOCLK、DCOCLK默认状态下是可用的;
*******************END**********************/
#include <msp430f5529.h>
void clock_check();
void main(void)
{
WDTCTL = WDTPW + WDTHOLD;
P1DIR |= BIT0; // 启用第二功能 ACLK
P1SEL |= BIT0;
P2DIR |= BIT2; // 启用第二功能 SMCLK
P2SEL |= BIT2;
P7DIR |= BIT7; // 启用第二功能 MCLK
P7SEL |= BIT7;
P5SEL |= BIT2+BIT3; // 启用第二功能 XT2 IN/OUT
UCSCTL6 &= ~(XT1OFF + XT2OFF); // 使能XT1 & XT2
UCSCTL6 |= XCAP_3; // 配置负载电容
clock_check();
UCSCTL6 &= ~XT2DRIVE0; // 降低XT2 振荡器的工作频率,减少电流消耗
UCSCTL4 |= SELA_0 + SELS_5; // 选择 SMCLK, ACLK的时钟源
while(1)
{
//do do do something
}
}
void clock_check()
{
while (SFRIFG1 & OFIFG) // 监测振荡器故障标志
{
UCSCTL7 &= ~(XT2OFFG + XT1LFOFFG + DCOFFG); // 清除 XT2,低频XT1,DCO 的故障标志 (fault flags)
SFRIFG1 &= ~OFIFG; // 清除故障标志
}
}
<file_sep>/Interrupt.c
#include<msp430f5529.h>
void main(void)
{
WDTCTL = WDTPW + WDTHOLD;
P8DIR |= BIT1;
P8OUT &= ~BIT1;
P1REN |= BIT2; //配置上拉电阻
P1OUT |= BIT2; //初始化端口电平
P1IES &= ~BIT2; //配置下降沿触发
P1IFG &= ~BIT2; //清除中断标志位
P1IE |= BIT2; //使能端口中断
_ENIT(); //为__enable_interrupt()的宏定义;总中断使能
}
#pragma vector=PORT1_VECTOR //使能P1端口的中断
__interrupt void Port_1(void) //将中断函数命名为Port_1
{
P8OUT |= BIT1;
P1IFG &= ~BIT2;
}
<file_sep>/Button.c
#include<msp430f5529.h>
int key_flag=0;
void key_check(void); //按键消抖——debounce
void main(void)
{
WDTCTL = WDTPW + WDTHOLD;
P1DIR |= BIT0;
P1OUT &= ~BIT0;
P1DIR &= ~BIT7;
P1REN |= BIT7; //配置P1^7口,接上拉电阻
while(1)
{
key_check();
if(key_flag == 1)
P1OUT |= BIT0;
else
P1OUT |= BIT0;
}
}
void key_check(void)
{
if(P1IN & BIT7 == 0)
{
__delay_cycles(1000);
if(P1IN & BIT7 == 0)
{
key_flag = ~key_flag;
}
}
}<file_sep>/Timer_PWM.c
/*********************Timer_A0****************************
P1.2引脚:输出Timer_A0_CCR1方波
P1.3引脚:输出Timer_A0_CCR2方波
TA0CTL:Timer_A0的控制寄存器
TA0CCTLn:Timer_A0的捕获 /比较控制 n寄存器(默认为比较模式)
TA0CCRn:Timer_A0的捕获 /比较 n寄存器
************************END****************************/
#include <msp430f5529.h>
void clock_check();
void main(void)
{
WDTCTL = WDTPW + WDTHOLD;
P1DIR |= BIT2+BIT3;
P1SEL |= BIT2+BIT3; // P1.2和P1.3引脚功能选为定时器输出
clock_check();
TA0CCR0 = 512-1; // 控制PWM周期
//PWM周期 = (TA0CCR0 + 1) / f_TASSEL
//此时 = 512 / 32.768K = 15.625us
TA0CCTL1 = OUTMOD_7; // CCR1比较输出模式7:复位/置位
TA0CCR1 = 384; // CCR1:控制PWM占空比
// 此模式下占空比 = TA0CCR1 / TA0CCR0
//此时 = 75%
TA0CCTL2 = OUTMOD_7; // CCR2 比较输出模式7:复位/置位
TA0CCR2 = 128; // CCR2:控制PWM占空比
//占空比为 25%
TA0CTL = TASSEL_1 + MC_1 + TACLR;
//TASSEL:选择ACLK时钟源;MC:选择增计数模式;TACLR:清除TAR计数器
__bis_SR_register(LPM3_bits); // 进入LPM3功耗模式
}
void clock_check()
{
do
{
UCSCTL7 &= ~(XT2OFFG + XT1LFOFFG + DCOFFG);
SFRIFG1 &= ~OFIFG;
}
while (SFRIFG1 & OFIFG);
}
| 53769a423da72074d135c9f7e65ae45dbb718f2e | [
"C"
] | 9 | C | StupidYR/MSP430 | ec8ce99176ffc9df5adf1a863c60e36b5e9f2a5e | e0434c5d38813a819f14045821a7208e57f9a9a6 | |
refs/heads/master | <repo_name>vigilantlaynar/Keyword-Search<file_sep>/src/com/searchkeyword/bean/CompanyProfileBean.java
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.searchkeyword.bean;
/**
*
* @author mayukh
*/
public class CompanyProfileBean {
private String name;
private String email;
private String website;
private String address;
private String logo;
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getLogo() {
return logo;
}
public void setLogo(String logo) {
this.logo = logo;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getWebsite() {
return website;
}
public void setWebsite(String website) {
this.website = website;
}
}
<file_sep>/src/com/searchkeyword/bean/Keywords.java
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.searchkeyword.bean;
/**
*
* @author Euphern_Java
*/
public class Keywords {
private int keywordid;
private String keyword=null;
private int rank;
private int localrank;
private int internalRank;
/**
* @return the keyword
*/
public String getKeyword() {
return keyword;
}
/**
* @param keyword the keyword to set
*/
public void setKeyword(String keyword) {
this.keyword = keyword;
}
/**
* @return the rank
*/
public int getRank() {
return rank;
}
/**
* @param rank the rank to set
*/
public void setRank(int rank) {
this.rank = rank;
}
/**
* @return the keywordid
*/
public int getKeywordid() {
return keywordid;
}
/**
* @param keywordid the keywordid to set
*/
public void setKeywordid(int keywordid) {
this.keywordid = keywordid;
}
public int getLocalrank() {
return localrank;
}
public void setLocalrank(int localrank) {
this.localrank = localrank;
}
public int getInternalRank() {
return internalRank;
}
public void setInternalRank(int internalRank) {
this.internalRank = internalRank;
}
}
<file_sep>/src/com/searchkeyword/frame/EnterKeyWord.java
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/*
* EnterKeyWord.java
*
* Created on May 9, 2011, 6:04:57 PM
*/
package com.searchkeyword.frame;
import com.searchkeyword.bean.Keywords;
import com.searchkeyword.bean.RankTrackerBean;
import com.searchkeyword.common.CommonHelper;
import java.awt.event.KeyEvent;
import java.util.ArrayList;
import java.util.List;
import javax.swing.JOptionPane;
/**
*
* @author Euphern_Java
*/
public class EnterKeyWord extends javax.swing.JFrame {
private RankTrackerBean rankTrackerBean;
/** Creates new form EnterKeyWord */
public EnterKeyWord() {
//initComponents();
}
public EnterKeyWord(RankTrackerBean rankTBean)
{
initComponents();
this.setTitle("Enter Keyword");
CommonHelper.setScreenInCenter(this);
CommonHelper.installCloseHandler(this);
rankTrackerBean=rankTBean;
}
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
jPanel1 = new javax.swing.JPanel();
jScrollPane2 = new javax.swing.JScrollPane();
txtaKeyword = new javax.swing.JTextArea();
jLabel1 = new javax.swing.JLabel();
jPanel2 = new javax.swing.JPanel();
btnFinish = new javax.swing.JButton();
btnNext = new javax.swing.JButton();
btnBack = new javax.swing.JButton();
btnHelp = new javax.swing.JButton();
btnCancel = new javax.swing.JButton();
jPanel3 = new javax.swing.JPanel();
jLabel2 = new javax.swing.JLabel();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
txtaKeyword.setColumns(20);
txtaKeyword.setRows(5);
txtaKeyword.addKeyListener(new java.awt.event.KeyAdapter() {
public void keyPressed(java.awt.event.KeyEvent evt) {
handleTabKey(evt);
}
});
jScrollPane2.setViewportView(txtaKeyword);
jLabel1.setFont(new java.awt.Font("Tahoma", 1, 11));
jLabel1.setText("Enter your keywords (only one entry per line) :");
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
jPanel1.setLayout(jPanel1Layout);
jPanel1Layout.setHorizontalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 817, Short.MAX_VALUE)
.addComponent(jLabel1))
.addContainerGap())
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addComponent(jLabel1)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 180, Short.MAX_VALUE)
.addContainerGap())
);
btnFinish.setText("Finish");
btnFinish.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
handleFinish(evt);
}
});
btnNext.setText("Next >>");
btnNext.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
handleNext(evt);
}
});
btnBack.setText("<< Back");
btnBack.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
handleBack(evt);
}
});
btnHelp.setText("Help");
btnHelp.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnHelphandleHelp(evt);
}
});
btnCancel.setText("Cancel");
btnCancel.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnCancelhandleCancel(evt);
}
});
javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
jPanel2.setLayout(jPanel2Layout);
jPanel2Layout.setHorizontalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
.addContainerGap()
.addComponent(btnHelp, javax.swing.GroupLayout.PREFERRED_SIZE, 71, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 397, Short.MAX_VALUE)
.addComponent(btnBack, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(btnNext, javax.swing.GroupLayout.PREFERRED_SIZE, 84, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(btnFinish, javax.swing.GroupLayout.PREFERRED_SIZE, 81, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(btnCancel, javax.swing.GroupLayout.PREFERRED_SIZE, 76, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap())
);
jPanel2Layout.setVerticalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(btnFinish)
.addComponent(btnNext)
.addComponent(btnBack)
.addComponent(btnHelp)
.addComponent(btnCancel))
);
jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/image/putkeywordMsg.png"))); // NOI18N
javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
jPanel3.setLayout(jPanel3Layout);
jPanel3Layout.setHorizontalGroup(
jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel3Layout.createSequentialGroup()
.addContainerGap()
.addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, 817, Short.MAX_VALUE)
.addContainerGap())
);
jPanel3Layout.setVerticalGroup(
jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel3Layout.createSequentialGroup()
.addContainerGap()
.addComponent(jLabel2)
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addContainerGap())
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(33, Short.MAX_VALUE))
);
pack();
}// </editor-fold>//GEN-END:initComponents
private void handleNext(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_handleNext
// TODO add your handling code here:
if(txtaKeyword.getText()!=null && !txtaKeyword.getText().equals(""))
{
String[] keywords = txtaKeyword.getText().split("\\n");
List keywordList = new ArrayList();
int j=0;
if(rankTrackerBean!=null && rankTrackerBean.getKeywordList()!=null && rankTrackerBean.getKeywordList().size()>0)
{
keywordList=rankTrackerBean.getKeywordList();
j=keywordList.size();
}
for(int i=0;i<keywords.length;i++)
{
j++;
Keywords keywords1=new Keywords();
keywords1.setKeywordid(j);
keywords1.setKeyword(keywords[i]);
keywordList.add(keywords1);
}
rankTrackerBean.setKeywordList(keywordList);
CheckKeyword ck=new CheckKeyword(rankTrackerBean);
ck.setVisible(true);
this.setVisible(false);
}
else{
JOptionPane.showMessageDialog(rootPane, "The Keyword field is empty! Please enter the Keyword(s). ", "The Keyword field is empty!", 0);
txtaKeyword.setFocusable(true);
}
}//GEN-LAST:event_handleNext
private void btnHelphandleHelp(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnHelphandleHelp
// TODO add your handling code here:
CommonHelper.openHelpURL();
}//GEN-LAST:event_btnHelphandleHelp
private void handleBack(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_handleBack
// TODO add your handling code here:
NewProject newProject=new NewProject(rankTrackerBean);
newProject.setVisible(true);
this.setVisible(false);
}//GEN-LAST:event_handleBack
private void btnCancelhandleCancel(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCancelhandleCancel
// TODO add your handling code here:
this.setVisible(false);
}//GEN-LAST:event_btnCancelhandleCancel
private void handleFinish(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_handleFinish
// TODO add your handling code here:
RankTracker rankTracker=new RankTracker(rankTrackerBean);
rankTracker.setVisible(true);
this.setVisible(false);
}//GEN-LAST:event_handleFinish
private void handleTabKey(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_handleTabKey
// TODO add your handling code here:
if(evt.getKeyCode()== KeyEvent.VK_TAB){
// your method action to ignore keypress enter
System.out.println("Tab pressed");
evt.consume();
}
}//GEN-LAST:event_handleTabKey
/**
* @param args the command line arguments
*/
/* public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new EnterKeyWord().setVisible(true);
}
});
}
*/
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JButton btnBack;
private javax.swing.JButton btnCancel;
private javax.swing.JButton btnFinish;
private javax.swing.JButton btnHelp;
private javax.swing.JButton btnNext;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JPanel jPanel1;
private javax.swing.JPanel jPanel2;
private javax.swing.JPanel jPanel3;
private javax.swing.JScrollPane jScrollPane2;
private javax.swing.JTextArea txtaKeyword;
// End of variables declaration//GEN-END:variables
}
<file_sep>/src/com/searchkeyword/frame/CompanyProfile.java
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/*
* CompanyProfile.java
*
* Created on Jun 10, 2011, 5:16:20 PM
*/
package com.searchkeyword.frame;
import com.searchkeyword.bean.CompanyProfileBean;
import com.searchkeyword.bean.RankTrackerBean;
import com.searchkeyword.common.CommonHelper;
import com.searchkeyword.component.ImageFileView;
import com.searchkeyword.component.ImageFilter;
import java.awt.Graphics2D;
import java.awt.Image;
import java.awt.RenderingHints;
import java.awt.image.BufferedImage;
import java.io.IOException;
/**
*
* @author mayukh
*/
public class CompanyProfile extends javax.swing.JFrame {
RankTrackerBean rankTrackerBean=new RankTrackerBean();
CompanyProfileBean cpb=new CompanyProfileBean();
/** Creates new form CompanyProfile */
public CompanyProfile() {
initComponents();
this.setTitle("Edit RankTracker123 Preferences");
CommonHelper.setScreenInCenter(this);
CommonHelper.installCloseHandler(this);
getCompanyProfilePreferences();
}
public CompanyProfile(RankTracker rankTracker) {
initComponents();
this.setTitle("Edit RankTracker123 Preferences");
CommonHelper.setScreenInCenter(this);
CommonHelper.installCloseHandler(this);
// rankTrackerBean.setRankTracker(rankTracker);
// if(rankTrackerBean!=null && rankTrackerBean.getWebsiteurl()!=null && !rankTrackerBean.getWebsiteurl().equals(""))
// {
// txtURL.setText(rankTrackerBean.getWebsiteurl());
// }
}
public CompanyProfile(RankTrackerBean rankTBean) {
initComponents();
this.setTitle("Edit RankTracker123 Preferences");
CommonHelper.setScreenInCenter(this);
CommonHelper.installCloseHandler(this);
// rankTrackerBean=rankTBean;
// if(rankTrackerBean!=null && rankTrackerBean.getWebsiteurl()!=null && !rankTrackerBean.getWebsiteurl().equals(""))
// {
// txtURL.setText(rankTrackerBean.getWebsiteurl());
// }
}
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
jPanel5 = new javax.swing.JPanel();
jPanel4 = new javax.swing.JPanel();
jLabel1 = new javax.swing.JLabel();
jPanel2 = new javax.swing.JPanel();
jLabel2 = new javax.swing.JLabel();
jLabel3 = new javax.swing.JLabel();
jLabel4 = new javax.swing.JLabel();
jLabel6 = new javax.swing.JLabel();
jLabel5 = new javax.swing.JLabel();
nameTextField = new javax.swing.JTextField();
emailTextField = new javax.swing.JTextField();
websiteTextField = new javax.swing.JTextField();
addressTextField = new javax.swing.JTextField();
jPanel3 = new javax.swing.JPanel();
logoLabel = new javax.swing.JLabel();
jButton4 = new javax.swing.JButton();
jPanel6 = new javax.swing.JPanel();
jButton1 = new javax.swing.JButton();
jButton2 = new javax.swing.JButton();
jButton3 = new javax.swing.JButton();
javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
jPanel5.setLayout(jPanel5Layout);
jPanel5Layout.setHorizontalGroup(
jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 100, Short.MAX_VALUE)
);
jPanel5Layout.setVerticalGroup(
jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 100, Short.MAX_VALUE)
);
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/image/companyprofileMsg.PNG"))); // NOI18N
jPanel2.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204)));
jLabel2.setFont(new java.awt.Font("Arial", 0, 11));
jLabel2.setText("Name :");
jLabel2.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT);
jLabel3.setFont(new java.awt.Font("Arial", 0, 11));
jLabel3.setText("Email :");
jLabel3.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
jLabel4.setFont(new java.awt.Font("Arial", 0, 11));
jLabel4.setText("Website :");
jLabel4.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
jLabel6.setFont(new java.awt.Font("Arial", 0, 11));
jLabel6.setText("Logo :");
jLabel6.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
jLabel5.setFont(new java.awt.Font("Arial", 0, 11));
jLabel5.setText("Address :");
jLabel5.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
jPanel3.setBorder(javax.swing.BorderFactory.createEtchedBorder());
logoLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
logoLabel.setDebugGraphicsOptions(javax.swing.DebugGraphics.BUFFERED_OPTION);
javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
jPanel3.setLayout(jPanel3Layout);
jPanel3Layout.setHorizontalGroup(
jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()
.addContainerGap()
.addComponent(logoLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 472, Short.MAX_VALUE)
.addContainerGap())
);
jPanel3Layout.setVerticalGroup(
jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel3Layout.createSequentialGroup()
.addContainerGap()
.addComponent(logoLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 245, Short.MAX_VALUE)
.addContainerGap())
);
jButton4.setFont(new java.awt.Font("Arial", 0, 11));
jButton4.setText("...");
jButton4.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
handleSelectLogo(evt);
}
});
javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
jPanel2.setLayout(jPanel2Layout);
jPanel2Layout.setHorizontalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addGap(37, 37, 37)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(jLabel3)
.addComponent(jLabel2)
.addComponent(jLabel4)
.addComponent(jLabel5)
.addComponent(jLabel6))
.addGap(18, 18, 18)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(addressTextField)
.addComponent(websiteTextField)
.addComponent(emailTextField)
.addComponent(nameTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 495, Short.MAX_VALUE))
.addGroup(jPanel2Layout.createSequentialGroup()
.addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jButton4, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addContainerGap(12, Short.MAX_VALUE))
);
jPanel2Layout.setVerticalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addGap(25, 25, 25)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(nameTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 19, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(emailTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 19, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(websiteTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 19, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(addressTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 19, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jButton4)
.addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 19, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addContainerGap())
);
javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
jPanel4.setLayout(jPanel4Layout);
jPanel4Layout.setHorizontalGroup(
jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel4Layout.createSequentialGroup()
.addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
.addComponent(jLabel1, javax.swing.GroupLayout.Alignment.LEADING, 0, 0, Short.MAX_VALUE)
.addComponent(jPanel2, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addContainerGap())
);
jPanel4Layout.setVerticalGroup(
jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel4Layout.createSequentialGroup()
.addComponent(jLabel1)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addContainerGap())
);
jButton1.setFont(new java.awt.Font("Arial", 0, 11)); // NOI18N
jButton1.setText("Help");
jButton2.setFont(new java.awt.Font("Arial", 0, 11)); // NOI18N
jButton2.setText("OK");
jButton2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
handlerOK(evt);
}
});
jButton3.setFont(new java.awt.Font("Arial", 0, 11)); // NOI18N
jButton3.setText("Cancel");
jButton3.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
handleCancel(evt);
}
});
javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
jPanel6.setLayout(jPanel6Layout);
jPanel6Layout.setHorizontalGroup(
jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel6Layout.createSequentialGroup()
.addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 406, Short.MAX_VALUE)
.addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 76, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 79, javax.swing.GroupLayout.PREFERRED_SIZE))
);
jPanel6Layout.setVerticalGroup(
jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jButton1)
.addComponent(jButton3)
.addComponent(jButton2))
);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(6, 6, 6)
.addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
pack();
}// </editor-fold>//GEN-END:initComponents
private void handleCancel(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_handleCancel
// TODO add your handling code here:
this.setVisible(false);
}//GEN-LAST:event_handleCancel
private void handleSelectLogo(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_handleSelectLogo
// TODO add your handling code here:
//Set up the file chooser.
if (fc == null) {
fc = new javax.swing.JFileChooser();
//Add a custom file filter and disable the default
//(Accept All) file filter.
fc.addChoosableFileFilter(new ImageFilter());
fc.setAcceptAllFileFilterUsed(false);
//Add custom icons for file types.
fc.setFileView(new ImageFileView());
//Add the preview pane.
// fc.setAccessory(new ImagePreview(fc));
}
//Show it.
int returnVal = fc.showDialog(CompanyProfile.this, "Open");
javax.swing.ImageIcon icon;
//Process the results.
if (returnVal == javax.swing.JFileChooser.APPROVE_OPTION) {
java.io.File file = fc.getSelectedFile();
fileName = file.getName();
fileExt = fileName.substring(fileName.indexOf(".")+1);
try {
// buffImage = javax.imageio.ImageIO.read(file);
image = javax.imageio.ImageIO.read(file);
} catch (java.io.IOException ex) {
java.util.logging.Logger.getLogger(CompanyProfile.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
}
if(image.getWidth(this)<=460 && image.getHeight(this)<=240) {
icon=new javax.swing.ImageIcon(image);
} else {
icon=new javax.swing.ImageIcon(getScaledImage(image, 430, 240));
}
logoLabel.setIcon(icon);
}
//Reset the file chooser for the next time it's shown.
fc.setSelectedFile(null);
}//GEN-LAST:event_handleSelectLogo
private void handlerOK(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_handlerOK
// TODO add your handling code here:
saveCompanyProfilePreferences();
try{
// Open the file that is the first
// command line parameter
java.io.FileInputStream fstream = new java.io.FileInputStream("companyProfileInformation.txt");
// Get the object of DataInputStream
java.io.DataInputStream in = new java.io.DataInputStream(fstream);
java.io.BufferedReader br = new java.io.BufferedReader(new java.io.InputStreamReader(in));
String strLine;
//Read File Line By Line
while ((strLine = br.readLine()) != null) {
// Print the content on the console
// System.out.println(strLine);
if(strLine.contains("Name")) {
cpb.setName(strLine.substring(strLine.indexOf(" ")+1));
}
else if(strLine.contains("Email")) {
cpb.setEmail(strLine.substring(strLine.indexOf(" ")+1));
}
else if(strLine.contains("Website")) {
cpb.setWebsite(strLine.substring(strLine.indexOf(" ")+1));
}
else if(strLine.contains("Address")) {
cpb.setAddress(strLine.substring(strLine.indexOf(" ")+1));
}
else if(strLine.contains("Logo")) {
fileName=strLine.substring(strLine.indexOf(" ")+1);
// fileExt = fileName.substring(fileName.indexOf(".")+1);
}
}
//Close the input stream
in.close();
}catch (Exception e){//Catch exception if any
java.util.logging.Logger.getLogger(CompanyProfile.class.getName()).log(java.util.logging.Level.SEVERE, null, e);
}
this.setVisible(false);
}//GEN-LAST:event_handlerOK
/**
* Resizes an image using a Graphics2D object backed by a BufferedImage.
* @param srcImg - source image to scale
* @param w - desired width
* @param h - desired height
* @return - the new resized image
*/
private Image getScaledImage(Image srcImg, int w, int h){
// System.out.println("height::"+srcImg.getHeight(this)+" "+"width::"+srcImg.getWidth(this));
BufferedImage resizedImg = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB);
Graphics2D g2 = resizedImg.createGraphics();
g2.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR);
g2.drawImage(srcImg, 0, 0, w, h, null);
g2.dispose();
return resizedImg;
}
public void saveCompanyProfilePreferences() {
try {
java.io.Writer output = null;
java.io.File file = new java.io.File("companyProfileInformation.txt");
output = new java.io.BufferedWriter(new java.io.FileWriter(file));
output.write("Name"+" "+nameTextField.getText()+"\n");
output.write("Email"+" "+emailTextField.getText()+"\n");
output.write("Website"+" "+websiteTextField.getText()+"\n");
output.write("Address"+" "+addressTextField.getText()+"\n");
output.write("Logo"+" "+fileName+"\n");
if(fileName!=null) {
javax.imageio.ImageIO.write(image, fileExt, new java.io.File(fileName));
}
// output.write(text);
output.close();
} catch (IOException e) {
java.util.logging.Logger.getLogger(CompanyProfile.class.getName()).log(java.util.logging.Level.SEVERE, null, e);
}
}
public void getCompanyProfilePreferences() {
try{
// Open the file that is the first
// command line parameter
java.io.FileInputStream fstream = new java.io.FileInputStream("companyProfileInformation.txt");
// Get the object of DataInputStream
java.io.DataInputStream in = new java.io.DataInputStream(fstream);
java.io.BufferedReader br = new java.io.BufferedReader(new java.io.InputStreamReader(in));
String strLine;
//Read File Line By Line
while ((strLine = br.readLine()) != null) {
// Print the content on the console
// System.out.println(strLine);
if(strLine.contains("Name")) {
nameTextField.setText(strLine.substring(strLine.indexOf(" ")+1));
}
else if(strLine.contains("Email")) {
emailTextField.setText(strLine.substring(strLine.indexOf(" ")+1));
}
else if(strLine.contains("Website")) {
websiteTextField.setText(strLine.substring(strLine.indexOf(" ")+1));
}
else if(strLine.contains("Address")) {
addressTextField.setText(strLine.substring(strLine.indexOf(" ")+1));
}
else if(strLine.contains("Logo")) {
fileName=strLine.substring(strLine.indexOf(" ")+1);
fileExt = fileName.substring(fileName.indexOf(".")+1);
}
}
//Close the input stream
in.close();
}catch (Exception e){//Catch exception if any
java.util.logging.Logger.getLogger(CompanyProfile.class.getName()).log(java.util.logging.Level.SEVERE, null, e);
}
javax.swing.ImageIcon icon;
if(fileName!=null) {
try {
image = javax.imageio.ImageIO.read(new java.io.File(fileName));
} catch (java.io.IOException ex) {
java.util.logging.Logger.getLogger(CompanyProfile.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
}
if(image.getWidth(this)<=460 && image.getHeight(this)<=240) {
icon=new javax.swing.ImageIcon(image);
} else {
icon=new javax.swing.ImageIcon(getScaledImage(image, 430, 240));
}
logoLabel.setIcon(icon);
}
}
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JTextField addressTextField;
private javax.swing.JTextField emailTextField;
private javax.swing.JButton jButton1;
private javax.swing.JButton jButton2;
private javax.swing.JButton jButton3;
private javax.swing.JButton jButton4;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
private javax.swing.JLabel jLabel4;
private javax.swing.JLabel jLabel5;
private javax.swing.JLabel jLabel6;
private javax.swing.JPanel jPanel2;
private javax.swing.JPanel jPanel3;
private javax.swing.JPanel jPanel4;
private javax.swing.JPanel jPanel5;
private javax.swing.JPanel jPanel6;
private javax.swing.JLabel logoLabel;
private javax.swing.JTextField nameTextField;
private javax.swing.JTextField websiteTextField;
// End of variables declaration//GEN-END:variables
private javax.swing.JFileChooser fc;
private java.awt.image.BufferedImage image;
// private java.awt.image.BufferedImage buffImage = null;
private String fileName=null;
private String fileExt=null;
}
<file_sep>/src/com/searchkeyword/frame/CheckKeyword.java
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/*
* CheckKeyword.java
*
* Created on May 9, 2011, 6:09:24 PM
*/
package com.searchkeyword.frame;
import com.searchkeyword.bean.Keywords;
import com.searchkeyword.bean.RankTrackerBean;
import com.searchkeyword.common.CommonHelper;
import com.searchkeyword.test.PageRankService;
import java.awt.BorderLayout;
import java.awt.Container;
import java.awt.Rectangle;
import java.awt.Toolkit;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.Random;
import javax.swing.JLabel;
import javax.swing.JProgressBar;
import javax.swing.SwingUtilities;
import java.util.List;
import javax.swing.Timer;
import javax.swing.BorderFactory;
import javax.swing.JButton;
import javax.swing.JComponent;
import javax.swing.JFrame;
import javax.swing.JTextArea;
import javax.swing.border.Border;
/**
*
* @author Euphern_Java
*/
public class CheckKeyword extends javax.swing.JFrame implements ActionListener{
private RankTrackerBean rankTrackerBean;
public final static int ONE_SECOND = 1000;
// private JProgressBar progressBar;
private Timer timer;
//private JButton startButton;
private LongTask task;
// private JTextArea taskOutput;
//private String newline = "\n";
private int actualRank=0;
/** Creates new form CheckKeyword */
public CheckKeyword() {
initComponents();
prgMain.setMinimum( 0 );
prgMain.setMaximum( 300 );
prgMain.setValue( 0 );
task = new LongTask();
// checkURL("http://euphern.com");
// int rank=getKeywordRank("euphern","www.google.com");
List keywordList=new ArrayList();
keywordList.add("euphern");
keywordList.add("image");
changePrgStatus(false);
if(keywordList!=null && keywordList.size()>0)
{
int noOfKeyword=keywordList.size();
for(int i=0;i<noOfKeyword;i++)
{
pnlPrg.add(new JButton("Button"));
pnlPrg.getComponent(0).setName("btn1");
pnlPrg.getComponent(0).setVisible(true);
// System.out.println(pnlPrg.getComponent(0).getName());
pnlPrg.revalidate();
validate();
}
/*
int i=0;
JProgressBar prg=new JProgressBar();
if(noOfKeyword>=1)
{
prg1.setVisible(true);
}
if(noOfKeyword>=2)
{
prg2.setVisible(true);
}
if(noOfKeyword>=3)
{
prg3.setVisible(true);
}
if(noOfKeyword>=4)
{
prg4.setVisible(true);
}
if(noOfKeyword>=5)
{
prg5.setVisible(true);
}
if(noOfKeyword>=6)
{
prg6.setVisible(true);
}
*/
}
/*
super(new BorderLayout());
task = new LongTask();
//Create the demo's UI.
startButton = new JButton("Start");
startButton.setActionCommand("start");
startButton.addActionListener(this);
progressBar = new JProgressBar(0, task.getLengthOfTask());
progressBar.setValue(0);
//We call setStringPainted, even though we don't want the
//string to show up until we switch to determinate mode,
//so that the progress bar height stays the same whether
//or not the string is shown.
progressBar.setStringPainted(true); //get space for the string
progressBar.setString(""); //but don't paint it
taskOutput = new JTextArea(5, 20);
taskOutput.setMargin(new Insets(5, 5, 5, 5));
taskOutput.setEditable(false);
JPanel panel = new JPanel();
panel.add(startButton);
panel.add(progressBar);
add(panel, BorderLayout.PAGE_START);
add(new JScrollPane(taskOutput), BorderLayout.CENTER);
setBorder(BorderFactory.createEmptyBorder(20, 20, 20, 20));
*/
//Create a timer.
timer = new Timer(ONE_SECOND, new ActionListener() {
public void actionPerformed(ActionEvent evt) {
prgMain.setValue(task.getCurrent());
String s = task.getMessage();
if (s != null) {
if (prgMain.isIndeterminate()) {
prgMain.setIndeterminate(false);
prg1.setIndeterminate(false);
prg1.setVisible(false);
// prg2.setIndeterminate(true);
prgMain.setString(null); //display % string
}
else if (prg2.isIndeterminate()) {
prg2.setIndeterminate(false);
prg2.setVisible(false);
// prg3.setIndeterminate(true);
}
else if (prg3.isIndeterminate()) {
prg3.setIndeterminate(false);
prg3.setVisible(false);
// prg4.setIndeterminate(true);
}
else if (prg4.isIndeterminate()) {
prg4.setIndeterminate(false);
prg4.setVisible(false);
// prg6.setIndeterminate(true);
}
else if (prg5.isIndeterminate()) {
prg5.setIndeterminate(false);
prg5.setVisible(false);
// prg6.setIndeterminate(true);
}
else if (prg6.isIndeterminate()) {
prg6.setIndeterminate(false);
prg6.setVisible(false);
//prg3.setIndeterminate(true);
}
// System.out.print("test "+ task.getCurrent());
// taskOutput.append(s + newline);
// taskOutput.setCaretPosition(taskOutput.getDocument()
// .getLength());
}
if (prgMain.getValue()==300) {
// System.out.print("test12");
Toolkit.getDefaultToolkit().beep();
timer.stop();
changePrgStatus(false);
btnAction.setEnabled(true);
prgMain.setValue(prgMain.getMinimum());
prgMain.setString(""); //hide % string
}
}
});
}
/*
*
* Function Chenge Progress bar Status
*/
private void changePrgStatus(boolean status)
{
prg1.setIndeterminate(status);
prg2.setIndeterminate(status);
prg3.setIndeterminate(status);
prg4.setIndeterminate(status);
prg5.setIndeterminate(status);
prg6.setIndeterminate(status);
prg1.setVisible(status);
prg2.setVisible(status);
prg3.setVisible(status);
prg4.setVisible(status);
prg5.setVisible(status);
prg6.setVisible(status);
}
public void actionPerformed(ActionEvent evt) {
prgMain.setIndeterminate(true);
btnAction.setEnabled(false);
task.go();
timer.start();
}
public CheckKeyword(RankTrackerBean rankTBean) {
initComponents();
this.setTitle("Check Keyword");
CommonHelper.setScreenInCenter(this);
CommonHelper.installCloseHandler(this);
prgMain.setMinimum( 0 );
prgMain.setMaximum( 300 );
prgMain.setValue( 0 );
rankTrackerBean=rankTBean;
task = new LongTask();
final long startTime = System.currentTimeMillis();
//Create a timer.
timer = new Timer(ONE_SECOND, new ActionListener() {
public void actionPerformed(ActionEvent evt) {
prgMain.setValue(task.getCurrent());
String s = task.getMessage();
if (s != null) {
if (prgMain.isIndeterminate()) {
prgMain.setIndeterminate(false);
prg6.setIndeterminate(false);
prg6.setVisible(false);
// prg2.setIndeterminate(true);
prgMain.setString(null); //display % string
}
else if (prg5.isIndeterminate()) {
prg5.setIndeterminate(false);
prg5.setVisible(false);
// prg3.setIndeterminate(true);
}
else if (prg4.isIndeterminate()) {
prg4.setIndeterminate(false);
prg4.setVisible(false);
// prg4.setIndeterminate(true);
}
else if (prg3.isIndeterminate()) {
prg3.setIndeterminate(false);
prg3.setVisible(false);
// prg6.setIndeterminate(true);
}
else if (prg2.isIndeterminate()) {
prg2.setIndeterminate(false);
prg2.setVisible(false);
// prg6.setIndeterminate(true);
}
else if (prg1.isIndeterminate()) {
prg1.setIndeterminate(false);
prg1.setVisible(false);
//prg3.setIndeterminate(true);
}
// System.out.print("test "+ task.getCurrent());
// taskOutput.append(s + newline);
// taskOutput.setCaretPosition(taskOutput.getDocument()
// .getLength());
}
if (prgMain.getValue()==300) {
// System.out.print("test12");
Toolkit.getDefaultToolkit().beep();
timer.stop();
changePrgStatus(false);
btnAction.setEnabled(true);
prgMain.setValue(prgMain.getMinimum());
prgMain.setString(""); //hide % string
long endTime = System.currentTimeMillis();
long totaltime=endTime-startTime;
// System.out.println(totaltime);
// double timeelapsed=totaltime/600;
// System.out.println(timeelapsed);
DecimalFormat df = new DecimalFormat("#.##");
String timeelapsed=df.format(totaltime/600);
if(timeelapsed.length()==1)
{
timeelapsed="0:"+timeelapsed+"0";
}
else if(timeelapsed.length()==2)
{
timeelapsed="0:"+timeelapsed;
}
// System.out.println(timeelapsed);
rankTrackerBean.setTimeelapsed(String.valueOf(timeelapsed));
SearchResult searchResult=new SearchResult(rankTrackerBean);
searchResult.setVisible(true);
setVisible(false);
}
}
});
changePrgStatus(true);
btnAction.setEnabled(false);
task.go();
timer.start();
List keywordList=rankTrackerBean.getKeywordList();
String domain=rankTrackerBean.getWebsiteurl();
List countryList=new ArrayList();
countryList.add(null); // creating and setting countryList with null and Denmark value
countryList.add("in");
for(int j=0;j<keywordList.size();j++)
{
Keywords keywords=(Keywords)keywordList.get(j);
for(int i=0;i<countryList.size();i++) {
String countrycode=(String)countryList.get(i);
int rank=getKeywordRank(keywords.getKeyword(),domain,countrycode);
if(countrycode!=null){
keywords.setLocalrank(rank);
}
else{
keywords.setRank(rank);
}
}
}
/* List keywordList1=rankTrackerBean.getKeywordList();
for(int j=0;j<keywordList1.size();j++)
{
Keywords keywords=(Keywords)keywordList1.get(j);
System.out.println("Keywords "+keywords.getKeyword());
System.out.println("Rank "+keywords.getRank());
}
*/
/*checkPR(rankTrackerBean.getWebsiteurl());
List keywordList=rankTrackerBean.getKeywordList();
for(int i=0;i<keywordList.size();i++)
{
JProgressBar progressBar = new JProgressBar();
progressBar.setValue(25);
progressBar.setStringPainted(true);
Border border = BorderFactory.createTitledBorder("Reading...");
progressBar.setBorder(border);
pnlPrg.add(progressBar, BorderLayout.SOUTH);
//
// JProgressBar prg=new JProgressBar();
// prg.setMinimum( 0 );
// prg.setMaximum( 200 );
// prg.setValue( 0 );
// prg.setVisible(true);
// jPanel3.add(prg);
}*/
}
private void checkPR(String domain)
{
// String [] args=null;
long start = System.currentTimeMillis();
PageRankService prService = new PageRankService();
//String domain = "http://www.gmail.com";
// if (args.length > 0) {
// domain = args[0];
// }
uploadProgress("test");
System.out.println("Checking " + domain);
System.out.println("Google PageRank: " + prService.getPR(domain));
System.out.println("Took: " + (System.currentTimeMillis() - start) + "ms");
}
public void uploadProgress(String filename)
{
for( int iCtr = 1; iCtr < 201; iCtr++ )
{
// Do some sort of simulated task
DoBogusTask( iCtr );
//System.out.print("I "+iCtr);
// if(iCtr==50)
// {
uploadProgress2("Test",prg1);
// }
// else if(iCtr==100)
// {
uploadProgress2("Test",prg2);
// }
// else if(iCtr==150)
// {
// uploadProgress2("Test",lblKeyword2,prgThree);
// }
// Update the progress indicator and label
/*lblKeyword.setText(filename);
Rectangle labelRect = lblKeyword.getBounds();
labelRect.x = 0;
labelRect.y = 0;
lblKeyword.paintImmediately( labelRect );
*/
prgMain.setValue( iCtr );
Rectangle progressRect = prgMain.getBounds();
progressRect.x = 0;
progressRect.y = 0;
prgMain.paintImmediately( progressRect );
}
}
public void uploadProgress2(String filename,JProgressBar prg)
{
for( int iCtr = 1; iCtr < 21; iCtr++ )
{
// Do some sort of simulated task
DoBogusTask( iCtr );
// Update the progress indicator and label
// lbl.setText(filename);
// Rectangle labelRect = lbl.getBounds();
// labelRect.x = 0;
// labelRect.y = 0;
// lbl.paintImmediately( labelRect );
prg.setValue( iCtr );
Rectangle progressRect = prg.getBounds();
progressRect.x = 0;
progressRect.y = 0;
prg.paintImmediately( progressRect );
}
}
public void DoBogusTask( int iCtr )
{
Random random = new Random( iCtr );
// Waste some time
for( int iValue = 0; iValue < random.nextFloat() * 100000; iValue++ )
{
//System.out.println("hi "+iValue);
}
}
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
jPanel2 = new javax.swing.JPanel();
btnFinish = new javax.swing.JButton();
btnNext = new javax.swing.JButton();
btnBack = new javax.swing.JButton();
btnHelp = new javax.swing.JButton();
btnCancel = new javax.swing.JButton();
jPanel1 = new javax.swing.JPanel();
prgMain = new javax.swing.JProgressBar();
btnAction = new javax.swing.JButton();
jScrollPane1 = new javax.swing.JScrollPane();
pnlPrg = new javax.swing.JPanel();
prg1 = new javax.swing.JProgressBar();
prg2 = new javax.swing.JProgressBar();
prg3 = new javax.swing.JProgressBar();
prg4 = new javax.swing.JProgressBar();
prg5 = new javax.swing.JProgressBar();
prg6 = new javax.swing.JProgressBar();
jPanel4 = new javax.swing.JPanel();
jLabel1 = new javax.swing.JLabel();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
btnFinish.setText("Finish");
btnFinish.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
handleFinish(evt);
}
});
btnNext.setText("Next >>");
btnNext.setEnabled(false);
btnBack.setText("<< Back");
btnBack.setEnabled(false);
btnHelp.setText("Help");
btnHelp.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnHelphandleHelp(evt);
}
});
btnCancel.setText("Cancel");
btnCancel.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnCancelhandleCancel(evt);
}
});
javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
jPanel2.setLayout(jPanel2Layout);
jPanel2Layout.setHorizontalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
.addContainerGap()
.addComponent(btnHelp, javax.swing.GroupLayout.PREFERRED_SIZE, 71, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 359, Short.MAX_VALUE)
.addComponent(btnBack, javax.swing.GroupLayout.PREFERRED_SIZE, 85, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(btnNext)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(btnFinish, javax.swing.GroupLayout.PREFERRED_SIZE, 81, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(btnCancel, javax.swing.GroupLayout.PREFERRED_SIZE, 76, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(6, 6, 6))
);
jPanel2Layout.setVerticalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(btnHelp)
.addComponent(btnBack)
.addComponent(btnNext)
.addComponent(btnFinish)
.addComponent(btnCancel))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
btnAction.setText("Start");
btnAction.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
handleStart(evt);
}
});
prg1.setMaximum(20);
prg2.setMaximum(20);
javax.swing.GroupLayout pnlPrgLayout = new javax.swing.GroupLayout(pnlPrg);
pnlPrg.setLayout(pnlPrgLayout);
pnlPrgLayout.setHorizontalGroup(
pnlPrgLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(pnlPrgLayout.createSequentialGroup()
.addContainerGap()
.addGroup(pnlPrgLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(prg6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(prg1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(prg2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(prg3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(prg4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(prg5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap(566, Short.MAX_VALUE))
);
pnlPrgLayout.setVerticalGroup(
pnlPrgLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(pnlPrgLayout.createSequentialGroup()
.addContainerGap()
.addComponent(prg6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(prg1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(prg2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(prg3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(prg4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(prg5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(80, Short.MAX_VALUE))
);
jScrollPane1.setViewportView(pnlPrg);
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
jPanel1.setLayout(jPanel1Layout);
jPanel1Layout.setHorizontalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(55, 55, 55)
.addComponent(prgMain, javax.swing.GroupLayout.PREFERRED_SIZE, 515, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(44, 44, 44)
.addComponent(btnAction, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addContainerGap(114, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
.addContainerGap(21, Short.MAX_VALUE)
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 741, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(23, 23, 23))
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(33, 33, 33)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(prgMain, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(btnAction))
.addGap(35, 35, 35)
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 142, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(87, Short.MAX_VALUE))
);
jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/image/searchKeywordMsg.png"))); // NOI18N
javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
jPanel4.setLayout(jPanel4Layout);
jPanel4Layout.setHorizontalGroup(
jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel4Layout.createSequentialGroup()
.addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 785, Short.MAX_VALUE)
.addContainerGap())
);
jPanel4Layout.setVerticalGroup(
jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel4Layout.createSequentialGroup()
.addComponent(jLabel1)
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
.addComponent(jPanel2, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jPanel1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
.addContainerGap())
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGap(18, 18, 18)
.addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap())
);
pack();
}// </editor-fold>//GEN-END:initComponents
private void handleStart(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_handleStart
// TODO add your handling code here:
// uploadProgress("test");
// btnAction.setText("Stop");
// prgMain.setIndeterminate(true);
// prg1.setIndeterminate(true);
// prg2.setIndeterminate(true);
// prg3.setIndeterminate(true);
// prg4.setIndeterminate(true);
// prg5.setIndeterminate(true);
// prg6.setIndeterminate(true);
changePrgStatus(true);
btnAction.setEnabled(false);
task.go();
timer.start();
}//GEN-LAST:event_handleStart
private void handleFinish(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_handleFinish
// TODO add your handling code here:
SearchResult sr=new SearchResult(rankTrackerBean);
sr.setVisible(true);
this.setVisible(false);
}//GEN-LAST:event_handleFinish
private void btnHelphandleHelp(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnHelphandleHelp
// TODO add your handling code here:
CommonHelper.openHelpURL();
}//GEN-LAST:event_btnHelphandleHelp
private void btnCancelhandleCancel(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCancelhandleCancel
// TODO add your handling code here:
this.setVisible(false);
}//GEN-LAST:event_btnCancelhandleCancel
private static void createAndShowGUI() {
new CheckKeyword().setVisible(true);
//Make sure we have nice window decorations.
// JFrame.setDefaultLookAndFeelDecorated(true);
//
// //Create and set up the window.
// JFrame frame = new JFrame("ProgressBarDemo2");
// frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
//
// //Create and set up the content pane.
// JComponent newContentPane = new ProgressBarDemo2();
// newContentPane.setOpaque(true); //content panes must be opaque
// frame.setContentPane(newContentPane);
//
// //Display the window.
// frame.pack();
// frame.setVisible(true);
}
/*
*
* Function To get All related URL List By a single URL
*/
private int getKeywordRank(String keyword,String domain,String countrycode)
{
int rank=0;
if(keyword!=null && domain!=null && !keyword.equals("") && !domain.equals(""))
{
// System.out.println("keyword "+keyword);
String newkeyword=keyword.replaceAll(" ", "_");
// System.out.println("keyword "+keyword);
String domainName=getdomainName(domain);
// System.out.println("domainName "+domainName);
boolean pagest=false;
if(domainName!=null && !domainName.equals("") && domainName.toUpperCase().equals(keyword.toUpperCase()))
{
String pagecontent=WebPageStatus.getPageContent(domain);
String[] strTitle1=pagecontent.split("<title>");
String[] strTitle2=strTitle1[1].split("</title>");
String title=strTitle2[0];
System.out.print("title "+title);
System.out.print("keyword "+keyword);
//System.out.print("pagecontent "+pagecontent);
String s1=title.toUpperCase().trim();
String s2=keyword.toUpperCase().trim();
if(s1.equals(s2))
{
rank=1;
// rank=actualRank;
pagest=true;
}
}
else if(domainName != null && !domainName.equals(""))
{
String str="\\[";
String googleBaseUrl=null;
if(countrycode!=null) {
googleBaseUrl="http://ajax.googleapis.com/ajax/services/search/web?v=1.0&q="+newkeyword+"&hl=en&safe=off&start=0&rsz=8&sa=N&gl="+countrycode+"";
} else {
googleBaseUrl="http://ajax.googleapis.com/ajax/services/search/web?v=1.0&q="+newkeyword+"&hl=en&safe=off&start=0&rsz=8&sa=N";
}
String pagecontent=WebPageStatus.getPageContent(googleBaseUrl);
//System.out.println("Page Content "+pagecontent);
String[] resultArray1=pagecontent.split("\\[");
// System.out.println("Page Content2 "+resultArray1[1]);
String[] resultArray2=resultArray1[1].split("\\]");
// System.out.println("Page Content3 "+resultArray2[0]);
if(resultArray2[0].toUpperCase().indexOf(domainName.toUpperCase())>0)
{
String result1=resultArray2[0].replaceAll("\\{", "");
// System.out.println("result "+result1);
String[] result2=result1.split("\\},");
// System.out.println("result2 "+result2[0]);
boolean status=false;
for(int i=0;i<result2.length;i++)
{
actualRank++;
String[] result_T3=result2[i].split("title");
if(result_T3.length>1)
{
// System.out.println("result_T3 "+result_T3[1]);
String[] result_T4=result_T3[1].split(",");
if(result_T4.length>0)
{
// System.out.println("result_T4 "+result_T4[0]);
String chkResult=result_T4[0].toUpperCase();
int indx_T=chkResult.indexOf(keyword.toUpperCase());
// System.out.println("Indx "+indx_T);
if(indx_T>0)
{
String[] result3=result2[i].split("visibleUrl");
if(result3.length>1)
{
// System.out.println("result3 "+result3[1]);
String[] result4=result3[1].split(",");
if(result4.length>0)
{
// System.out.println("result4 "+result4[0]);
String linkedUrl=result4[0].toUpperCase();
// System.out.println("linkedUrl "+linkedUrl);
// if(domain.indexOf("http")>0)
// {
String chekdomain=domain.replaceAll("http://", "");
chekdomain=chekdomain.replaceAll("www", "");
// System.out.println("chekdomain "+chekdomain);
int indx1=linkedUrl.indexOf(chekdomain.toUpperCase());
//System.out.println("Indx "+indx);
if(indx1>0)
{
rank=1;
// rank=actualRank;
status=true;
break;
}
int indx=result4[0].indexOf(".com");
//System.out.println("Indx "+indx);
if(indx>0)
{
rank++;
}
}
// }
}
}
}
}
}
if(!status)
{
rank=(10-rank)*3;
}
}
}
}
// System.out.println("Rank "+rank);
return rank;
}
public String getdomainName(String websiteURL)
{
String domainName=null;
//websiteURL="http://euphern.com";
//System.out.println("websiteURL "+websiteURL);
if(websiteURL!=null && !websiteURL.equals(""))
{
if(websiteURL.toUpperCase().indexOf("www".toUpperCase())>0)
{
String[] str=websiteURL.split("\\.");
if(str.length>1)
domainName=str[1];
}
else{
String[] str1=websiteURL.split("/");
if(str1.length>1)
{
// System.out.println("str1[2] "+str1[2]);
String[] str2=str1[2].split("\\.");
if(str2.length>1)
domainName=str2[0];
}
}
}
return domainName;
}
private void checkURL(String websiteurl)
{
String pagecontent=WebPageStatus.getPageContent(websiteurl);
List urllinkList=WebPageStatus.getLink(pagecontent);
List webpageUrlList=new ArrayList();
if(urllinkList!=null && urllinkList.size()>0)
{
for(int i=0;i<urllinkList.size();i++)
{
WebSitePageLink pageLink=new WebSitePageLink();
pageLink.setPageid(i);
String pageurl=String.valueOf(urllinkList.get(i));
if(pageurl.indexOf("http://") != -1)
pageLink.setPageurl(pageurl);
else
{
pageLink.setPageurl(websiteurl+"/"+pageurl);
pageLink.setPagetitle(pageurl.substring(0, pageurl.length()-5).toUpperCase());
}
//String pagecontent2=WebPageStatus.getPageContent(String.valueOf(urllinkList.get(i)));
//String pagetitle=WebPageStatus.getPageTitle(pagecontent2);
//pageLink.setPagetitle(pagetitle);
webpageUrlList.add(pageLink);
//System.out.println("Link "+urllinkList.get(i));
}
}
else
{
WebSitePageLink pageLink=new WebSitePageLink();
pageLink.setPageid(1);
pageLink.setPageurl("No Page Link Found");
webpageUrlList.add(pageLink);
}
if(webpageUrlList!=null && webpageUrlList.size()>0)
{
for(int i=0;i<webpageUrlList.size();i++)
{
WebSitePageLink pageLink=(WebSitePageLink)webpageUrlList.get(i);
System.out.println("URL "+pageLink.getPageurl());
System.out.println("Title "+pageLink.getPagetitle());
}
}
}
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
// java.awt.EventQueue.invokeLater(new Runnable() {
// public void run() {
// new CheckKeyword().setVisible(true);
// }
// });
javax.swing.SwingUtilities.invokeLater(new Runnable() {
public void run() {
createAndShowGUI();
}
});
}
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JButton btnAction;
private javax.swing.JButton btnBack;
private javax.swing.JButton btnCancel;
private javax.swing.JButton btnFinish;
private javax.swing.JButton btnHelp;
private javax.swing.JButton btnNext;
private javax.swing.JLabel jLabel1;
private javax.swing.JPanel jPanel1;
private javax.swing.JPanel jPanel2;
private javax.swing.JPanel jPanel4;
private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JPanel pnlPrg;
private javax.swing.JProgressBar prg1;
private javax.swing.JProgressBar prg2;
private javax.swing.JProgressBar prg3;
private javax.swing.JProgressBar prg4;
private javax.swing.JProgressBar prg5;
private javax.swing.JProgressBar prg6;
private javax.swing.JProgressBar prgMain;
// End of variables declaration//GEN-END:variables
}
/*
* Code for Grnerate and run the progress bar
*/
abstract class SwingWorker {
private Object value; // see getValue(), setValue()
/**
* Class to maintain reference to current worker thread under separate
* synchronization control.
*/
private static class ThreadVar {
private Thread thread;
ThreadVar(Thread t) {
thread = t;
}
synchronized Thread get() {
return thread;
}
synchronized void clear() {
thread = null;
}
}
private ThreadVar threadVar;
/**
* Get the value produced by the worker thread, or null if it hasn't been
* constructed yet.
*/
protected synchronized Object getValue() {
return value;
}
/**
* Set the value produced by worker thread
*/
private synchronized void setValue(Object x) {
value = x;
}
/**
* Compute the value to be returned by the <code>get</code> method.
*/
public abstract Object construct();
/**
* Called on the event dispatching thread (not on the worker thread) after
* the <code>construct</code> method has returned.
*/
public void finished() {
}
/**
* A new method that interrupts the worker thread. Call this method to force
* the worker to stop what it's doing.
*/
public void interrupt() {
Thread t = threadVar.get();
if (t != null) {
t.interrupt();
}
threadVar.clear();
}
/**
* Return the value created by the <code>construct</code> method. Returns
* null if either the constructing thread or the current thread was
* interrupted before a value was produced.
*
* @return the value created by the <code>construct</code> method
*/
public Object get() {
while (true) {
Thread t = threadVar.get();
if (t == null) {
return getValue();
}
try {
t.join();
} catch (InterruptedException e) {
Thread.currentThread().interrupt(); // propagate
return null;
}
}
}
/**
* Start a thread that will call the <code>construct</code> method and
* then exit.
*/
public SwingWorker() {
final Runnable doFinished = new Runnable() {
public void run() {
finished();
}
};
Runnable doConstruct = new Runnable() {
public void run() {
try {
setValue(construct());
} finally {
threadVar.clear();
}
SwingUtilities.invokeLater(doFinished);
}
};
Thread t = new Thread(doConstruct);
threadVar = new ThreadVar(t);
}
/**
* Start the worker thread.
*/
public void start() {
Thread t = threadVar.get();
if (t != null) {
t.start();
}
}
}
class LongTask {
private int lengthOfTask;
private int current = 0;
private boolean done = false;
private boolean canceled = false;
private String statMessage;
public LongTask() {
//Compute length of task...
//In a real program, this would figure out
//the number of bytes to read or whatever.
lengthOfTask = 1000;
}
/**
* Called from ProgressBarDemo to start the task.
*/
public void go() {
final SwingWorker worker = new SwingWorker() {
public Object construct() {
current = 0;
done = false;
canceled = false;
statMessage = null;
return new ActualTask();
}
};
worker.start();
}
/**
* Called from ProgressBarDemo to find out how much work needs to be done.
*/
public int getLengthOfTask() {
return lengthOfTask;
}
/**
* Called from ProgressBarDemo to find out how much has been done.
*/
public int getCurrent() {
return current;
}
public void stop() {
canceled = true;
statMessage = null;
}
/**
* Called from ProgressBarDemo to find out if the task has completed.
*/
public boolean isDone() {
return done;
}
/**
* Returns the most recent status message, or null if there is no current
* status message.
*/
public String getMessage() {
return statMessage;
}
/**
* The actual long running task. This runs in a SwingWorker thread.
*/
class ActualTask {
ActualTask() {
//Fake a long task,
//making a random amount of progress every second.
while (!canceled && !done) {
try {
Thread.sleep(1000); //sleep for a second
current += Math.random() * 100; //make some progress
if (current >= lengthOfTask) {
done = true;
current = lengthOfTask;
}
statMessage = "Completed " + current + " out of "
+ lengthOfTask + ".";
} catch (InterruptedException e) {
System.out.println("ActualTask interrupted");
}
}
}
}
}
/*
* End the progress bar code
*/
| 9544d9e29b3149b6aa6a33eb50f5fbe3bafe454e | [
"Java"
] | 5 | Java | vigilantlaynar/Keyword-Search | be2330472a8c8c879923a95153e58eb2779656fc | 49189c0a6fdffda4ec0a917b17b3d0f05be7ca1c | |
refs/heads/master | <file_sep>"""
Development of FTIR processing algorithm
To Do:
- Improve baseline and area normalization
- Improve gaussian peak fitting (maybe restrict peak widths and movement)
- Improve file open to enable opening in any directory, not just current
directory
B.Kendrick modifications to file in April 2018 include:
- updated to read file names with underscores (or any special character)
- added dataframe sorting function to ensure FTIR data input gets arranged in
descending wavenumber
- included output of individual Gaussian fit curves to csv output file
- removed redundant curve fitting function call for csv output
- modified the matplotlib plots to stack the gaussian fit plot and the
residual plot together
- added extra gaussian peak at 1615 cm-1 for initial fit due to extra
non-structural peak creating poor fit
- added calculation of secondary structure elements (helix, turn, etc.) and
output to csv
Notes:
Program will throw the following error if any of the initial guess peaks in
clist has a zero y-value in the FTIR dataset:
TypeError: Improper input: N=30 must not exceed M=1
Program will throw a key error if the initial guess peaks in clist lie
outside the x-data range
Sometimes you need to tweak the initial guess peaks (in clist) to get the fit
to work
Sometimes you need to tweak the height constant in guess_heights function as
needed for difficult to fit spectra
"""
import math
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from ftir.modeling.peak_definitions import yang_h20_2015
from scipy import optimize
def _split_result_array(res):
""" Test
"""
# Pull out meaningful data triplets
centers = list()
width = list()
height = list()
for i in range(0, len(res.x), 3):
height.append(res.x[i])
centers.append(res.x[i+1])
width.append(res.x[i+2])
return centers, width, height,
def underlying_gaussian(df, col, freq='freq'):
""" Finds the gaussian curves that make up the FTIR signals
Returns a tuple of the xdata (freq), ydata (summed gaussian)
and a list of ydata for each underlying gaussian
Parameters
----------
df : Dataframe
pandas dataframe containing the FTIR data. The data must be contain a
column of the wavenumber data, and a column of the spectral data.
col : Int or Str
Column index for the absorbance data to be fit. This value is used to
reference the `df` column using the standard pandas api, either integer
or string values are permitted.
freq : Int or Str (optional kwarg)
Column index or name for the frequency data. Defaults to `freq`, but
can be changed if a different name is used for the the wavenumber
(or frequency) column.
Returns
-------
xdata : Dataframe
Frequency range for the Gaussian fit
ydata :
Model absorbance data for the Gaussian fit. This returns the sum of all
Gaussian peaks.
gauss_list :
resid :
The function evaluated at the output of the optimized least squares
method from `scipy`
rsquared :
centers :
areas :
"""
# Creates an array of x, y data
data = np.array(pd.concat([df[freq], df[col]], axis=1))
# print(data)
def errfunc(p, x, y):
""" Simple error function taking the array of parameters, calculating
the Gaussian sum, and then taking the difference from the measured
spectra.
Prevents negative parameters by returning an array of very high error
when getting an negative parameter
"""
if min(p) > 0:
return gaussian_sum(x, *p) - y
else:
return np.full((len(y),), 100, dtype=np.float64)
# Deconvoluted amide I band frequencies for proteins in water
clist = [1694, 1691, 1687, 1676, 1672, 1660, 1656, 1650, 1642, 1638, 1634,
1627, 1621]
# Gets list of relevant heights corresponding to clist freqs
hlist = guess_heights(df, col, clist)
# creates a list of peak widths to use in fitting
wlist = [5 for i in clist]
# creates a tuple, e.g. [(0.012, 1700, 5), (0.032, 1688, 5), ...]
tmp = list(zip(hlist, clist, wlist))
# print('zipped list of hlist, clist, wlist')
# print(tmp)
# unpacks the tmp nested list/tuple into a 1-D array
guess = np.array([item for sublist in tmp for item in sublist])
# print('guess np.array from zipped list')
# print(guess)
optim, cov, infodict, mesg, ier = optimize.leastsq(
errfunc, guess, args=(data[:, 0], data[:, 1]), full_output=True)
xdata = data[:, 0]
ydata = gaussian_sum(data[:, 0], *optim)
gausslist = gaussian_list(data[:, 0], *optim)
resid = infodict['fvec']
ss_err = (resid**2).sum()
ss_tot = ((data[:, 1] - data[:, 1].mean())**2).sum()
rsquared = 1 - (ss_err/ss_tot)
optim = list(optim)
heights = optim[0::3]
centers = optim[1::3]
widths = optim[2::3]
areas = []
for a, b, c in zip(heights, centers, widths):
area = gaussian_integral(a, c)
areas.append(area)
return xdata, ydata, gausslist, resid, rsquared, centers, areas
def gaussian_minimize(
df, col, freq='freq', peaks=yang_h20_2015, peak_width=5,
params={'method': 'L-BFGS-B'}):
"""
Gradient based minimization implementation of the FTIR peak fitting
Uses the Scipy `optimize.minimize` function for minimization. Different
solvers can be specified in the method parameters. This method is likely
to converge upon a local minimum rather than the global minimum, but
will converge MUCH faster than the different evolution solution.
Parameters
----------
df : DataFrame
pandas dataframe containing the FTIR data. The data must be contain a
column of the wavenumber data, and a column of the spectral data.
col : Int or Str
Column index for the absorbance data to be fit. This value is used to
reference the `df` column using the standard pandas api, either integer
or string values are permitted.
freq : Int or Str (optional)
Column index or name for the frequency data. Defaults to `freq`.
Can be changed if a different name is used for the the wavenumber
(or frequency) column.
peak_width : Int (optional)
Maximum peak width. Defaults to 5
peaks : Peak Definitions (optional)
A dictionary containing peak definitions to be used. Three kwargs are
necessary:
* `peaks` which should provide a list of the the peak means,
* `uncertainties` which should provide a list of tuple bounds
around the peak means. These must be ordered the same as the
peak means list.
* `assignments` which should provide a list of the peak secondary
structure assignments. These must be ordered the same as the
peak means list.
Defaults to the Yang et. al, Nature Protocol 2015. peak definitions.
params : Dict (optional)
A dictionary of kwargs passed to the scipy differential evolution
optimization algorithm. If `None`, the Default settings within scipy
are used.
Returns
-------
TBD
"""
def func(p, x, y):
"""Function to find the local minimum in the boundary space
Parameters
----------
p : 1-D array
Inputs are a 1-D array that follow the sequence:
(peak_height, peak_mean, peak_width)_{n}
x : 1-D array
Frequency range for evaluation
y : 1-D array
Measured absorbance data corresponding to the frequency range
provided
"""
return np.sum((gaussian_sum(x, *p) - y)**2)
data = np.array(pd.concat([df[freq], df[col]], axis=1))
heights = guess_heights(df, col, peaks['means'], gain=1.0)
width = peak_width*2
bounds = list()
guess = list()
# Make 1-D array for optimization func definition above
for mean, bound, height in zip(peaks['means'], peaks['uncertainties'],
heights):
bounds.append((0, height))
bounds.append(bound)
bounds.append((0, width*2))
guess.append(height*0.95)
guess.append(mean)
guess.append(peak_width)
args = [func, np.array(guess)]
params['args'] = (data[:, 0], data[:, 1])
params['bounds'] = bounds
res = optimize.minimize(*args, **params)
areas = list()
for i in range(0, len(res.x), 3):
height = res.x[i]
width = res.x[i+2]
area = gaussian_integral(height, width)
areas.append(area)
return areas, res
def gaussian_differential_evolution(
df, col, freq='freq', peaks=yang_h20_2015, peak_width=5,
params=dict()):
"""
Differential evolution minimization implementation of the FTIR peak fitting
Uses the Scipy implementation of the Storn and Price differential evolution
minimization technique. This optimization approach does not use gradient
methods to find the global minimum across the defined space, and often
requires a larger number of function evaluations to converge to the local
minimum than other approaches, e.g. least squared optimization. The
advantage of this approach is that we can define the bounds of the peak
positions, and search of the global minima within this defined bounds
without the worry of converging on a local minimum. The disadvantage is
that is takes a really long time to run. Like hit go and walk away for a
couple hours long.
Parameters
----------
df : DataFrame
pandas dataframe containing the FTIR data. The data must be contain a
column of the wavenumber data, and a column of the spectral data.
col : Int or Str
Column index for the absorbance data to be fit. This value is used to
reference the `df` column using the standard pandas api, either integer
or string values are permitted.
freq : Int or Str (optional)
Column index or name for the frequency data. Defaults to `freq`.
Can be changed if a different name is used for the the wavenumber
(or frequency) column.
peak_width : Int (optional)
Maximum peak width. Defaults to 5
peaks : Peak Definitions (optional)
A dictionary containing peak definitions to be used. Three kwargs are
necessary:
* `peaks` which should provide a list of the the peak means,
* `uncertainties` which should provide a list of tuple bounds
around the peak means. These must be ordered the same as the
peak means list.
* `assignments` which should provide a list of the peak secondary
structure assignments. These must be ordered the same as the
peak means list.
Defaults to the Yang et. al, Nature Protocol 2015. peak definitions.
params : Dict (optional)
A dictionary of kwargs passed to the scipy differential evolution
optimization algorithm. If `None`, the Default settings within scipy
are used.
Returns
-------
TBD
"""
def func(p, x, y):
"""Function to find the local minimum in the boundary space
Parameters
----------
p : 1-D array
Inputs are a 1-D array that follow the sequence:
(peak_mean, peak_height, peak_width)_{n}
x : 1-D array
Frequency range for evaluation
y : 1-D array
Measured absorbance data corresponding to the frequency range
provided
"""
return np.sum((gaussian_sum(x, *p) - y)**2)
data = np.array(pd.concat([df[freq], df[col]], axis=1))
heights = guess_heights(df, col, peaks['means'], gain=1.0)
width = peak_width
bounds = list()
# Make 1-D array for optimization to match the func definition above
for bound, height in zip(peaks['uncertainties'], heights):
bounds.append((0, height))
bounds.append(bound)
bounds.append((0, width))
args = [func, np.array(bounds)]
params['args'] = (data[:, 0], data[:, 1])
res = optimize.differential_evolution(*args, **params)
areas = []
centers, width, height = _split_result_array(res)
for a, b in zip(heights, width):
area = gaussian_integral(a, b)
areas.append(area)
return areas, res
def guess_heights(df, col, center_list, gain=0.95):
""" Determines guesses for the heights based on measured data.
Function creates an integer mapping to the measured frequencies, and then
creates an initial peak height guess of gain*actual height at x=freq*. A
Default of 0.95 seems to work best for most spectra, but can be change to
improve convergence.
Parameters
----------
df : Dataframe
Dataframe containing the measured absorbance data
col : string or integer
Column index for the absorbance data being fit. Accepts either index
or string convention.
center_list : iterable of integers
An iterable of integer peak positions used to find the experiment
absorbance at a given wavenumber. I.e, the heights are returned at the
center values in this iterable
gain : number (optional)
Fraction of the measured absorbance value to use determine the initial
guess for the peak height. The value Default value is 0.95, and thus
by default, all initial peak guesses are 95% of the peak max.
"""
heights = []
freq_map = {}
for i in df.freq:
j = math.floor(i)
freq_map[j] = float(df[col].get(df.freq == i))
for i in center_list:
height = freq_map[i]
heights.append(gain*height)
return heights
def gaussian(x, height, center, width):
""" Function defining a gaussian distribution
"""
return height*np.exp(-(x - center)**2/(2*width**2))
def gaussian_sum(x, *args):
""" Returns the sum of the gaussian function inputs
"""
return sum(gaussian_list(x, *args))
def gaussian_list(x, *args):
""" Returns the sum of the gaussian function inputs
"""
if len(args) % 3 != 0:
raise ValueError('Args must divisible by 3')
gausslist = []
count = 0
for i in range(int(len(args)/3)):
gausstemp = gaussian(x, args[count], args[count+1], args[count+2])
gausslist.append(gausstemp)
count += 3
return gausslist
def gaussian_integral(height, width):
""" Returns the integral of a gaussian curve with the given height, width
and center
"""
return height*width*math.sqrt(2*math.pi)
def secondary_structure(areas, peaks):
""" Returns secondary structure content
Takes ordered area definitions and peak definitions and returns secondary
structure quantities.
Parameters
----------
areas : list
An ordered list of peak areas. Areas should be ordered from lowest
wavenumber to the highest wavenumber
peaks : Dict
Peak definition dictionary containing a `means` and `assignments`
items.
Returns
-------
Dict
Dictionary of secondary structure content
"""
# check area length
if not len(areas) == len(peaks['means']):
raise ValueError('Area definitions do not match the number of peak'
'definitions')
structures = {i: 0 for i in set(peaks['assignments'])}
for i, assignment in enumerate(peaks['assignments']):
structures[assignment] += areas[i]/sum(areas)
return structures
def create_fit_plots(raw_df, col, peak_list):
""" Creates the following plots for each protein sample:
Parameters
----------
raw_df : Dataframe
Pandas dataframe containing the raw FTIR second derivative data.
Frequency and absorbance values will be used for plotting and residual
calculations.
col : String
Dataframe column name to be used for plotting.
peak_list : Iterable
Iterable containing the peak fit data. Each value in the iterable will
be plotted to show the quality of the model fit. The peaks are also sum
to show the composite fit and calculate the residuals.
Returns
-------
Plot
`matplotlib.pyplot` handle is returned. This plot can be displayed via
`plot.show()` or saved as a file image via `plot.save()`
"""
fig = plt.figure(figsize=(8, 6))
ax = fig.add_subplot(211)
xdata = raw_df['freq']
y_fit = sum(peak_list)
ax.plot(xdata, raw_df[col], label='$2^{nd}$ derivative')
ax.plot(xdata, y_fit, label='Model fit')
for i in range(len(peak_list)):
ax.plot(xdata, peak_list[i], ls='--', label='')
ax.set_xlim([1705, 1600])
ax.legend(loc=2)
resid = raw_df[col] - y_fit
ax = fig.add_subplot(212)
ax.plot(xdata, resid, label='residuals')
ax.set_xlim([1705, 1600])
ax.set_xlabel('Wavenumber ($cm^{-1}$)', fontsize=11)
ax.set_xlim([1705, 1600])
ax.legend(loc=2)
return plt
<file_sep>import pandas as pd
from ftir.modeling.buffer_subtraction import find_buffer_subtraction_constant, buffer_subtract
from ftir.modeling.peak_fitting import gaussian_minimize, gaussian_differential_evolution, secondary_structure, create_fit_plots, gaussian_list
from ftir.modeling.peak_definitions import yang_h20_2015
from ftir.io.utils import create_df_from_single_file
# get some data
raw_data_filename = "ExampleBSA_IgG1_2ndDer_AmideI.csv"
directory = "/home/jyoung/Devel/ftir_data_analytics/tests/data/"
rawData_df = pd.read_csv(directory + raw_data_filename)
proteins = list(rawData_df.columns)[1:]
structures = {}
structures['File'] = []
structures['Turn'] = []
structures['α-Helix'] = []
structures['Unordered'] = []
structures['β-Sheet'] = []
num_files = len(raw_data_filename)
for i in proteins:
current_df = rawData_df[['freq', i]].copy()
area, res = gaussian_minimize(
current_df, current_df.columns[1],
params={'method': 'TNC', 'tol': 1e-8})
structs = secondary_structure(area, yang_h20_2015)
gaussian_list_data = gaussian_list(rawData_df['freq'], *res.x)
plt = create_fit_plots(current_df, i, gaussian_list_data)
plt.show()
| d2465f184f24d85efd8542b6ce7ffacd920eb009 | [
"Python"
] | 2 | Python | lucyliu1991/ftir_data_analytics | 5a8ea95b22156d143c8e3f0545142dffa506babc | 382615dd2bd2981405c1d0234ab4d6085e9f8b66 | |
refs/heads/master | <file_sep>//
// LifeGridModel.swift
// AudioModem
//
// Created by Nick on 22/06/2017.
// Copyright © 2017 Nick. All rights reserved.
//
import Foundation
class LifeGridModel {
let dimensions: (x: Int, y: Int)
var grid: [Bool]
init(dimensions: (x: Int, y: Int)) {
self.dimensions = dimensions
self.grid = []
self.reloadRandomGrid()
//self.grid = Array(repeating: false, count: dimensions.x * dimensions.y)
}
func randomBool() -> Bool {
return arc4random_uniform(3) == 0
}
func reloadRandomGrid() {
self.grid = []
for _ in 0..<(dimensions.x * dimensions.y) {
self.grid.append(self.randomBool())
}
}
func index(forCoordinate coordinate: (x: Int, y: Int)) -> Int {
guard coordinate.x < dimensions.x, coordinate.y < dimensions.y else {
fatalError("grid coordinate is out of range")
}
return dimensions.x * coordinate.y + coordinate.x
}
subscript(x: Int, y: Int) -> Bool {
get {
let idx = index(forCoordinate: (x, y))
return grid[idx]
}
set {
let idx = index(forCoordinate: (x, y))
grid[idx] = newValue
}
}
}
<file_sep>//
// ViewController.swift
// AudioModem
//
// Created by Nick on 22/06/2017.
// Copyright © 2017 Nick. All rights reserved.
//
import UIKit
import AVFoundation
class ViewController: UIViewController {
@IBOutlet weak var lifeGridView: LifeGridView!
@IBOutlet weak var frequencySlider: UISlider!
let controlFrequency: Double = 120.0
let trueFrequency: Double = 200.0
let falseFrequency: Double = 320.0
let normalTimeInterval: TimeInterval = 0.25
let controlTimeInterval: TimeInterval = 3.0
static let squareSize = 40
lazy var recommendedDimensions: (Int, Int) = {
let xDimension = Int(self.view.bounds.size.width) / ViewController.squareSize
let yDimension = Int(self.view.bounds.size.height) / ViewController.squareSize
return (8, 16)
//return (xDimension, yDimension)
}()
var gridModel: LifeGridModel?
var engine: AVAudioEngine!
var tone: AVTonePlayerUnit!
override func viewDidLoad() {
super.viewDidLoad()
self.gridModel = LifeGridModel(dimensions: recommendedDimensions)
self.lifeGridView.gridModel = self.gridModel
self.setupToneGeneration()
}
@IBAction func onTapSend(_ sender: UIButton) {
if tone.isPlaying {
//sender.setTitle("Send", for: UIControlState())
self.stopTone()
} else {
sender.setTitle("Stop", for: UIControlState())
self.playTone()
}
}
}
extension ViewController{
func setupToneGeneration() {
tone = AVTonePlayerUnit()
tone.frequency = controlFrequency // This can be changed accordingly
let format = AVAudioFormat(standardFormatWithSampleRate: tone.sampleRate, channels: 1)
print(format.sampleRate)
engine = AVAudioEngine()
engine.attach(tone)
let mixer = engine.mainMixerNode
engine.connect(tone, to: mixer, format: format)
do {
try engine.start()
} catch let error as NSError {
print(error)
}
}
@IBAction func frequencyChanged(_ sender: UISlider){
let freq = Double(sender.value)
tone.frequency = freq
}
func playTone(){
tone.preparePlaying()
engine.mainMixerNode.volume = 1.0
print("Started Sending Tone")
self.playGridToneDataBlast()
}
func stopTone(){
engine.mainMixerNode.volume = 0.0
tone.stop()
self.gridModel?.reloadRandomGrid()
self.lifeGridView.setNeedsDisplay()
print("Stopped Sending Tone")
}
}
extension ViewController{
func playGridToneDataBlast() {
tone.play()
// Initial Blast signifying that new grid data is about to be transmitted
self.playControlFrequencyBlast(duration: controlTimeInterval)
let count = self.gridModel?.grid.count
for i in 0...(count! - 1) {
self.playControlFrequencyBlast(duration:normalTimeInterval)
if (self.gridModel?.grid[i])!{
self.playToneBlast(frequency: trueFrequency, duration: normalTimeInterval)
}
else{
self.playToneBlast(frequency: falseFrequency, duration: normalTimeInterval)
}
}
// Ending Blast signifying that grid data has finished transmitting
self.playControlFrequencyBlast(duration: controlTimeInterval)
self.stopTone()
}
func playControlFrequencyBlast(duration: Double) {
self.playToneBlast(frequency: controlFrequency, duration: duration)
}
func playToneBlast(frequency: Double,duration: TimeInterval) {
print("Playing Frequency: \(frequency), for Duration: \(duration)")
tone.frequency = frequency
Thread.sleep(forTimeInterval: duration)
}
}
<file_sep>//
// LifeGridView.swift
// AudioModem
//
// Created by Nick on 22/06/2017.
// Copyright © 2017 Nick. All rights reserved.
//
import Foundation
import UIKit
class LifeGridView: UIView {
public var gridModel: LifeGridModel?
var xSquareSize: CGFloat? {
get {
guard let dimensions = gridModel?.dimensions else {
return nil
}
return self.bounds.size.width / CGFloat(dimensions.x)
}
}
var ySquareSize: CGFloat? {
get {
guard let dimensions = gridModel?.dimensions else {
return nil
}
return self.bounds.size.height / CGFloat(dimensions.y)
}
}
override func touchesEnded(_ touches: Set<UITouch>, with event: UIEvent?) {
guard let gridModel = gridModel else {
return
}
guard let xSize = self.xSquareSize, let ySize = self.ySquareSize else {
return
}
guard let touch = touches.first else {
return
}
let point = touch.location(in: self)
let x = Int(point.x / xSize)
let y = Int(point.y / ySize)
gridModel[x, y] = !gridModel[x, y]
self.setNeedsDisplay()
}
override func draw(_ rect: CGRect) {
guard let gridModel = gridModel else {
return
}
guard let xSize = self.xSquareSize, let ySize = self.ySquareSize else {
return
}
let ctx = UIGraphicsGetCurrentContext()
ctx?.setStrokeColor(UIColor.blue.cgColor)
ctx?.setLineWidth(1.0)
for x in 0..<gridModel.dimensions.x {
for y in 0..<gridModel.dimensions.y {
let color = gridModel[x, y] ? UIColor.darkGray : UIColor.lightGray
ctx?.setFillColor(color.cgColor)
let origin = CGPoint(x: CGFloat(x) * xSize + 1.0, y: CGFloat(y) * ySize + 1.0)
let rect = CGRect(origin: origin, size: CGSize(width: xSize, height: ySize))
ctx?.addRect(rect)
ctx?.drawPath(using: .fillStroke)
}
}
let size = CGSize(width: self.bounds.size.width - 1.0, height: self.bounds.size.height - 1.0)
let rect = CGRect(origin: CGPoint.zero, size: size)
ctx?.addRect(rect)
ctx?.strokePath()
}
}
| cdeef0402447827e0dfe741d058e307ac4d07d97 | [
"Swift"
] | 3 | Swift | ncke/AudioModem | 1b97fc87b5588c8e9fe3ccf48776343d57e75275 | 88f89bc48ccbe19d5b4d68e051a0b4173049f6d3 | |
refs/heads/master | <file_sep>package models
import (
"time"
"go.mongodb.org/mongo-driver/bson/primitive"
)
//DevuelvoTweetsSeguidores es la estructura con la que devolveremos los tweets
type DevuelvoTweetsSeguidores struct {
ID primitive.ObjectID `bson: "_id" json:"_id,omitempty`
UsuarioID string `bson: "usuarioid" json: "userId,omitempty"`
UsuarioRelacionID string `bson: "usuariorelacionid" json: "userRelationId,omitempty"`
Tweet struct {
Mensaje string `bson: "mensaje" json: "mensaje,omitempty"`
Fecha time.Time `bson: "fecha" json: "fecha,omitempty"`
ID string `bson: "_id" json: "_id,omitempty"`
}
}
<file_sep>package models
//Relacion modelo para grabar la relacion de un usuario con otro
type Relacion struct {
UsuarioID string `bson: "usuarioid" json: "usuarioId"`
UsuarioRelacionID string `bson: "usuariorelacionid" json: "usuarioRelacionId"`
}
<file_sep>package models
//Tweet captura del body el mensaje quee nos llega
type Tweet struct {
Mensaje string `bson:"mensaje" json:"mensaje"`
}
<file_sep>package models
//RespuertaConsultaRelacion tiene el true o false que se obtiene de consulta relacion entre usuarios
type RespuestaconsultaRelacion struct {
Status bool `json: "status"`
}
<file_sep>package main
import (
"log"
"github.com/iurzaiz/similTwitter/bd"
"github.com/iurzaiz/similTwitter/handlers"
)
func main() {
if bd.ChequeoConnection() == 0 {
log.Fatal("Siin conexion a la base de datos")
return
}
handlers.Manejadores()
}
| ddfb9f8111a4b2a83676a77d511e4cc782715b45 | [
"Go"
] | 5 | Go | iurzaiz/similTwitter | 88bc75ea11b2b1b9651c902c106b239b81ee7bc4 | c7b37143a2f558935a5216116b7ef49cf01c8b41 | |
refs/heads/master | <file_sep>"""
This file has been written with love by <NAME> (lexygon) for giving a simple example for writing C extensions for Python 3.5.
Feel free to cloning, sharing, editing and committing some new examples.
I have tried to explain each part basicly as I can.
For communicating with me:
mail: <EMAIL>
github: github.com/lexygon
For documentation for Python/C API please visit https://docs.python.org/3/c-api/
"""
from distutils.core import setup, Extension
# defining calculator_module as an extension class instance.
# 'calculator' is extension's name and sources is a file name list.
calculator_module = Extension('calculator', sources=['calculator.c'])
# calling setup function with theese parameters.
setup(name='python_c_calculator_extension',
version='0.1',
description='An Example For Python C Extensions',
ext_modules=[calculator_module],
url='github.com/lexygon',
author='<NAME>',
author_email='<EMAIL>')
<file_sep>**About Repository:**
This repo will host some examples for "writing C extensions for Python 3.x".
Our first example is calculator. It has 4 basit arithmetic functions.
You can find all of comments in the files. I tried to explain what is happening line by line.
**Example Structrue:**
One or more ".c, .h etc." files that contains C extension codes.
A setup.py file that contains installing codes and parameters.
An sample.py file that shows how to use that extension.
**How Can I Install And Try the Extension Examples ?:**
1- Create a virtualenv.(*Optional**)
2- Go to the project directory and run "python setup.py install"
3- Check the sample.py for learning how to use the extension.
That's it !
**Can you help me ?:**
If you have some example ideas or you know how to write C extension for Python, please help me and commit some examples or updates.
<file_sep>/*
This file has been written with love by <NAME> (lexygon) for giving a simple example for writing C extensions for Python 3.5.
Feel free to cloning, sharing, editing and committing some new examples.
I have tried to explain each part basicly as I can.
For communicating with me:
mail: <EMAIL>
github: github.com/lexygon
For documentation for Python/C API please visit https://docs.python.org/3/c-api/
*/
// importing Python C API Header
#include <Python.h>
// creating functions that returning PyObject.
static PyObject *addition(PyObject *self, PyObject *args){
// variables for our parameters. our parameters that are coming from python will be stored in theese variables.
int number1;
int number2;
int result;
// Parsing our Python parameters to C variables.
// "ii" means we are taking 2 integer variables from Python.
// if we were taking 2 integer and 1 string that would be "iis".
// after parsing python variables, this is sending them to number1 and number2 variables. ORDER IS IMPORTANT!!
if (!PyArg_ParseTuple(args, "ii", &number1, &number2))
// if sending parameters are not fitting to types, it will return NULL
return NULL;
// after parsing, we are doing our job.
result = number1 + number2;
// like before, this part is parsing our variable to a python value and returning it.
// in here i means we are returning an integer that comes from result variable.
return Py_BuildValue("i", result);
}
//same structure with addition
static PyObject *substraction(PyObject *self, PyObject *args){
int number1;
int number2;
int result;
if (!PyArg_ParseTuple(args, "ii", &number1, &number2))
return NULL;
result = number1 - number2;
return Py_BuildValue("i", result);
}
//same structure with addition
static PyObject *division(PyObject *self, PyObject *args){
int number1;
int number2;
int result;
if (!PyArg_ParseTuple(args, "ii", &number1, &number2))
return NULL;
result = number1 / number2;
return Py_BuildValue("i", result);
}
//same structure with addition
static PyObject *multiplication(PyObject *self, PyObject *args){
int number1;
int number2;
int result;
if (!PyArg_ParseTuple(args, "ii", &number1, &number2))
return NULL;
result = number1 * number2;
return Py_BuildValue("i", result);
}
// documentation for each functions.
static char addition_document[] = "Document stuff for addition...";
static char substraction_document[] = "Document stuff for substraction...";
static char division_document[] = "Document stuff for division...";
static char multiplication_document[] = "Document stuff for multiplication...";
// defining our functions like below:
// function_name, function, METH_VARARGS flag, function documents
static PyMethodDef functions[] = {
{"addition", addition, METH_VARARGS, addition_document},
{"substraction", substraction, METH_VARARGS, substraction_document},
{"division", division, METH_VARARGS, division_document},
{"multiplication", multiplication, METH_VARARGS, multiplication_document},
{NULL, NULL, 0, NULL}
};
// initializing our module informations and settings in this structure
// for more informations, check head part of this file. there are some important links out there.
static struct PyModuleDef calculatorModule = {
PyModuleDef_HEAD_INIT, // head informations for Python C API. It is needed to be first member in this struct !!
"calculator", // module name
NULL, // means that the module does not support sub-interpreters, because it has global state.
-1,
functions // our functions list
};
// runs while initializing and calls module creation function.
PyMODINIT_FUNC PyInit_calculator(void){
return PyModule_Create(&calculatorModule);
}
<file_sep># importing the extension like a standart python module
from calculator import *
# calling functions from extension like a standart python function
add = addition(3, 5)
sub = substraction(10, 5)
multi = multiplication(2, 4)
div = division(20, 5)
print(add, sub, multi, div)
| d054c6937be14997a66b0042c35ea0a7f9f9a2fd | [
"Markdown",
"C",
"Python"
] | 4 | Python | lexygon/python-c-extension-examples | 44367ed52ad2daae0b21e5531fdc6e6dc32c0dae | 54c984b140bd4b41c44a51cb5aa20278477266ff | |
refs/heads/master | <file_sep>import React from "react";
import './Schedule.css'
import Footer from "../../components/Footer/Footer";
import foto from '../../assets/fotos/IGREJA.jpg'
import { height } from "@material-ui/system";
export default function Schedule(props) {
return (
<div className='containerSchedule'>
<h1 className='titleSchedule'>PROGRAMAÇÃO</h1>
<div className='mainSchedule'>
<p>Confira nossa programação e fique por dentro das nossas novidades!</p>
<a src='www.google.com.br' target='_blank'><img className='imgSchedule' src={foto} /></a>
</div>
<Footer />
</div>
)
}<file_sep>import React from "react";
import './Footer.css'
import wpp from '../../assets/images/sociaMedias/wpp.svg'
import insta from '../../assets/images/sociaMedias/insta.svg'
import youtube from '../../assets/images/sociaMedias/youtube.svg'
import facebook from '../../assets/images/sociaMedias/face.svg'
export default function Footer(props) {
return (
<div className='containerFooter'>
<a href='' target='_blank'><img className='iconSocialFooter' src={wpp} /></a>
<a href='https://www.instagram.com/idevangelho/?utm_medium=copy_link' target='_blank'><img className='iconSocialFooter' src={insta} /></a>
<a href='https://www.youtube.com/channel/UCvm55wgtIh-CwKxIGs5FgfA' target='_blank'><img className='iconSocialFooter' src={youtube} /></a>
<a href='https://www.facebook.com/search/top?q=igreja%20do%20evangelho' target='_blank'><img className='iconSocialFooter' src={facebook} /></a>
</div>
);
}<file_sep>import React from 'react'
export default function StatementFaith(props) {
return (
<div>
<h1>Declaração de Fé</h1>
</div>
);
}<file_sep>import React from 'react'
export default function AboutUs(props) {
return (
<div>
<h1>Qeum somos</h1>
</div>
);
}<file_sep>import React from 'react'
export default function Purposes(props) {
return (
<div>
<h1>Propósitos</h1>
</div>
);
}<file_sep>import React from 'react'
export default function Ministries(props) {
return (
<div>
<h1>Ministérios</h1>
</div>
);
}<file_sep>import React, { useState } from "react";
import CircularProgress from '@material-ui/core/CircularProgress/CircularProgress';
export default function Loading(props) {
return (
<div style={{ position: 'absolute', display: 'flex', alignItems: 'center', justifyContent: 'center', width: '100%', height: '100vh', backgroundColor: '#252526', }}>
<CircularProgress style={{ color: 'white' }} />
</div>
);
}<file_sep>import React from 'react'
import './PrayForMe.css'
import Footer from '../../components/Footer/Footer';
import TextField from '@material-ui/core/TextField/TextField';
export default function PrayForMe(props) {
return (
<div className='containerPrayforMe'>
<h1>ORE POR MIM</h1>
<div className='mainPrayforMe'>
<p>Precisa de oração? Preencha o formulário com seu pedido que vamos orar por você!</p>
<TextField style={{ color: 'white' }} id="standard-basic" label="Nome" variant="standard" />
<TextField id="standard-basic" label="Contato" variant="standard" />
<TextField id="standard-basic" label="Pedido" variant="standard" />
<label>
<p>Gostaria de ser contatado sobre o pedido?</p>
<div>
<input type='radio' name='pedidoContato' id='sim' checked />
<label for='sim'>Sim</label>
</div>
<div>
<input type='radio' name='pedidoContato' id='nao' />
<label for='nao'>Não</label>
</div>
</label>
<button>Enviar pedido</button>
<h2>SALA DE ORAÇÃO</h2>
<p>Sala online às quartas-feiras, às 21h. Acesse o link e participe ao vivo com nosso time do Ministério de Intercessão. Participe e seja abençoado!</p>
<button>Acessar a sala</button>
</div>
<Footer />
</div>
);
}<file_sep>import React from 'react'
import './Header.css'
import logo from '../../assets/images/whiteLogo.svg'
import Menu from '../Menu/Menu'
import { Link } from 'react-router-dom'
const styleLogo = {
width: '50px',
zIndex: 50,
paddingBottom: '1.1rem',
paddingTop: '6px',
paddingLeft: '10px',
paddingRight: '6px ',
}
export default function Header(props) {
return (
<div className='containerHeader'>
<Link to='/'><img src={logo} style={styleLogo} /></Link>
<Menu />
</div>
);
}<file_sep>import React, { useState } from "react";
import './Hamburguer.css';
export default function Hamburguer(props) {
const [isOpen, setIsOpen] = useState(false);
return (
<div className='containerHamburguer'>
<ul className='itemsHamburguer'>
<li>X</li>
<li>Home</li>
<li>Quem Somos</li>
<li>Propósitos</li>
<li>Declaração de Fé</li>
<li>Ministérios</li>
<li>Contatos</li>
</ul>
</div>
)
}<file_sep>import React, { useState, useEffect } from "react";
import './Celebrations.css'
import Footer from "../../components/Footer/Footer";
import Loading from "../../components/Loading/Loading";
const objTeste = [
{ thumb: 'https://d1csarkz8obe9u.cloudfront.net/posterpreviews/church-youtube-thumbnail-template-design-7beb6c33baf72b81f4246accf906252c_screen.jpg?ts=1592922309', url: 'https://www.youtube.com/c/IgrejadoEvangelho/videos' },
{ thumb: 'https://d1csarkz8obe9u.cloudfront.net/posterpreviews/church-youtube-thumbnail-template-design-ed78d8ed72fd4763927211913ea989c3_screen.jpg?ts=1592504072', url: 'https://www.youtube.com/c/IgrejadoEvangelho/videos' },
{ thumb: 'https://d1csarkz8obe9u.cloudfront.net/posterpreviews/church-thumbnail-template-youtube-design-acd3f619ef8bbb7e02d933cbfb3e3128_screen.jpg?ts=1591258964', url: 'https://www.youtube.com/c/IgrejadoEvangelho/videos' },
{ thumb: 'https://d1csarkz8obe9u.cloudfront.net/posterpreviews/church-youtube-thumbnail-template-design-93e4a1c53fff4a23b6b75a7dbbd549ab_screen.jpg?ts=1591269057', url: 'https://www.youtube.com/c/IgrejadoEvangelho/videos' },
{ thumb: 'https://d1csarkz8obe9u.cloudfront.net/posterpreviews/church-youtube-thumbnail-template-design-1d68bc23861feca22ad0231618dfdda3_screen.jpg?ts=1592567148', url: 'https://www.youtube.com/c/IgrejadoEvangelho/videos' },
{ thumb: 'https://d1csarkz8obe9u.cloudfront.net/posterpreviews/church-youtube-thumbnail-template-design-7beb6c33baf72b81f4246accf906252c_screen.jpg?ts=1592922309', url: 'https://www.youtube.com/c/IgrejadoEvangelho/videos' },
{ thumb: 'https://d1csarkz8obe9u.cloudfront.net/posterpreviews/church-youtube-thumbnail-template-design-ed78d8ed72fd4763927211913ea989c3_screen.jpg?ts=1592504072', url: 'https://www.youtube.com/c/IgrejadoEvangelho/videos' },
{ thumb: 'https://d1csarkz8obe9u.cloudfront.net/posterpreviews/church-thumbnail-template-youtube-design-acd3f619ef8bbb7e02d933cbfb3e3128_screen.jpg?ts=1591258964', url: 'https://www.youtube.com/c/IgrejadoEvangelho/videos' },
{ thumb: 'https://d1csarkz8obe9u.cloudfront.net/posterpreviews/church-youtube-thumbnail-template-design-93e4a1c53fff4a23b6b75a7dbbd549ab_screen.jpg?ts=1591269057', url: 'https://www.youtube.com/c/IgrejadoEvangelho/videos' },
{ thumb: 'https://d1csarkz8obe9u.cloudfront.net/posterpreviews/church-youtube-thumbnail-template-design-1d68bc23861feca22ad0231618dfdda3_screen.jpg?ts=1592567148', url: 'https://www.youtube.com/c/IgrejadoEvangelho/videos' },
]
export default function Celebration(props) {
const [list, setList] = useState([])
useEffect(() => {
setList(objTeste)
}, [])
return (
<div className='containerCelebration'>
<h1 className='titleCelebration'>CELEBRAÇÕES</h1>
{list.length === 0 && typeof list.url === "string" ?
<Loading />
:
<>
<div className='mainCelebration'>
<p> {list.length === 0 ? 'Não há vídeos dísponiveis :/' : 'Confira nossa programação e fique por dentro das nossas novidades!'}</p>
{list.map(item => (
<a href={item.url} target='_blank'> <img className='imgCelebration' src={item.thumb} /> </a>
))}
</div>
<Footer />
</>
}
</div>
)
}<file_sep>import React, { useState, useEffect } from "react";
import './Conections.css'
import Footer from "../../components/Footer/Footer";
import Loading from '../../components/Loading/Loading';
const objTeste = [
{ title: 'Geral', date: 'Reunião quinta ás 20h', resp: 'Pr.Ildenor José', url: 'www.google.com.br' },
{ title: 'Geral', date: 'Reunião quinta ás 20h', resp: 'Pr.Ildenor José', url: 'www.google.com.br' },
{ title: 'Geral', date: 'Reunião quinta ás 20h', resp: 'Pr.Ildenor José', url: 'www.google.com.br' },
{ title: 'Geral', date: 'Reunião quinta ás 20h', resp: 'Pr.Ildenor José', url: 'www.google.com.br' },
{ title: 'Geral', date: 'Reunião quinta ás 20h', resp: 'Pr.Ildenor José', url: 'www.google.com.br' },
{ title: 'Geral', date: 'Reunião quinta ás 20h', resp: 'Pr.Ildenor José', url: 'www.google.com.br' },
{ title: 'Geral', date: 'Reunião quinta ás 20h', resp: 'Pr.Ildenor José', url: 'www.google.com.br' },
]
export default function Conections(props) {
const [list, setList] = useState([])
useEffect(() => {
setList(objTeste)
}, [])
return (
<div className='containerConections'>
<h1 className='titleConections'>COLLEGE</h1>
<div className='mainConections'>
{list.length === 0 && typeof list.url === "string" ?
<Loading />
:
<>
<p>Nossas conexões acontecem, atualmente, online por videoconferências, em sua maioria, as quinta-feiras às 20h.
É nas conexões que nos conectamos para aprendermos mais sobre Jesus e Sua Palavra juntos em comunhão com um pequeno grupo.
Participe e venha pertencer a uma das nossas conexões!<br />
Escolha abaixo a que mais se adequa a você:
</p>
{list.map((item, i) => (
<div className='descriptionConection'>
<h3>{`Conexão ${i + 1}`}</h3>
<p>{item.title}</p>
<p>{item.date}</p>
<p>{item.resp}</p>
<a style={{ textDecoration: 'none' }} href={item.url} target='_blank'><p className='btnConection'>Link da sala</p></a>
</div>
))}
</>
}
</div>
<Footer />
</div>
)
}<file_sep>import React, { useState, useEffect } from "react";
import './College.css'
import Footer from "../../components/Footer/Footer";
import Loading from '../../components/Loading/Loading';
const objTeste = [
{ title: 'Melhor Decisção', modules: ['Quém é Deus?', 'Quem sou eu?', 'Por que estou aqui?'], beginDate: '01/01/2021', endDate: '30/01/2021', hoursCourse: '15h', url: 'www.google.com.br', description: "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. " },
{ title: 'DNA', modules: ['Quém é Deus?', 'Quem sou eu?', 'Por que estou aqui?'], beginDate: '01/01/2021', endDate: '30/01/2021', hoursCourse: '15h', url: 'www.google.com.br', description: "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. " },
{ title: 'Quero Servir', modules: ['Quém é Deus?', 'Quem sou eu?', 'Por que estou aqui?'], beginDate: '01/01/2021', endDate: '30/01/2021', hoursCourse: '15h', url: 'www.google.com.br', description: "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. " },
{ title: 'Cultura da Honra', modules: ['Quém é Deus?', 'Quem sou eu?', 'Por que estou aqui?'], beginDate: '01/01/2021', endDate: '30/01/2021', hoursCourse: '15h', url: 'www.google.com.br', description: "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. " },
{ title: 'Tempo a sós com Deus', modules: ['Quém é Deus?', 'Quem sou eu?', 'Por que estou aqui?'], beginDate: '01/01/2021', endDate: '30/01/2021', hoursCourse: '15h', url: 'www.google.com.br', description: "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. " },
{ title: 'Vida Abençoada', modules: ['Quém é Deus?', 'Quem sou eu?', 'Por que estou aqui?'], beginDate: '01/01/2021', endDate: '30/01/2021', hoursCourse: '15h', url: 'www.google.com.br', description: "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. " },
,
]
export default function College(props) {
const [list, setList] = useState([])
useEffect(() => {
setList(objTeste)
}, [])
return (
<div className='containerCollege'>
<h1 className='titleCollege'>COLLEGE</h1>
<div className='mainCollege'>
{list.length === 0 && typeof list.url === "string" ?
<Loading />
:
<>
<p>
O Evangelho College é o centro de capacitação ministerial da Igreja do Evangelho.
A cada ciclo o College oferece vários cursos que tem entre 5 e 6 módulos com aulas on-line ministradas ao vivo através do Google Meet com módulos e questões aplicadas pelo Google Classroom. Encontre um curso e estude com a gente!
</p>
{list.map((item, i) => (
<div className='descriptionCollege'>
<h3 style={{ textAlign: 'center' }} >{item.title}</h3>
<p>{item.description}</p>
<b>Módulos:</b>
{item.modules.map((item, i) => (<p>{`${i + 1} - ${item}`}</p>))}
<p><b>Ínicio e fim do curso: </b>{`${item.beginDate} á ${item.endDate}`}</p>
<p><b>Carga Horária:</b> {item.hoursCourse}</p>
<a style={{ textDecoration: 'none' }} href={item.url} target='_blank'><p className='btnCollege'>Quero me inscrever</p></a>
</div>
))}
</>
}
</div>
<Footer />
</div>
)
}<file_sep>import React from 'react'
import './Home.css';
import { Link } from 'react-router-dom';
import programacao from '../../assets/images/inciatialScreen/programacao.svg'
import celebracoes from '../../assets/images/inciatialScreen/celebracoes.svg'
import conexoes from '../../assets/images/inciatialScreen/conexoes.svg'
import college from '../../assets/images/inciatialScreen/college.svg'
import orePorMim from '../../assets/images/inciatialScreen/orePorMim.svg'
import contribuicao from '../../assets/images/inciatialScreen/contribuicao.svg'
import queroPertencer from '../../assets/images/inciatialScreen/queroPertencer.svg'
import missoes from '../../assets/images/inciatialScreen/missoes.svg'
import Footer from '../../components/Footer/Footer';
export default function Home(props) {
return (
<div className='containerHome'>
<div className='titleHome'>
<h1>BEM-VINDO À IDEVANGELHO </h1>
</div>
<div className='optionsMenu'>
<div className='divOptionMenu'>
<Link to='/programacao'> <img src={programacao} className='IconOptionMenu' /></Link>
<p>PROGRAMAÇÃO</p>
</div>
<div className='divOptionMenu'>
<Link to='/celebracoes'> <img src={celebracoes} className='IconOptionMenu' /></Link>
<p>CELEBRAÇÕES</p>
</div>
<div className='divOptionMenu'>
<Link to='/conexoes'> <img src={conexoes} className='IconOptionMenu' /></Link>
<p>CONEXOES</p>
</div>
<div className='divOptionMenu'>
<Link to='/college'> <img src={college} className='IconOptionMenu' /></Link>
<p>COLLEGE</p>
</div>
<div className='divOptionMenu'>
<Link to='/orePorMim'> <img src={orePorMim} className='IconOptionMenu' /></Link>
<p>ORE POR MIM</p>
</div>
<div className='divOptionMenu'>
<Link to='/'> <img src={contribuicao} className='IconOptionMenu' /></Link>
<p>CONTRIBUIÇÃO</p>
</div>
<div className='divOptionMenu'>
<Link to='/'> <img src={queroPertencer} className='IconOptionMenu' /></Link>
<p>QUERO PERTENCER</p>
</div>
<div className='divOptionMenu'>
<Link to='/'> <img src={missoes} className='IconOptionMenu' /></Link>
<p>MISSÕES</p>
</div>
</div>
<Footer />
</div>
);
} | 84a59d2c3f35616a4695a41dac1329c05c3b74f6 | [
"JavaScript"
] | 14 | JavaScript | TBarontoTI/ProjetoIgreja | 85515795c57e562af9bef1ec037cbea4bcf42b24 | 3ce0f18d82b38e26632870918756778b6091acda | |
refs/heads/master | <repo_name>ranjanpandeysbp/recipe-app<file_sep>/src/app/recipe.service.ts
import { Injectable } from '@angular/core';
import { HttpClient, HttpHeaders } from '@angular/common/http';
import { Observable } from 'rxjs';
@Injectable({
providedIn: 'root'
})
export class RecipeService {
private baseUrlApi = "https://recipeapi2021.herokuapp.com";
constructor(private http: HttpClient) {}
registerUser(user: Object): Observable < Object > {
return this.http.post(`${this.baseUrlApi}` + `/api/v1/auth/register`, user);
}
login(user: Object): Observable < Object > {
return this.http.post(`${this.baseUrlApi}` + `/api/v1/auth/login`, user);
}
getRecipe(id: number): Observable < Object > {
let data = JSON.parse(localStorage.getItem("data"));
let header = {
headers: new HttpHeaders()
.set('Authorization', `Bearer ${data.token}`)
}
return this.http.get(`${this.baseUrlApi}`+`/api/v1/users/${data.userId}/recipes/${id}`, header);
}
createRecipe(recipe: Object): Observable < Object > {
let data = JSON.parse(localStorage.getItem("data"));
let header = {
headers: new HttpHeaders()
.set('Authorization', `Bearer ${data.token}`)
}
return this.http.post(`${this.baseUrlApi}` + `/api/v1/users/${data.userId}/recipes`, recipe, header);
}
updateRecipe(value: any): Observable < Object > {
let data = JSON.parse(localStorage.getItem("data"));
let header = {
headers: new HttpHeaders()
.set('Authorization', `Bearer ${data.token}`)
}
return this.http.put(`${this.baseUrlApi}`+ `/api/v1/users/${data.userId}/recipes`, value, header);
}
deleteRecipe(id: number): Observable < any > {
let data = JSON.parse(localStorage.getItem("data"));
let header = {
headers: new HttpHeaders()
.set('Authorization', `Bearer ${data.token}`)
.set('responseType', 'text')
}
return this.http.delete(`${this.baseUrlApi}`+ `/api/v1/users/${data.userId}/recipes/${id}`, header);
}
getRecipesList(): Observable < any > {
let data = JSON.parse(localStorage.getItem("data"));
let header = {
headers: new HttpHeaders()
.set('Authorization', `Bearer ${data.token}`)
}
return this.http.get(`${this.baseUrlApi}`+ `/api/v1/users/${data.userId}/recipes`, header);
}
getIngredientsList(): Observable < any > {
let data = JSON.parse(localStorage.getItem("data"));
let header = {
headers: new HttpHeaders()
.set('Authorization', `Bearer ${data.token}`)
}
return this.http.get(`${this.baseUrlApi}`+ `/api/v1/ingredients`, header);
}
getRecipesByName(name: string): Observable < any > {
return this.http.get(`${this.baseUrlApi}/name/${name}`);
}
deleteAll(): Observable < any > {
return this.http.delete(`${this.baseUrlApi}` + `/delete`, {
responseType: 'text'
});
}
}
<file_sep>/src/app/app.component.ts
import { Component } from '@angular/core';
import { Router } from '@angular/router';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
title = 'Recipe Management App';
description = 'Recipe App helps in managing the recipes'
showMenu: any;
constructor(private router: Router) {
}
ngOnInit() {
let data = JSON.parse(localStorage.getItem("data"));
if(data){
this.showMenu = true;
}else{
this.showMenu = false;
}
this.router.onSameUrlNavigation = 'reload';
alert("Important Info: Please click on Login button and use Username=ranjan and Password=<PASSWORD> OR click on Register button for new account");
}
logout(event) {
localStorage.clear();
this.router.navigate(['login']);
}
}
<file_sep>/src/app/register/register.component.ts
import { Component, OnInit } from '@angular/core';
import { RecipeService } from '../recipe.service';
import { FormGroup, FormBuilder, Validators } from '@angular/forms';
import { User } from '../user';
@Component({
selector: 'app-register',
templateUrl: './register.component.html',
styleUrls: ['./register.component.css']
})
export class RegisterComponent implements OnInit {
user: User = new User();
form: FormGroup;
errMessage: any;
message: any;
showMenu: any;
constructor(private recipeService: RecipeService, private formBuilder: FormBuilder) {
}
ngOnInit() {
let data = JSON.parse(localStorage.getItem("data"));
if(data){
this.showMenu = true;
}else{
this.showMenu = false;
}
this.form = this.formBuilder.group({
name: [null, [Validators.required, Validators.minLength(1)]],
username: [null, [Validators.required, Validators.minLength(1)]],
email: [null, [Validators.required, Validators.minLength(1)]],
password: [null, [Validators.required]],
phone: [null, [Validators.required, Validators.minLength(1)]],
});
}
onSubmit() {
this.message = "";
this.errMessage = "";
this.recipeService.registerUser(this.user)
.subscribe(data => this.message = data["message"], error => this.errMessage = error["error"]["message"]);
}
}
<file_sep>/src/app/login/login.component.ts
import { Component, OnInit } from '@angular/core';
import { RecipeService } from '../recipe.service';
import { FormGroup, FormBuilder, Validators } from '@angular/forms';
import { User } from '../user';
import { Router } from '@angular/router';
@Component({
selector: 'app-login',
templateUrl: './login.component.html',
styleUrls: ['./login.component.css']
})
export class LoginComponent implements OnInit {
user: User = new User();
form: FormGroup;
errMessage: any;
showMenu: any;
constructor(private router: Router, private recipeService: RecipeService, private formBuilder: FormBuilder) {
}
ngOnInit() {
let data = JSON.parse(localStorage.getItem("data"));
if(data){
this.showMenu = true;
}else{
this.showMenu = false;
}
this.form = this.formBuilder.group({
username: [null, [Validators.required, Validators.minLength(1)]],
password: [null, [Validators.required]],
});
this.router.onSameUrlNavigation = 'reload';
}
onSubmit() {
this.recipeService.login(this.user)
.subscribe((data) => {
console.log(data);
localStorage.setItem("data", JSON.stringify(data));
this.router.navigate(['recipe']);
}, (error) => {
debugger;
if(error["error"]["status"] == 401){
this.errMessage = "Invalid credentials";
}
});
}
}
<file_sep>/README.md
The application is the frontend part of Recipe management application
You can register and login and manage recipes
Two ways to acess the application:
----------------------------------
1. Access the hosted url: **https://ranjanpandeysbp.github.io/**
2. Run the application locally:
a. Git clone https://github.com/ranjanpandeysbp/recipe-app.git
b. From root run command **npm install**
c. From root run command **ng serve**
d. Open browser access http://localhost:4200/
e. Popup will appear with login details instruction, please use the instruction.
This frontend is connected to heroku hosted api:
https://recipeapi2021.herokuapp.com/v2/api-docs
If you want to run the backend API locally by following below steps:
https://github.com/ranjanpandeysbp/recipes-api
Than in this project(Frontend) please change the base url from heroku to your local backend API in file **recipe.service.ts**
Change the local url in **baseUrlApi** variable.<file_sep>/src/app/recipe.ts
import { Ingredients } from "./ingredients";
export class Recipe {
id: number;
recipeName: string;
dishType: string;
creationDateTime: Date;
noOfPeople: number;
ingredientEntityList: Ingredients[];
cookingInstruction: string;
}
| 12796da15a6010891570aba28757e32a1feb7138 | [
"Markdown",
"TypeScript"
] | 6 | TypeScript | ranjanpandeysbp/recipe-app | f445a57d1a67d5ffaf675ea1bedfea5541b68829 | 043a14852ecf664305a9009ae28ff5dd958b4ffa | |
refs/heads/master | <repo_name>saxenakrati09/Contour-detection-of-multicolored-clothes<file_sep>/Contour_detection.py
# -*- coding: utf-8 -*-
"""
Created on Thu Nov 30 16:46:23 2017
@author: ks
"""
import numpy as np
import matplotlib.pyplot as plt
import cv2
import glob
cv_img = []
path = "./Sim_with_table/Cloth6"
x_val = np.arange(255)
for img in sorted(glob.glob(path+"/00*.jpg")):
n = cv2.imread(img)
cv_img.append(n)
# Gabor filters
def build_filters():
filters = []
ksize = 31
for theta in np.arange(0, np.pi, np.pi/16):
kern = cv2.getGaborKernel((ksize, ksize), 4.0, theta, 10.0, 0.5, 0, ktype=cv2.CV_32F)
kern /= 1.5 * kern.sum()
filters.append(kern)
return filters
def process(img, filters):
accum = np.zeros_like(img)
for kern in filters:
fimg = cv2.filter2D(img, cv2.CV_8UC3, kern)
np.maximum(accum, fimg, accum)
return accum
# blur size = (9,9)
# imgweight = 1.5
# gaussianweight = -0.5
# 2.5 -1.5
def unsharp_mask(img, blur_size = (15,15), imgWeight = 2.5, gaussianWeight = -1.5):
gaussian = cv2.GaussianBlur(img, (5,5), 0)
return cv2.addWeighted(img, imgWeight, gaussian, gaussianWeight, 0)
j =1
max_area=[]
max_perimeter = []
for img in cv_img:
# Finding the edges of tablecloth
img = cv2.blur(img, (5, 5))
img = unsharp_mask(img)
img = unsharp_mask(img)
img = unsharp_mask(img)
hsv = cv2.cvtColor(img, cv2.COLOR_BGR2HSV)
h, s, v = cv2.split(hsv)
thresh = cv2.adaptiveThreshold(s, 255, cv2.ADAPTIVE_THRESH_GAUSSIAN_C, cv2.THRESH_BINARY_INV, 11, 2)
_, contours, heirarchy = cv2.findContours(thresh.copy(), cv2.RETR_TREE, cv2.CHAIN_APPROX_SIMPLE)
cnts = sorted(contours, key = cv2.contourArea, reverse = True)
#for cnt in cnts:
canvas_for_contours = thresh.copy()
cv2.drawContours(thresh, cnts[:-1], 0, (0,255,0), 3)
cv2.drawContours(canvas_for_contours, contours, 0, (0,255,0), 3)
ed = canvas_for_contours - thresh
#Making contour
A=[] #area list
P=[] #perimeter list
image, contours, hierarchy = cv2.findContours(ed,cv2.RETR_TREE,cv2.CHAIN_APPROX_SIMPLE)
filters = build_filters()
res1 = process(ed, filters)
for cnt in contours:
hull = cv2.convexHull(cnt)
cv2.drawContours(img, [hull], -1, (0,0,255),3 )
perimeter = cv2.arcLength(cnt,True)
area = cv2.contourArea(cnt)
A.append(area)
P.append(perimeter)
#print("Area : ", max(A))
#print("Perimeter : ", max(P))
max_area.append(max(A))
max_perimeter.append(max(P))
cv2.imshow('Result', img )
sav_file = path+ "/contour/Contour_%d.jpg"%j
#print(sav_file)
cv2.imwrite(sav_file, img)
j = j+1
#print("image saved")
cv2.waitKey(50)
print(len(max_area))
print(len(max_perimeter))
frames = np.linspace(1,len(max_area), len(max_area))
fig, ax = plt.subplots(nrows=1, ncols=2)
plt.subplot(1,2,1)
if max_area!=0:
plt.plot(frames, max_area, 'r', label="area of contour")
plt.title("Area")
plt.legend()
plt.xlabel("frames")
plt.ylabel("area")
plt.subplot(1,2,2)
if max_perimeter!=0:
plt.plot(frames, max_perimeter, 'b', label="perimeter of contour")
plt.legend()
plt.xlabel("frames")
plt.ylabel("perimeter")
plt.title("Perimeter")
plt.show()
<file_sep>/convert_to_video.py
# -*- coding: utf-8 -*-
"""
Created on Thu Dec 14 16:10:51 2017
@author: tom-16s2
"""
import os
os.system("ffmpeg -f image2 -r 10 -i ./Sim_with_table/Cloth1/contour/Contour_%d.jpg -vcodec mpeg4 -y ./Sim_with_table/Cloth1/contour/contour.mp4")<file_sep>/README.md
# Contour-detection-of-multicolored-clothes
Contour detection of simulated multicolored clothes
Table1.blend file is used to simulate different types of multi-colored cloth.
10 cloth designs are used and saved to layers 11-20 in blender file. A table is designed on layer 1.
Different layers are used to render the images of cloth and saved in the folders from Cloth1 to Cloth 10.
Different layers of clothes with table are used to render the images of cloth being set on the table and saved in Sim_with_table folder.
contour_detection.py is used to detect the contour of multicolored cloth (based on convex hull method)
convert_to_video.py converts the image to a video.
| 255cb8015da5c3a262e5d36a468c5178354520dd | [
"Markdown",
"Python"
] | 3 | Python | saxenakrati09/Contour-detection-of-multicolored-clothes | 24564da8892012efff77b67aeb7f8ba797343fcb | acc4c3b85c0319c1453823017acd14af69b2fb51 | |
refs/heads/master | <repo_name>nchaulet/KunstmaanVotingBundle<file_sep>/Tests/Controller/VotingControllerTest.php
<?php
namespace Kunstmaan\VotingBundle\Tests\Controller;
use Symfony\Component\HttpFoundation\Request;
use Kunstmaan\VotingBundle\EventListener\Facebook\FacebookLikeEventListener;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
use Kunstmaan\VotingBundle\Event\Events;
use Kunstmaan\VotingBundle\Event\Facebook\FacebookLikeEvent;
class VotingControllerTest extends WebTestCase
{
public function testIndex()
{
$this->assertTrue(true);
}
}
<file_sep>/KunstmaanVotingBundle.php
<?php
namespace Kunstmaan\VotingBundle;
use Symfony\Component\HttpKernel\Bundle\Bundle;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Bundle\SecurityBundle\DependencyInjection\SecurityExtension;
/**
* KunstmaanVotingBundle
*/
class KunstmaanVotingBundle extends Bundle
{
} | b331d9f2b7efda28e4283facfa0abb1460c46fee | [
"PHP"
] | 2 | PHP | nchaulet/KunstmaanVotingBundle | 2da6817d05c3ff235cf2b9578302257431076834 | 674bbfb6db2cb0435585f50621eeb7add512a078 | |
refs/heads/master | <repo_name>gem29/Project3-RESTfulServer<file_sep>/docs/createmap.js
var mymap = L.map('mapid').setView([44.9537, -93.0900], 12);
var northWest = L.latLng(44.991548, -93.207680),
southEast = L.latLng(44.889845, -93.002029),
bounds = L.latLngBounds(southEast, northWest);
/*var popup = L.popup()
.setLatLng([51.5, -0.09])
.setContent("I am a standalone popup.")
.openOn(mymap);*/
L.tileLayer('https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}?access_token=<KEY>', {
maxZoom: 18,
minZoom: 11,
attribution: 'Map data © <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors, ' +
'<a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, ' +
'Imagery © <a href="https://www.mapbox.com/">Mapbox</a>',
id: 'mapbox/streets-v11'
}).addTo(mymap);
/*
N1: "Conway/Battlecreek/Highwood"
N2: "Greater East Side"
N3: "West Side"
N4: "Dayton's Bluff"
N5: "Payne/Phalen"
N6: "North End"
N7: "Thomas/Dale(Frogtown)"
N8: "Summit/University"
N9: "West Seventh"
N10: "Como"
N11: "Hamline/Midway"
N12: "St. Anthony"
N13: "Union Park"
N14: "Macalester-Groveland"
N15: "Highland"
N16: "Summit Hill"
N17: "Capitol River"*/
//L.marker([44.949581, -93.186362]).addTo(mymap);
//L.marker(app.neighborhoods['N1'].latlon).addTo(mymap);
//Dayton's Bluff
mymap.setMaxBounds(bounds);
function onMapClick(e) {
}
function onMoveEnd(e) {
let coords = mymap.getCenter();
//console.log(app);
if(app){
app.view_latlon = coords.lat + "," + coords.lng;
//https://nominatim.openstreetmap.org/reverse?format=xml&lat=44.949583&lon=-93.018998
console.log('https://nominatim.openstreetmap.org/reverse?format=json&lat='+coords.lat+'&lon='+coords.lng);
$.ajax('https://nominatim.openstreetmap.org/reverse?format=json&lat='+coords.lat+'&lon='+coords.lng, {
success: (data) => {
console.log(data);
if(data.address.house_number) {
app.view_address = data.address.house_number + " " + data.address.road;
} else
{
app.view_address = data.address.road;
}
},
error: (err) => { console.log(err) }
});
//onsole.log(app.view_latlon.toString().substring(6));
app.bounds = mymap.getBounds();
}
}
//getBounds
mymap.on('click', onMapClick)
mymap.on('moveend',onMoveEnd)<file_sep>/server.js
var fs = require('fs');
var path = require('path');
var express = require('express');
var bodyParser = require('body-parser');
var js2xmlparser = require("js2xmlparser");
var sqlite3 = require('sqlite3');
var cors = require('cors');
var port = parseInt(process.argv[2]);
var public_dir = path.join(__dirname, 'public');
var db_filename = path.join(__dirname, 'db', 'stpaul_crime.sqlite3');
var app = express();
app.use(bodyParser.urlencoded({extended: true}));
app.use(cors());
// open stpaul_crime.sqlite3 database
var db = new sqlite3.Database(db_filename, sqlite3.OPEN_READWRITE, (err) => {
if (err) {
console.log('Error opening ' + db_filename);
}
else {
console.log('Now connected to ' + db_filename);
}
});
var all_codes = [];
db.all('select code from Codes order by code', (err, rows) => {
for(var i = 0; i<rows.length; i++) {
all_codes.push(rows[i].code);
}
});
var all_grids = [];
db.all('select distinct police_grid from Incidents where police_grid > 0 order by police_grid', (err, rows) => {
for(var i = 0; i<rows.length; i++) {
all_grids.push(rows[i].police_grid);
}
});
var all_neighborhoods = [];
db.all('select distinct neighborhood_number from Neighborhoods order by neighborhood_number', (err, rows) => {
for(var i = 0; i<rows.length; i++) {
all_neighborhoods.push(rows[i].neighborhood_number);
}
});
/*
Codes:
code (INTEGER) - crime incident type numeric code
incident_type (TEXT) - crime incident type description
Neighborhoods:
neighborhood_number (INTEGER) - neighborhood id
neighborhood_name (TEXT) - neighborhood name
Incidents:
case_number (TEXT): unique id from crime case
date_time (DATETIME): date and time when incident took place
code (INTEGER): crime incident type numeric code
incident (TEXT): crime incident description (more specific than incident_type)
police_grid (INTEGER): police grid number where incident occurred
neighborhood_number (INTEGER): neighborhood id where incident occurred
block (TEXT): approximate address where incident occurred
*/
/* curl -x GET http://localhost:8000/code */
/*
GET /codes
Return JSON object with list of codes and their corresponding incident type. Note - keys cannot start with a number, therefore are prepended with a 'C'.
Example:
{
"C110": "Murder, Non Negligent Manslaughter",
"C120": "Murder, Manslaughter By Negligence",
"C210": "Rape, By Force",
"C220": "Rape, Attempt",
"C300": "Robbery",
"C311": "Robbery, Highway, Firearm",
"C312": "Robbery, Highway, Knife or Cutting Instrument",
"C313": "Robbery, Highway, Other Dangerous Weapons",
"C314": "Robbery, Highway, By Strong Arm",
...
}
Add the following query options for GET /codes (2 pts)
code - comma separated list of codes to include in result (e.g. ?code=110,700). By default all codes should be included.
format - json or xml (e.g. ?format=xml). By default JSON format should be used.
*/
app.get('/codes', (req,res) => {
var code_list = all_codes;
var format = 'json';
if(req.query.hasOwnProperty('code')) {
code_list = req.query.code.split(',');
}
db.all("Select * from Codes where code in (" + code_list + ") order by code", (err, rows) => {
//console.log(rows);
var codes = {};
for(var i = 0; i < rows.length; i++) {
codes['C' + rows[i].code] = rows[i].incident_type;
}
if(req.query.format == 'xml') {
codes = js2xmlparser.parse('codes', codes);
format = 'xml';
}
res.type(format).send(codes);
});
});
/* curl -x GET http://localhost:8000/neighborhoods */
/*
GET /neighborhoods
Return JSON object with list of neighborhood ids and their corresponding neighborhood name. Note - keys cannot start with a number, therefore are prepended with a 'N'.
Example:
{
"N1": "Conway/Battlecreek/Highwood",
"N2": "Greater East Side",
"N3": "West Side",
"N4": "Dayton's Bluff",
"N5": "Payne/Phalen",
"N6": "North End",
"N7": "Thomas/Dale(Frogtown)",
"N8": "Summit/University",
"N9": "West Seventh",
"N10": "Como",
"N11": "Hamline/Midway",
"N12": "St. Anthony",
"N13": "Union Park",
"N14": "Macalester-Groveland",
"N15": "Highland",
"N16": "Summit Hill",
"N17": "Capitol River"
}
Add the following query options for GET /neighborhoods (2 pts)
id - comma separated list of neighborhood numbers to include in result (e.g. ?id=11,14). By default all neighborhoods should be included.
format - json or xml (e.g. ?format=xml). By default JSON format should be used.
*/
app.get('/neighborhoods', (req,res) => {
var neighborhood_list = all_neighborhoods;
var format = 'json';
if(req.query.hasOwnProperty('id')) {
neighborhood_list = req.query.id.split(',');
}
db.all("Select * from Neighborhoods where neighborhood_number in (" + neighborhood_list + ")", (err, rows) => {
//console.log(rows);
var neighborhoods = {};
for(var i = 0; i < rows.length; i++) {
neighborhoods['N' + rows[i].neighborhood_number] = rows[i].neighborhood_name;
}
if(req.query.format == 'xml') {
neighborhoods = js2xmlparser.parse('neighborhoods', neighborhoods);
format = 'xml';
}
res.type(format).send(neighborhoods);
});
});
/* curl -x GET http://localhost:8000/incidents */
/*
GET /incidents
Return JSON object with list of crime incidents. Make date and time separate fields. Note - keys cannot start with a number, therefore are prepended with a 'I'.
Example:
{
"I19245020": {
"date": "2019-10-30",
"time": "23:57:08",
"code": 9954,
"incident": "Proactive Police Visit",
"police_grid": 87,
"neighborhood_number": 7,
"block": "THOMAS AV & VICTORIA"
},
"I19245016": {
"date": "2019-10-30",
"time": "23:53:04",
"code": 9954,
"incident": "Proactive Police Visit",
"police_grid": 87,
"neighborhood_number": 7,
"block": "98X UNIVERSITY AV W"
},
"I19245014": {
"date": "2019-10-30",
"time": "23:43:19",
"code": 700,
"incident": "Auto Theft",
"police_grid": 95,
"neighborhood_number": 4,
"block": "79X 6 ST E"
},
...
start_date - first date to include in results (e.g. ?start_date=2019-09-01)
end_date - last date to include in results (e.g. ?end_date=2019-10-31)
code - comma separated list of codes to include in result (e.g. ?code=110,700). By default all codes should be included.
grid - comma separated list of police grid numbers to include in result (e.g. ?grid=38,65). By default all police grids should be included.
neighborhood - comma separated list of neighborhood numbers to include in result (e.g. ?id=11,14). By default all neighborhoods should be included.
limit - maximum number of incidents to include in result (e.g. ?limit=50). By default the limit should be 10,000. Result should include the N most recent incidents.
format - json or xml (e.g. ?format=xml). By default JSON format should be used.
}
*/
app.get('/incidents', (req,res) => {
var limit = 10000;
var start_date = '0000-01-01';
var end_date = '9999-12-31';
var code_list = all_codes;
var grid_list = all_grids;
var neighborhood_list = all_neighborhoods;
var format = 'json';
if (req.query.hasOwnProperty('limit')) {
limit = Math.min(limit,parseInt(req.query.limit, 10));
}
if(req.query.hasOwnProperty('start_date')) {
start_date = req.query.start_date;
}
if(req.query.hasOwnProperty('end_date')) {
end_date = req.query.end_date;
}
if(req.query.hasOwnProperty('code')) {
code_list = req.query.code.split(',');
}
if(req.query.hasOwnProperty('grid')) {
var grid_list = req.query.grid.split(',');
}
if(req.query.hasOwnProperty('neighborhood')) {
neighborhood_list = req.query.neighborhood.split(',');
}
//console.log("Select * from Incidents where date_time >= '" + start_date + "' and date_time < '" + end_date + "' and code in (" + code_list + ") and police_grid in (" + grid_list + ") and neighborhood_number in (" + neighborhood_list + ") order by date_time desc limit " + limit);
db.all("Select * from Incidents where date_time > '" + start_date + "' and date_time <= '" + end_date + "' and code in (" + code_list + ") and police_grid in (" + grid_list + ") and neighborhood_number in (" + neighborhood_list + ") order by date_time desc limit " + limit, (err, rows) => {
if(err) {console.log(err);}
//console.log(rows);
var incidents = {};
for(var i = 0; i < rows.length; i++) {
let this_date = rows[i].date_time.substring(0,10);
let this_time = rows[i].date_time.substring(11,19);
let this_code = rows[i].code;
let this_incident = rows[i].incident;
let this_police_grid = rows[i].police_grid;
let this_neighborhood_number = rows[i].neighborhood_number;
let this_block = rows[i].block;
incidents['I' + rows[i].case_number] = {};
incidents['I' + rows[i].case_number].date = this_date;
incidents['I' + rows[i].case_number].time = this_time;
incidents['I' + rows[i].case_number].code = this_code;
incidents['I' + rows[i].case_number].incident = this_incident;
incidents['I' + rows[i].case_number].police_grid = this_police_grid;
incidents['I' + rows[i].case_number].neighborhood_number = this_neighborhood_number;
incidents['I' + rows[i].case_number].block = this_block;
}
if(req.query.format == 'xml') {
incidents = js2xmlparser.parse('incidents', incidents);
format = 'xml';
}
//console.log(incidents);
res.type(format).send(incidents);
});
});
/*
PUT /new-incident
Upload incident data to be inserted into the SQLite3 database
Data fields:
case_number
date
time
code
incident
police_grid
neighborhood_number
block
Note: response should reject (status 500) if the case number already exists in the database
*/
app.put('/new-incident', (req,res) => {
db.all('select * from Incidents where case_number = ' + req.body.case_number, (err, rows) => {
if(err) {
console.log(err)
res.status(400).send('SQL Error');
} else
{
if(rows !== undefined && rows.length != 0) {
res.status(500).send('Error: Case number ' + req.body.case_number + ' is already in the database');
}
else {
//console.log(req.body);
var new_case = {
case_number : parseInt(req.body.case_number),
code : parseInt(req.body.code),
incident : (req.body.incident),
police_grid: parseInt(req.body.police_grid),
date: req.body.date,
time: req.body.time,
neighborhood_number: parseInt(req.body.neighborhood_number),
block: req.body.block
};
//console.log(new_case);
if(new_case.date){
new_case.date_time=new_case.date+new_case.time;
var dateObj = new Date(new_case.date + ' ' + new_case.time);
console.log(dateObj);
}
var sql ='INSERT INTO Incidents (case_number, code, incident,police_grid,neighborhood_number, block,date_time) VALUES (?,?,?,?,?,?,?)'
var params =[new_case.case_number, new_case.code, new_case.incident,new_case.police_grid,new_case.neighborhood_number,new_case.block,new_case.date_time]
db.run(sql, params, function (err, result) {
if (err){
console.log(err)
res.status(400).send('SQL Error');
} else
{
res.status(200).send('Success!');
}
});
};
};
});
});
/*app.put('/new-incident', (req,res) => {
var this_case_number = req.query.case_number;
var this_date = req.query.date;
var this_time = req.query.time;
var this_code = req.query.code;
var this_incident = req.query.code;
var this_police_grid = req.query.police_grid;
var this_neighborhood_number = req.query.neighborhood_number;
var this_block = req.query.block;
var this_date_time = this_date + 'T' + this_time;
console.log(this_date_time);
if(all_incidents[req.query.case_number]) {
res.status(500).send('Error: Case number ' + req.query.case_number + ' is already in the database');
}
else {
//add to database
console.log('insert into Incidents (case_number, date_time, code, incident, police_grid, neighborhood_number, block) Values (' + this_case_number + ', ' + this_date_time + ', ' + this_code + ', ' + this_incident + ', ' + this_police_grid + ', ' + this_neighborhood_number + ', ' + this_block + ')');
db.all('insert into Incidents (case_number, date_time, code, incident, police_grid, neighborhood_number, block) Values (' + this_case_number + ', ' + this_date_time + ', ' + this_code + ', ' + this_incident + ', ' + this_police_grid + ', ' + this_neighborhood_number + ', ' + this_block + ')', (err, rows) => {
console.log(rows);
res.type('json').send(rows);
});
}
});*/
console.log('Now Listening on port ' + port);
var server = app.listen(port);
<file_sep>/docs/mapsearch.js
var app;
var auth_data = {};
function Init()
{
app = new Vue({
el: "#app",
data: {
crimes: [{case: '1', date: '2', time: '3', code: '4', incident: '5', grid: '6', neighborhood: '7', block: '8'}]
}
});
}
function search(event)
{
} | 2947d25ab1b4ea47c3ca3ff8630fdfcbd7b7888d | [
"JavaScript"
] | 3 | JavaScript | gem29/Project3-RESTfulServer | 3d80e3a3867446be4ad0c5af406f0d96aad4c2e0 | d6753a8dc3168fb4b153a65952199e3abad1bf4e | |
refs/heads/master | <repo_name>Antoha93/projectApp<file_sep>/MarketStoreSystem/src/com/home/SilverCard.java
package com.home;
class SilverCard {
private float discountRate = 2.0f;
public float getDiscountRate() {
return discountRate;
}
public void setDiscountRate(float discountRate) {
this.discountRate = discountRate;
}
public void calculateDiscountRate(final float turnoverForPreviousMonth) {
if (turnoverForPreviousMonth >= 300) {
discountRate = 3.5f;
}
}
}
<file_sep>/MarketStoreSystem/src/com/home/PayDesk.java
package com.home;
import java.util.Scanner;
public class PayDesk {
public static void main(String[] args) {
boolean newCard = true;
while (newCard) {
String ownersName;
int cardType;
float turnoverForPreviousMonth = 0.0f;
float purchaseValue = 0.0f;
System.out.println("Choose card:");
System.out.println("0. No discount card");
System.out.println("1. Bronze card");
System.out.println("2. Silver card");
System.out.println("3. Gold card");
System.out.println("4. Exit");
Scanner scanner = new Scanner(System.in);
int chooseCard = scanner.nextInt();
if (chooseCard == 1 || chooseCard == 2 || chooseCard == 3) {
cardType = chooseCard;
ownersName = getName();
turnoverForPreviousMonth = getTurnoverForPreviousMonth(turnoverForPreviousMonth);
purchaseValue = getPurchaseValue(purchaseValue);
Card card = new Card(ownersName, cardType, turnoverForPreviousMonth, purchaseValue);
card.printInformation();
}
else if (chooseCard == 0) {
ownersName = getName();
purchaseValue = getPurchaseValue(purchaseValue);
Card card = new Card(ownersName, purchaseValue);
card.printInformation();
}
else if (chooseCard == 4) {
break;
}
else {
continue;
}
boolean successEnter;
do {
System.out.println("Do you want to enter new card (Y/N): ");
scanner = new Scanner(System.in);
String continueWithNewCard = scanner.nextLine().toLowerCase();
if (continueWithNewCard.equals("y") || continueWithNewCard.equals("yes")) {
successEnter = false;
}
else if (continueWithNewCard.equals("n") || continueWithNewCard.equals("no")) {
newCard = false;
successEnter = false;
}
else {
System.out.println("Error enter!");
successEnter = true;
}
} while (successEnter);
}
}
private static float getTurnoverForPreviousMonth(float turnoverForPreviousMonth) {
Scanner scanner;
boolean successEnter;
do {
System.out.println("Enter turnover: ");
scanner = new Scanner(System.in);
if (scanner.hasNextFloat()) {
turnoverForPreviousMonth = scanner.nextFloat();
successEnter = false;
}
else {
System.out.println("Error enter!");
successEnter = true;
}
} while (successEnter);
return turnoverForPreviousMonth;
}
private static float getPurchaseValue(float purchaseValue) {
Scanner scanner;
boolean successEnter;
do {
System.out.println("Enter purchase value: ");
scanner = new Scanner(System.in);
if (scanner.hasNextFloat()) {
purchaseValue = scanner.nextFloat();
successEnter = false;
}
else {
successEnter = true;
}
} while (successEnter);
return purchaseValue;
}
private static String getName() {
Scanner scanner;
String ownersName;
boolean successEnter;
do {
System.out.println("Enter owner's name: ");
scanner = new Scanner(System.in);
ownersName = scanner.nextLine();
if (ownersName.isEmpty()) {
System.out.println("Error enter!");
successEnter = true;
}
else {
successEnter = false;
}
} while (successEnter);
return ownersName;
}
}
| c576d0354b593f6d97ad3dfd60962e21570ef915 | [
"Java"
] | 2 | Java | Antoha93/projectApp | 8572882bfa8faa197b55afef1eeb01ff2183c654 | 41b0af5c57a662de9e532e8484d7f20b1194ba23 | |
refs/heads/main | <repo_name>sai374/music-application<file_sep>/src/main/java/com/manipal/demo/model/Song.java
package com.manipal.demo.model;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import io.swagger.annotations.ApiModelProperty;
@Entity
@Table(name = "Song")
public class Song {
@Id
@ApiModelProperty(notes = "ID of the Song", name = "songId", value="S101")
private String songId;
@ApiModelProperty(notes = "Title of the Song", name = "songTitle", value="Breathless")
private String songTitle;
@ApiModelProperty(notes = "Singer of the Song", name = "singer", value="<NAME>")
private String singer;
@ApiModelProperty(notes = "Album of the Song", name = "albumName", value="Breathless")
private String albumName;
@ApiModelProperty(notes = "Url of the Song", name = "url", value="https://www.youtube.com/watch?v=HHkHxTeaK_I")
private String url;
public Song() {}
public Song(String songId, String songTitle, String singer, String albumName, String url) {
this.songId = songId;
this.songTitle = songTitle;
this.singer = singer;
this.albumName = albumName;
this.url = url;
}
public String getSongId() {
return songId;
}
public void setSongId(String songId) {
this.songId = songId;
}
public String getSongTitle() {
return songTitle;
}
public void setSongTitle(String songTitle) {
this.songTitle = songTitle;
}
public String getSinger() {
return singer;
}
public void setSinger(String singer) {
this.singer = singer;
}
public String getAlbumName() {
return albumName;
}
public void setAlbumName(String albumName) {
this.albumName = albumName;
}
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
}
<file_sep>/README.md
# music-app-management
<file_sep>/src/test/java/com/manipal/demo/controller/SongControllerTest.java
package com.manipal.demo.controller;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post;
import static org.springframework.test.web.servlet.result.MockMvcResultHandlers.print;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.http.MediaType;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.request.MockMvcRequestBuilders;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.manipal.demo.controller.SongController;
import com.manipal.demo.model.Song;
import com.manipal.demo.service.impl.SongServiceImpl;
@WebMvcTest(SongController.class)
public class SongControllerTest {
@Autowired
MockMvc mvc;
@MockBean
private SongServiceImpl songService;
@Test
void testFindAll() throws Exception {
mvc.perform(MockMvcRequestBuilders
.get("/songs")
.accept(MediaType.APPLICATION_JSON))
.andDo(print())
.andExpect(status().isOk());
}
@Test
void testFindSongByTitle() throws Exception {
ObjectMapper objectMapper = new ObjectMapper();
Song song = new Song("S106","Ee petaku nene mestri","SP Balasubramanyam","Muta Mestri","https://www.youtube.com/watch?v=c16sIwFhVgQ");
mvc.perform(MockMvcRequestBuilders
.get("/songs/title/Ee petaku nene mestri")
.content(objectMapper.writeValueAsString(song))
.accept(MediaType.APPLICATION_JSON)
.contentType(MediaType.APPLICATION_JSON))
.andDo(print())
.andExpect(status().isOk());
}
}
<file_sep>/src/main/java/com/manipal/demo/service/impl/SongServiceImpl.java
package com.manipal.demo.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.manipal.demo.exception.SongNotFoundException;
import com.manipal.demo.model.Song;
import com.manipal.demo.repository.SongRepo;
import com.manipal.demo.service.SongService;
@Service
public class SongServiceImpl implements SongService {
@Autowired
private SongRepo songRepo;
@Override
public List<Song> findAllSongs() throws SongNotFoundException {
try {
List<Song> songs = songRepo.findAll();
if(songs.size() == 0) {
throw new SongNotFoundException("Songs are not available now. Try after some time.");
}
return songs;
} catch(SongNotFoundException snfe) {
throw new SongNotFoundException("Songs are not available now. Try after some time.");
}
}
@Override
public Song findSongByTitle(String title) throws SongNotFoundException {
try {
Song song = songRepo.findBySongTitle(title);
if(song==null) {
throw new SongNotFoundException("Song with title "+title+" is not found.");
}
return song;
} catch(SongNotFoundException snfe) {
throw new SongNotFoundException("Song with title "+title+" is not found.");
}
}
@Override
public List<Song> findSongsBySinger(String singer) throws SongNotFoundException {
try {
List<Song> songs = songRepo.findBySinger(singer);
if(songs.size()==0) {
throw new SongNotFoundException("Songs sung by "+singer+" are not available.");
}
return songs;
} catch(SongNotFoundException snfe) {
throw new SongNotFoundException("Songs sung by "+singer+" are not available.");
}
}
@Override
public List<Song> findSongsByAlbum(String album) throws SongNotFoundException {
try {
List<Song> songs = songRepo.findByAlbumName(album);
if(songs.size()==0) {
throw new SongNotFoundException("Album "+album+" is not found.");
}
return songs;
} catch(SongNotFoundException snfe) {
throw new SongNotFoundException("Album "+album+" is not found.");
}
}
@Override
public Song addSongToMusicStore(Song song) throws SongNotFoundException {
if(songRepo.searchSong(song.getSongId())!=null) {
throw new SongNotFoundException("Song id already exists. Give new song id.");
}
return songRepo.save(song);
}
@Override
public Song getSongById(String songId) throws SongNotFoundException {
return songRepo.findById(songId).orElseThrow(() -> new SongNotFoundException("No songs found."));
}
@Override
public Song updateDetails(Song song) throws SongNotFoundException {
songRepo.findById(song.getSongId()).orElseThrow(() -> new SongNotFoundException("Updation cannot be done. Song with this song id is not found."));
return songRepo.save(song);
}
@Override
public void removeSong(String songId) throws SongNotFoundException {
songRepo.findById(songId).orElseThrow(() -> new SongNotFoundException("Deletion cannot be done. Song with this song id is not found."));
songRepo.deleteById(songId);
}
}
<file_sep>/src/test/java/com/manipal/demo/controller/UserControllerTest.java
package com.manipal.demo.controller;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post;
import static org.springframework.test.web.servlet.result.MockMvcResultHandlers.print;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.http.MediaType;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.request.MockMvcRequestBuilders;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.manipal.demo.model.User;
import com.manipal.demo.service.impl.UserServiceImpl;
import com.manipal.demo.service.impl.UserWishlistServiceImpl;
@WebMvcTest(UserController.class)
public class UserControllerTest {
@Autowired
MockMvc mvc;
@MockBean
private UserServiceImpl userService;
@MockBean
private UserWishlistServiceImpl userWishlistService;
/*@Test
void checkDetailsTest() throws Exception {
ObjectMapper objectMapper = new ObjectMapper();
User user = new User("U101", "Sai", "S<PASSWORD>");
mvc.perform(MockMvcRequestBuilders
.post("/users/validate")
.content(objectMapper.writeValueAsString(user))
.accept(MediaType.APPLICATION_JSON)
.contentType(MediaType.APPLICATION_JSON))
.andExpect(status().isOk());
}*/
@Test
void addDetailsTest() throws Exception {
ObjectMapper objectMapper = new ObjectMapper();
User user = new User("U101", "Sai", "S<PASSWORD>");
mvc.perform(post("/users")
.content(objectMapper.writeValueAsString(user))
.accept(MediaType.APPLICATION_JSON)
.contentType(MediaType.APPLICATION_JSON))
.andDo(print())
.andExpect(status().isOk());
}
@Test
void updateDetailsTest() throws Exception {
ObjectMapper objectMapper = new ObjectMapper();
User user = new User("U101", "<NAME>", "<PASSWORD>");
mvc.perform(MockMvcRequestBuilders
.post("/users")
.content(objectMapper.writeValueAsString(user))
.accept(MediaType.APPLICATION_JSON)
.contentType(MediaType.APPLICATION_JSON))
.andDo(print())
.andExpect(status().isOk());
}
}
<file_sep>/src/main/java/com/manipal/demo/service/SongService.java
package com.manipal.demo.service;
import java.util.List;
import com.manipal.demo.exception.SongNotFoundException;
import com.manipal.demo.model.Song;
public interface SongService {
public List<Song> findAllSongs() throws SongNotFoundException;
public Song findSongByTitle(String title) throws SongNotFoundException;
public List<Song> findSongsBySinger(String singer) throws SongNotFoundException;
public List<Song> findSongsByAlbum(String album) throws SongNotFoundException;
public Song addSongToMusicStore(Song song) throws SongNotFoundException;
public Song getSongById(String songId) throws SongNotFoundException;
public Song updateDetails(Song song) throws SongNotFoundException;
public void removeSong(String songId) throws SongNotFoundException;
}
<file_sep>/src/main/java/com/manipal/demo/repository/SongRepo.java
package com.manipal.demo.repository;
import java.util.List;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;
import com.manipal.demo.model.Song;
@Repository
public interface SongRepo extends JpaRepository<Song, String> {
public Song findBySongTitle(String title);
public List<Song> findBySinger(String singer);
public List<Song> findByAlbumName(String album);
@Query(value = "SELECT * FROM Song s WHERE s.song_id = (:songId)", nativeQuery = true)
public Song searchSong(String songId);
}
<file_sep>/src/main/java/com/manipal/demo/model/Admin.java
package com.manipal.demo.model;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import io.swagger.annotations.ApiModelProperty;
@Entity
@Table(name = "Admin")
public class Admin {
@Id
@ApiModelProperty(notes = "ID of the Admin", name = "adminId", value="A101")
private String adminId;
@ApiModelProperty(notes = "Password of the Admin", name = "adminPassword", value="<PASSWORD>")
private String adminPassword;
public Admin() {}
public Admin(String adminId, String adminPassword) {
this.adminId = adminId;
this.adminPassword = <PASSWORD>;
}
public String getAdminId() {
return adminId;
}
public void setAdminId(String adminId) {
this.adminId = adminId;
}
public String getAdminPassword() {
return <PASSWORD>Password;
}
public void setAdminPassword(String adminPassword) {
this.adminPassword = <PASSWORD>;
}
}
<file_sep>/src/main/java/com/manipal/demo/service/UserService.java
package com.manipal.demo.service;
import com.manipal.demo.exception.UserNotFoundException;
import com.manipal.demo.model.User;
public interface UserService {
public User addDetails(User user) throws UserNotFoundException;
public User checkDetails(String userId, String password);
public User updateDetails(User user) throws UserNotFoundException;
public void deleteAccount(String userId);
public User getUserById(String userId) throws UserNotFoundException;
public Boolean validateUserId(String userId);
}
<file_sep>/src/main/java/com/manipal/demo/controller/UserController.java
package com.manipal.demo.controller;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.manipal.demo.exception.UserNotFoundException;
import com.manipal.demo.model.User;
import com.manipal.demo.service.impl.UserServiceImpl;
import com.manipal.demo.service.impl.UserWishlistServiceImpl;
import io.swagger.annotations.ApiOperation;
@CrossOrigin(origins = "http://localhost:3000")
@ApiOperation(value = "/users", tags = "User Controller")
@RestController
@RequestMapping("/users")
public class UserController {
@Autowired
private UserServiceImpl userService;
@Autowired
private UserWishlistServiceImpl userWishlistService;
public Boolean validateUserId( String userId) {
return userService.validateUserId(userId);
}
@ApiOperation(value = "User Registration", response = User.class)
@PostMapping()
public User addDetails(@RequestBody User user) throws UserNotFoundException {
return userService.addDetails(user);
}
@ApiOperation(value = "User Login")
@GetMapping("/validate/{userId}/{userPassword}")
public String checkDetails(@PathVariable String userId, @PathVariable String userPassword) throws UserNotFoundException {
if(userService.checkDetails(userId, userPassword) != null) {
return "Login Successful";
}
return "Wrong Credentials";
}
@ApiOperation(value = "Update User Details", response = User.class)
@PutMapping("/{userId}")
public User updateDetails(@PathVariable String userId, @RequestBody User userDetails) throws UserNotFoundException {
User user = userService.getUserById(userId);
user.setUserName(userDetails.getUserName());
user.setUserPassword(<PASSWORD>());
User updatedUser = userService.updateDetails(user);
return updatedUser;
}
@ApiOperation(value = "Delete User Account", response = User.class)
@DeleteMapping("/{userId}")
public String deleteAccount(@PathVariable String userId) throws UserNotFoundException {
User user = userService.getUserById(userId);
userWishlistService.deleteAllSongsByUserId(userId);
userService.deleteAccount(userId);
return "Account Deleted Succesfully";
}
}
<file_sep>/src/test/java/com/manipal/demo/controller/AdminControllerTest.java
package com.manipal.demo.controller;
import static org.springframework.test.web.servlet.result.MockMvcResultHandlers.print;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.http.MediaType;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.request.MockMvcRequestBuilders;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.manipal.demo.model.Admin;
import com.manipal.demo.repository.AdminRepo;
import com.manipal.demo.service.impl.AdminServiceImpl;
@WebMvcTest(AdminController.class)
public class AdminControllerTest {
@Autowired
MockMvc mvc;
@MockBean
private AdminServiceImpl adminService;
@MockBean
private AdminRepo adminRepo;
@Test
void checkDetailsTest() throws Exception {
ObjectMapper objectMapper = new ObjectMapper();
Admin admin = new Admin("A101", "<PASSWORD>");
mvc.perform(MockMvcRequestBuilders
.post("/admins/valid")
.content(objectMapper.writeValueAsString(admin))
.accept(MediaType.APPLICATION_JSON)
.contentType(MediaType.APPLICATION_JSON))
.andExpect(status().isOk());
}
@Test
void updateDetailsTest() throws Exception {
ObjectMapper objectMapper = new ObjectMapper();
Admin admin = new Admin("A101", "<PASSWORD>");
mvc.perform(MockMvcRequestBuilders
.put("/admins/A101")
.content(objectMapper.writeValueAsString(admin))
.accept(MediaType.APPLICATION_JSON)
.contentType(MediaType.APPLICATION_JSON))
.andDo(print())
.andExpect(status().isOk());
}
}
<file_sep>/.metadata/version.ini
#Sat Dec 05 22:31:32 IST 2020
org.eclipse.core.runtime=2
org.eclipse.platform=4.17.0.v20200902-1800
<file_sep>/src/main/java/com/manipal/demo/repository/UserWishlistRepo.java
package com.manipal.demo.repository;
import java.util.List;
import javax.transaction.Transactional;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;
import com.manipal.demo.model.Song;
import com.manipal.demo.model.UserWishlist;
@Repository
public interface UserWishlistRepo extends JpaRepository<UserWishlist, String> {
@Query("SELECT song FROM Song song WHERE song.songId IN (SELECT u.songId FROM UserWishlist u WHERE u.userId = ?1)")
public List<Song> findAllSongsFromsWishlist(String userId);
//public List<Song> findAllSongsFromsWishlist(@Param("userId") String userId);
@Query("SELECT song FROM Song song where song.songId IN (SELECT u.songId FROM UserWishlist u WHERE u.songId = ?2 AND u.userId = ?1)")
public Song findSongsByTitleFromWishlist(String userId, String songId);
@Query(value = "SELECT song FROM Song song WHERE song.songId IN (SELECT u.songId FROM UserWishlist u WHERE u.songId = ?2 AND u.userId = ?1)")
public Song findSongsByAlbumFromWishlist(String userId, String songId);
@Transactional
@Modifying
@Query(value = "DELETE FROM User_Wishlist WHERE user_id = (:userId)", nativeQuery = true)
public void deleteAllSongsByUserId(@Param("userId") String userId);
@Query(value = "SELECT song_id FROM User_Wishlist WHERE song_id = (:songId)", nativeQuery = true)
public String findSongBySongIdFromWishlist(@Param("songId") String songId);
@Transactional
@Modifying
@Query(value = "DELETE FROM User_Wishlist WHERE user_id = (:userId) AND song_id = (:songId)", nativeQuery = true)
public void deleteSong(@Param("userId") String userId, @Param("songId") String songId);
}
| f23986fb8bfd17d5381ed283d7642030584ae990 | [
"Markdown",
"Java",
"INI"
] | 13 | Java | sai374/music-application | 8fa5e102ba7f81a733f91a3e733f7fe856435933 | 260c2d34bb39b56add19c0a821452f26eaeaa61c | |
refs/heads/master | <file_sep>/*
* testFun.h
*
* Created on: Jun 5, 2018
* Author: leviscar
*/
#ifndef TESTFUN_TESTFUN_H_
#define TESTFUN_TESTFUN_H_
#include "main.h"
#include "deca_regs.h"
#include "deca_device_api.h"
void unlockflash(unsigned int passwd);
void testfun1(void);
void testfun2(void);
void DMA_test(void);
void SET_Tpoint(void);
void GET_Time2Tpoint(void);
void ShowTimeStack(void);
void getSYSstatus(void);
void read_test(unsigned char add);
void read_led(void);
extern uint32 time_record;
extern uint32 time_stack[];
extern uint16 timestack_cnt;
void going(void);
extern uint8 triggle;
#define HAULT_POINT {while(!triggle);triggle=0;}
#endif /* TESTFUN_TESTFUN_H_ */
<file_sep>cmake_minimum_required(VERSION 3.10)
project(toa)
set(CMAKE_CXX_STANDARD 11)
add_executable(toa main.c)<file_sep>#include <decaFun/irq_init.h>
port_deca_isr_t port_deca_isr = 0;
void dw1000IRQ_init(void)
{
// use RPI_V2_GPIO_P1_35 as irq pin
bcm2835_gpio_fsel(RPI_V2_GPIO_P1_35,BCM2835_GPIO_FSEL_INPT);
// with a pullup
bcm2835_gpio_set_pud(RPI_V2_GPIO_P1_35,BCM2835_GPIO_PUD_UP);
// and a rising detect enable
bcm2835_gpio_ren(RPI_V2_GPIO_P1_35);
}
void port_set_deca_isr(port_deca_isr_t deca_isr)
{
/* If needed, deactivate DW1000 IRQ during the installation of the new handler. */
port_deca_isr = deca_isr;
}
<file_sep>/*
* irq_init.h
*
* Created on: Jun 6, 2018
* Author: leviscar
*/
#ifndef DECAFUN_IRQ_INIT_H_
#define DECAFUN_IRQ_INIT_H_
#include "main.h"
#include <bcm2835.h>
typedef void (*port_deca_isr_t)(void);
/* DW1000 IRQ handler declaration. */
extern port_deca_isr_t port_deca_isr;
void dw1000IRQ_init(void);
void port_set_deca_isr(port_deca_isr_t deca_isr);
#endif /* DECAFUN_IRQ_INIT_H_ */
<file_sep>from ctypes import *
cdll_names ={
'dw1000': 'dw1000.so'
}
clib = CDLL("./dw1000.so")
i=0
while i<10:
clib.deca_sleep(500)
print(clib.spiPiSetup(0,1000000))
i = i+1;
print(i)
i=0
<file_sep>/*
* testFun.c
*
* Created on: Jun 5, 2018
* Author: leviscar
*/
#include "testFun.h"
uint32 time_record;
uint32 time_stack[10];
uint16 timestack_cnt=0;
uint8 triggle=0;
//void System_GetClocks(void)
//{
// RCC_ClocksTypeDef rcc_clocks;
//
// RCC_GetClocksFreq(&rcc_clocks);
//
// printf("SYSCLK = %dMHz\r\n", rcc_clocks.SYSCLK_Frequency / 1000000);
// printf("HCLK(AHB) = %dMHz\r\n", rcc_clocks.HCLK_Frequency / 1000000);
// printf("HCLK(AHB) = %dMHz\r\n", rcc_clocks.HCLK_Frequency / 1000000);
// printf("PCLK(APB) = %dMHz\r\n", rcc_clocks.PCLK_Frequency / 1000000);
//}
void getSYSstatus(void)
{
uint32 status_reg;
status_reg = dwt_read32bitreg(SYS_STATUS_ID);
printf("0x%lx\r\n",status_reg);
}
void getIDs(unsigned char index)
{
uint8 headbuff[1]={0x00};
uint8 headlength=1;
uint8 bodylength=4;
uint8 bodybuff[4];
readfromspi(headlength,headbuff,bodylength,bodybuff);
printf("%d\r\n",bodybuff[index]);
}
void read_test(unsigned char add)
{
uint32 id;
id=dwt_readdevid();
printf("%lx\r\n",id);
}
// this func is wrote for show led register
void read_led(void)
{
uint32 reg;
reg = dwt_read32bitoffsetreg(GPIO_CTRL_ID, GPIO_MODE_OFFSET);
printf("%lx\r\n",reg);
}
//void Prt_anchnum(void)
//{
// static int i=ANCHOR_NUM;
// printf("anchor num=%d\r\n",i);
//}
//
void testfun1(void)
{
uint8 txframe[19]={0x61,0x88,0x00,0xca,0xde,0x01,0x00,0x02,0x00,0xa1,0x02,0x00,0xac,0x2e,0x9d,0x7d,0x3d,0,0};
dwt_forcetrxoff();
dwt_writetxdata((19), txframe, 0); /* Zero offset in TX buffer. */
dwt_writetxfctrl((19), 0, 1); /* Zero offset in TX buffer, ranging. */
printf("testfun1 executed!\r\n");
dwt_starttx(DWT_START_TX_IMMEDIATE|DWT_RESPONSE_EXPECTED);
}
void testfun2(void)
{
uint8 txframe[19]={0x41,0x88,0x00,0xca,0xde,0xFF,0xFF,0x01,0x00,0xa0,0,0,0xac,0x2e,0x9d,0x7d,0x3d,0,0};
dwt_forcetrxoff();
dwt_writetxdata((12), txframe, 0); /* Zero offset in TX buffer. */
dwt_writetxfctrl((12), 0, 1); /* Zero offset in TX buffer, ranging. */
printf("testfun2 executed!\r\n");
dwt_starttx(DWT_START_TX_IMMEDIATE|DWT_RESPONSE_EXPECTED);
}
//void GET_Time2Tpoint(void)
//{
// uint32 timetmp;
// timetmp=dwt_readsystimestamphi32();
// time_stack[timestack_cnt++]=timetmp-time_record;//µÍ¾ÅλΪ³£0£¬¼Ä´æÆ÷40λ·Ö±æÂÊ15.65ps£¬¸ß32λ×Ö½Ú·Ö±æÂÊ4.006ns
//
//}
<file_sep>#include "main.h"
static void dw1000_init(void);
static void system_init(void);
static void printfSomething(void);
static dwt_config_t config = {
1, /* Channel number. */
DWT_PRF_16M, /* Pulse repetition frequency. */
DWT_PLEN_128, /* Preamble length. Used in TX only. */
DWT_PAC8, /* Preamble acquisition chunk size. Used in RX only. */
2, /* TX preamble code. Used in TX only. */
2, /* RX preamble code. Used in RX only. */
0, /* 0 to use standard SFD, 1 to use non-standard SFD. */
DWT_BR_6M8, /* Data rate. */
DWT_PHRMODE_STD, /* PHY header mode. */
(129 + 8 - 8) /* SFD timeout (preamble length + 1 + SFD length - PAC size). Used in RX only. */
};
sys_config_t sys_config={
.timebase=1,
.ACtype=0,
.id=ANCHOR_NUM,
.TBfreq=1000,
.acnum=ANCHORCNT,
};
uint8_t nrf_Tx_Buffer[33] ;
uint8_t nrf_Rx_Buffer[33] ;
/* Frames used in the ranging process.*/
/* Buffer to store received response message. */
static uint16 pan_id = 0xDECA;
static uint8 eui[] = {'A', 'C', 'K', 'D', 'A', 'T', 'R', 'X'};
static uint16 Achor_addr = ANCHOR_NUM; /* "RX" */
uint8 rx_buffer[RX_BUF_LEN];
volatile uint8 DMA_transing=0;
uint8 frame_seq_nb=0;
//uint8 ACKframe[12]={0x41, 0x88, 0, 0xCA, 0xDE, 0x00, 0x00, 0x00, 0x00, 0xAC, 0, 0};
uint8 ACKframe[5]={ACK_FC_0,ACK_FC_1,0,0,0};
uint8 send_pc[20]={0xFB, 0xFB, 0x11, 0, 0, 0x02, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
uint8 dw_payloadbuff[127];
uint16 TBsyctime=0xff;
float *pglobalmpudata;
int idxreco=-1;
uint16 TAG_datacnt=0;
uint8 crc=0;
uint8 QuantityAC=QUANTITY_ANCHOR;
uint8 TBPOLL[TDOAMSGLEN] = {0x41, 0x88, 0, 0xCA, 0xDE, 0xFF, 0xFF, 0, 0, 0x80, 0, 0};
LIST_HEAD(TAG_list);
typedef struct
{
uint16 Mark;
uint16 Tagid;
uint8 Idx;
uint8 Accnt;
uint8 Rangingtype;
uint8 Mpu;
uint16 datalen;
} Headdata_t;
int pin_irq = 24;
int main(void)
{
// define variable
int ret;
uint16 i=0;
uint32 addtime;
uint32 txtime;
addtime=(uint32)((float)sys_config.TBfreq/0.0000040064);
// 1. open bcm_init
// 2. spi_init
openspi();
printf("open spi");
// 3. dw1000_init
system_init();
if(!sys_config.timebase)
{
printf("System initialized successfully......\r\n");
printf("Anchor Number: %d Anchor Type: %d\r\n",sys_config.id, sys_config.ACtype);
while(i<20)
{
dwt_rxenable(DWT_START_RX_IMMEDIATE);
deca_sleep(500);
i++;
}
}
else
{
printf("run as TB");
//running as TB
while(i<20)
{
sys_config.id=0;
TBPOLL[FRAME_SN_IDX]=frame_seq_nb++;
TBPOLL[WLIDX]=0;
TBPOLL[WRIDX]=0;
TBPOLL[UWBFREQ1]=(uint8)sys_config.TBfreq;
TBPOLL[UWBFREQ2]=(uint8)(sys_config.TBfreq>>8);
dwt_writetxdata(sizeof(TBPOLL), TBPOLL, 0); // Zero offset in TX buffer.
dwt_writetxfctrl(sizeof(TBPOLL), 0, 1); // Zero offset in TX buffer, ranging.
ret = dwt_starttx(DWT_START_TX_IMMEDIATE);
WAIT_SENT(2000);
if(ret == DWT_ERROR)
{
printf("send failed");
}else{
printf("start send\r\n");
}
deca_sleep(500);
i++;
}
exit(0);
}
// while(1)
// {
// while(!isframe_rec);
// isframe_rec=0;
// if(uwbrevbuff[FUNCODE_IDX]==0x80)
// {
// printfSomething();
// }
// }
// int i=0;
// openspi();
// printf("test01\n");
//
// delay(1000);
// for(i=0;i<1000;i++)
// {
//// delay(500);
// getSYSstatus();
// read_test(0);
// deca_sleep(500);
// }
bcm2835_close();
return 0;
}
static void system_init(void)
{
dw1000_init();
if(sys_config.id==1)
{
sys_config.ACtype=0;
}
else
{
sys_config.ACtype=1;
}
if(!sys_config.ACtype)
{
// DMA_init();
}
if(!sys_config.timebase)
{
dwt_rxenable(DWT_START_RX_IMMEDIATE);
}
else
{
sys_config.id=0;
// while(!isframe_sent) isframe_sent = 0;
tx_timestamp = get_tx_timestamp_u64();
printf("%d",tx_timestamp);
TBPOLL[FRAME_SN_IDX]=frame_seq_nb++;
TBPOLL[WLIDX]=0;
TBPOLL[WRIDX]=0;
TBPOLL[UWBFREQ1]=(uint8)sys_config.TBfreq;
TBPOLL[UWBFREQ2]=(uint8)(sys_config.TBfreq>>8);
dwt_writetxdata(sizeof(TBPOLL), TBPOLL, 0); /* Zero offset in TX buffer. */
dwt_writetxfctrl(sizeof(TBPOLL), 0, 1); /* Zero offset in TX buffer, ranging. */
dwt_starttx(DWT_START_TX_IMMEDIATE);
printf("start send\r\n");
}
pglobalmpudata=(float*)malloc(MAX_MPUDATA_CNT);
}
static void dw1000_init(void)
{
uint8 euiArr[8];
decaIrqStatus_t stat ;
reset_DW1000();
if (dwt_initialise(DWT_LOADUCODE) == DWT_ERROR) //dw1000 init
{
printf("INIT FAILED\r\n");
while (1)
{ };
}
else
{
printf("UWB Device initialised\r\n");
}
dw1000IRQ_init();
stat = decamutexon() ;
set_spi_rate_high();
dwt_configure(&config);
dwt_setleds(DWT_LEDS_ENABLE);
port_set_deca_isr(dwt_isr);
decamutexoff(stat) ;
//--------------------------------
/* Apply default antenna delay value. See NOTE 2 below. */
dwt_setrxantennadelay(RX_ANT_DLY);
dwt_settxantennadelay(TX_ANT_DLY);
/* Set expected response's delay and timeout. See NOTE 1 and 5 below.
* As this example only handles one incoming frame with always the same delay and timeout, those values can be set here once for all. */
dwt_write32bitreg(SYS_STATUS_ID, SYS_STATUS_RXFCG|SYS_STATUS_SLP2INIT);
dwt_setinterrupt(DWT_INT_ALLERR|DWT_INT_TFRS|DWT_INT_RFCG|DWT_INT_RFTO,1);
//dw_setARER(1);
dwt_setcallbacks(&tx_conf_cb, &rx_ok_cb, &rx_to_cb, &rx_err_cb);
dwt_setpanid(pan_id);
dwt_seteui(eui);
dwt_setaddress16(Achor_addr);
// dwt_geteui(euiArr);
// printf("eui0: %d\r\n",euiArr[1]);
/* Configure frame filtering. Only data frames are enabled in this example. Frame filtering must be enabled for Auto ACK to work. */
dwt_enableframefilter(DWT_FF_DATA_EN|DWT_FF_ACK_EN);
/* Activate auto-acknowledgement. Time is set to 0 so that the ACK is sent as soon as possible after reception of a frame. */
dwt_enableautoack(8);
dwt_setrxtimeout(0);
// dwt_setlnapamode(1,1);
// dwt_write16bitoffsetreg(PMSC_ID,PMSC_RES3_OFFSET+2,0);
}
void reset_DW1000(void)
{
// enable GPIO used for dw1000 reset
bcm2835_gpio_fsel(ResetPin, BCM2835_GPIO_FSEL_OUTP);
bcm2835_gpio_write(ResetPin, LOW);//拉低
sleep_ms(1);
//put the pin back to tri-state ... as input
bcm2835_gpio_fsel(ResetPin, BCM2835_GPIO_FSEL_INPT);
bcm2835_gpio_set_pud(ResetPin, BCM2835_GPIO_PUD_UP);
sleep_ms(5);
// dwt_softreset();
}
static void printfSomething(void)
{
printf("rec %d\r\n",uwbrevbuff[FRAME_SN_IDX]);
dwt_setrxtimeout(0);
dwt_rxenable(DWT_START_RX_IMMEDIATE);
}
| 5cba18da6e09dcd6967a34ee5f9b85a9e2a96c8f | [
"C",
"Python",
"CMake"
] | 7 | C | leviscar/myLocation | 606ea5009b9f5ae484e2c85942e22b486968b816 | df38562e32704a60e3aa84bc14c46c5924e2cb21 | |
refs/heads/main | <file_sep>
function myFunction() {
var person = prompt("Please enter your name");
if (person != null) {
var age_verification = prompt("Please enter your age");
if(age_verification <18){
alert("you cannot enter");
}
else{
alert("you can enter");
}
}
}
| 7c18f38969fd1490b9c38ad29e8e3671cf4f70df | [
"JavaScript"
] | 1 | JavaScript | codeacademyprogramming/intro-to-js-Kenan125 | 10c8c47de6c2ffdd72335f703f2eb72cf8e076bd | 837199886a98ed7c12cce1fa9f56c03a9f994a33 | |
refs/heads/master | <repo_name>abelectronicsuk/ABElectronics_Win10IOT_Libraries<file_sep>/ABElectronics_Win10IOT_Libraries/ExpanderPi.cs
using System;
using System.Threading.Tasks;
using Windows.Devices.Enumeration;
using Windows.Devices.Spi;
using Windows.Devices.I2c;
using Windows.Foundation.Metadata;
using System.Runtime.InteropServices;
using Microsoft.Win32.SafeHandles;
namespace ABElectronics_Win10IOT_Libraries
{
/// <summary>
/// Class Library for use with the Expander Pi
/// </summary>
public class ExpanderPi : IDisposable
{
// SPI Variables
private const string SPI_CONTROLLER_NAME = "SPI0";
private const Int32 ADC_CHIP_SELECT_LINE = 0; // ADC on SPI channel select CE0
private const Int32 DAC_CHIP_SELECT_LINE = 1; // ADC on SPI channel select CE1
// ADC Variables
private SpiDevice adc;
private double ADCReferenceVoltage = 4.096;
// DAC Variables
private SpiDevice dac;
// IO Variables
private readonly ABE_Helpers helper = new ABE_Helpers();
// Define IO registers values from datasheet
private const byte IODIRA = 0x00; // IO direction A
private const byte IODIRB = 0x01; // IO direction B
private const byte IPOLA = 0x02; // Input polarity A
private const byte IPOLB = 0x03; // Input polarity B
private const byte GPINTENA = 0x04; // Interrupt-on-change A
private const byte GPINTENB = 0x05; // Interrupt-on-change B
private const byte DEFVALA = 0x06; // Default value for port A
private const byte DEFVALB = 0x07; // Default value for port B
private const byte INTCONA = 0x08; // Interrupt control register for port A
private const byte INTCONB = 0x09; // Interrupt control register for port B
private const byte IOCON = 0x0A; // configuration register
private const byte GPPUA = 0x0C; // pull-up resistors for port A
private const byte GPPUB = 0x0D; // pull-up resistors for port B
private const byte INTFA = 0x0E; // interrupt condition on port A
private const byte INTFB = 0x0F; // interrupt condition on port B
private const byte INTCAPA = 0x10; // captures the GPIO port A value at the time the interrupt occurred
private const byte INTCAPB = 0x11; // captures the GPIO port B value at the time the interrupt occurred
private const byte GPIOA = 0x12; // Data port A
private const byte GPIOB = 0x13; // Data port B
private const byte OLATA = 0x14; // Output latches A
private const byte OLATB = 0x15; // Output latches B
private const byte IOADDRESS = 0x20; // I2C Address for the MCP23017 IO chip
private byte config = 0x22; // initial configuration - see IOCON page in the MCP23017 datasheet for more information.
private I2cDevice IOi2cbus; // create an instance of the i2c bus
private byte intA; // interrupt control for port a
private byte intB; // interrupt control for port a
// variables
private byte port_a_dir; // port a direction
private byte port_b_dir; // port b direction
private byte porta_polarity; // input polarity for port a
private byte porta_pullup; // port a pull-up resistors
private byte portaval; // port a value
private byte portb_polarity; // input polarity for port b
private byte portb_pullup; // port a pull-up resistors
private byte portbval; // port b value
// RTC Variables
private const byte RTCADDRESS = 0x68;
private I2cDevice RTCi2cbus; // create an instance of the i2c bus
// Register addresses for the DS1307 IC
private const byte SECONDS = 0x00;
private const byte MINUTES = 0x01;
private const byte HOURS = 0x02;
private const byte DAYOFWEEK = 0x03;
private const byte DAY = 0x04;
private const byte MONTH = 0x05;
private const byte YEAR = 0x06;
private const byte CONTROL = 0x07;
// the DS1307 does not store the current century so that has to be added on manually.
private readonly int century = 2000;
// initial configuration - square wave and output disabled, frequency set to 32.768KHz.
private byte rtcconfig = 0x03;
// Flag: Has Dispose already been called?
bool disposed = false;
// Instantiate a SafeHandle instance.
SafeHandle handle = new SafeFileHandle(IntPtr.Zero, true);
#region General Methods
/// <summary>
/// Shows if there is a connection with the Expander Pi
/// </summary>
public bool IsConnected { get; private set; }
/// <summary>
/// Create an instance of the Expander Pi.
/// </summary>
public ExpanderPi(){
IsConnected = false;
}
/// <summary>
/// Open a connection to the Expander Pi.
/// </summary>
public async Task Connect()
{
if (IsConnected)
{
return; // Already connected
}
if (!ApiInformation.IsTypePresent("Windows.Devices.Spi.SpiDevice"))
{
return; // This system does not support this feature: can't connect
}
if (!ApiInformation.IsTypePresent("Windows.Devices.I2c.I2cDevice"))
{
return; // This system does not support this feature: can't connect
}
try
{
// Create SPI initialization settings for the ADC
var adcsettings =
new SpiConnectionSettings(ADC_CHIP_SELECT_LINE)
{
ClockFrequency = 1900000, // SPI clock frequency of 1.9MHz
Mode = SpiMode.Mode0
};
var spiAqs = SpiDevice.GetDeviceSelector(SPI_CONTROLLER_NAME); // Find the selector string for the SPI bus controller
var devicesInfo = await DeviceInformation.FindAllAsync(spiAqs); // Find the SPI bus controller device with our selector string
if (devicesInfo.Count == 0)
{
return; // Controller not found
}
adc = await SpiDevice.FromIdAsync(devicesInfo[0].Id, adcsettings); // Create an ADC connection with our bus controller and SPI settings
// Create SPI initialization settings for the DAC
var dacSettings =
new SpiConnectionSettings(DAC_CHIP_SELECT_LINE)
{
ClockFrequency = 2000000, // SPI clock frequency of 20MHz
Mode = SpiMode.Mode0
};
dac = await SpiDevice.FromIdAsync(devicesInfo[0].Id, dacSettings); // Create a DAC connection with our bus controller and SPI settings
// Initialize the I2C bus
var aqs = I2cDevice.GetDeviceSelector(ABE_Helpers.I2C_CONTROLLER_NAME); // Find the selector string for the I2C bus controller
var dis = await DeviceInformation.FindAllAsync(aqs); // Find the I2C bus controller device with our selector string
if (dis.Count == 0)
{
return; // Controller not found
}
var IOsettings = new I2cConnectionSettings(IOADDRESS) { BusSpeed = I2cBusSpeed.FastMode };
var RTCsettings = new I2cConnectionSettings(RTCADDRESS) { BusSpeed = I2cBusSpeed.FastMode };
IOi2cbus = await I2cDevice.FromIdAsync(dis[0].Id, IOsettings); // Create an IOI2cDevice with our selected bus controller and I2C settings
RTCi2cbus = await I2cDevice.FromIdAsync(dis[0].Id, RTCsettings); // Create an RTCI2cDevice with our selected bus controller and I2C settings
if (IOi2cbus != null && RTCi2cbus != null)
{
// Set IsConnected to true
IsConnected = true;
// i2c bus is connected so set up the initial configuration for the IO Pi
helper.WriteI2CByte(IOi2cbus, IOCON, config);
portaval = helper.ReadI2CByte(IOi2cbus, GPIOA);
portbval = helper.ReadI2CByte(IOi2cbus, GPIOB);
helper.WriteI2CByte(IOi2cbus, IODIRA, 0xFF);
helper.WriteI2CByte(IOi2cbus, IODIRB, 0xFF);
IOSetPortPullups(0, 0x00);
IOSetPortPullups(1, 0x00);
IOInvertPort(0, 0x00);
IOInvertPort(1, 0x00);
// Fire the Connected event handler
Connected?.Invoke(this, EventArgs.Empty);
}
}
/* If initialization fails, display the exception and stop running */
catch (Exception ex)
{
IsConnected = false;
throw new Exception("SPI and I2C Initialization Failed", ex);
}
}
/// <summary>
/// Event occurs when connection is made.
/// </summary>
public event EventHandler Connected;
private void CheckConnected()
{
if (!IsConnected)
{
throw new InvalidOperationException("Not connected. You must call .Connect() first.");
}
}
#endregion
#region ADC Methods
/// <summary>
/// Read the voltage from the selected <paramref name="channel" /> on the ADC.
/// </summary>
/// <param name="channel">1 to 8</param>
/// <param name="mode">1 = Single Ended Input, 2 = Differential Input</param>
/// When in differential mode setting channel to 1 will make IN1 = IN+ and IN2 = IN-
/// When in differential mode setting channel to 2 will make IN1 = IN- and IN2 = IN+
/// When in differential mode setting channel to 3 will make IN3 = IN+ and IN4 = IN-
/// When in differential mode setting channel to 4 will make IN3 = IN- and IN4 = IN+
/// When in differential mode setting channel to 5 will make IN5 = IN+ and IN6 = IN-
/// When in differential mode setting channel to 6 will make IN5 = IN- and IN6 = IN+
/// When in differential mode setting channel to 7 will make IN7 = IN+ and IN8 = IN-
/// When in differential mode setting channel to 8 will make IN7 = IN- and IN8 = IN+
/// <returns>voltage</returns>
public double ADCReadVoltage(byte channel, byte mode)
{
if (channel < 1 || channel > 8)
{
throw new ArgumentOutOfRangeException(nameof(channel));
}
var raw = ADCReadRaw(channel, mode);
var voltage = ADCReferenceVoltage / 4096 * raw; // convert the raw value into a voltage based on the reference voltage.
return voltage;
}
/// <summary>
/// Read the raw value from the selected <paramref name="channel" /> on the ADC.
/// </summary>
/// <param name="channel">1 to 8</param>
/// <param name="mode">1 = Single Ended Input, 2 = Differential Input</param>
/// When in differential mode setting channel to 1 will make IN1 = IN+ and IN2 = IN-
/// When in differential mode setting channel to 2 will make IN1 = IN- and IN2 = IN+
/// When in differential mode setting channel to 3 will make IN3 = IN+ and IN4 = IN-
/// When in differential mode setting channel to 4 will make IN3 = IN- and IN4 = IN+
/// When in differential mode setting channel to 5 will make IN5 = IN+ and IN6 = IN-
/// When in differential mode setting channel to 6 will make IN5 = IN- and IN6 = IN+
/// When in differential mode setting channel to 7 will make IN7 = IN+ and IN8 = IN-
/// When in differential mode setting channel to 8 will make IN7 = IN- and IN8 = IN+
/// <returns>Integer</returns>
public int ADCReadRaw(byte channel, byte mode)
{
if (channel < 1 || channel > 8)
{
throw new ArgumentOutOfRangeException(nameof(channel));
}
CheckConnected();
var writeArray = new byte[] { 0x00, 0x00, 0x00 };
channel = (byte)(channel - 1);
if (mode == 0)
{
writeArray[0] = (byte)(6 + (channel >> 2));
writeArray[1] = (byte)((channel & 3) << 6);
}
else if (mode == 1)
{
writeArray[0] = (byte)(4 + (channel >> 2));
writeArray[1] = (byte)((channel & 3) << 6);
}
else
{
throw new ArgumentOutOfRangeException(nameof(mode));
}
var readBuffer = new byte[3]; // this holds the output data
adc.TransferFullDuplex(writeArray, readBuffer); // transfer the adc data
var ret = (short)(((readBuffer[1] & 0x0F) << 8) + readBuffer[2]); // combine the two bytes into a single 16bit integer
return ret;
}
/// <summary>
/// Set the reference <paramref name="voltage" /> for the analogue to digital converter.
/// The Expander Pi contains an onboard 4.096V voltage reference. If you want to use an external
/// reference between 0V and 5V, disconnect the jumper J1 and connect your reference voltage to the Vref pin.
/// </summary>
/// <param name="voltage">double</param>
public void ADCSetRefVoltage(double voltage)
{
CheckConnected();
if (voltage < 0.0 || voltage > 5.0)
{
throw new ArgumentOutOfRangeException(nameof(voltage), "Reference voltage must be between 0.0V and 5.0V.");
}
ADCReferenceVoltage = voltage;
}
#endregion
#region DAC Methods
/// <summary>
/// Set the <paramref name="voltage" /> for the selected channel on the DAC.
/// </summary>
/// <param name="channel">1 or 2</param>
/// <param name="voltage">Voltage will be between 0 and 2.047V when gain is 1, 0 and 4.096V when gain is 2</param>
/// <param name="gain">Gain can be 1 or 2</param>
public void DACSetVoltage(byte channel, double voltage, byte gain)
{
// Check for valid channel and voltage variables
if (channel < 1 || channel > 2)
{
throw new ArgumentOutOfRangeException(nameof(channel));
}
if (gain < 1 || gain > 2)
{
throw new ArgumentOutOfRangeException(nameof(gain));
}
if ((gain == 1 && (voltage >= 0.0 && voltage <= 2.048)) || (gain == 2 && (voltage >= 0.0 && voltage <= 4.096)))
{
var rawval = Convert.ToInt16(((voltage / 2.048) * 4096) / gain); // convert the voltage into a raw value
DACSetRaw(channel, rawval, gain);
}
else
{
throw new ArgumentOutOfRangeException(nameof(voltage));
}
}
/// <summary>
/// Set the raw <paramref name="value" /> from the selected <paramref name="channel" /> on the DAC.
/// </summary>
/// <param name="channel">1 or 2</param>
/// <param name="value">Value between 0 and 4095</param>
/// <param name="gain">Gain can be 1 or 2</param>
/// Voltage will be between 0 and 2.047V when gain is 1, 0 and 4.096V when gain is 2
public void DACSetRaw(byte channel, short value, byte gain)
{
CheckConnected();
if (channel < 1 || channel > 2)
{
throw new ArgumentOutOfRangeException(nameof(channel));
}
if (value < 0 || value > 4095)
{
throw new ArgumentOutOfRangeException(nameof(value));
}
if (gain < 1 || gain > 2)
{
throw new ArgumentOutOfRangeException(nameof(gain));
}
// split the raw value into two bytes and send it to the DAC.
var lowByte = (byte)(value & 0xff);
var highByte = (byte)0;
if (gain == 1)
{
highByte = (byte)(((value >> 8) & 0xff) | ((channel - 1) << 7) | (1 << 5) | (1 << 4));
}
else
{
highByte = (byte)(((value >> 8) & 0xff) | ((channel - 1) << 7) | (1 << 4));
}
var writeBuffer = new[] { highByte, lowByte };
dac.Write(writeBuffer);
}
#endregion
#region IO Methods
/// <summary>
/// Set IO <paramref name="direction" /> for an individual pin.
/// </summary>
/// <param name="pin">1 to 16</param>
/// <param name="direction">true = input, false = output</param>
public void IOSetPinDirection(byte pin, bool direction)
{
CheckConnected();
pin = (byte)(pin - 1);
if (pin < 8)
{
port_a_dir = helper.UpdateByte(port_a_dir, pin, direction);
helper.WriteI2CByte(IOi2cbus, IODIRA, port_a_dir);
}
else if (pin >= 8 && pin < 16)
{
port_b_dir = helper.UpdateByte(port_b_dir, (byte)(pin - 8), direction);
helper.WriteI2CByte(IOi2cbus, IODIRB, port_b_dir);
}
else
{
throw new ArgumentOutOfRangeException(nameof(pin));
}
}
/// <summary>
/// Set the <paramref name="direction"/> for an IO <paramref name="port"/>.
/// You can control the direction of all 8 pins on a port by sending a single byte value.
/// Each bit in the byte represents one pin so for example 0x0A would set pins 2 and 4 to
/// inputs and all other pins to outputs.
/// </summary>
/// <param name="port">0 = pins 1 to 8, 1 = pins 9 to 16</param>
/// <param name="direction">Direction for all pins on the port. 1 = input, 0 = output</param>
public void IOSetPortDirection(byte port, byte direction)
{
CheckConnected();
switch (port)
{
case 0:
helper.WriteI2CByte(IOi2cbus, IODIRA, direction);
port_a_dir = direction;
break;
case 1:
helper.WriteI2CByte(IOi2cbus, IODIRB, direction);
port_b_dir = direction;
break;
default:
throw new ArgumentOutOfRangeException(nameof(port));
}
}
/// <summary>
/// Set the internal 100K pull-up resistors for an individual pin.
/// </summary>
/// <param name="pin">1 to 16</param>
/// <param name="value">true = enabled, false = disabled</param>
public void IOSetPinPullup(byte pin, bool value)
{
CheckConnected();
pin = (byte)(pin - 1);
if (pin < 8)
{
porta_pullup = helper.UpdateByte(porta_pullup, pin, value);
helper.WriteI2CByte(IOi2cbus, GPPUA, porta_pullup);
}
else if (pin >= 8 && pin < 16)
{
portb_pullup = helper.UpdateByte(portb_pullup, (byte)(pin - 8), value);
helper.WriteI2CByte(IOi2cbus, GPPUB, portb_pullup);
}
else
{
throw new ArgumentOutOfRangeException(nameof(pin));
}
}
/// <summary>
/// set the internal 100K pull-up resistors for the selected IO port.
/// </summary>
/// <param name="port">0 = pins 1 to 8, 1 = pins 9 to 16</param>
/// <param name="value">number between 0 and 255 or 0x00 and 0xFF</param>
public void IOSetPortPullups(byte port, byte value)
{
CheckConnected();
switch (port)
{
case 0:
porta_pullup = value;
helper.WriteI2CByte(IOi2cbus, GPPUA, value);
break;
case 1:
portb_pullup = value;
helper.WriteI2CByte(IOi2cbus, GPPUB, value);
break;
default:
throw new ArgumentOutOfRangeException(nameof(port));
}
}
/// <summary>
/// Write to an individual <paramref name="pin"/>.
/// </summary>
/// <param name="pin">1 - 16</param>
/// <param name="value">0 = logic low, 1 = logic high</param>
public void IOWritePin(byte pin, bool value)
{
CheckConnected();
pin = (byte)(pin - 1);
if (pin < 8)
{
portaval = helper.UpdateByte(portaval, pin, value);
helper.WriteI2CByte(IOi2cbus, GPIOA, portaval);
}
else if (pin >= 8 && pin < 16)
{
portbval = helper.UpdateByte(portbval, (byte)(pin - 8), value);
helper.WriteI2CByte(IOi2cbus, GPIOB, portbval);
}
else
{
throw new ArgumentOutOfRangeException(nameof(pin));
}
}
/// <summary>
/// Write to all pins on the selected <paramref name="port"/>.
/// </summary>
/// <param name="port">0 = pins 1 to 8, 1 = pins 9 to 16</param>
/// <param name="value">number between 0 and 255 or 0x00 and 0xFF</param>
public void IOWritePort(byte port, byte value)
{
CheckConnected();
switch (port)
{
case 0:
helper.WriteI2CByte(IOi2cbus, GPIOA, value);
portaval = value;
break;
case 1:
helper.WriteI2CByte(IOi2cbus, GPIOB, value);
portbval = value;
break;
default:
throw new ArgumentOutOfRangeException(nameof(port));
}
}
/// <summary>
/// read the value of an individual <paramref name="pin"/>.
/// </summary>
/// <param name="pin">1 - 16</param>
/// <returns>0 = logic level low, 1 = logic level high</returns>
public bool IOReadPin(byte pin)
{
CheckConnected();
pin = (byte)(pin - 1);
if (pin < 8)
{
portaval = helper.ReadI2CByte(IOi2cbus, GPIOA);
return helper.CheckBit(portaval, pin);
}
if (pin >= 8 && pin < 16)
{
portbval = helper.ReadI2CByte(IOi2cbus, GPIOB);
return helper.CheckBit(portbval, (byte)(pin - 8));
}
throw new ArgumentOutOfRangeException(nameof(pin));
}
/// <summary>
/// Read all pins on the selected <paramref name="port"/>.
/// </summary>
/// <param name="port">0 = pins 1 to 8, 1 = pins 9 to 16</param>
/// <returns>returns number between 0 and 255 or 0x00 and 0xFF</returns>
public byte IOReadPort(byte port)
{
CheckConnected();
switch (port)
{
case 0:
portaval = helper.ReadI2CByte(IOi2cbus, GPIOA);
return portaval;
case 1:
portbval = helper.ReadI2CByte(IOi2cbus, GPIOB);
return portbval;
default:
throw new ArgumentOutOfRangeException(nameof(port));
}
}
/// <summary>
/// Invert the polarity of the pins on a selected <paramref name="port"/>.
/// </summary>
/// <param name="port">0 = pins 1 to 8, 1 = pins 9 to 16</param>
/// <param name="polarity">0x00 - 0xFF (0 = same logic state of the input pin, 1 = inverted logic state of the input pin)</param>
public void IOInvertPort(byte port, byte polarity)
{
CheckConnected();
switch (port)
{
case 0:
helper.WriteI2CByte(IOi2cbus, IPOLA, polarity);
porta_polarity = polarity;
break;
case 1:
helper.WriteI2CByte(IOi2cbus, IPOLB, polarity);
portb_polarity = polarity;
break;
default:
throw new ArgumentOutOfRangeException(nameof(port));
}
}
/// <summary>
/// Invert the <paramref name="polarity" /> of the selected <paramref name="pin" />.
/// </summary>
/// <param name="pin">1 to 16</param>
/// <param name="polarity">False = same logic state of the input pin, True = inverted logic state of the input pin</param>
public void IOInvertPin(byte pin, bool polarity)
{
CheckConnected();
pin = (byte)(pin - 1);
if (pin < 8)
{
porta_polarity = helper.UpdateByte(portaval, pin, polarity);
helper.WriteI2CByte(IOi2cbus, IPOLA, porta_polarity);
}
else if (pin >= 8 && pin < 16)
{
portb_polarity = helper.UpdateByte(portbval, (byte)(pin - 8), polarity);
helper.WriteI2CByte(IOi2cbus, IPOLB, portb_polarity);
}
else
{
throw new ArgumentOutOfRangeException(nameof(pin));
}
}
/// <summary>
/// Sets the mirror status of the interrupt pins.
/// </summary>
/// <param name="value">
/// 0 = The INT pins are not mirrored. INTA is associated with PortA and INTB is associated with PortB.
/// 1 = The INT pins are internally connected
/// </param>
public void IOMirrorInterrupts(byte value)
{
CheckConnected();
switch (value)
{
case 0:
config = helper.UpdateByte(config, 6, false);
helper.WriteI2CByte(IOi2cbus, IOCON, config);
break;
case 1:
config = helper.UpdateByte(config, 6, true);
helper.WriteI2CByte(IOi2cbus, IOCON, config);
break;
default:
throw new ArgumentOutOfRangeException(nameof(value));
}
}
/// <summary>
/// This sets the polarity of the INT output pins.
/// </summary>
/// <param name="value">1 = Active - high. 0 = Active - low.</param>
public void IOSetInterruptPolarity(byte value)
{
CheckConnected();
switch (value)
{
case 0:
config = helper.UpdateByte(config, 1, false);
helper.WriteI2CByte(IOi2cbus, IOCON, config);
break;
case 1:
config = helper.UpdateByte(config, 1, true);
helper.WriteI2CByte(IOi2cbus, IOCON, config);
break;
default:
throw new ArgumentOutOfRangeException(nameof(value));
}
}
/// <summary>
/// Sets the type of interrupt for each pin on the selected <paramref name="port"/>.
/// 1 = interrupt is fired when the pin matches the default value.
/// 0 = the interrupt is fired on state change.
/// </summary>
/// <param name="port">0 = pins 1 to 8, 1 = pins 9 to 16</param>
/// <param name="value">number between 0 and 255 or 0x00 and 0xFF</param>
public void IOSetInterruptType(byte port, byte value)
{
CheckConnected();
switch (port)
{
case 0:
helper.WriteI2CByte(IOi2cbus, INTCONA, value);
break;
case 1:
helper.WriteI2CByte(IOi2cbus, INTCONB, value);
break;
default:
throw new ArgumentOutOfRangeException(nameof(port));
}
}
/// <summary>
/// These bits set the compare value for pins configured for interrupt-on-change
/// on the selected <paramref name="port"/>. If the associated pin level is the
/// opposite from the register bit, an interrupt occurs.
/// </summary>
/// <param name="port">0 = pins 1 to 8, 1 = pins 9 to 16</param>
/// <param name="value">number between 0 and 255 or 0x00 and 0xFF</param>
public void IOSetInterruptDefaults(byte port, byte value)
{
CheckConnected();
switch (port)
{
case 0:
helper.WriteI2CByte(IOi2cbus, DEFVALA, value);
break;
case 1:
helper.WriteI2CByte(IOi2cbus, DEFVALB, value);
break;
default:
throw new ArgumentOutOfRangeException(nameof(port));
}
}
/// <summary>
/// Enable interrupts for the pins on the selected <paramref name="port"/>.
/// </summary>
/// <param name="port">0 = pins 1 to 8, 1 = pins 9 to 16</param>
/// <param name="value">number between 0 and 255 or 0x00 and 0xFF</param>
public void IOSetInterruptOnPort(byte port, byte value)
{
CheckConnected();
switch (port)
{
case 0:
helper.WriteI2CByte(IOi2cbus, GPINTENA, value);
intA = value;
break;
case 1:
helper.WriteI2CByte(IOi2cbus, GPINTENB, value);
intB = value;
break;
default:
throw new ArgumentOutOfRangeException(nameof(port));
}
}
/// <summary>
/// Enable interrupts for the selected <paramref name="pin"/>.
/// </summary>
/// <param name="pin">1 to 16</param>
/// <param name="value">0 = interrupt disabled, 1 = interrupt enabled</param>
public void IOSetInterruptOnPin(byte pin, bool value)
{
CheckConnected();
pin = (byte)(pin - 1);
if (pin < 8)
{
intA = helper.UpdateByte(intA, pin, value);
helper.WriteI2CByte(IOi2cbus, GPINTENA, intA);
}
else if (pin >= 8 && pin < 16)
{
intB = helper.UpdateByte(intB, (byte)(pin - 8), value);
helper.WriteI2CByte(IOi2cbus, GPINTENB, intB);
}
else
{
throw new ArgumentOutOfRangeException(nameof(pin));
}
}
/// <summary>
/// Read the interrupt status for the pins on the selected <paramref name="port"/>.
/// </summary>
/// <param name="port">0 = pins 1 to 8, 1 = pins 9 to 16</param>
public byte IOReadInterruptStatus(byte port)
{
CheckConnected();
switch (port)
{
case 0:
return helper.ReadI2CByte(IOi2cbus, INTFA);
case 1:
return helper.ReadI2CByte(IOi2cbus, INTFB);
default:
throw new ArgumentOutOfRangeException(nameof(port));
}
}
/// <summary>
/// Read the value from the selected <paramref name="port"/> at the time
/// of the last interrupt trigger.
/// </summary>
/// <param name="port">0 = pins 1 to 8, 1 = pins 9 to 16</param>
public byte IOReadInterruptCapture(byte port)
{
CheckConnected();
switch (port)
{
case 0:
return helper.ReadI2CByte(IOi2cbus, INTCAPA);
case 1:
return helper.ReadI2CByte(IOi2cbus, INTCAPB);
default:
throw new ArgumentOutOfRangeException(nameof(port));
}
}
/// <summary>
/// Reset the interrupts A and B to 0.
/// </summary>
public void IOResetInterrupts()
{
CheckConnected();
IOReadInterruptCapture(0);
IOReadInterruptCapture(1);
}
#endregion
#region RTC Methods
/// <summary>
/// Converts BCD format to integer.
/// </summary>
/// <param name="x">BCD formatted byte</param>
/// <returns></returns>
private int BCDtoInt(byte x)
{
return x - 6 * (x >> 4);
}
/// <summary>
/// Converts byte to BCD format.
/// </summary>
/// <param name="val">value to convert</param>
/// <returns>Converted byte</returns>
private byte BytetoBCD(int val)
{
return (byte)(val / 10 * 16 + val % 10);
}
/// <summary>
/// Set the date and time on the RTC.
/// </summary>
/// <param name="date">DateTime</param>
public void RTCSetDate(DateTime date)
{
CheckConnected();
helper.WriteI2CByte(RTCi2cbus, SECONDS, BytetoBCD(date.Second));
helper.WriteI2CByte(RTCi2cbus, MINUTES, BytetoBCD(date.Minute));
helper.WriteI2CByte(RTCi2cbus, HOURS, BytetoBCD(date.Hour));
helper.WriteI2CByte(RTCi2cbus, DAYOFWEEK, BytetoBCD((int)date.DayOfWeek));
helper.WriteI2CByte(RTCi2cbus, DAY, BytetoBCD(date.Day));
helper.WriteI2CByte(RTCi2cbus, MONTH, BytetoBCD(date.Month));
helper.WriteI2CByte(RTCi2cbus, YEAR, BytetoBCD(date.Year - century));
}
/// <summary>
/// Read the date and time from the RTC.
/// </summary>
/// <returns>DateTime</returns>
public DateTime RTCReadDate()
{
CheckConnected();
var DateArray = helper.ReadI2CBlockData(RTCi2cbus, 0, 7);
var year = BCDtoInt(DateArray[6]) + century;
var month = BCDtoInt(DateArray[5]);
var day = BCDtoInt(DateArray[4]);
// var dayofweek = BCDtoInt(DateArray[3]);
var hours = BCDtoInt(DateArray[2]);
var minutes = BCDtoInt(DateArray[1]);
var seconds = BCDtoInt(DateArray[0]);
try
{
var date = new DateTime(year, month, day, hours, minutes, seconds);
return date;
}
catch
{
var date = new DateTime(1990, 01, 01, 01, 01, 01);
return date;
}
}
/// <summary>
/// Enable the clock output pin.
/// </summary>
public void RTCEnableOutput()
{
CheckConnected();
rtcconfig = helper.UpdateByte(rtcconfig, 7, true);
rtcconfig = helper.UpdateByte(rtcconfig, 4, true);
helper.WriteI2CByte(RTCi2cbus, CONTROL, rtcconfig);
}
/// <summary>
/// Disable the clock output pin.
/// </summary>
public void RTCDisableOutput()
{
CheckConnected();
rtcconfig = helper.UpdateByte(rtcconfig, 7, false);
rtcconfig = helper.UpdateByte(rtcconfig, 4, false);
helper.WriteI2CByte(RTCi2cbus, CONTROL, rtcconfig);
}
/// <summary>
/// Set the frequency of the output pin square-wave.
/// </summary>
/// <param name="frequency">options are: 1 = 1Hz, 2 = 4.096KHz, 3 = 8.192KHz, 4 = 32.768KHz</param>
public void RTCSetFrequency(byte frequency)
{
CheckConnected();
switch (frequency)
{
case 1:
rtcconfig = helper.UpdateByte(rtcconfig, 0, false);
rtcconfig = helper.UpdateByte(rtcconfig, 1, false);
break;
case 2:
rtcconfig = helper.UpdateByte(rtcconfig, 0, true);
rtcconfig = helper.UpdateByte(rtcconfig, 1, false);
break;
case 3:
rtcconfig = helper.UpdateByte(rtcconfig, 0, false);
rtcconfig = helper.UpdateByte(rtcconfig, 1, true);
break;
case 4:
rtcconfig = helper.UpdateByte(rtcconfig, 0, true);
rtcconfig = helper.UpdateByte(rtcconfig, 1, true);
break;
default:
throw new ArgumentOutOfRangeException(nameof(frequency));
}
helper.WriteI2CByte(RTCi2cbus, CONTROL, rtcconfig);
}
#endregion
/// <summary>
/// Dispose of the resources
/// </summary>
public void Dispose()
{
Dispose(true);
GC.SuppressFinalize(this);
}
/// <summary>
/// Protected implementation of Dispose pattern
/// </summary>
/// <param name="disposing"></param>
protected virtual void Dispose(bool disposing)
{
if (disposed)
return;
if (disposing)
{
handle.Dispose();
// Free any other managed objects here.
adc?.Dispose();
adc = null;
dac?.Dispose();
dac = null;
IOi2cbus?.Dispose();
IOi2cbus = null;
RTCi2cbus?.Dispose();
RTCi2cbus = null;
IsConnected = false;
}
// Free any unmanaged objects here.
//
disposed = true;
}
}
}
<file_sep>/ABElectronics_Win10IOT_Libraries/ADCDACPi.cs
using System;
using Windows.Devices.Enumeration;
using Windows.Devices.Spi;
using Windows.Foundation.Metadata;
namespace ABElectronics_Win10IOT_Libraries
{
/// <summary>
/// Class for accessing the ADCDAC Pi from AB Electronics UK.
/// </summary>
public class ADCDACPi : IDisposable
{
private const string SPI_CONTROLLER_NAME = "SPI0";
private const Int32 ADC_CHIP_SELECT_LINE = 0; // ADC on SPI channel select CE0
private const Int32 DAC_CHIP_SELECT_LINE = 1; // ADC on SPI channel select CE1
private SpiDevice adc;
private double ADCReferenceVoltage = 3.3;
private SpiDevice dac;
/// <summary>
/// Event triggers when a connection is established.
/// </summary>
public bool IsConnected { get; private set; }
// Flag: Has Dispose already been called?
bool disposed = false;
// Instantiate a SafeHandle instance.
System.Runtime.InteropServices.SafeHandle handle = new Microsoft.Win32.SafeHandles.SafeFileHandle(IntPtr.Zero, true);
/// <summary>
/// Open a connection to the ADCDAC Pi.
/// </summary>
public async void Connect()
{
if (IsConnected)
{
return; // Already connected
}
if(!ApiInformation.IsTypePresent("Windows.Devices.Spi.SpiDevice"))
{
return; // This system does not support this feature: can't connect
}
try
{
// Create SPI initialization settings for the ADC
var adcsettings =
new SpiConnectionSettings(ADC_CHIP_SELECT_LINE)
{
ClockFrequency = 10000000, // SPI clock frequency of 10MHz
Mode = SpiMode.Mode0
};
var spiAqs = SpiDevice.GetDeviceSelector(SPI_CONTROLLER_NAME); // Find the selector string for the SPI bus controller
var devicesInfo = await DeviceInformation.FindAllAsync(spiAqs); // Find the SPI bus controller device with our selector string
if (devicesInfo.Count == 0)
{
return; // Controller not found
}
adc = await SpiDevice.FromIdAsync(devicesInfo[0].Id, adcsettings); // Create an ADC connection with our bus controller and SPI settings
// Create SPI initialization settings for the DAC
var dacSettings =
new SpiConnectionSettings(DAC_CHIP_SELECT_LINE)
{
ClockFrequency = 2000000, // SPI clock frequency of 20MHz
Mode = SpiMode.Mode0
};
dac = await SpiDevice.FromIdAsync(devicesInfo[0].Id, dacSettings); // Create a DAC connection with our bus controller and SPI settings
IsConnected = true; // connection established, set IsConnected to true.
// Fire the Connected event handler
Connected?.Invoke(this, EventArgs.Empty);
}
/* If initialization fails, display the exception and stop running */
catch (Exception ex)
{
IsConnected = false;
throw new Exception("SPI Initialization Failed", ex);
}
}
/// <summary>
/// Event occurs when connection is made.
/// </summary>
public event EventHandler Connected;
/// <summary>
/// Read the voltage from the selected <paramref name="channel" /> on the ADC.
/// </summary>
/// <param name="channel">1 or 2</param>
/// <returns>voltage</returns>
public double ReadADCVoltage(byte channel)
{
if (channel < 1 || channel > 2)
{
throw new ArgumentOutOfRangeException(nameof(channel));
}
var raw = ReadADCRaw(channel);
var voltage = ADCReferenceVoltage / 4096 * raw; // convert the raw value into a voltage based on the reference voltage.
return voltage;
}
/// <summary>
/// Read the raw value from the selected <paramref name="channel" /> on the ADC.
/// </summary>
/// <param name="channel">1 or 2</param>
/// <returns>Integer</returns>
public int ReadADCRaw(byte channel)
{
if (channel < 1 || channel > 2)
{
throw new ArgumentOutOfRangeException(nameof(channel));
}
CheckConnected();
var writeArray = new byte[] { 0x01, (byte) ((1 + channel) << 6), 0x00}; // create the write bytes based on the input channel
var readBuffer = new byte[3]; // this holds the output data
adc.TransferFullDuplex(writeArray, readBuffer); // transfer the adc data
var ret = (short) (((readBuffer[1] & 0x0F) << 8) + readBuffer[2]); // combine the two bytes into a single 16bit integer
return ret;
}
/// <summary>
/// Set the reference <paramref name="voltage" /> for the analogue to digital converter.
/// The ADC uses the raspberry pi 3.3V power as a <paramref name="voltage" /> reference
/// so using this method to set the reference to match the exact output
/// <paramref name="voltage" /> from the 3.3V regulator will increase the accuracy of
/// the ADC readings.
/// </summary>
/// <param name="voltage">double</param>
public void SetADCrefVoltage(double voltage)
{
CheckConnected();
if (voltage < 0.0 || voltage > 7.0)
{
throw new ArgumentOutOfRangeException(nameof(voltage), "Reference voltage must be between 0.0V and 7.0V.");
}
ADCReferenceVoltage = voltage;
}
/// <summary>
/// Set the <paramref name="voltage" /> for the selected channel on the DAC.
/// </summary>
/// <param name="channel">1 or 2</param>
/// <param name="voltage">Voltage can be between 0 and 2.047 volts</param>
public void SetDACVoltage(byte channel, double voltage)
{
// Check for valid channel and voltage variables
if (channel < 1 || channel > 2)
{
throw new ArgumentOutOfRangeException();
}
if (voltage >= 0.0 && voltage < 2.048)
{
var rawval = Convert.ToInt16(voltage / 2.048 * 4096); // convert the voltage into a raw value
SetDACRaw(channel, rawval);
}
else
{
throw new ArgumentOutOfRangeException();
}
}
/// <summary>
/// Set the raw <paramref name="value" /> from the selected <paramref name="channel" /> on the DAC.
/// </summary>
/// <param name="channel">1 or 2</param>
/// <param name="value">Value between 0 and 4095</param>
public void SetDACRaw(byte channel, short value)
{
CheckConnected();
if (channel < 1 || channel > 2)
{
throw new ArgumentOutOfRangeException();
}
// split the raw value into two bytes and send it to the DAC.
var lowByte = (byte) (value & 0xff);
var highByte = (byte) (((value >> 8) & 0xff) | ((channel - 1) << 7) | (0x1 << 5) | (1 << 4));
var writeBuffer = new [] { highByte, lowByte};
dac.Write(writeBuffer);
}
private void CheckConnected()
{
if (!IsConnected)
{
throw new InvalidOperationException("Not connected. You must call .Connect() first.");
}
}
/// <summary>
/// Dispose of the resources
/// </summary>
public void Dispose()
{
Dispose(true);
GC.SuppressFinalize(this);
}
/// <summary>
/// Protected implementation of Dispose pattern
/// </summary>
/// <param name="disposing"></param>
protected virtual void Dispose(bool disposing)
{
if (disposed)
return;
if (disposing)
{
handle.Dispose();
// Free any other managed objects here.
adc?.Dispose();
adc = null;
dac?.Dispose();
dac = null;
IsConnected = false;
}
// Free any unmanaged objects here.
//
disposed = true;
}
}
}<file_sep>/DemoApplication/RTCPi.xaml.cs
using System;
using System.Threading;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
namespace DemoApplication
{
/// <summary>
/// This demonstration shows how to use the RTC Pi class to read and set a date and time
/// </summary>
public sealed partial class RTCPi : Page
{
// create an instance of the RTCPi class called rtc
ABElectronics_Win10IOT_Libraries.RTCPi rtc = new ABElectronics_Win10IOT_Libraries.RTCPi();
// a timer will be used to read from the RTC Pi at 1 second intervals
Timer _timer;
public RTCPi()
{
this.InitializeComponent();
}
private async void bt_Connect_Click(object sender, RoutedEventArgs e)
{
// when the connect button is clicked check that the RTC Pi is not already connected before creating a Connected event handler and connecting to the RTC Pi
if (!rtc.IsConnected)
{
rtc.Connected += Rtc_Connected;
await rtc.Connect();
}
}
private void Rtc_Connected(object sender, EventArgs e)
{
// a connection has been established so start the timer to read the date from the RTC Pi
_timer = new Timer(Timer_Tick, null, 1000, Timeout.Infinite);
}
private async void Timer_Tick(object state)
{
// check that the RTC Pi is still connected
if (rtc.IsConnected)
{
try {
// read the current date and time from the RTC Pi into a DateTime object
DateTime date = rtc.ReadDate();
// invoke a dispatcher to update the date textbox on the page
await Windows.ApplicationModel.Core.CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () =>
{
txt_Date.Text = date.ToString("d MMMM yyyy hh:mm:ss tt");
});
}
catch
{
await Windows.ApplicationModel.Core.CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () =>
{
txt_Date.Text = "Error reading date";
});
}
}
_timer.Change(1000, Timeout.Infinite);
}
private void bt_SetDate_Click(object sender, RoutedEventArgs e)
{
if (rtc.IsConnected)
{
// create a new DateTime object using the values from the Date and Time pickers
DateTime newdate = new DateTime(picker_NewDate.Date.Year, picker_NewDate.Date.Month, picker_NewDate.Date.Day, picker_NewTime.Time.Hours, picker_NewTime.Time.Minutes, picker_NewTime.Time.Seconds);
// update the RTC Pi with the new DateTime object
rtc.SetDate(newdate);
}
}
private void cb_sqw_clicked(object sender, RoutedEventArgs e)
{
// check the value for the SQW checkbox and enable or disable the square wave output pin
if (rtc.IsConnected)
{
if (cb_sqw.IsChecked == true)
{
radio_frequency_clicked(null, null);
rtc.EnableOutput();
}
else
{
rtc.DisableOutput();
}
}
}
private void radio_frequency_clicked(object sender, RoutedEventArgs e)
{
// check which frequency radio button has been clicked and update the frequency for the square wave output
if (rtc.IsConnected)
{
if (radio_frequency1.IsChecked == true)
{
rtc.SetFrequency(1);
}
if (radio_frequency2.IsChecked == true)
{
rtc.SetFrequency(2);
}
if (radio_frequency3.IsChecked == true)
{
rtc.SetFrequency(3);
}
if (radio_frequency4.IsChecked == true)
{
rtc.SetFrequency(4);
}
}
}
private void bt_Back_Clicked(object sender, RoutedEventArgs e)
{
// dispose of the rtc object and go back to the main page
try
{
rtc.Dispose();
}
catch { }
Frame rootFrame = Window.Current.Content as Frame;
rootFrame.Navigate(typeof(MainPage));
}
}
}
<file_sep>/README.md
# AB Electronics UK Windows 10 IOT Libraries and Demos #
This is the Windows 10 IOT Library to work with Raspberry Pi expansion boards from <https://www.abelectronics.co.uk>.
The AB Electronics Windows 10 IOT Library in the ABElectronics_Win10IOT_Libraries directory contains classes for the following Raspberry Pi expansion boards:
**This library is not compatible with the direct memory mapped driver (DMAP).**
## Installing The Library ##
To install ABElectronics-Windows10-IOT, run the following command in the Package Manager Console
``` powershell
Install-Package ABElectronics_Win10IOT_Libraries
```
The library is available from [NuGet](https://www.nuget.org/packages/ABElectronics_Win10IOT_Libraries/).
## Boards ##
### ADC-DAC Pi ###
<https://www.abelectronics.co.uk/products/3/Raspberry-Pi/39/ADC-DAC-Pi-Raspberry-Pi-ADC-and-DAC-expansion-board>
### ADC Pi, ADC Pi Zero and ADC Pi Plus ###
- RP A+, B+, 2, 3 & Zero: <https://www.abelectronics.co.uk/p/69/ADC-Pi-Raspberry-Pi-Analogue-to-Digital-converter>
### Delta Sigma Pi and ADC Differential Pi ###
- RP A+, B+, 2 & 3: <https://www.abelectronics.co.uk/p/65/ADC-Differential-Pi-Raspberry-Pi-Analogue-to-Digital-converter>
### Expander Pi ###
- RP Zero, A+, B+, 2 & 3: <https://www.abelectronics.co.uk/p/50/Expander-Pi>
### IO Pi, IO Pi Zero and IO Pi Plus ###
- RP Pi Zero: <https://www.abelectronics.co.uk/p/71/IO-Pi-Zero>*
- RP A+, B+, 2 & 3: <https://www.abelectronics.co.uk/p/54/IO-Pi-Plus>
### RTC Pi, RTC Pi Zero and RTC Pi Plus ###
- RP Pi Zero: <https://www.abelectronics.co.uk/p/70/RTC-Pi-Zero>*
- RP A+, B+, 2 & 3: <https://www.abelectronics.co.uk/p/52/RTC-Pi-Plus>
### Servo Pi Zero and Servo Pi ###
- RP Pi Zero: <https://www.abelectronics.co.uk/p/72/Servo-PWM-Pi-Zero>*
- RP A+, B+, 2 & 3: <https://www.abelectronics.co.uk/p/44/Servo-PWM-Pi>
> \* Note: Windows 10 IoT won't work on Pi Zero because it's ARMv6. ARMv7+ is required for Windows.
## Demo Applications ##
- The "**DemoApplication**" directory contains a sample GUI application to connect to each of the supported boards and get and set data.
-- The project/solution is written for Visual Studio 2015 running under Windows 10.
If you are not using the Nuget version, you'll need to include the following dll file as a reference in your project:
`ABElectronics_Win10IOT_Libraries\bin\ARM\Release\ABElectronics_Win10IOT_Libraries.dll`.
<file_sep>/ABElectronics_Win10IOT_Libraries/README.md
AB Electronics Windows 10 IOT Libraries
=====
Windows 10 IOT Library to use with Raspberry Pi expansion boards from https://www.abelectronics.co.uk
The AB Electronics Windows 10 IOT Library contains the following classes:
# ADCDACPi
This class contains methods for use with the ADC DAC Pi and ADC DAC Pi Zero from https://www.abelectronics.co.uk/p/74/ADC-DAC-Pi-Zero-Raspberry-Pi-ADC-and-DAC-expansion-board
## Methods:
```
ReadADCVoltage(byte channel)
```
Read the voltage from the selected channel on the ADC
**Parameters:** channel - 1 or 2
**Returns:** number as float between 0 and 2.048
```
ReadADCRaw(byte channel)
```
Read the raw value from the selected channel on the ADC
**Parameters:** channel - 1 or 2
**Returns:** int
```
SetADCrefVoltage(double voltage)
```
Set the reference voltage for the analogue to digital converter.
The ADC uses the raspberry pi 3.3V power as a voltage reference so using this method to set the reference to match the exact output voltage from the 3.3V regulator will increase the accuracy of the ADC readings.
**Parameters:** voltage - double between 0.0 and 7.0
**Returns:** null
```
SetDACVoltage(byte channel, double voltage)
```
Set the voltage for the selected channel on the DAC
**Parameters:** channel - 1 or 2, voltage can be between 0 and 2.047 volts
**Returns:** null
```
SetDACRaw(byte channel, int value)
```
Set the raw value from the selected channel on the DAC
**Parameters:** channel - 1 or 2,value int between 0 and 4095
**Returns:** null
## Usage
To use the ADCDACPi library in your code you must first import the library dll:
```
using ABElectronics_Win10IOT_Libraries;
```
Next you must initialise the ADCDACPi class:
```
ABElectronics_Win10IOT_Libraries.ADCDACPi adcdac = new ABElectronics_Win10IOT_Libraries.ADCDACPi();
```
Next we need to connect to the device and wait for the connection
```
adcdac.Connect();
while (!adcdac.IsConnected)
{
}
```
Set the reference voltage.
```
adcdac.SetADCrefVoltage(3.3);
```
Read the voltage from channel 2
```
double value = adcdac.ReadADCVoltage(2);
```
Set the DAC voltage on channel 2 to 1.5 volts
```
adcdac.SetDACVoltage(2, 1.5);
```
# ADCPi
This class contains methods for use with the ADC Pi, ADC Pi Plus and ADC Pi Zero from https://www.abelectronics.co.uk/p/56/ADC-Pi-Plus-Raspberry-Pi-Analogue-to-Digital-converter
https://www.abelectronics.co.uk/p/69/ADC-Pi-Zero-Raspberry-Pi-Analogue-to-Digital-converter
## Methods:
```
Connect()
```
Connect to the I2C device
**Parameters:** none
**Returns:** null
```
IsConnected()
```
Check if the device is connected
**Parameters:** none
**Returns:** boolean
```
Dispose()
```
Dispose of the active I2C device
**Parameters:** none
**Returns:** null
```
ReadVoltage(byte channel)
```
Read the voltage from the selected channel
**Parameters:** channel as int - 1 to 8
**Returns:** number as double between 0 and 5.0
```
ReadRaw(byte channel)
```
Read the raw int value from the selected channel
**Parameters:** channel as int - 1 to 8
**Returns:** raw integer value from ADC buffer
```
SetPGA(byte gain)
```
Set the gain of the PDA on the chip
**Parameters:** gain as int - 1, 2, 4, 8
**Returns:** null
```
SetBitRate(byte rate)
```
Set the sample bit rate of the adc
**Parameters:** rate as int - 12, 14, 16, 18
**Returns:** null
12 = 12 bit (240SPS max)
14 = 14 bit (60SPS max)
16 = 16 bit (15SPS max)
18 = 18 bit (3.75SPS max)
```
SetConversionMode(bool mode)
```
Set the conversion mode for the adc
**Parameters:** mode as boolean - false = One-shot conversion, true = Continuous conversion
**Returns:** null
## Usage
To use the ADC Pi library in your code you must first import the library dll:
```
using ABElectronics_Win10IOT_Libraries;
```
Next you must initialise the adc class:
```
ABElectronics_Win10IOT_Libraries.ADCPi adc = new ADCPi(0x68, 0x69);
```
The arguments are the two I2C addresses of the ADC chips. The values shown are the default addresses of the ADC board.
Next we need to connect to the device and wait for the connection before setting the bit rate and gain. The sample rate can be 12, 14, 16 or 18
```
adc.Connect();
while (!adc.IsConnected)
{
}
adc.SetBitRate(18);
adc.SetPGA(1);
```
You can now read the voltage from channel 1 with:
```
double readvalue = 0;
readvalue = adc.ReadVoltage(1);
```
# ADCDifferentialPi
This class contains methods for use with the ADC Differential Pi from https://www.abelectronics.co.uk/p/65/ADC-Differential-Pi-Raspberry-Pi-Analogue-to-Digital-converter
## Methods:
```
Connect()
```
Connect to the I2C device
**Parameters:** none
**Returns:** null
```
IsConnected()
```
Check if the device is connected
**Parameters:** none
**Returns:** boolean
```
Dispose()
```
Dispose of the active I2C device
**Parameters:** none
**Returns:** null
```
ReadVoltage(byte channel)
```
Read the voltage from the selected channel
**Parameters:** channel as int - 1 to 8
**Returns:** number as double between 0 and 5.0
```
ReadRaw(byte channel)
```
Read the raw int value from the selected channel
**Parameters:** channel as int - 1 to 8
**Returns:** raw integer value from ADC buffer
```
SetPGA(byte gain)
```
Set the gain of the PDA on the chip
**Parameters:** gain as int - 1, 2, 4, 8
**Returns:** null
```
SetBitRate(byte rate)
```
Set the sample bit rate of the adc
**Parameters:** rate as int - 12, 14, 16, 18
**Returns:** null
12 = 12 bit (240SPS max)
14 = 14 bit (60SPS max)
16 = 16 bit (15SPS max)
18 = 18 bit (3.75SPS max)
```
SetConversionMode(bool mode)
```
Set the conversion mode for the adc
**Parameters:** mode as boolean - false = One-shot conversion, true = Continuous conversion
**Returns:** null
### Usage
To use the Delta Sigma Pi library in your code you must first import the library dll:
```
using ABElectronics_Win10IOT_Libraries;
```
Next you must initialise the adc class:
```
ABElectronics_Win10IOT_Libraries.DeltaSigmaPi adc = new DeltaSigmaPi(0x68, 0x69);
```
The arguments are the two I2C addresses of the ADC chips. The values shown are the default addresses of the Delta Sigma Pi board.
Next we need to connect to the device and wait for the connection before setting the bit rate and gain. The sample rate can be 12, 14, 16 or 18
```
adc.Connect();
while (!adc.IsConnected)
{
}
adc.SetBitRate(18);
adc.SetPGA(1);
```
You can now read the voltage from channel 1 with:
```
double readvalue = 0;
readvalue = adc.ReadVoltage(1);
```
# ExpanderPi
This class contains methods to use with the Expander Pi from
https://www.abelectronics.co.uk/p/50/Expander-Pi
**Note:** Microchip recommends that digital pins 8 (GPA7) and 16 (GPB7) are used as outputs only. This change was made for revision D MCP23017 chips manufactured after June 2020. See the [MCP23017 datasheet](https://www.abelectronics.co.uk/docs/pdf/microchip-mcp23017.pdf) for more information.
## Methods
```
Connect()
```
Connect to the Expander Pi
**Parameters:** none
**Returns:** null
```
IsConnected()
```
Check if the device is connected
**Parameters:** none
**Returns:** boolean
```
Dispose()
```
Dispose of the active device
**Parameters:** none
**Returns:** null
### ADC Methods
```
ADCReadVoltage(byte channel, byte mode)
```
Read the voltage from the selected channel on the ADC.
**Parameters:** channel (1 to 8)
**Parameters:** mode (1 = Single Ended Input, 2 = Differential Input)
**Returns:** voltage
```
ADCReadRaw(byte channel, byte mode)
```
Read the raw value from the selected channel on the ADC.
**Parameters:** channel (1 to 8)
**Parameters:** mode (1 = Single Ended Input, 2 = Differential Input)
**Returns:** voltage
```
ADCSetRefVoltage(double voltage)
```
Set the reference voltage for the analogue to digital converter.
The Expander Pi contains an onboard 4.096V voltage reference.
If you want to use an external reference between 0V and 5V, disconnect the jumper J1 and connect your reference voltage to the Vref pin.
**Parameters:** voltage
**Returns:** null
### DAC Methods
```
DACSetVoltage(byte channel, double voltage, byte gain)
```
Set the voltage for the selected channel on the DAC.
**Parameters:** channel (1 or 2)
**Parameters:** voltage (Voltage will be between 0 and 2.047V when gain is 1, 0 and 4.096V when gain is 2)
**Parameters:** gain (1 or 2)
**Returns:** null
```
DACSetRaw(byte channel, short value, byte gain)
```
Set the voltage for the selected channel on the DAC.
Voltage will be between 0 and 2.047V when gain is 1, 0 and 4.096V when gain is 2
**Parameters:** channel (1 or 2)
**Parameters:** value (0 to 4095)
**Parameters:** gain (1 or 2)
**Returns:** null
### IO Methods
```
IOSetPinDirection(byte pin, bool direction)
```
Sets the IO direction for an individual pin
**Parameters:** pin - 1 to 16, direction - true = input, false = output
**Returns:** null
```
IOSetPortDirection(byte port, byte direction)
```
Sets the IO direction for the specified IO port
**Parameters:** port - 0 = pins 1 to 8, port 1 = pins 9 to 16, direction - true = input, false = output
**Returns:** null
```
IOSetPinPullup(byte pin, bool value)
```
Set the internal 100K pull-up resistors for the selected IO pin
**Parameters:** pin - 1 to 16, value: true = Enabled, false = Disabled
**Returns:** null
```
IOSetPortPullups(byte port, byte value)
```
Set the internal 100K pull-up resistors for the selected IO port
**Parameters:** 0 = pins 1 to 8, 1 = pins 9 to 16, value: true = Enabled, false = Disabled
**Returns:** null
```
IOWritePin(byte pin, bool value)
```
Write to an individual pin 1 - 16
**Parameters:** pin - 1 to 16, value - true = Enabled, false = Disabled
**Returns:** null
```
IOWritePort(byte port, byte value)
```
Write to all pins on the selected port
**Parameters:** port - 0 = pins 1 to 8, port 1 = pins 9 to 16, value - number between 0 and 255 or 0x00 and 0xFF
**Returns:** null
```
IOReadPin(byte pin)
```
Read the value of an individual pin 1 - 16
**Parameters:** pin: 1 to 16
**Returns:** false = logic level low, true = logic level high
```
IOReadPort(byte port)
```
Read all pins on the selected port
**Parameters:** port - 0 = pins 1 to 8, port 1 = pins 9 to 16
**Returns:** number between 0 and 255 or 0x00 and 0xFF
```
IOInvertPort(byte port, byte polarity)
```
Invert the polarity of the pins on a selected port
**Parameters:** port - 0 = pins 1 to 8, port 1 = pins 9 to 16, polarity - 0 = same logic state of the input pin, 1 = inverted logic state of the input pin
**Returns:** null
```
IOInvertPin(byte pin, bool polarity)
```
Invert the polarity of the selected pin
**Parameters:** pin - 1 to 16, polarity - false = same logic state of the input pin, true = inverted logic state of the input pin
**Returns:** null
```
IOMirrorInterrupts(byte value)
```
Mirror Interrupts
**Parameters:** value - 1 = The INT pins are internally connected, 0 = The INT pins are not connected. INTA is associated with PortA and INTB is associated with PortB
**Returns:** null
```
IOSetInterruptPolarity(byte value)
```
This sets the polarity of the INT output pins
**Parameters:** 1 = Active - high. 0 = Active - low.
**Returns:** null
```
IOSetInterruptType(byte port, byte value)
```
Sets the type of interrupt for each pin on the selected port
**Parameters:** port 0 = pins 1 to 8, port 1 = pins 9 to 16, value: number between 0 and 255 or 0x00 and 0xFF. 1 = interrupt is fired when the pin matches the default value, 0 = the interrupt is fired on state change
**Returns:** null
```
IOSetInterruptDefaults(byte port, byte value)
```
These bits set the compare value for pins configured for interrupt-on-change on the selected port.
If the associated pin level is the opposite from the register bit, an interrupt occurs.
**Parameters:** port 0 = pins 1 to 8, port 1 = pins 9 to 16, value: compare value
**Returns:** null
```
IOSetInterruptOnPort(byte port, byte value)
```
Enable interrupts for the pins on the selected port
**Parameters:** port 0 = pins 1 to 8, port 1 = pins 9 to 16, value: number between 0 and 255 or 0x00 and 0xFF
**Returns:** null
```
IOSetInterruptOnPin(byte pin, bool value)
```
Enable interrupts for the selected pin
**Parameters:** pin - 1 to 16, value - true = interrupt enabled, false = interrupt disabled
**Returns:** null
```
IOReadInterruptStatus(byte port)
```
Enable interrupts for the selected pin
**Parameters:** port 0 = pins 1 to 8, port 1 = pins 9 to 16
**Returns:** status
```
IOReadInterruptCapture(byte port)
```
Read the value from the selected port at the time of the last interrupt trigger
**Parameters:** port 0 = pins 1 to 8, port 1 = pins 9 to 16
**Returns:** status
```
IOResetInterrupts()
```
Set the interrupts A and B to 0
**Parameters:** null
**Returns:** null
### RTC Methods
```
RTCSetDate(DateTime date)
```
Set the date and time on the RTC
**Parameters:** date as DateTime
**Returns:** null
```
RTCReadDate()
```
Returns the date from the RTC in ISO 8601 format - YYYY-MM-DDTHH:MM:SS
**Returns:** date as DateTime
```
RTCEnableOutput()
```
Enable the square-wave output on the SQW pin.
**Returns:** null
```
RTCDisableOutput()
```
Disable the square-wave output on the SQW pin.
**Returns:** null
```
RTCSetFrequency(byte frequency)
```
Set the frequency for the square-wave output on the SQW pin.
**Parameters:** frequency - options are: 1 = 1Hz, 2 = 4.096KHz, 3 = 8.192KHz, 4 = 32.768KHz
**Returns:** null
## Usage:
To use the Expander Pi library in your code you must first import the library dll:
```
using ABElectronics_Win10IOT_Libraries;
```
Next you must initialise the io class:
```
ABElectronics_Win10IOT_Libraries.IOPi expi = new ABElectronics_Win10IOT_Libraries.ExpanderPi();
```
Next we need to connect to the device and wait for the connection before setting the digital IO ports to be inputs
```
expi.Connect();
while (!expi.IsConnected)
{
}
expi.IOSetPortDirection(0, 0xFF);
expi.IOSetPortDirection(1, 0xFF);
```
You can now read the input status from pin 1 on the digital IO bus with:
```
bool value = bus1.IOReadPin(1);
```
# IOPi
This class contains methods for use with the IO Pi, IO Pi Plus and IO Pi Zero from
https://www.abelectronics.co.uk/p/54/IO-Pi-Plus
https://www.abelectronics.co.uk/p/71/IO-Pi-Zero
**Note:** Microchip recommends that pin 8 (GPA7) and pin 16 (GPB7) are used as outputs only. This change was made for revision D MCP23017 chips manufactured after June 2020. See the [MCP23017 datasheet](https://www.abelectronics.co.uk/docs/pdf/microchip-mcp23017.pdf) for more information.
## Methods:
```
Connect()
```
Connect to the I2C device
**Parameters:** none
**Returns:** null
```
IsConnected()
```
Check if the device is connected
**Parameters:** none
**Returns:** boolean
```
Dispose()
```
Dispose of the active I2C device
**Parameters:** none
**Returns:** null
```
SetPinDirection(byte pin, bool direction)
```
Sets the IO direction for an individual pin
**Parameters:** pin - 1 to 16, direction - true = input, false = output
**Returns:** null
```
SetPortDirection(byte port, byte direction)
```
Sets the IO direction for the specified IO port
**Parameters:** port - 0 = pins 1 to 8, port 1 = pins 9 to 16, direction - true = input, false = output
**Returns:** null
```
SetPinPullup(byte pin, bool value)
```
Set the internal 100K pull-up resistors for the selected IO pin
**Parameters:** pin - 1 to 16, value: true = Enabled, false = Disabled
**Returns:** null
```
SetPortPullups(byte port, byte value)
```
Set the internal 100K pull-up resistors for the selected IO port
**Parameters:** 0 = pins 1 to 8, 1 = pins 9 to 16, value: true = Enabled, false = Disabled
**Returns:** null
```
WritePin(byte pin, bool value)
```
Write to an individual pin 1 - 16
**Parameters:** pin - 1 to 16, value - true = Enabled, false = Disabled
**Returns:** null
```
WritePort(byte port, byte value)
```
Write to all pins on the selected port
**Parameters:** port - 0 = pins 1 to 8, port 1 = pins 9 to 16, value - number between 0 and 255 or 0x00 and 0xFF
**Returns:** null
```
ReadPin(byte pin)
```
Read the value of an individual pin 1 - 16
**Parameters:** pin: 1 to 16
**Returns:** false = logic level low, true = logic level high
```
ReadPort(byte port)
```
Read all pins on the selected port
**Parameters:** port - 0 = pins 1 to 8, port 1 = pins 9 to 16
**Returns:** number between 0 and 255 or 0x00 and 0xFF
```
InvertPort(byte port, byte polarity)
```
Invert the polarity of the pins on a selected port
**Parameters:** port - 0 = pins 1 to 8, port 1 = pins 9 to 16, polarity - 0 = same logic state of the input pin, 1 = inverted logic state of the input pin
**Returns:** null
```
InvertPin(byte pin, bool polarity)
```
Invert the polarity of the selected pin
**Parameters:** pin - 1 to 16, polarity - false = same logic state of the input pin, true = inverted logic state of the input pin
**Returns:** null
```
MirrorInterrupts(byte value)
```
Mirror Interrupts
**Parameters:** value - 1 = The INT pins are internally connected, 0 = The INT pins are not connected. INTA is associated with PortA and INTB is associated with PortB
**Returns:** null
```
SetInterruptPolarity(byte value)
```
This sets the polarity of the INT output pins
**Parameters:** 1 = Active - high. 0 = Active - low.
**Returns:** null
```
SetInterruptType(byte port, byte value)
```
Sets the type of interrupt for each pin on the selected port
**Parameters:** port 0 = pins 1 to 8, port 1 = pins 9 to 16, value: number between 0 and 255 or 0x00 and 0xFF. 1 = interrupt is fired when the pin matches the default value, 0 = the interrupt is fired on state change
**Returns:** null
```
SetInterruptDefaults(byte port, byte value)
```
These bits set the compare value for pins configured for interrupt-on-change on the selected port.
If the associated pin level is the opposite from the register bit, an interrupt occurs.
**Parameters:** port 0 = pins 1 to 8, port 1 = pins 9 to 16, value: compare value
**Returns:** null
```
SetInterruptOnPort(byte port, byte value)
```
Enable interrupts for the pins on the selected port
**Parameters:** port 0 = pins 1 to 8, port 1 = pins 9 to 16, value: number between 0 and 255 or 0x00 and 0xFF
**Returns:** null
```
SetInterruptOnPin(byte pin, bool value)
```
Enable interrupts for the selected pin
**Parameters:** pin - 1 to 16, value - true = interrupt enabled, false = interrupt disabled
**Returns:** null
```
ReadInterruptStatus(byte port)
```
Enable interrupts for the selected pin
**Parameters:** port 0 = pins 1 to 8, port 1 = pins 9 to 16
**Returns:** status
```
ReadInterruptCapture(byte port)
```
Read the value from the selected port at the time of the last interrupt trigger
**Parameters:** port 0 = pins 1 to 8, port 1 = pins 9 to 16
**Returns:** status
```
ResetInterrupts()
```
Set the interrupts A and B to 0
**Parameters:** null
**Returns:** null
### Usage
To use the IO Pi library in your code you must first import the library dll:
```
using ABElectronics_Win10IOT_Libraries;
```
Next you must initialise the io class:
```
ABElectronics_Win10IOT_Libraries.IOPi bus1 = new ABElectronics_Win10IOT_Libraries.IOPi(0x20);
```
The argument is the I2C addresses of the IO chip. The value shown are the default addresses of the IO board which are 0x20 and 0x21.
Next we need to connect to the device and wait for the connection before setting ports to be inputs
```
bus1.Connect();
while (!bus1.IsConnected)
{
}
bus1.SetPortDirection(0, 0xFF);
bus1.SetPortDirection(1, 0xFF);
```
You can now read the input status from channel 1 with:
```
bool value = bus1.ReadPin(1);
```
# RTCPi
This class contains methods for use with the RTC Pi, RTC Pi Plus and RTC Pi Zero from https://www.abelectronics.co.uk/p/52/RTC-Pi-Plus
https://www.abelectronics.co.uk/p/70/RTC-Pi-Zero
## Methods:
```
Connect()
```
Connect to the I2C device
**Parameters:** none
**Returns:** null
```
IsConnected()
```
Check if the device is connected
**Parameters:** none
**Returns:** boolean
```
Dispose()
```
Dispose of the active I2C device
**Parameters:** none
**Returns:** null
```
SetDate(DateTime date)
```
Set the date and time on the RTC
**Parameters:** date as DateTime
**Returns:** null
```
ReadDate()
```
Returns the date from the RTC in ISO 8601 format - YYYY-MM-DDTHH:MM:SS
**Returns:** date as DateTime
```
EnableOutput()
```
Enable the square-wave output on the SQW pin.
**Returns:** null
```
DisableOutput()
```
Disable the square-wave output on the SQW pin.
**Returns:** null
```
SetFrequency(byte frequency)
```
Set the frequency for the square-wave output on the SQW pin.
**Parameters:** frequency - options are: 1 = 1Hz, 2 = 4.096KHz, 3 = 8.192KHz, 4 = 32.768KHz
**Returns:** null
## Usage
To use the RTC Pi library in your code you must first import the library dll:
```
using ABElectronics_Win10IOT_Libraries;
```
Next you must initialise the rtc class:
```
ABElectronics_Win10IOT_Libraries.RTCPi rtc = new ABElectronics_Win10IOT_Libraries.RTCPi();
```
Next we need to connect to the device and wait for the connection
```
rtc.Connect();
while (!rtc.IsConnected)
{
}
```
You can set the date and time from the RTC chip to be the 25th December 2015 at 6 AM with:
```
DateTime newdate = new DateTime(2015, 12, 25, 06, 00, 00);
rtc.SetDate(newdate);
```
You can read the date and time from the RTC chip with:
```
DateTime value = rtc.ReadDate();
```
# ServoPi
This class contains methods for use with the ServoPi and Servo PWM Pi Zero from
https://www.abelectronics.co.uk/p/72/Servo-PWM-Pi-Zero
## Methods:
```
Connect()
```
Connect to the I2C device
**Parameters:** none
**Returns:** null
```
IsConnected()
```
Check if the device is connected
**Parameters:** none
**Returns:** boolean
```
Dispose()
```
Dispose of the active I2C device
**Parameters:** none
**Returns:** null
```
SetPwmFreq(freq)
```
Set the PWM frequency
**Parameters:** freq - required frequency
**Returns:** null
```
SetPwm(channel, on, off)
```
Set the output on single channels
**Parameters:** channel - 1 to 16, on - time period, off - time period
**Returns:** null
```
SetAllPwm( on, off)
```
Set the output on all channels
**Parameters:** on - time period, off - time period
**Returns:** null
```
byte OutputEnablePin { get; set; }
```
**Parameters:** Set the GPIO pin for the output enable function.
**Returns:** null
**Notes:** The default GPIO pin 4 is not supported in Windows 10 IOT so the OE pad will need to be connected to a different GPIO pin.
```
OutputDisable()
```
Disable the output via OE pin
**Parameters:** null
**Returns:** null
```
OutputEnable()
```
Enable the output via OE pin
**Parameters:** null
**Returns:** null
## Usage
To use the ServoPi Pi library in your code you must first import the library dll:
```
using ABElectronics_Win10IOT_Libraries;
```
Next you must initialise the ServoPi class:
```
ABElectronics_Win10IOT_Libraries.ServoPi servo = new ABElectronics_Win10IOT_Libraries.ServoPi(0x40);
```
The argument is the I2C addresses of the Servo Pi chip.
Next we need to connect to the device and wait for the connection
```
servo.Connect();
while (!servo.IsConnected)
{
}
```
Set PWM frequency to 60 Hz and enable the output
```
servo.SetPWMFreqency(60);
```
**Optional**
You can set the enable pin to use the output enable functions and the enable and disable the output.
The default GPIO pin 4 is not supported in Windows 10 IOT and so the OE pad will need to be connected to a different GPIO pin to use this functionality.
```
servo.OutputEnablePin(17); // set to GPIO pin 17
servo.OutputEnable();
```
```
Move the servo to a position and exit the application.
```
servo.SetPWM(1, 0, 300);
```
<file_sep>/ABElectronics_Win10IOT_Libraries/ABE_Helpers.cs
using System;
using Windows.Devices.I2c;
namespace ABElectronics_Win10IOT_Libraries
{
/// <summary>
/// Helpers for the ABElectronics library.
/// </summary>
internal class ABE_Helpers
{
internal const string I2C_CONTROLLER_NAME = "I2C1";
/// <summary>
/// Updates the value of a single bit within a byte and returns the updated byte
/// </summary>
/// <param name="value">The byte to update</param>
/// <param name="position">Position of the bit to change</param>
/// <param name="bitstate">The new bit value</param>
/// <returns>Updated byte</returns>
internal byte UpdateByte(byte value, byte position, bool bitstate)
{
if (bitstate)
{
//left-shift 1, then bitwise OR
return (byte) (value | (1 << position));
}
//left-shift 1, then take complement, then bitwise AND
return (byte) (value & ~(1 << position));
}
/// <summary>
/// Updates the value of a single bit within an int and returns the updated int
/// </summary>
/// <param name="value">The int to update</param>
/// <param name="position">Position of the bit to change</param>
/// <param name="bitstate">The new bit value</param>
/// <returns>Updated int</returns>
internal int UpdateInt(int value, byte position, bool bitstate)
{
if (bitstate)
{
//left-shift 1, then bitwise OR
return value | (1 << position);
}
//left-shift 1, then take complement, then bitwise AND
return value & ~(1 << position);
}
/// <summary>
/// Checks the value of a single bit within a byte.
/// </summary>
/// <param name="value">The value to query</param>
/// <param name="position">The bit position within the byte</param>
/// <returns>boolean value of the asked bit</returns>
internal bool CheckBit(byte value, byte position)
{
// internal method for reading the value of a single bit within a byte
return (value & (1 << position)) != 0;
}
/// <summary>
/// Checks the value of a single bit within an int.
/// </summary>
/// <param name="value">The value to query</param>
/// <param name="position">The bit position within the byte</param>
/// <returns>boolean value of the asked bit</returns>
internal bool CheckIntBit(int value, byte position)
{
// internal method for reading the value of a single bit within a byte
return (value & (1 << position)) != 0;
}
/// <summary>
/// Writes a single byte to an I2C device.
/// </summary>
/// <param name="bus">I2C device</param>
/// <param name="register">Address register</param>
/// <param name="value">Value to write to the register</param>
internal void WriteI2CByte(I2cDevice bus, byte register, byte value)
{
var writeBuffer = new[] { register, value};
try
{
bus.Write(writeBuffer);
}
catch (Exception)
{
throw;
}
}
/// <summary>
/// Writes a single byte to an I2C device.
/// </summary>
/// <param name="bus">I2C device</param>
/// <param name="value">Value to write to the register</param>
internal void WriteI2CSingleByte(I2cDevice bus, byte value)
{
byte[] writeBuffer = {value};
try
{
bus.Write(writeBuffer);
}
catch (Exception)
{
throw;
}
}
/// <summary>
/// Read a single byte from an I2C device.
/// </summary>
/// <param name="bus">I2C device</param>
/// <param name="register">Address register to read from</param>
/// <returns>Read value</returns>
internal byte ReadI2CByte(I2cDevice bus, byte register)
{
try
{
var readBuffer = new[] { register};
var returnValue = new byte[1];
bus.WriteRead(readBuffer, returnValue);
return returnValue[0];
}
catch (Exception)
{
throw;
}
}
/// <summary>
/// Read a single byte from an I2C device.
/// </summary>
/// <param name="bus">I2C device</param>
/// <param name="register">Address register to read from</param>
/// <param name="bytesToReturn">Number of bytes to return</param>
/// <returns>Read block of bytes</returns>
internal byte[] ReadI2CBlockData(I2cDevice bus, byte register, byte bytesToReturn)
{
try
{
var readBuffer = new[] { register };
var returnValue = new byte[bytesToReturn];
bus.WriteRead(readBuffer, returnValue);
return returnValue;
}
catch (Exception)
{
throw;
}
}
}
}<file_sep>/DemoApplication/ADCPi.xaml.cs
using System;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using System.Threading;
namespace DemoApplication
{
/// <summary>
/// This demonstration shows how to read from the ADC Pi and update the bit rate and gain.
/// </summary>
public sealed partial class ADCPi : Page
{
// create an instance of the ADCPi class called adc
ABElectronics_Win10IOT_Libraries.ADCPi adc = new ABElectronics_Win10IOT_Libraries.ADCPi();
// set the time interval for sampling from the ADC and create a timer
int TIME_INTERVAL_IN_MILLISECONDS = 10;
Timer _timer;
// this will be used to measure the sample rate from the ADC Pi
DateTime startTime;
// used to start and stop the sampling
bool run = false;
// temporary variables where the ADC values will be stored
double channel1_value = 0;
double channel2_value = 0;
double channel3_value = 0;
double channel4_value = 0;
double channel5_value = 0;
double channel6_value = 0;
double channel7_value = 0;
double channel8_value = 0;
public ADCPi()
{
this.InitializeComponent();
}
private async void bt_Connect_Click(object sender, RoutedEventArgs e)
{
// when the connect button is clicked update the ADC i2c addresses with the values in the textboxes on the page
try
{
adc.Address1 = Convert.ToByte(txt_Address1.Text.Replace("0x", ""), 16);
adc.Address2 = Convert.ToByte(txt_Address2.Text.Replace("0x", ""), 16);
}
catch (Exception ex)
{
throw ex;
}
// create a Connected event handler and connect to the ADC Pi.
adc.Connected += Adc_Connected;
await adc.Connect();
}
private void Adc_Connected(object sender, EventArgs e)
{
// The ADC Pi is connected
// set the initial bit rate to 16
adc.SetBitRate(16);
radio_bitrate12.IsChecked = false;
radio_bitrate14.IsChecked = false;
radio_bitrate16.IsChecked = true;
radio_bitrate18.IsChecked = false;
// set the gain to 1
adc.SetPGA(1);
radio_Gain1.IsChecked = true;
radio_Gain2.IsChecked = false;
radio_Gain4.IsChecked = false;
radio_Gain8.IsChecked = false;
// set the startTime to be now and start the timer
startTime = DateTime.Now;
_timer = new Timer(ReadADC, null, TIME_INTERVAL_IN_MILLISECONDS, Timeout.Infinite);
}
private async void ReadADC(object state)
{
// check to see if the run is true
if (run)
{
// get the voltage values from all 8 ADC channels
channel1_value = adc.ReadVoltage(1);
channel2_value = adc.ReadVoltage(2);
channel3_value = adc.ReadVoltage(3);
channel4_value = adc.ReadVoltage(4);
channel5_value = adc.ReadVoltage(5);
channel6_value = adc.ReadVoltage(6);
channel7_value = adc.ReadVoltage(7);
channel8_value = adc.ReadVoltage(8);
// use a dispatcher event to update the textboxes on the page
await Windows.ApplicationModel.Core.CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () =>
{
txt_Channel1.Text = channel1_value.ToString("F4");
txt_Channel2.Text = channel2_value.ToString("F4");
txt_Channel3.Text = channel3_value.ToString("F4");
txt_Channel4.Text = channel4_value.ToString("F4");
txt_Channel5.Text = channel5_value.ToString("F4");
txt_Channel6.Text = channel6_value.ToString("F4");
txt_Channel7.Text = channel7_value.ToString("F4");
txt_Channel8.Text = channel8_value.ToString("F4");
});
// calculate how long it has been since the last reading and use that to work out the sample rate
TimeSpan duration = DateTime.Now.Subtract(startTime);
startTime = DateTime.Now;
WriteMessage((1000 / (duration.TotalMilliseconds / 8)).ToString("F2") + "sps");
// reset the timer so it will run again after the preset period
_timer.Change(TIME_INTERVAL_IN_MILLISECONDS, Timeout.Infinite);
}
}
private void radio_bitrate_clicked(object sender, RoutedEventArgs e)
{
// find out which radio button was clicked and use that to update the bit rate for the ADC
RadioButton cb = (RadioButton)sender;
if (adc.IsConnected == true)
{
adc.SetBitRate(Convert.ToByte(cb.Content.ToString()));
}
else
{
WriteMessage("ADC not connected.");
}
}
private void radio_gain_clicked(object sender, RoutedEventArgs e)
{
// find out which radio button was clicked and use that to update the gain for the ADC
RadioButton cb = (RadioButton)sender;
if (adc.IsConnected == true)
{
adc.SetPGA(Convert.ToByte(cb.Content.ToString()));
}
else
{
WriteMessage("ADC not connected.");
}
}
private void bt_Back_Clicked(object sender, RoutedEventArgs e)
{
// go back to the main page
Frame rootFrame = Window.Current.Content as Frame;
rootFrame.Navigate(typeof(MainPage));
}
private async void WriteMessage(string message)
{
// WriteMessage is used to update the message box on the page
await Windows.ApplicationModel.Core.CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () =>
{
txt_Message.Text = message;
});
}
private void bt_Start_Click(object sender, RoutedEventArgs e)
{
// set run to be true and call ReadADC to start the ADC reading
run = true;
ReadADC(null);
}
private void bt_Stop_Click(object sender, RoutedEventArgs e)
{
// set run to false to stop the ADC from reading
run = false;
}
}
}
<file_sep>/ABElectronics_Win10IOT_Libraries/ADCDifferentialPi.cs
using System;
using System.Threading.Tasks;
using Windows.Devices.Enumeration;
using Windows.Devices.I2c;
using Windows.Foundation.Metadata;
namespace ABElectronics_Win10IOT_Libraries
{
/// <summary>
/// Class for controlling the ADC Differential Pi and Delta-Sigma Pi expansion board from AB Electronics UK
/// </summary>
public class ADCDifferentialPi : IDisposable
{
// create byte array and fill with initial values to define size
private Byte[] __adcreading = {0, 0, 0, 0};
private byte bitrate = 18; // current bit rate
// Flag: Has Dispose already been called?
bool disposed = false;
// Instantiate a SafeHandle instance.
System.Runtime.InteropServices.SafeHandle handle = new Microsoft.Win32.SafeHandles.SafeFileHandle(IntPtr.Zero, true);
// internal variables
private byte config1 = 0x9C; // PGAx1, 18 bit, continuous conversion, channel 1
private byte config2 = 0x9C; // PGAx1, 18 bit, continuous-shot conversion, channel 1
private byte conversionmode = 1; // Conversion Mode
private byte currentchannel1; // channel variable for ADC 1
private byte currentchannel2; // channel variable for ADC 2
private readonly ABE_Helpers helper = new ABE_Helpers();
private I2cDevice i2cbus1; // i2c bus for ADC chip 1
private I2cDevice i2cbus2; // i2c bus for ADC chip 2
private double lsb = 0.0000078125; // default LSB value for 18 bit
private double pga = 0.5; // current PGA setting
private bool signbit;
/// <summary>
/// Create an instance of a Delta-Sigma Pi bus.
/// </summary>
/// <param name="i2caddress1">I2C address for the U1 (channels 1 - 4)</param>
/// <param name="i2caddress2">I2C address for the U2 (channels 5 - 8)</param>
public ADCDifferentialPi(byte i2caddress1 = 0x68, byte i2caddress2 = 0x69)
{
Address1 = i2caddress1;
Address2 = i2caddress2;
IsConnected = false;
}
/// <summary>
/// I2C address for the U1 (channels 1 - 4).
/// </summary>
public byte Address1 { get; set; }
/// <summary>
/// I2C address for the U2 (channels 5 - 8).
/// </summary>
public byte Address2 { get; set; }
/// <summary>
/// Shows if there is a connection with the ADC Pi.
/// </summary>
public bool IsConnected { get; private set; }
/// <summary>
/// Open a connection with the Delta-Sigma Pi.
/// </summary>
public async Task Connect()
{
if (IsConnected)
{
return; // Already connected
}
if (!ApiInformation.IsTypePresent("Windows.Devices.I2c.I2cDevice"))
{
return; // This system does not support this feature: can't connect
}
// Initialize both I2C busses
try
{
var aqs = I2cDevice.GetDeviceSelector(ABE_Helpers.I2C_CONTROLLER_NAME); // Find the selector string for the I2C bus controller
var dis = await DeviceInformation.FindAllAsync(aqs); // Find the I2C bus controller device with our selector string
if (dis.Count == 0)
{
return; // Controller not found
}
var settings1 = new I2cConnectionSettings(Address1) {BusSpeed = I2cBusSpeed.FastMode};
var settings2 = new I2cConnectionSettings(Address2) {BusSpeed = I2cBusSpeed.FastMode};
i2cbus1 = await I2cDevice.FromIdAsync(dis[0].Id, settings1); // Create an I2cDevice with our selected bus controller and I2C settings
i2cbus2 = await I2cDevice.FromIdAsync(dis[0].Id, settings2); // Create an I2cDevice with our selected bus controller and I2C settings
// check if the i2c busses are not null
if (i2cbus1 != null && i2cbus2 != null)
{
// set the initial bit rate and trigger a Connected event handler
IsConnected = true;
SetBitRate(bitrate);
// Fire the Connected event handler
Connected?.Invoke(this, EventArgs.Empty);
}
}
catch(Exception ex)
{
IsConnected = false;
throw new Exception("I2C Initialization Failed", ex);
}
}
/// <summary>
/// Event occurs when connection is made.
/// </summary>
public event EventHandler Connected;
/// <summary>
/// Private method for updating the configuration to the selected <paramref name="channel" />.
/// </summary>
/// <param name="channel">ADC channel, 1 - 8</param>
private void SetChannel(byte channel)
{
if (channel < 5 && channel != currentchannel1)
{
switch (channel)
{
case 1:
config1 = helper.UpdateByte(config1, 5, false);
config1 = helper.UpdateByte(config1, 6, false);
currentchannel1 = 1;
break;
case 2:
config1 = helper.UpdateByte(config1, 5, true);
config1 = helper.UpdateByte(config1, 6, false);
currentchannel1 = 2;
break;
case 3:
config1 = helper.UpdateByte(config1, 5, false);
config1 = helper.UpdateByte(config1, 6, true);
currentchannel1 = 3;
break;
case 4:
config1 = helper.UpdateByte(config1, 5, true);
config1 = helper.UpdateByte(config1, 6, true);
currentchannel1 = 4;
break;
}
}
else if (channel >= 5 && channel <= 8 && channel != currentchannel2)
{
switch (channel)
{
case 5:
config2 = helper.UpdateByte(config2, 5, false);
config2 = helper.UpdateByte(config2, 6, false);
currentchannel2 = 5;
break;
case 6:
config2 = helper.UpdateByte(config2, 5, true);
config2 = helper.UpdateByte(config2, 6, false);
currentchannel2 = 6;
break;
case 7:
config2 = helper.UpdateByte(config2, 5, false);
config2 = helper.UpdateByte(config2, 6, true);
currentchannel2 = 7;
break;
case 8:
config2 = helper.UpdateByte(config2, 5, true);
config2 = helper.UpdateByte(config2, 6, true);
currentchannel2 = 8;
break;
}
}
}
/// <summary>
/// Returns the voltage from the selected ADC <paramref name="channel" />.
/// </summary>
/// <param name="channel">1 to 8</param>
/// <returns>Read voltage</returns>
public double ReadVoltage(byte channel)
{
var raw = ReadRaw(channel);
double voltage = 0;
if (signbit)
{
voltage = raw * (lsb / pga) - 2.048 / (pga * 2);
}
else
{
voltage = raw * (lsb / pga);
}
return voltage;
}
/// <summary>
/// Reads the raw value from the selected ADC <paramref name="channel" />.
/// </summary>
/// <param name="channel">1 to 8</param>
/// <returns>raw integer value from ADC buffer</returns>
public int ReadRaw(byte channel)
{
CheckConnected();
byte h = 0;
byte l = 0;
byte m = 0;
byte s = 0;
byte config = 0;
var t = 0;
signbit = false;
I2cDevice bus;
SetChannel(channel);
// get the configuration and i2c bus for the selected channel
if (channel < 5)
{
config = config1;
bus = i2cbus1;
}
else if (channel >= 5 && channel <= 8)
{
config = config2;
bus = i2cbus2;
}
else
{
throw new ArgumentOutOfRangeException(nameof(channel));
}
// set the configuration register for the selected channel
// if the conversion mode is set to one-shot update the ready bit to 1
if (conversionmode == 0)
{
config = helper.UpdateByte(config, 7, true);
helper.WriteI2CByte(bus, config, 0x00);
config = helper.UpdateByte(config, 7, false);
}
// keep reading the ADC data until the conversion result is ready
var timeout = 10000; // number of reads before a timeout occurs
var x = 0;
do
{
if (bitrate == 18)
{
__adcreading = helper.ReadI2CBlockData(bus, config, 4);
h = __adcreading[0];
m = __adcreading[1];
l = __adcreading[2];
s = __adcreading[3];
}
else
{
__adcreading = helper.ReadI2CBlockData(bus, config, 3);
h = __adcreading[0];
m = __adcreading[1];
s = __adcreading[2];
}
// check bit 7 of s to see if the conversion result is ready
if (!helper.CheckBit(s, 7))
{
break;
}
if (x > timeout)
{
// timeout occurred
throw new TimeoutException();
}
x++;
} while (true);
// extract the returned bytes and combine in the correct order
switch (bitrate)
{
case 18:
t = ((h & 3) << 16) | (m << 8) | l;
signbit = helper.CheckIntBit(t, 17);
if (signbit)
{
t = helper.UpdateInt(t, 17, false);
}
break;
case 16:
t = (h << 8) | m;
signbit = helper.CheckIntBit(t, 15);
if (signbit)
{
t = helper.UpdateInt(t, 15, false);
}
break;
case 14:
t = ((h & 63) << 8) | m;
signbit = helper.CheckIntBit(t, 13);
if (signbit)
{
t = helper.UpdateInt(t, 13, false);
}
break;
case 12:
t = ((h & 15) << 8) | m;
signbit = helper.CheckIntBit(t, 11);
if (signbit)
{
t = helper.UpdateInt(t, 11, false);
}
break;
default:
throw new InvalidOperationException("Invalid Bitrate");
}
return t;
}
/// <summary>
/// Set the PGA (Programmable Gain Amplifier) <paramref name="gain"/>.
/// </summary>
/// <param name="gain">Set to 1, 2, 4 or 8</param>
public void SetPGA(byte gain)
{
CheckConnected();
switch (gain)
{
case 1:
config1 = helper.UpdateByte(config1, 0, false);
config1 = helper.UpdateByte(config1, 1, false);
config2 = helper.UpdateByte(config2, 0, false);
config2 = helper.UpdateByte(config2, 1, false);
pga = 0.5;
break;
case 2:
config1 = helper.UpdateByte(config1, 0, true);
config1 = helper.UpdateByte(config1, 1, false);
config2 = helper.UpdateByte(config2, 0, true);
config2 = helper.UpdateByte(config2, 1, false);
pga = 1;
break;
case 4:
config1 = helper.UpdateByte(config1, 0, false);
config1 = helper.UpdateByte(config1, 1, true);
config2 = helper.UpdateByte(config2, 0, false);
config2 = helper.UpdateByte(config2, 1, true);
pga = 2;
break;
case 8:
config1 = helper.UpdateByte(config1, 0, true);
config1 = helper.UpdateByte(config1, 1, true);
config2 = helper.UpdateByte(config2, 0, true);
config2 = helper.UpdateByte(config2, 1, true);
pga = 4;
break;
default:
throw new ArgumentOutOfRangeException(nameof(gain));
}
// helper.WriteI2CSingleByte(i2cbus1, config1);
// helper.WriteI2CSingleByte(i2cbus2, config2);
}
/// <summary>
/// Set the sample resolution (rate).
/// </summary>
/// <param name="rate">
/// 12 = 12 bit(240SPS max),
/// 14 = 14 bit(60SPS max),
/// 16 = 16 bit(15SPS max),
/// 18 = 18 bit(3.75SPS max)
/// </param>
public void SetBitRate(byte rate)
{
CheckConnected();
switch (rate)
{
case 12:
config1 = helper.UpdateByte(config1, 2, false);
config1 = helper.UpdateByte(config1, 3, false);
config2 = helper.UpdateByte(config2, 2, false);
config2 = helper.UpdateByte(config2, 3, false);
bitrate = 12;
lsb = 0.0005;
break;
case 14:
config1 = helper.UpdateByte(config1, 2, true);
config1 = helper.UpdateByte(config1, 3, false);
config2 = helper.UpdateByte(config2, 2, true);
config2 = helper.UpdateByte(config2, 3, false);
bitrate = 14;
lsb = 0.000125;
break;
case 16:
config1 = helper.UpdateByte(config1, 2, false);
config1 = helper.UpdateByte(config1, 3, true);
config2 = helper.UpdateByte(config2, 2, false);
config2 = helper.UpdateByte(config2, 3, true);
bitrate = 16;
lsb = 0.00003125;
break;
case 18:
config1 = helper.UpdateByte(config1, 2, true);
config1 = helper.UpdateByte(config1, 3, true);
config2 = helper.UpdateByte(config2, 2, true);
config2 = helper.UpdateByte(config2, 3, true);
bitrate = 18;
lsb = 0.0000078125;
break;
default:
throw new ArgumentOutOfRangeException(nameof(rate));
}
// helper.WriteI2CSingleByte(i2cbus1, config1);
// helper.WriteI2CSingleByte(i2cbus2, config2);
}
/// <summary>
/// Set the conversion <paramref name="mode" /> for ADC.
/// </summary>
/// <param name="mode">0 = One shot conversion mode, 1 = Continuous conversion mode</param>
private void SetConversionMode(bool mode)
{
if (mode)
{
config1 = helper.UpdateByte(config1, 4, true);
config2 = helper.UpdateByte(config2, 4, true);
conversionmode = 1;
}
else
{
config1 = helper.UpdateByte(config1, 4, false);
config2 = helper.UpdateByte(config2, 4, false);
conversionmode = 0;
}
}
private void CheckConnected()
{
if (!IsConnected)
{
throw new InvalidOperationException("Not connected. You must call .Connect() first.");
}
}
/// <summary>
/// Dispose of the resources
/// </summary>
public void Dispose()
{
Dispose(true);
GC.SuppressFinalize(this);
}
/// <summary>
/// Protected implementation of Dispose pattern
/// </summary>
/// <param name="disposing"></param>
protected virtual void Dispose(bool disposing)
{
if (disposed)
return;
if (disposing)
{
handle.Dispose();
// Free any other managed objects here.
i2cbus1?.Dispose();
i2cbus1 = null;
i2cbus2?.Dispose();
i2cbus2 = null;
IsConnected = false;
}
// Free any unmanaged objects here.
//
disposed = true;
}
}
}<file_sep>/DemoApplication/ServoPi.xaml.cs
using System;
using System.Diagnostics;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
namespace DemoApplication
{
/// <summary>
/// This demonstration shows how to use the PWM outputs on the Servo Pi from AB Electronics UK
/// </summary>
public sealed partial class ServoPi : Page
{
ABElectronics_Win10IOT_Libraries.ServoPi servo = new ABElectronics_Win10IOT_Libraries.ServoPi();
public ServoPi()
{
this.InitializeComponent();
}
private async void bt_Connect_Click(object sender, RoutedEventArgs e)
{
// check if the servo pi is already connected and if the i2c address textbox contains a value
if ((!servo.IsConnected) && (txt_Address.Text.Length > 0))
{
try
{
// set the i2c address from the textbox value
servo.Address = Convert.ToByte(txt_Address.Text.Replace("0x", ""), 16);
// create a Connected event listener and connect to the servo pi
servo.Connected += Servo_Connected; ;
await servo.Connect();
}
catch (Exception ex)
{
throw ex;
}
}
}
private void Servo_Connected(object sender, EventArgs e)
{
// on connection get the value from the frequency slider and set the PWM frequency on the Servo Pi
int frequency = Convert.ToInt32(slider_Frequency.Value);
servo.SetPWMFreqency(frequency);
WriteMessage("Connected");
}
private void FrequencySliderChanged(object sender, RangeBaseValueChangedEventArgs e)
{
if (servo.IsConnected)
{
// get the value from the frequency slider and set the PWM frequency on the Servo Pi
int frequency = Convert.ToInt32(slider_Frequency.Value);
servo.SetPWMFreqency(frequency);
}
}
private void ChannelSliderChanged(object sender, RangeBaseValueChangedEventArgs e)
{
if (servo.IsConnected)
{
// Find out which slider was changed and use the slider value to update the PWM value on the Servo Pi
Slider slider = (Slider)sender;
byte channel = Convert.ToByte(slider.Name.ToString().Replace("slider_Channel", ""));
short highvalue = 0;
short lowvalue = Convert.ToInt16(slider.Value);
Debug.WriteLine(highvalue.ToString() + " " + lowvalue.ToString());
servo.SetPWM(channel, highvalue, lowvalue);
}
}
private void cbServoControl_Click(object sender, RoutedEventArgs e)
{
// create an array containing all of the channel sliders
Slider[] sliders = { slider_Channel1, slider_Channel2, slider_Channel3, slider_Channel4, slider_Channel5, slider_Channel6, slider_Channel7, slider_Channel8, slider_Channel9, slider_Channel10, slider_Channel11, slider_Channel12, slider_Channel13, slider_Channel14, slider_Channel15, slider_Channel16 };
// check to see if the checkbox is checked
if (cbServoControl.IsChecked == true)
{
// set the frequency to 60Hz and the slider limits to be 150 to 700
// these values should allow the Servo Pi to control most RC model servos.
slider_Frequency.Value = 60;
servo.SetPWMFreqency(60);
// loop through all of the sliders setting their value, minimum and maximum
foreach (Slider slider in sliders)
{
slider.Value = 425;
slider.Minimum = 150;
slider.Maximum = 700;
}
}
else
{
// reset the sliders to the default limits
foreach (Slider slider in sliders)
{
slider.Value = 0;
slider.Minimum = 0;
slider.Maximum = 4096;
}
}
}
private async void WriteMessage(string message)
{
// used to update the message textbox on the page
await Windows.ApplicationModel.Core.CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () =>
{
txt_Message.Text = message;
});
}
private void bt_Back_Clicked(object sender, RoutedEventArgs e)
{
// dispose of the servo pi and go back to the main page
try
{
servo.Dispose();
}
catch { }
Frame rootFrame = Window.Current.Content as Frame;
rootFrame.Navigate(typeof(MainPage));
}
}
}
<file_sep>/DemoApplication/IOPi.xaml.cs
using System;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using System.Threading;
namespace DemoApplication
{
/// <summary>
/// This demonstration shows how to use the IO Pi class to write to and read from and IO Pi or IO Pi Plus
/// </summary>
public sealed partial class IOPi : Page
{
// The IO Pi contains two MCP23017 chips so we need to create a separate instance of the IOPi class for each chip and call the bus1 and bus2
public ABElectronics_Win10IOT_Libraries.IOPi bus1 = new ABElectronics_Win10IOT_Libraries.IOPi(0x20);
public ABElectronics_Win10IOT_Libraries.IOPi bus2 = new ABElectronics_Win10IOT_Libraries.IOPi(0x21);
// create two timers for reading from each IO Pi bus
int TIME_INTERVAL_IN_MILLISECONDS = 200;
Timer _timer1;
Timer _timer2;
// used to set the bus direction. true = read, false = write.
bool Bus1_Direction = true;
bool Bus2_Direction = true;
public IOPi()
{
this.InitializeComponent();
// initialise the timers with the preset period
_timer1 = new Timer(Timer1_Tick, null, TIME_INTERVAL_IN_MILLISECONDS, Timeout.Infinite);
_timer2 = new Timer(Timer2_Tick, null, TIME_INTERVAL_IN_MILLISECONDS, Timeout.Infinite);
}
private async void bt_Bus1_Connect_Click(object sender, RoutedEventArgs e)
{
// check to see if there is an address in the textbox for bus 1 and if so connect to the IO Pi
if (txt_Bus1_Address.Text.Length > 0)
{
try {
// get the i2c address from the textbox for bus 1
bus1.Address = Convert.ToByte(txt_Bus1_Address.Text.Replace("0x",""), 16);
// create an event handler for the Connected event and connect to bus 1
bus1.Connected += Bus1_Connected;
await bus1.Connect();
}
catch (Exception ex)
{
throw ex;
}
}
}
private void Bus1_Connected(object sender, EventArgs e)
{
// bus 1 is connected so update the message box, read from the bus and start the timer
WriteMessage("Bus 1 Connected");
ReadBus1();
_timer1.Change(TIME_INTERVAL_IN_MILLISECONDS, Timeout.Infinite);
}
private async void bt_Bus2_Connect_Click(object sender, RoutedEventArgs e)
{
// check to see if there is an address in the textbox for bus 2 and if so connect to the IO Pi
if (txt_Bus2_Address.Text.Length > 0)
{
try
{
// get the i2c address from the textbox for bus 2
bus2.Address = Convert.ToByte(txt_Bus2_Address.Text.Replace("0x", ""), 16);
// create an event handler for the Connected event and connect to bus 2
bus2.Connected += Bus2_Connected;
await bus2.Connect();
}
catch (Exception ex)
{
throw ex;
}
}
}
private void Bus2_Connected(object sender, EventArgs e)
{
// bus 2 is connected so update the message box, read from the bus and start the timer
WriteMessage("Bus 2 Connected");
ReadBus2();
_timer2.Change(TIME_INTERVAL_IN_MILLISECONDS, Timeout.Infinite);
}
private void Timer1_Tick(Object state)
{
// on timer tick check if the bus is connected and read from the bus before resetting the timer
if (bus1.IsConnected)
{
ReadBus1();
_timer1.Change(TIME_INTERVAL_IN_MILLISECONDS, Timeout.Infinite);
}
}
private void Timer2_Tick(Object state)
{
// on timer 2 tick check if the bus is connected and read from the bus before resetting the timer
if (bus2.IsConnected)
{
ReadBus2();
_timer2.Change(TIME_INTERVAL_IN_MILLISECONDS, Timeout.Infinite);
}
}
private async void ReadBus1()
{
// check that the bus is connected
if (bus1.IsConnected)
{
try
{
// invoke the dispatcher to update the checkboxes for bus 1 with the values read from each pin
await Windows.ApplicationModel.Core.CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () => {
Bus1_Channel_01_checkBox.IsChecked = bus1.ReadPin(1);
Bus1_Channel_02_checkBox.IsChecked = bus1.ReadPin(2);
Bus1_Channel_03_checkBox.IsChecked = bus1.ReadPin(3);
Bus1_Channel_04_checkBox.IsChecked = bus1.ReadPin(4);
Bus1_Channel_05_checkBox.IsChecked = bus1.ReadPin(5);
Bus1_Channel_06_checkBox.IsChecked = bus1.ReadPin(6);
Bus1_Channel_07_checkBox.IsChecked = bus1.ReadPin(7);
Bus1_Channel_08_checkBox.IsChecked = bus1.ReadPin(8);
Bus1_Channel_09_checkBox.IsChecked = bus1.ReadPin(9);
Bus1_Channel_10_checkBox.IsChecked = bus1.ReadPin(10);
Bus1_Channel_11_checkBox.IsChecked = bus1.ReadPin(11);
Bus1_Channel_12_checkBox.IsChecked = bus1.ReadPin(12);
Bus1_Channel_13_checkBox.IsChecked = bus1.ReadPin(13);
Bus1_Channel_14_checkBox.IsChecked = bus1.ReadPin(14);
Bus1_Channel_15_checkBox.IsChecked = bus1.ReadPin(15);
Bus1_Channel_16_checkBox.IsChecked = bus1.ReadPin(16);
}
);
}
catch (Exception e)
{
throw e;
}
}
}
private async void ReadBus2()
{
// check that the bus is connected
if (bus2.IsConnected)
{
try
{
// invoke the dispatcher to update the checkboxes for bus 1 with the values read from each pin
await Windows.ApplicationModel.Core.CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () => {
Bus2_Channel_01_checkBox.IsChecked = bus2.ReadPin(1);
Bus2_Channel_02_checkBox.IsChecked = bus2.ReadPin(2);
Bus2_Channel_03_checkBox.IsChecked = bus2.ReadPin(3);
Bus2_Channel_04_checkBox.IsChecked = bus2.ReadPin(4);
Bus2_Channel_05_checkBox.IsChecked = bus2.ReadPin(5);
Bus2_Channel_06_checkBox.IsChecked = bus2.ReadPin(6);
Bus2_Channel_07_checkBox.IsChecked = bus2.ReadPin(7);
Bus2_Channel_08_checkBox.IsChecked = bus2.ReadPin(8);
Bus2_Channel_09_checkBox.IsChecked = bus2.ReadPin(9);
Bus2_Channel_10_checkBox.IsChecked = bus2.ReadPin(10);
Bus2_Channel_11_checkBox.IsChecked = bus2.ReadPin(11);
Bus2_Channel_12_checkBox.IsChecked = bus2.ReadPin(12);
Bus2_Channel_13_checkBox.IsChecked = bus2.ReadPin(13);
Bus2_Channel_14_checkBox.IsChecked = bus2.ReadPin(14);
Bus2_Channel_15_checkBox.IsChecked = bus2.ReadPin(15);
Bus2_Channel_16_checkBox.IsChecked = bus2.ReadPin(16);
}
);
}
catch (Exception e)
{
throw e;
}
}
}
private void Bus1_SetDirection(object sender, RoutedEventArgs e)
{
// read the values from the direction radio buttons and update the bus 1 ports using the SetPortDirection method
if (radio_Bus1_Read.IsChecked == true)
{
if (bus1.IsConnected)
{
bus1.SetPortDirection(0, 0xFF);
bus1.SetPortDirection(1, 0xFF);
Bus1_Direction = true;
WriteMessage("Bus 1 Reading");
}
else
{
radio_Bus1_Read.IsChecked = false;
WriteMessage("Bus 1 not connected");
}
}
if (radio_Bus1_Write.IsChecked == true)
{
if (bus1.IsConnected)
{
bus1.SetPortDirection(0, 0x00);
bus1.SetPortDirection(1, 0x00);
Bus1_Direction = false;
WriteMessage("Bus 1 Writing");
}
else
{
radio_Bus1_Write.IsChecked = false;
WriteMessage("Bus 1 not connected");
}
}
}
private void Bus2_SetDirection(object sender, RoutedEventArgs e)
{
// read the values from the direction radio buttons and update the bus 2 ports using the SetPortDirection method
if (radio_Bus2_Read.IsChecked == true)
{
if (bus2.IsConnected)
{
bus2.SetPortDirection(0, 0xFF);
bus2.SetPortDirection(1, 0xFF);
Bus2_Direction = true;
WriteMessage("Bus 2 Reading");
}
else
{
radio_Bus2_Read.IsChecked = false;
WriteMessage("Bus 2 not connected");
}
}
if (radio_Bus2_Write.IsChecked == true)
{
if (bus2.IsConnected)
{
bus2.SetPortDirection(0, 0x00);
bus2.SetPortDirection(1, 0x00);
Bus2_Direction = false;
WriteMessage("Bus 2 Writing");
}
else
{
radio_Bus2_Write.IsChecked = false;
WriteMessage("Bus 2 not connected");
}
}
}
private void Bus1_EnablePullups(object sender, RoutedEventArgs e)
{
// get the value from the pull-ups checkbox and set the port pull-ups to the required state using the SetPortPullups method
CheckBox cb = (CheckBox)sender;
if (bus1.IsConnected)
{
if (cb.IsChecked == true)
{
bus1.SetPortPullups(0, 0xFF);
bus1.SetPortPullups(1, 0xFF);
}
else
{
bus1.SetPortPullups(0, 0x00);
bus1.SetPortPullups(1, 0x00);
}
}
else
{
cb.IsChecked = false;
WriteMessage("Bus 1 not connected");
}
}
private void Bus2_EnablePullups(object sender, RoutedEventArgs e)
{
// get the value from the pull-ups checkbox and set the port pull-ups to the required state using the SetPortPullups method
CheckBox cb = (CheckBox)sender;
if (bus2.IsConnected)
{
if (cb.IsChecked == true)
{
bus2.SetPortPullups(0, 0xFF);
bus2.SetPortPullups(1, 0xFF);
}
else
{
bus2.SetPortPullups(0, 0x00);
bus2.SetPortPullups(1, 0x00);
}
}
else
{
cb.IsChecked = false;
WriteMessage("Bus 2 not connected");
}
}
private void Bus1_InvertPort(object sender, RoutedEventArgs e)
{
// get the value from the invert port checkbox and set the port to the required state using the InvertPort method
CheckBox cb = (CheckBox)sender;
if (bus1.IsConnected)
{
if (cb.IsChecked == true)
{
bus1.InvertPort(0, 0xFF);
bus1.InvertPort(1, 0xFF);
WriteMessage("Bus 2 Inverted");
}
else
{
bus1.InvertPort(0, 0x00);
bus1.InvertPort(1, 0x00);
WriteMessage("Bus 1 not inverted");
}
}
else
{
cb.IsChecked = false;
WriteMessage("Bus 1 not connected");
}
}
private void Bus2_InvertPort(object sender, RoutedEventArgs e)
{
// get the value from the invert port checkbox and set the port to the required state using the InvertPort method
CheckBox cb = (CheckBox)sender;
if (bus2.IsConnected)
{
if (cb.IsChecked == true)
{
bus2.InvertPort(0, 0xFF);
bus2.InvertPort(1, 0xFF);
WriteMessage("Bus 2 Inverted");
}
else
{
bus2.InvertPort(0, 0x00);
bus2.InvertPort(1, 0x00);
WriteMessage("Bus 2 not inverted");
}
}
else
{
cb.IsChecked = false;
WriteMessage("Bus 2 not connected");
}
}
private void Bus1_EnablePort0(object sender, RoutedEventArgs e)
{
// get the value from the enable port checkbox and set the port values to the required state using the WritePort method
CheckBox cb = (CheckBox)sender;
if (bus1.IsConnected == true)
{
if (Bus1_Direction == false)
{
if (cb.IsChecked == true)
{
bus1.WritePort(0, 0xFF);
}
else
{
bus1.WritePort(0, 0x00);
}
}
else
{
cb.IsChecked = false;
WriteMessage("You can not set a port state in read mode.");
}
}
else
{
cb.IsChecked = false;
WriteMessage("Bus 1 not connected.");
}
}
private void Bus1_EnablePort1(object sender, RoutedEventArgs e)
{
// get the value from the enable port checkbox and set the port values to the required state using the WritePort method
CheckBox cb = (CheckBox)sender;
if (bus1.IsConnected == true)
{
if (Bus1_Direction == false)
{
if (cb.IsChecked == true)
{
bus1.WritePort(1, 0xFF);
}
else
{
bus1.WritePort(1, 0x00);
}
}
else
{
cb.IsChecked = false;
WriteMessage("You can not set a port state in read mode.");
}
}
else
{
cb.IsChecked = false;
WriteMessage("Bus 1 not connected.");
}
}
private void Bus2_EnablePort0(object sender, RoutedEventArgs e)
{
// get the value from the enable port checkbox and set the port values to the required state using the WritePort method
CheckBox cb = (CheckBox)sender;
if (bus2.IsConnected == true)
{
if (Bus2_Direction == false)
{
if (cb.IsChecked == true)
{
bus2.WritePort(0, 0xFF);
}
else
{
bus2.WritePort(0, 0x00);
}
}
else
{
cb.IsChecked = false;
WriteMessage("You can not set a port state in read mode.");
}
}
else
{
cb.IsChecked = false;
WriteMessage("Bus 2 not connected.");
}
}
private void Bus2_EnablePort1(object sender, RoutedEventArgs e)
{
// get the value from the enable port checkbox and set the port values to the required state using the WritePort method
CheckBox cb = (CheckBox)sender;
if (bus2.IsConnected == true)
{
if (Bus2_Direction == false)
{
if (cb.IsChecked == true)
{
bus2.WritePort(1, 0xFF);
}
else
{
bus2.WritePort(1, 0x00);
}
}
else
{
cb.IsChecked = false;
WriteMessage("You can not set a port state in read mode.");
}
}
else
{
cb.IsChecked = false;
WriteMessage("Bus 2 not connected.");
}
}
private void Bus1_PinEnable(object sender, RoutedEventArgs e)
{
// check which pin checkbox was clicked and update the value of that pin to the required state
CheckBox cb = (CheckBox)sender;
if (bus1.IsConnected == true)
{
if (Bus1_Direction == false)
{
if (cb.IsChecked == true)
{
bus1.WritePin(Convert.ToByte(cb.Content.ToString()), true);
}
else
{
bus1.WritePin(Convert.ToByte(cb.Content.ToString()), false);
}
}
else
{
cb.IsChecked = false;
WriteMessage("You can not set a pin state in read mode.");
}
}
else
{
cb.IsChecked = false;
WriteMessage("Bus 2 not connected.");
}
}
private void Bus2_PinEnable(object sender, RoutedEventArgs e)
{
// check which pin checkbox was clicked and update the value of that pin to the required state
CheckBox cb = (CheckBox)sender;
if (bus2.IsConnected == true) {
if (Bus2_Direction == false) {
if (cb.IsChecked == true)
{
bus2.WritePin(Convert.ToByte(cb.Content.ToString()), true);
}
else
{
bus2.WritePin(Convert.ToByte(cb.Content.ToString()), false);
}
}
else
{
cb.IsChecked = false;
WriteMessage("You can not set a pin state in read mode.");
}
}
else
{
cb.IsChecked = false;
WriteMessage("Bus 2 not connected.");
}
}
private async void WriteMessage(string message)
{
// this method updates the Message textbox on the page
await Windows.ApplicationModel.Core.CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () =>
{
txt_Message.Text = message;
});
}
private void bt_Back_Clicked(object sender, RoutedEventArgs e)
{
// go back to the main page
Frame rootFrame = Window.Current.Content as Frame;
rootFrame.Navigate(typeof(MainPage));
}
}
}
<file_sep>/ABElectronics_Win10IOT_Libraries/IOPi.cs
using System;
using System.Threading.Tasks;
using Windows.Devices.Enumeration;
using Windows.Devices.I2c;
using Windows.Foundation.Metadata;
namespace ABElectronics_Win10IOT_Libraries
{
/// <summary>
/// Class for controlling the IO Pi and IO Pi Plus expansion boards from AB Electronics UK
/// Based on the MCP23017 IO expander IC from Microchip.
/// </summary>
public class IOPi : IDisposable
{
// Define registers values from datasheet
/// <summary>
/// IO direction A - 1= input 0 = output
/// </summary>
private const byte IODIRA = 0x00;
/// <summary>
/// IO direction B - 1= input 0 = output
/// </summary>
private const byte IODIRB = 0x01;
/// <summary>
/// Input polarity A - If a bit is set, the corresponding GPIO register bit will reflect the inverted value on the pin.
/// </summary>
private const byte IPOLA = 0x02;
/// <summary>
/// Input polarity B - If a bit is set, the corresponding GPIO register bit will reflect the inverted value on the pin.
/// </summary>
private const byte IPOLB = 0x03;
/// <summary>
/// The GPINTEN register controls the interrupt-on-change feature for each pin on port A.
/// </summary>
private const byte GPINTENA = 0x04;
/// <summary>
/// The GPINTEN register controls the interrupt-on-change feature for each pin on port B.
/// </summary>
private const byte GPINTENB = 0x05;
/// <summary>
/// Default value for port A - These bits set the compare value for pins configured for interrupt-on-change. If the
/// associated pin level is the opposite from the register bit, an interrupt occurs.
/// </summary>
private const byte DEFVALA = 0x06;
/// <summary>
/// Default value for port B - These bits set the compare value for pins configured for interrupt-on-change. If the
/// associated pin level is the opposite from the register bit, an interrupt occurs.
/// </summary>
private const byte DEFVALB = 0x07;
/// <summary>
/// Interrupt control register for port A. If 1 interrupt is fired when the pin matches the default value, if 0 the
/// interrupt is fired on state change.
/// </summary>
private const byte INTCONA = 0x08;
/// <summary>
/// Interrupt control register for port B. If 1 interrupt is fired when the pin matches the default value, if 0 the
/// interrupt is fired on state change.
/// </summary>
private const byte INTCONB = 0x09;
/// <summary>
/// See datasheet for configuration register
/// </summary>
private const byte IOCON = 0x0A;
/// <summary>
/// pull-up resistors for port A
/// </summary>
private const byte GPPUA = 0x0C;
/// <summary>
/// pull-up resistors for port B
/// </summary>
private const byte GPPUB = 0x0D;
/// <summary>
/// The INTFA register reflects the interrupt condition on the port A pins of any pin that is enabled for interrupts. A
/// set bit indicates that the associated pin caused the interrupt.
/// </summary>
private const byte INTFA = 0x0E;
/// <summary>
/// The INTFB register reflects the interrupt condition on the port B pins of any pin that is enabled for interrupts. A
/// set bit indicates that the associated pin caused the interrupt.
/// </summary>
private const byte INTFB = 0x0F;
/// <summary>
/// The INTCAP register captures the GPIO port A value at the time the interrupt occurred.
/// </summary>
private const byte INTCAPA = 0x10;
/// <summary>
/// The INTCAP register captures the GPIO port B value at the time the interrupt occurred.
/// </summary>
private const byte INTCAPB = 0x11;
/// <summary>
/// Data port A.
/// </summary>
private const byte GPIOA = 0x12;
/// <summary>
/// Data port B.
/// </summary>
private const byte GPIOB = 0x13;
/// <summary>
/// Output latches A.
/// </summary>
private const byte OLATA = 0x14;
/// <summary>
/// Output latches B
/// </summary>
private const byte OLATB = 0x15;
private readonly ABE_Helpers helper = new ABE_Helpers();
private byte config = 0x22; // initial configuration - see IOCON page in the MCP23017 datasheet for more information.
private I2cDevice i2cbus; // create an instance of the i2c bus
private byte intA; // interrupt control for port a
private byte intB; // interrupt control for port a
// variables
private byte port_a_dir; // port a direction
private byte port_b_dir; // port b direction
private byte porta_polarity; // input polarity for port a
private byte porta_pullup; // port a pull-up resistors
private byte portaval; // port a value
private byte portb_polarity; // input polarity for port b
private byte portb_pullup; // port a pull-up resistors
private byte portbval; // port b value
// Flag: Has Dispose already been called?
bool disposed = false;
// Instantiate a SafeHandle instance.
System.Runtime.InteropServices.SafeHandle handle = new Microsoft.Win32.SafeHandles.SafeFileHandle(IntPtr.Zero, true);
/// <summary>
/// Create an instance of an IOPi bus.
/// </summary>
/// <param name="i2caddress">I2C Address of IO Pi bus</param>
public IOPi(byte i2caddress)
{
Address = i2caddress;
IsConnected = false;
}
/// <summary>
/// I2C address for the IO Pi bus
/// </summary>
public byte Address { get; set; }
/// <summary>
/// Shows if there is a connection with the IO Pi
/// </summary>
public bool IsConnected { get; private set; }
/// <summary>
/// Open a connection with the IO Pi.
/// </summary>
public async Task Connect()
{
if (IsConnected)
{
return; // Already connected
}
if (!ApiInformation.IsTypePresent("Windows.Devices.I2c.I2cDevice"))
{
return; // This system does not support this feature: can't connect
}
/* Initialize the I2C bus */
try
{
var aqs = I2cDevice.GetDeviceSelector(ABE_Helpers.I2C_CONTROLLER_NAME); // Find the selector string for the I2C bus controller
var dis = await DeviceInformation.FindAllAsync(aqs); // Find the I2C bus controller device with our selector string
if (dis.Count == 0)
{
return; // Controller not found
}
var settings = new I2cConnectionSettings(Address) {BusSpeed = I2cBusSpeed.FastMode};
i2cbus = await I2cDevice.FromIdAsync(dis[0].Id, settings); // Create an I2cDevice with our selected bus controller and I2C settings
if (i2cbus != null)
{
// Set IsConnected to true and fire the Connected event handler
IsConnected = true;
// i2c bus is connected so set up the initial configuration for the IO Pi
helper.WriteI2CByte(i2cbus, IOCON, config);
portaval = helper.ReadI2CByte(i2cbus, GPIOA);
portbval = helper.ReadI2CByte(i2cbus, GPIOB);
helper.WriteI2CByte(i2cbus, IODIRA, 0xFF);
helper.WriteI2CByte(i2cbus, IODIRB, 0xFF);
SetPortPullups(0, 0x00);
SetPortPullups(1, 0x00);
InvertPort(0, 0x00);
InvertPort(1, 0x00);
// Fire the Connected event handler
Connected?.Invoke(this, EventArgs.Empty);
}
}
catch (Exception ex)
{
IsConnected = false;
throw new Exception("I2C Initialization Failed", ex);
}
}
/// <summary>
/// Event occurs when connection is made.
/// </summary>
public event EventHandler Connected;
/// <summary>
/// Set IO <paramref name="direction" /> for an individual pin.
/// </summary>
/// <param name="pin">1 to 16</param>
/// <param name="direction">true = input, false = output</param>
public void SetPinDirection(byte pin, bool direction)
{
CheckConnected();
pin = (byte) (pin - 1);
if (pin < 8)
{
port_a_dir = helper.UpdateByte(port_a_dir, pin, direction);
helper.WriteI2CByte(i2cbus, IODIRA, port_a_dir);
}
else if (pin >= 8 && pin < 16)
{
port_b_dir = helper.UpdateByte(port_b_dir, (byte) (pin - 8), direction);
helper.WriteI2CByte(i2cbus, IODIRB, port_b_dir);
}
else
{
throw new ArgumentOutOfRangeException(nameof(pin));
}
}
/// <summary>
/// get the direction of an individual <paramref name="pin"/>.
/// </summary>
/// <param name="pin">1 - 16</param>
/// <returns>0 = logic level low, 1 = logic level high</returns>
public bool GetPinDirection(byte pin)
{
CheckConnected();
pin = (byte)(pin - 1);
if (pin < 8)
{
port_a_dir = helper.ReadI2CByte(i2cbus, IODIRA);
return helper.CheckBit(port_a_dir, pin);
}
if (pin >= 8 && pin < 16)
{
port_b_dir = helper.ReadI2CByte(i2cbus, IODIRB);
return helper.CheckBit(port_b_dir, (byte)(pin - 8));
}
throw new ArgumentOutOfRangeException(nameof(pin));
}
/// <summary>
/// Set the <paramref name="direction"/> for an IO <paramref name="port"/>.
/// You can control the direction of all 8 pins on a port by sending a single byte value.
/// Each bit in the byte represents one pin so for example 0x0A would set pins 2 and 4 to
/// inputs and all other pins to outputs.
/// </summary>
/// <param name="port">0 = pins 1 to 8, 1 = pins 9 to 16</param>
/// <param name="direction">Direction for all pins on the port. 1 = input, 0 = output</param>
public void SetPortDirection(byte port, byte direction)
{
CheckConnected();
switch (port)
{
case 0:
helper.WriteI2CByte(i2cbus, IODIRA, direction);
port_a_dir = direction;
break;
case 1:
helper.WriteI2CByte(i2cbus, IODIRB, direction);
port_b_dir = direction;
break;
default:
throw new ArgumentOutOfRangeException(nameof(port));
}
}
/// <summary>
/// Set the internal 100K pull-up resistors for an individual pin.
/// </summary>
/// <param name="pin">1 to 16</param>
/// <param name="value">true = enabled, false = disabled</param>
public void SetPinPullup(byte pin, bool value)
{
CheckConnected();
pin = (byte) (pin - 1);
if (pin < 8)
{
porta_pullup = helper.UpdateByte(porta_pullup, pin, value);
helper.WriteI2CByte(i2cbus, GPPUA, porta_pullup);
}
else if (pin >= 8 && pin < 16)
{
portb_pullup = helper.UpdateByte(portb_pullup, (byte) (pin - 8), value);
helper.WriteI2CByte(i2cbus, GPPUB, portb_pullup);
}
else
{
throw new ArgumentOutOfRangeException(nameof(pin));
}
}
/// <summary>
/// get the pull-up status of an individual <paramref name="pin"/>.
/// </summary>
/// <param name="pin">1 - 16</param>
/// <returns>0 = logic level low, 1 = logic level high</returns>
public bool GetPinPullUp(byte pin)
{
CheckConnected();
pin = (byte)(pin - 1);
if (pin < 8)
{
porta_pullup = helper.ReadI2CByte(i2cbus, GPPUA);
return helper.CheckBit(porta_pullup, pin);
}
if (pin >= 8 && pin < 16)
{
portb_pullup = helper.ReadI2CByte(i2cbus, GPPUB);
return helper.CheckBit(portb_pullup, (byte)(pin - 8));
}
throw new ArgumentOutOfRangeException(nameof(pin));
}
/// <summary>
/// set the internal 100K pull-up resistors for the selected IO port.
/// </summary>
/// <param name="port">0 = pins 1 to 8, 1 = pins 9 to 16</param>
/// <param name="value">number between 0 and 255 or 0x00 and 0xFF</param>
public void SetPortPullups(byte port, byte value)
{
CheckConnected();
switch (port)
{
case 0:
porta_pullup = value;
helper.WriteI2CByte(i2cbus, GPPUA, value);
break;
case 1:
portb_pullup = value;
helper.WriteI2CByte(i2cbus, GPPUB, value);
break;
default:
throw new ArgumentOutOfRangeException(nameof(port));
}
}
/// <summary>
/// Write to an individual <paramref name="pin"/>.
/// </summary>
/// <param name="pin">1 - 16</param>
/// <param name="value">0 = logic low, 1 = logic high</param>
public void WritePin(byte pin, bool value)
{
CheckConnected();
pin = (byte) (pin - 1);
if (pin < 8)
{
portaval = helper.UpdateByte(portaval, pin, value);
helper.WriteI2CByte(i2cbus, GPIOA, portaval);
}
else if (pin >= 8 && pin < 16)
{
portbval = helper.UpdateByte(portbval, (byte) (pin - 8), value);
helper.WriteI2CByte(i2cbus, GPIOB, portbval);
}
else
{
throw new ArgumentOutOfRangeException(nameof(pin));
}
}
/// <summary>
/// Write to all pins on the selected <paramref name="port"/>.
/// </summary>
/// <param name="port">0 = pins 1 to 8, 1 = pins 9 to 16</param>
/// <param name="value">number between 0 and 255 or 0x00 and 0xFF</param>
public void WritePort(byte port, byte value)
{
CheckConnected();
switch (port)
{
case 0:
helper.WriteI2CByte(i2cbus, GPIOA, value);
portaval = value;
break;
case 1:
helper.WriteI2CByte(i2cbus, GPIOB, value);
portbval = value;
break;
default:
throw new ArgumentOutOfRangeException(nameof(port));
}
}
/// <summary>
/// read the value of an individual <paramref name="pin"/>.
/// </summary>
/// <param name="pin">1 - 16</param>
/// <returns>0 = logic level low, 1 = logic level high</returns>
public bool ReadPin(byte pin)
{
CheckConnected();
pin = (byte) (pin - 1);
if (pin < 8)
{
portaval = helper.ReadI2CByte(i2cbus, GPIOA);
return helper.CheckBit(portaval, pin);
}
if (pin >= 8 && pin < 16)
{
portbval = helper.ReadI2CByte(i2cbus, GPIOB);
return helper.CheckBit(portbval, (byte) (pin - 8));
}
throw new ArgumentOutOfRangeException(nameof(pin));
}
/// <summary>
/// Read all pins on the selected <paramref name="port"/>.
/// </summary>
/// <param name="port">0 = pins 1 to 8, 1 = pins 9 to 16</param>
/// <returns>returns number between 0 and 255 or 0x00 and 0xFF</returns>
public byte ReadPort(byte port)
{
CheckConnected();
switch (port)
{
case 0:
portaval = helper.ReadI2CByte(i2cbus, GPIOA);
return portaval;
case 1:
portbval = helper.ReadI2CByte(i2cbus, GPIOB);
return portbval;
default:
throw new ArgumentOutOfRangeException(nameof(port));
}
}
/// <summary>
/// Invert the polarity of the pins on a selected <paramref name="port"/>.
/// </summary>
/// <param name="port">0 = pins 1 to 8, 1 = pins 9 to 16</param>
/// <param name="polarity">0x00 - 0xFF (0 = same logic state of the input pin, 1 = inverted logic state of the input pin)</param>
public void InvertPort(byte port, byte polarity)
{
CheckConnected();
switch (port)
{
case 0:
helper.WriteI2CByte(i2cbus, IPOLA, polarity);
porta_polarity = polarity;
break;
case 1:
helper.WriteI2CByte(i2cbus, IPOLB, polarity);
portb_polarity = polarity;
break;
default:
throw new ArgumentOutOfRangeException(nameof(port));
}
}
/// <summary>
/// Invert the <paramref name="polarity" /> of the selected <paramref name="pin" />.
/// </summary>
/// <param name="pin">1 to 16</param>
/// <param name="polarity">False = same logic state of the input pin, True = inverted logic state of the input pin</param>
public void InvertPin(byte pin, bool polarity)
{
CheckConnected();
pin = (byte) (pin - 1);
if (pin < 8)
{
porta_polarity = helper.UpdateByte(porta_polarity, pin, polarity);
helper.WriteI2CByte(i2cbus, IPOLA, porta_polarity);
}
else if (pin >= 8 && pin < 16)
{
portb_polarity = helper.UpdateByte(portb_polarity, (byte) (pin - 8), polarity);
helper.WriteI2CByte(i2cbus, IPOLB, portb_polarity);
}
else
{
throw new ArgumentOutOfRangeException(nameof(pin));
}
}
/// <summary>
/// Sets the mirror status of the interrupt pins.
/// </summary>
/// <param name="value">
/// 0 = The INT pins are not mirrored. INTA is associated with PortA and INTB is associated with PortB.
/// 1 = The INT pins are internally connected
/// </param>
public void MirrorInterrupts(byte value)
{
CheckConnected();
switch (value)
{
case 0:
config = helper.UpdateByte(config, 6, false);
helper.WriteI2CByte(i2cbus, IOCON, config);
break;
case 1:
config = helper.UpdateByte(config, 6, true);
helper.WriteI2CByte(i2cbus, IOCON, config);
break;
default:
throw new ArgumentOutOfRangeException(nameof(value));
}
}
/// <summary>
/// This sets the polarity of the INT output pins.
/// </summary>
/// <param name="value">1 = Active - high. 0 = Active - low.</param>
public void SetInterruptPolarity(byte value)
{
CheckConnected();
switch (value)
{
case 0:
config = helper.UpdateByte(config, 1, false);
helper.WriteI2CByte(i2cbus, IOCON, config);
break;
case 1:
config = helper.UpdateByte(config, 1, true);
helper.WriteI2CByte(i2cbus, IOCON, config);
break;
default:
throw new ArgumentOutOfRangeException(nameof(value));
}
}
/// <summary>
/// This sets the INT output pins to be active driver or open-drain.
/// Setting to open-drain overrides the interrupt polarity.
/// </summary>
/// <param name="value">1 = Open Drain. 0 = Active Driver.</param>
public void SetInterruptOutputType(byte value)
{
CheckConnected();
switch (value)
{
case 0:
config = helper.UpdateByte(config, 2, false);
helper.WriteI2CByte(i2cbus, IOCON, config);
break;
case 1:
config = helper.UpdateByte(config, 2, true);
helper.WriteI2CByte(i2cbus, IOCON, config);
break;
default:
throw new ArgumentOutOfRangeException(nameof(value));
}
}
/// <summary>
/// Sets the type of interrupt for each pin on the selected <paramref name="port"/>.
/// 1 = interrupt is fired when the pin matches the default value.
/// 0 = the interrupt is fired on state change.
/// </summary>
/// <param name="port">0 = pins 1 to 8, 1 = pins 9 to 16</param>
/// <param name="value">number between 0 and 255 or 0x00 and 0xFF</param>
public void SetInterruptType(byte port, byte value)
{
CheckConnected();
switch (port)
{
case 0:
helper.WriteI2CByte(i2cbus, INTCONA, value);
break;
case 1:
helper.WriteI2CByte(i2cbus, INTCONB, value);
break;
default:
throw new ArgumentOutOfRangeException(nameof(port));
}
}
/// <summary>
/// These bits set the compare value for pins configured for interrupt-on-change
/// on the selected <paramref name="port"/>. If the associated pin level is the
/// opposite from the register bit, an interrupt occurs.
/// </summary>
/// <param name="port">0 = pins 1 to 8, 1 = pins 9 to 16</param>
/// <param name="value">number between 0 and 255 or 0x00 and 0xFF</param>
public void SetInterruptDefaults(byte port, byte value)
{
CheckConnected();
switch (port)
{
case 0:
helper.WriteI2CByte(i2cbus, DEFVALA, value);
break;
case 1:
helper.WriteI2CByte(i2cbus, DEFVALB, value);
break;
default:
throw new ArgumentOutOfRangeException(nameof(port));
}
}
/// <summary>
/// Enable interrupts for the pins on the selected <paramref name="port"/>.
/// </summary>
/// <param name="port">0 = pins 1 to 8, 1 = pins 9 to 16</param>
/// <param name="value">number between 0 and 255 or 0x00 and 0xFF</param>
public void SetInterruptOnPort(byte port, byte value)
{
CheckConnected();
switch (port)
{
case 0:
helper.WriteI2CByte(i2cbus, GPINTENA, value);
intA = value;
break;
case 1:
helper.WriteI2CByte(i2cbus, GPINTENB, value);
intB = value;
break;
default:
throw new ArgumentOutOfRangeException(nameof(port));
}
}
/// <summary>
/// Enable interrupts for the selected <paramref name="pin"/>.
/// </summary>
/// <param name="pin">1 to 16</param>
/// <param name="value">0 = interrupt disabled, 1 = interrupt enabled</param>
public void SetInterruptOnPin(byte pin, bool value)
{
CheckConnected();
pin = (byte) (pin - 1);
if (pin < 8)
{
intA = helper.UpdateByte(intA, pin, value);
helper.WriteI2CByte(i2cbus, GPINTENA, intA);
}
else if (pin >= 8 && pin < 16)
{
intB = helper.UpdateByte(intB, (byte) (pin - 8), value);
helper.WriteI2CByte(i2cbus, GPINTENB, intB);
}
else
{
throw new ArgumentOutOfRangeException(nameof(pin));
}
}
/// <summary>
/// Read the interrupt status for the pins on the selected <paramref name="port"/>.
/// </summary>
/// <param name="port">0 = pins 1 to 8, 1 = pins 9 to 16</param>
public byte ReadInterruptStatus(byte port)
{
CheckConnected();
switch (port)
{
case 0:
return helper.ReadI2CByte(i2cbus, INTFA);
case 1:
return helper.ReadI2CByte(i2cbus, INTFB);
default:
throw new ArgumentOutOfRangeException(nameof(port));
}
}
/// <summary>
/// Read the value from the selected <paramref name="port"/> at the time
/// of the last interrupt trigger.
/// </summary>
/// <param name="port">0 = pins 1 to 8, 1 = pins 9 to 16</param>
public byte ReadInterruptCapture(byte port)
{
CheckConnected();
switch (port)
{
case 0:
return helper.ReadI2CByte(i2cbus, INTCAPA);
case 1:
return helper.ReadI2CByte(i2cbus, INTCAPB);
default:
throw new ArgumentOutOfRangeException(nameof(port));
}
}
/// <summary>
/// Reset the interrupts A and B to 0.
/// </summary>
public void ResetInterrupts()
{
CheckConnected();
ReadInterruptCapture(0);
ReadInterruptCapture(1);
}
private void CheckConnected()
{
if (!IsConnected)
{
throw new InvalidOperationException("Not connected. You must call .Connect() first.");
}
}
/// <summary>
/// get the value of a <paramref name="register"/> from the MCP23017.
/// </summary>
/// <param name="register">0 to 255</param>
/// <returns>Register Value</returns>
public byte GetRegister(byte register)
{
CheckConnected();
return helper.ReadI2CByte(i2cbus, register);
}
/// <summary>
/// Dispose of the resources
/// </summary>
public void Dispose()
{
Dispose(true);
GC.SuppressFinalize(this);
}
/// <summary>
/// Protected implementation of Dispose pattern
/// </summary>
/// <param name="disposing"></param>
protected virtual void Dispose(bool disposing)
{
if (disposed)
return;
if (disposing)
{
handle.Dispose();
// Free any other managed objects here.
i2cbus?.Dispose();
i2cbus = null;
IsConnected = false;
}
// Free any unmanaged objects here.
//
disposed = true;
}
}
}
<file_sep>/DemoApplication/ExpanderPi.xaml.cs
using System;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using System.Threading;
using ABElectronics_Win10IOT_Libraries;
namespace DemoApplication
{
/// <summary>
/// This demonstration shows how to use the Expander Pi class to write to and read from the analogue and digital inputs
/// </summary>
public sealed partial class ExpanderPi : Page
{
public ABElectronics_Win10IOT_Libraries.ExpanderPi expi = new ABElectronics_Win10IOT_Libraries.ExpanderPi();
// create two timers. _timer 1 reads from the IO and ADC. _timer2 updates the date from the RTC at 1 second intervals
int TIMER1_INTERVAL_IN_MILLISECONDS = 200;
int TIMER2_INTERVAL_IN_MILLISECONDS = 1000;
Timer _timer1;
Timer _timer2;
// used to set the expander pi direction. true = read, false = write.
bool IO_Direction = true;
public ExpanderPi()
{
this.InitializeComponent();
// initialise the timers with the preset period
_timer1 = new Timer(Timer1_Tick, null, TIMER1_INTERVAL_IN_MILLISECONDS, Timeout.Infinite);
_timer2 = new Timer(Timer2_Tick, null, TIMER2_INTERVAL_IN_MILLISECONDS, Timeout.Infinite);
}
private async void bt_expi_Connect_Click(object sender, RoutedEventArgs e)
{
// when the connect button is clicked check that the RTC Pi is not already connected before creating a Connected event handler and connecting to the RTC Pi
if (!expi.IsConnected)
{
expi.Connected += expi_Connected;
await expi.Connect();
}
}
private void bt_Back_Clicked(object sender, RoutedEventArgs e)
{
// dispose of the expander pi and go back to the main page
expi.Dispose();
Frame rootFrame = Window.Current.Content as Frame;
rootFrame.Navigate(typeof(MainPage));
}
private void expi_Connected(object sender, EventArgs e)
{
// expander pi 1 is connected so update the message box, read from the expander pi and start the timer
WriteMessage("expander pi Connected");
// set the ADC reference voltage to 4.096V
expi.ADCSetRefVoltage(4.096);
radio_IO_Read.IsChecked = true;
radio_DACGain1.IsChecked = true;
RefeshDisplay();
_timer1.Change(TIMER1_INTERVAL_IN_MILLISECONDS, Timeout.Infinite);
_timer2.Change(TIMER2_INTERVAL_IN_MILLISECONDS, Timeout.Infinite);
}
private void Timer1_Tick(Object state)
{
// on timer tick check if the expander pi is connected and read from the expander pi before resetting the timer
if (expi.IsConnected)
{
RefeshDisplay();
_timer1.Change(TIMER1_INTERVAL_IN_MILLISECONDS, Timeout.Infinite);
}
}
private async void Timer2_Tick(Object state)
{
// on timer 2 tick check if the expander pi is connected and read from the expander pi before resetting the timer
if (expi.IsConnected)
{
try
{
// read the current date and time from the RTC Pi into a DateTime object
DateTime date = expi.RTCReadDate();
// invoke a dispatcher to update the date textbox on the page
await Windows.ApplicationModel.Core.CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () =>
{
txt_ClockOut.Text = date.ToString("d MMMM yyyy hh:mm:ss tt");
});
}
catch
{
await Windows.ApplicationModel.Core.CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () =>
{
txt_ClockOut.Text = "Error reading date";
});
}
_timer2.Change(TIMER2_INTERVAL_IN_MILLISECONDS, Timeout.Infinite);
}
}
private bool GetBit(byte b, int bitNumber)
{
return (b & (1 << bitNumber)) != 0;
}
private async void WriteMessage(string message)
{
// this method updates the Message textbox on the page
await Windows.ApplicationModel.Core.CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () =>
{
txt_Message.Text = message;
});
}
private async void RefeshDisplay()
{
// check that the expander pi is connected
if (expi.IsConnected)
{
try
{
// invoke the dispatcher to update the checkboxes for expander pi IO ports with the values read from each pin
await Windows.ApplicationModel.Core.CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () =>
{
// check if the IO Pi is in read mode
if (radio_IO_Read.IsChecked == true)
{
// read the values from ports 0 and 1 into two byte variables and check
// the status of each variable to find the pin status
// this is faster than reading each pin individually
byte port0 = expi.IOReadPort(0);
byte port1 = expi.IOReadPort(1);
chk_IO_Channel_01.IsChecked = GetBit(port0, 0);
chk_IO_Channel_02.IsChecked = GetBit(port0, 1);
chk_IO_Channel_03.IsChecked = GetBit(port0, 2);
chk_IO_Channel_04.IsChecked = GetBit(port0, 3);
chk_IO_Channel_05.IsChecked = GetBit(port0, 4);
chk_IO_Channel_06.IsChecked = GetBit(port0, 5);
chk_IO_Channel_07.IsChecked = GetBit(port0, 6);
chk_IO_Channel_08.IsChecked = GetBit(port0, 7);
chk_IO_Channel_09.IsChecked = GetBit(port1, 0);
chk_IO_Channel_10.IsChecked = GetBit(port1, 1);
chk_IO_Channel_11.IsChecked = GetBit(port1, 2);
chk_IO_Channel_12.IsChecked = GetBit(port1, 3);
chk_IO_Channel_13.IsChecked = GetBit(port1, 4);
chk_IO_Channel_14.IsChecked = GetBit(port1, 5);
chk_IO_Channel_15.IsChecked = GetBit(port1, 6);
chk_IO_Channel_16.IsChecked = GetBit(port1, 7);
}
// read the adc values and update the textblocks
txt_ADC1.Text = expi.ADCReadVoltage(1, 0).ToString("#.###");
txt_ADC2.Text = expi.ADCReadVoltage(2, 0).ToString("#.###");
txt_ADC3.Text = expi.ADCReadVoltage(3, 0).ToString("#.###");
txt_ADC4.Text = expi.ADCReadVoltage(4, 0).ToString("#.###");
txt_ADC5.Text = expi.ADCReadVoltage(5, 0).ToString("#.###");
txt_ADC6.Text = expi.ADCReadVoltage(6, 0).ToString("#.###");
txt_ADC7.Text = expi.ADCReadVoltage(7, 0).ToString("#.###");
txt_ADC8.Text = expi.ADCReadVoltage(8, 0).ToString("#.###");
}
);
}
catch (Exception e)
{
throw e;
}
}
}
private async void UpdateClock()
{
// Updates the clock label from the RTC clock value
// check that the expander pi is connected
if (expi.IsConnected)
{
try
{
// invoke the dispatcher to update the checkboxes for expander pi IO ports with the values read from each pin
await Windows.ApplicationModel.Core.CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () =>
{
}
);
}
catch (Exception e)
{
throw e;
}
}
}
private void IO_SetDirection(object sender, RoutedEventArgs e)
{
// read the values from the direction radio buttons and update the expander pi 2 ports using the SetPortDirection method
if (radio_IO_Read.IsChecked == true)
{
if (expi.IsConnected)
{
expi.IOSetPortDirection(0, 0xFF);
expi.IOSetPortDirection(1, 0xFF);
IO_Direction = true;
WriteMessage("IO Reading");
}
else
{
radio_IO_Read.IsChecked = false;
WriteMessage("expander pi not connected");
}
}
if (radio_IO_Write.IsChecked == true)
{
if (expi.IsConnected)
{
expi.IOSetPortDirection(0, 0x00);
expi.IOSetPortDirection(1, 0x00);
IO_Direction = false;
WriteMessage("IO Writing");
}
else
{
radio_IO_Write.IsChecked = false;
WriteMessage("expander pi not connected");
}
}
}
private void IO_EnablePullups(object sender, RoutedEventArgs e)
{
// get the value from the pull-ups checkbox and set the port pull-ups to the required state using the SetPortPullups method
CheckBox cb = (CheckBox)sender;
if (expi.IsConnected)
{
if (cb.IsChecked == true)
{
expi.IOSetPortPullups(0, 0xFF);
expi.IOSetPortPullups(1, 0xFF);
}
else
{
expi.IOSetPortPullups(0, 0x00);
expi.IOSetPortPullups(1, 0x00);
}
}
else
{
cb.IsChecked = false;
WriteMessage("expander pi not connected");
}
}
private void IO_InvertPort(object sender, RoutedEventArgs e)
{
// get the value from the invert port checkbox and set the port to the required state using the InvertPort method
CheckBox cb = (CheckBox)sender;
if (expi.IsConnected)
{
if (cb.IsChecked == true)
{
expi.IOInvertPort(0, 0xFF);
expi.IOInvertPort(1, 0xFF);
WriteMessage("IO Inverted");
}
else
{
expi.IOInvertPort(0, 0x00);
expi.IOInvertPort(1, 0x00);
WriteMessage("IO not inverted");
}
}
else
{
cb.IsChecked = false;
WriteMessage("expander pi not connected");
}
}
private void IO_EnablePort0(object sender, RoutedEventArgs e)
{
// get the value from the enable port checkbox and set the port values to the required state using the WritePort method
CheckBox cb = (CheckBox)sender;
if (expi.IsConnected == true)
{
if (IO_Direction == false)
{
if (cb.IsChecked == true)
{
expi.IOWritePort(0, 0xFF);
}
else
{
expi.IOWritePort(0, 0x00);
}
}
else
{
cb.IsChecked = false;
WriteMessage("You can not set a port state in read mode.");
}
}
else
{
cb.IsChecked = false;
WriteMessage("expander pi not connected.");
}
}
private void IO_EnablePort1(object sender, RoutedEventArgs e)
{
// get the value from the enable port checkbox and set the port values to the required state using the WritePort method
CheckBox cb = (CheckBox)sender;
if (expi.IsConnected == true)
{
if (IO_Direction == false)
{
if (cb.IsChecked == true)
{
expi.IOWritePort(1, 0xFF);
}
else
{
expi.IOWritePort(1, 0x00);
}
}
else
{
cb.IsChecked = false;
WriteMessage("You can not set a port state in read mode.");
}
}
else
{
cb.IsChecked = false;
WriteMessage("expander pi not connected.");
}
}
private void IO_PinEnable(object sender, RoutedEventArgs e)
{
// check which pin checkbox was clicked and update the value of that pin to the required state
CheckBox cb = (CheckBox)sender;
if (expi.IsConnected == true)
{
if (IO_Direction == false)
{
if (cb.IsChecked == true)
{
expi.IOWritePin(Convert.ToByte(cb.Content.ToString()), true);
}
else
{
expi.IOWritePin(Convert.ToByte(cb.Content.ToString()), false);
}
}
else
{
cb.IsChecked = false;
WriteMessage("You can not set a pin state in read mode.");
}
}
else
{
cb.IsChecked = false;
WriteMessage("expander pi not connected.");
}
}
private void updateDAC(byte channel)
{
if (expi.IsConnected)
{
double newvoltage = 0;
if (channel == 1)
{
newvoltage = slider_DACChannel1.Value;
}
else
{
newvoltage = slider_DACChannel2.Value;
}
// check to see if the gain is set to 1
if (radio_DACGain1.IsChecked == true)
{
// write the value to the dac channel 1
expi.DACSetVoltage(channel, newvoltage, 1);
}
else // gain is set to 2
{
// double the value in newvoltage before writing it to the DAC
newvoltage = newvoltage * 2;
expi.DACSetVoltage(channel, newvoltage, 2);
}
}
else
{
WriteMessage("expander pi not connected.");
}
}
private void DACChannel1_Changed(object sender, Windows.UI.Xaml.Controls.Primitives.RangeBaseValueChangedEventArgs e)
{
updateDAC(1);
}
private void DACChannel2_Changed(object sender, Windows.UI.Xaml.Controls.Primitives.RangeBaseValueChangedEventArgs e)
{
updateDAC(2);
}
private void radio_DACGain1_Checked(object sender, RoutedEventArgs e)
{
updateDAC(1);
updateDAC(2);
}
private void radio_DACGain2_Checked(object sender, RoutedEventArgs e)
{
updateDAC(1);
updateDAC(2);
}
private void bt_SetDate_Click(object sender, RoutedEventArgs e)
{
if (expi.IsConnected)
{
// create a new DateTime object using the values from the Date and Time pickers
DateTime newdate = new DateTime(picker_NewDate.Date.Year, picker_NewDate.Date.Month, picker_NewDate.Date.Day, picker_NewTime.Time.Hours, picker_NewTime.Time.Minutes, picker_NewTime.Time.Seconds);
// update the RTC Pi with the new DateTime object
expi.RTCSetDate(newdate);
}
}
private void cb_sqw_clicked(object sender, RoutedEventArgs e)
{
// check the value for the SQW checkbox and enable or disable the square wave output pin
if (expi.IsConnected)
{
if (cb_sqw.IsChecked == true)
{
radio_frequency_clicked(null, null);
expi.RTCEnableOutput();
}
else
{
expi.RTCDisableOutput();
}
}
}
private void radio_frequency_clicked(object sender, RoutedEventArgs e)
{
// check which frequency radio button has been clicked and update the frequency for the square wave output
if (expi.IsConnected)
{
if (radio_frequency1.IsChecked == true)
{
expi.RTCSetFrequency(1);
}
if (radio_frequency2.IsChecked == true)
{
expi.RTCSetFrequency(2);
}
if (radio_frequency3.IsChecked == true)
{
expi.RTCSetFrequency(3);
}
if (radio_frequency4.IsChecked == true)
{
expi.RTCSetFrequency(4);
}
}
}
}
}
<file_sep>/ABElectronics_Win10IOT_Libraries/RTCPi.cs
using System;
using System.Threading.Tasks;
using Windows.Devices.Enumeration;
using Windows.Devices.I2c;
using Windows.Foundation.Metadata;
namespace ABElectronics_Win10IOT_Libraries
{
/// <summary>
/// Class for controlling the RTC Pi and RTC Pi Plus expansion boards from AB Electronics UK
/// Based on the DS1307 real-time clock from Maxim.
/// </summary>
public class RTCPi : IDisposable
{
// Register addresses for the DS1307 IC
private const byte SECONDS = 0x00;
private const byte MINUTES = 0x01;
private const byte HOURS = 0x02;
private const byte DAYOFWEEK = 0x03;
private const byte DAY = 0x04;
private const byte MONTH = 0x05;
private const byte YEAR = 0x06;
private const byte CONTROL = 0x07;
// the DS1307 does not store the current century so that has to be added on manually.
private readonly int century = 2000;
// initial configuration - square wave and output disabled, frequency set to 32.768KHz.
private byte config = 0x03;
private readonly ABE_Helpers helper = new ABE_Helpers();
private I2cDevice i2cbus; // create an instance of the i2c bus.
// variables
private readonly byte rtcAddress = 0x68; // I2C address
// Flag: Has Dispose already been called?
bool disposed = false;
// Instantiate a SafeHandle instance.
System.Runtime.InteropServices.SafeHandle handle = new Microsoft.Win32.SafeHandles.SafeFileHandle(IntPtr.Zero, true);
/// <summary>
/// Create an instance of a RTC Pi bus.
/// </summary>
public RTCPi()
{
IsConnected = false;
}
/// <summary>
/// Shows if there is a connection with the RTC Pi.
/// </summary>
public bool IsConnected { get; private set; }
/// <summary>
/// Open a connection with the RTC Pi.
/// </summary>
/// <returns></returns>
public async Task Connect()
{
if (IsConnected)
{
return; // Already connected
}
if (!ApiInformation.IsTypePresent("Windows.Devices.I2c.I2cDevice"))
{
return; // This system does not support this feature: can't connect
}
/* Initialize the I2C bus */
try
{
var aqs = I2cDevice.GetDeviceSelector(ABE_Helpers.I2C_CONTROLLER_NAME); // Find the selector string for the I2C bus controller
var dis = await DeviceInformation.FindAllAsync(aqs); // Find the I2C bus controller device with our selector string
if (dis.Count == 0)
{
return; // Controller not found
}
var settings = new I2cConnectionSettings(rtcAddress) {BusSpeed = I2cBusSpeed.FastMode};
i2cbus = await I2cDevice.FromIdAsync(dis[0].Id, settings); // Create an I2cDevice with our selected bus controller and I2C settings
if (i2cbus != null)
{
// i2c bus is connected so set IsConnected to true and fire the Connected event handler
IsConnected = true;
// Fire the Connected event handler
Connected?.Invoke(this, EventArgs.Empty);
}
}
catch (Exception ex)
{
IsConnected = false;
throw new Exception("I2C Initialization Failed", ex);
}
}
/// <summary>
/// Event occurs when connection is made.
/// </summary>
public event EventHandler Connected;
/// <summary>
/// Converts BCD format to integer.
/// </summary>
/// <param name="x">BCD formatted byte</param>
/// <returns></returns>
private int BCDtoInt(byte x)
{
return x - 6 * (x >> 4);
}
/// <summary>
/// Converts byte to BCD format.
/// </summary>
/// <param name="val">value to convert</param>
/// <returns>Converted byte</returns>
private byte BytetoBCD(int val)
{
return (byte) (val / 10 * 16 + val % 10);
}
/// <summary>
/// Set the date and time on the RTC.
/// </summary>
/// <param name="date">DateTime</param>
public void SetDate(DateTime date)
{
CheckConnected();
helper.WriteI2CByte(i2cbus, SECONDS, BytetoBCD(date.Second));
helper.WriteI2CByte(i2cbus, MINUTES, BytetoBCD(date.Minute));
helper.WriteI2CByte(i2cbus, HOURS, BytetoBCD(date.Hour));
helper.WriteI2CByte(i2cbus, DAYOFWEEK, BytetoBCD((int) date.DayOfWeek));
helper.WriteI2CByte(i2cbus, DAY, BytetoBCD(date.Day));
helper.WriteI2CByte(i2cbus, MONTH, BytetoBCD(date.Month));
helper.WriteI2CByte(i2cbus, YEAR, BytetoBCD(date.Year - century));
}
/// <summary>
/// Read the date and time from the RTC.
/// </summary>
/// <returns>DateTime</returns>
public DateTime ReadDate()
{
CheckConnected();
var DateArray = helper.ReadI2CBlockData(i2cbus, 0, 7);
var year = BCDtoInt(DateArray[6]) + century;
var month = BCDtoInt(DateArray[5]);
var day = BCDtoInt(DateArray[4]);
// var dayofweek = BCDtoInt(DateArray[3]);
var hours = BCDtoInt(DateArray[2]);
var minutes = BCDtoInt(DateArray[1]);
var seconds = BCDtoInt(DateArray[0]);
try
{
var date = new DateTime(year, month, day, hours, minutes, seconds);
return date;
}
catch
{
var date = new DateTime(1990, 01, 01, 01, 01, 01);
return date;
}
}
/// <summary>
/// Enable the clock output pin.
/// </summary>
public void EnableOutput()
{
CheckConnected();
config = helper.UpdateByte(config, 7, true);
config = helper.UpdateByte(config, 4, true);
helper.WriteI2CByte(i2cbus, CONTROL, config);
}
/// <summary>
/// Disable the clock output pin.
/// </summary>
public void DisableOutput()
{
CheckConnected();
config = helper.UpdateByte(config, 7, false);
config = helper.UpdateByte(config, 4, false);
helper.WriteI2CByte(i2cbus, CONTROL, config);
}
/// <summary>
/// Set the frequency of the output pin square-wave.
/// </summary>
/// <param name="frequency">options are: 1 = 1Hz, 2 = 4.096KHz, 3 = 8.192KHz, 4 = 32.768KHz</param>
public void SetFrequency(byte frequency)
{
CheckConnected();
switch (frequency)
{
case 1:
config = helper.UpdateByte(config, 0, false);
config = helper.UpdateByte(config, 1, false);
break;
case 2:
config = helper.UpdateByte(config, 0, true);
config = helper.UpdateByte(config, 1, false);
break;
case 3:
config = helper.UpdateByte(config, 0, false);
config = helper.UpdateByte(config, 1, true);
break;
case 4:
config = helper.UpdateByte(config, 0, true);
config = helper.UpdateByte(config, 1, true);
break;
default:
throw new ArgumentOutOfRangeException(nameof(frequency));
}
helper.WriteI2CByte(i2cbus, CONTROL, config);
}
private void CheckConnected()
{
if (!IsConnected)
{
throw new InvalidOperationException("Not connected. You must call .Connect() first.");
}
}
/// <summary>
/// Dispose of the resources
/// </summary>
public void Dispose()
{
Dispose(true);
GC.SuppressFinalize(this);
}
/// <summary>
/// Protected implementation of Dispose pattern
/// </summary>
/// <param name="disposing"></param>
protected virtual void Dispose(bool disposing)
{
if (disposed)
return;
if (disposing)
{
handle.Dispose();
// Free any other managed objects here.
i2cbus?.Dispose();
i2cbus = null;
IsConnected = false;
}
// Free any unmanaged objects here.
//
disposed = true;
}
}
}<file_sep>/DemoApplication/MainPage.xaml.cs
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;
// The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=402352&clcid=0x409
namespace DemoApplication
{
/// <summary>
/// An empty page that can be used on its own or navigated to within a Frame.
/// </summary>
public sealed partial class MainPage : Page
{
Frame rootFrame = Window.Current.Content as Frame;
public MainPage()
{
this.InitializeComponent();
}
private void iopi_Click(object sender, RoutedEventArgs e)
{
rootFrame.Navigate(typeof(IOPi));
}
private void adc_Click(object sender, RoutedEventArgs e)
{
rootFrame.Navigate(typeof(ADCPi));
}
private void adcdifferentialpi_Click(object sender, RoutedEventArgs e)
{
rootFrame.Navigate(typeof(ADCDifferentialPi));
}
private void expanderpi_Click(object sender, RoutedEventArgs e)
{
rootFrame.Navigate(typeof(ExpanderPi));
}
private void rtc_Click(object sender, RoutedEventArgs e)
{
rootFrame.Navigate(typeof(RTCPi));
}
private void adcdac_Click(object sender, RoutedEventArgs e)
{
rootFrame.Navigate(typeof(ADCDACPi));
}
private void servo_Click(object sender, RoutedEventArgs e)
{
rootFrame.Navigate(typeof(ServoPi));
}
}
}
<file_sep>/DemoApplication/ADCDACPi.xaml.cs
using System;
using System.Threading;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
namespace DemoApplication
{
/// <summary>
/// This demonstration for the ADCDAC Pi shows how to read from the ADC and write to the DAC
/// </summary>
public sealed partial class ADCDACPi : Page
{
// create an instance of the ADCDAC class
ABElectronics_Win10IOT_Libraries.ADCDACPi adcdac = new ABElectronics_Win10IOT_Libraries.ADCDACPi();
// variables for storing the ADC values
double ADC1_value = 0;
double ADC2_value = 0;
// A timer for reading from the ADC
Timer _timer;
// set a time interval for reading from the ADC
int TIME_INTERVAL_IN_MILLISECONDS = 50;
public ADCDACPi()
{
this.InitializeComponent();
}
private void bt_Connect_Click(object sender, RoutedEventArgs e)
{
// when the connect button is clicked set the ADC reference voltage, create an event handler for the Connected event and connect to the ADCDAC Pi.
adcdac.SetADCrefVoltage(3.3);
adcdac.Connected += Adcdac_Connected;
adcdac.Connect();
}
private void Adcdac_Connected(object sender, EventArgs e)
{
// The ADCDAC Pi is connected to start the timer to read from the ADC channels
_timer = new Timer(ReadADC, null, TIME_INTERVAL_IN_MILLISECONDS, Timeout.Infinite);
}
private async void ReadADC(object state)
{
// Get the values from both ADC channels and store them in two variables.
ADC1_value = adcdac.ReadADCVoltage(1);
ADC2_value = adcdac.ReadADCVoltage(2);
// use a dispatcher event to update the textboxes on the page with the saved values
await Windows.ApplicationModel.Core.CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () =>
{
txt_ADC1.Text = ADC1_value.ToString("F3");
txt_ADC2.Text = ADC2_value.ToString("F3");
});
// reset the timer so it will trigger again after the set period
_timer = new Timer(ReadADC, null, TIME_INTERVAL_IN_MILLISECONDS, Timeout.Infinite);
}
private void DAC1SliderChanged(object sender, RangeBaseValueChangedEventArgs e)
{
// get the new value from slider 1 and use it to update the DAC channel 1
double dac_value = slider_Channel1.Value;
adcdac.SetDACVoltage(1, dac_value);
}
private void DAC2SliderChanged(object sender, RangeBaseValueChangedEventArgs e)
{
// get the new value from slider 2 and use it to update the DAC channel 2
double dac_value = slider_Channel2.Value;
adcdac.SetDACVoltage(2, dac_value);
}
private void bt_Back_Clicked(object sender, RoutedEventArgs e)
{
// go back to the main page
adcdac.Dispose();
Frame rootFrame = Window.Current.Content as Frame;
rootFrame.Navigate(typeof(MainPage));
}
}
}
<file_sep>/ABElectronics_Win10IOT_Libraries/ServoPi.cs
using System;
using System.Threading.Tasks;
using Windows.Devices.Enumeration;
using Windows.Devices.Gpio;
using Windows.Devices.I2c;
using Windows.Foundation.Metadata;
namespace ABElectronics_Win10IOT_Libraries
{
/// <summary>
/// Class for controlling the Servo Pi expansion board from AB Electronics UK
/// Based on the PCA9685 PWM controller IC from NXT.
/// </summary>
public class ServoPi : IDisposable
{
private readonly byte ALL_LED_OFF_H = 0xFD;
private readonly byte ALL_LED_OFF_L = 0xFC;
private readonly byte ALL_LED_ON_H = 0xFB;
private readonly byte ALL_LED_ON_L = 0xFA;
private GpioController gpio;
private readonly ABE_Helpers helper = new ABE_Helpers();
// create an instance of the i2c bus and GPIO controller
private I2cDevice i2cbus;
private readonly byte LED0_OFF_H = 0x09;
private readonly byte LED0_OFF_L = 0x08;
private readonly byte LED0_ON_H = 0x07;
private readonly byte LED0_ON_L = 0x06;
// Define registers values from the datasheet
private readonly byte MODE1 = 0x00;
private GpioPin pin;
private readonly byte PRE_SCALE = 0xFE;
// Flag: Has Dispose already been called?
bool disposed = false;
// Instantiate a SafeHandle instance.
System.Runtime.InteropServices.SafeHandle handle = new Microsoft.Win32.SafeHandles.SafeFileHandle(IntPtr.Zero, true);
/// <summary>
/// Create an instance of a Servo Pi bus.
/// </summary>
/// <param name="address">I2C address of Servo Pi bus</param>
/// <param name="outputEnablePin">GPIO pin for Output Enable function (0-disabled)</param>
/// <example>ABElectronics_Win10IOT_Libraries.ServoPi servo = new ABElectronics_Win10IOT_Libraries.ServoPi();</example>
public ServoPi(byte address = 0x40, byte outputEnablePin = 0)
{
Address = address;
IsConnected = false;
OutputEnablePin = outputEnablePin;
}
/// <summary>
/// I2C address for the Servo Pi bus.
/// </summary>
/// <example>servopi.Address = 0x40;</example>
public byte Address { get; set; }
/// <summary>
/// Set the GPIO pin for the output enable function.
/// The default GPIO pin 4 is not supported in Windows 10 IOT so the OE pad will need to be connected to a different
/// GPIO pin.
/// </summary>
/// <example>servopi.OutputEnablePin = 17;</example>
public byte OutputEnablePin { get; set; }
/// <summary>
/// Shows if there is a connection with the Servo Pi
/// </summary>
/// <example>if (servopi.IsConnected) { }</example>
public bool IsConnected { get; private set; }
/// <summary>
/// Open a connection with the Servo Pi
/// </summary>
/// <returns></returns>
/// <example>servopi.Connect();</example>
public async Task Connect()
{
if (IsConnected)
{
return; // Already connected
}
if (!ApiInformation.IsTypePresent("Windows.Devices.I2c.I2cDevice"))
{
return; // This system does not support this feature: can't connect
}
/* Initialize the I2C bus */
try
{
var aqs = I2cDevice.GetDeviceSelector(ABE_Helpers.I2C_CONTROLLER_NAME); // Find the selector string for the I2C bus controller
var dis = await DeviceInformation.FindAllAsync(aqs); // Find the I2C bus controller device with our selector string
if (dis.Count == 0)
{
return; // Controller not found
}
var settings = new I2cConnectionSettings(Address) {BusSpeed = I2cBusSpeed.FastMode};
i2cbus = await I2cDevice.FromIdAsync(dis[0].Id, settings);
/* Create an I2cDevice with our selected bus controller and I2C settings */
if (i2cbus != null)
{
// Connection is established so set IsConnected to true
IsConnected = true;
helper.WriteI2CByte(i2cbus, MODE1, 0x00);
// Check to see if the output pin has been set and if so try to connect to the GPIO pin on the Raspberry Pi
if (OutputEnablePin != 0)
{
gpio = GpioController.GetDefault();
if (gpio != null)
{
GpioOpenStatus status;
gpio.TryOpenPin(OutputEnablePin, GpioSharingMode.Exclusive, out pin, out status);
if (status == GpioOpenStatus.PinOpened)
{
// Latch HIGH value first. This ensures a default value when the pin is set as output
pin.Write(GpioPinValue.High);
// Set the IO direction as output
pin.SetDriveMode(GpioPinDriveMode.Output);
}
}
}
// Fire the Connected event handler
Connected?.Invoke(this, EventArgs.Empty);
}
else
{
IsConnected = false;
}
}
catch (Exception ex)
{
IsConnected = false;
throw new Exception("I2C Initialization Failed", ex);
}
}
/// <summary>
/// Event occurs when connection is made.
/// </summary>
public event EventHandler Connected;
/// <summary>
/// Set the output frequency of all PWM channels.
/// The output frequency is programmable from a typical 40Hz to 1000Hz.
/// </summary>
/// <param name="freq">Integer frequency value</param>
/// <example>servopi.SetPWMFreqency(500);</example>
public void SetPWMFreqency(int freq)
{
var scaleval = 25000000.0; // 25MHz
scaleval /= 4096.0; // 12-bit
scaleval /= freq;
scaleval -= 1.0;
var prescale = Math.Floor(scaleval + 0.5);
var oldmode = helper.ReadI2CByte(i2cbus, MODE1);
var newmode = (byte) ((oldmode & 0x7F) | 0x10);
helper.WriteI2CByte(i2cbus, MODE1, newmode);
helper.WriteI2CByte(i2cbus, PRE_SCALE, (byte) Math.Floor(prescale));
helper.WriteI2CByte(i2cbus, MODE1, oldmode);
helper.WriteI2CByte(i2cbus, MODE1, (byte) (oldmode | 0x80));
}
/// <summary>
/// Set the PWM output on a single <paramref name="channel"/>.
/// </summary>
/// <param name="channel">1 to 16</param>
/// <param name="on">Value between 0 and 4096</param>
/// <param name="off">Value between 0 and 4096</param>
/// <example>servopi.SetPWM(1,512,1024);</example>
public void SetPWM(byte channel, short on, short off)
{
channel = (byte) (channel - 1);
helper.WriteI2CByte(i2cbus, (byte) (LED0_ON_L + 4 * channel), (byte) (on & 0xFF));
helper.WriteI2CByte(i2cbus, (byte) (LED0_ON_H + 4 * channel), (byte) (on >> 8));
helper.WriteI2CByte(i2cbus, (byte) (LED0_OFF_L + 4 * channel), (byte) (off & 0xFF));
helper.WriteI2CByte(i2cbus, (byte) (LED0_OFF_H + 4 * channel), (byte) (off >> 8));
}
/// <summary>
/// Set PWM output on all channels.
/// </summary>
/// <param name="on">Value between 0 and 4096</param>
/// <param name="off">Value between 0 and 4096</param>
/// <example>servopi.SetAllPWM(512,1024);</example>
public void SetAllPWM(short on, short off)
{
helper.WriteI2CByte(i2cbus, ALL_LED_ON_L, (byte) (on & 0xFF));
helper.WriteI2CByte(i2cbus, ALL_LED_ON_H, (byte) (on >> 8));
helper.WriteI2CByte(i2cbus, ALL_LED_OFF_L, (byte) (off & 0xFF));
helper.WriteI2CByte(i2cbus, ALL_LED_OFF_H, (byte) (off >> 8));
}
/// <summary>
/// Disable output via OE pin. Only used when the OE jumper is joined.
/// </summary>
/// <example>servopi.OutputDisable();</example>
public void OutputDisable()
{
if (pin == null)
{
throw new InvalidOperationException("OutputEnablePin was not set for the .Connect().");
}
pin.Write(GpioPinValue.High);
}
/// <summary>
/// Enable output via OE pin. Only used when the OE jumper is joined.
/// </summary>
/// <example>servopi.OutputEnable();</example>
public void OutputEnable()
{
if (pin == null)
{
throw new InvalidOperationException("OutputEnablePin was not set for the .Connect().");
}
pin.Write(GpioPinValue.Low);
}
private void CheckConnected()
{
if (!IsConnected)
{
throw new InvalidOperationException("Not connected. You must call .Connect() first.");
}
}
/// <summary>
/// Dispose of the resources
/// </summary>
public void Dispose()
{
Dispose(true);
GC.SuppressFinalize(this);
}
/// <summary>
/// Protected implementation of Dispose pattern
/// </summary>
/// <param name="disposing"></param>
protected virtual void Dispose(bool disposing)
{
if (disposed)
return;
if (disposing)
{
handle.Dispose();
// Free any other managed objects here.
i2cbus?.Dispose();
i2cbus = null;
IsConnected = false;
}
// Free any unmanaged objects here.
//
disposed = true;
}
}
}<file_sep>/DemoApplication_VB/bin/ARM/Release/ilc/ImplTypes.g.cs
#define MCG_WINRT_SUPPORTED
using Mcg.System;
using System;
using System.Collections.Generic;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.InteropServices.WindowsRuntime;
// -----------------------------------------------------------------------------------------------------------
//
// WARNING: THIS SOURCE FILE IS FOR 32-BIT BUILDS ONLY!
//
// MCG GENERATED CODE
//
// This C# source file is generated by MCG and is added into the application at compile time to support interop features.
//
// It has three primary components:
//
// 1. Public type definitions with interop implementation used by this application including WinRT & COM data structures and P/Invokes.
//
// 2. The 'McgInterop' class containing marshaling code that acts as a bridge from managed code to native code.
//
// 3. The 'McgNative' class containing marshaling code and native type definitions that call into native code and are called by native code.
//
// -----------------------------------------------------------------------------------------------------------
//
// warning CS0067: The event 'event' is never used
#pragma warning disable 67
// warning CS0169: The field 'field' is never used
#pragma warning disable 169
// warning CS0649: Field 'field' is never assigned to, and will always have its default value 0
#pragma warning disable 414
// warning CS0414: The private field 'field' is assigned but its value is never used
#pragma warning disable 649
// warning CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member'
#pragma warning disable 1591
// warning CS0108 'member1' hides inherited member 'member2'. Use the new keyword if hiding was intended.
#pragma warning disable 108
// warning CS0114 'member1' hides inherited member 'member2'. To make the current method override that implementation, add the override keyword. Otherwise add the new keyword.
#pragma warning disable 114
// warning CS0659 'type' overrides Object.Equals but does not override GetHashCode.
#pragma warning disable 659
// warning CS0465 Introducing a 'Finalize' method can interfere with destructor invocation. Did you intend to declare a destructor?
#pragma warning disable 465
// warning CS0028 'function declaration' has the wrong signature to be an entry point
#pragma warning disable 28
// warning CS0162 Unreachable code Detected
#pragma warning disable 162
// warning CS0628 new protected member declared in sealed class
#pragma warning disable 628
namespace System
{
// System.EventHandler<Windows.UI.Xaml.Controls.DatePickerValueChangedEventArgs>
public unsafe static class EventHandler_A_Windows_UI_Xaml_Controls_DatePickerValueChangedEventArgs_V___Impl
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void Invoke(
this global::System.__ComObject __this,
object sender,
global::Windows.UI.Xaml.Controls.DatePickerValueChangedEventArgs args)
{
global::McgInterop.ForwardComSharedStubs.Proc_object__TArg0__<global::System.EventHandler<global::Windows.UI.Xaml.Controls.DatePickerValueChangedEventArgs>, global::Windows.UI.Xaml.Controls.DatePickerValueChangedEventArgs>(
__this,
sender,
args,
global::System.EventHandler_A_Windows_UI_Xaml_Controls_DatePickerValueChangedEventArgs_V___Impl.Vtbl.idx_Invoke
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// v-table for 'System.EventHandler<Windows.UI.Xaml.Controls.DatePickerValueChangedEventArgs>'
[global::System.Runtime.InteropServices.McgRootsType(typeof(global::System.EventHandler<global::Windows.UI.Xaml.Controls.DatePickerValueChangedEventArgs>))]
public unsafe partial struct Vtbl
{
global::System.IntPtr pfnQueryInterface;
global::System.IntPtr pfnAddRef;
global::System.IntPtr pfnRelease;
// Windows_Foundation__EventHandler_A_Windows_UI_Xaml_Controls_DatePickerValueChangedEventArgs_V_
global::System.IntPtr pfnInvoke_Windows_Foundation__EventHandler_A_Windows_UI_Xaml_Controls_DatePickerValueChangedEventArgs_V_;
internal const int idx_Invoke = 3;
[global::System.Runtime.CompilerServices.InitDataBlob(typeof(global::System.EventHandler_A_Windows_UI_Xaml_Controls_DatePickerValueChangedEventArgs_V___Impl.Vtbl.System_EventHandler_A_Windows_UI_Xaml_Controls_DatePickerValueChangedEventArgs_V___Impl_Vtbl_McgRvaContainer), "RVA_System_EventHandler_A_Windows_UI_Xaml_Controls_DatePickerValueChangedEventArgs_V___Impl_Vtbl_s_theCcwVtable")]
public static global::System.EventHandler_A_Windows_UI_Xaml_Controls_DatePickerValueChangedEventArgs_V___Impl.Vtbl s_theCcwVtable
#if false
= new global::System.EventHandler_A_Windows_UI_Xaml_Controls_DatePickerValueChangedEventArgs_V___Impl.Vtbl() {
pfnQueryInterface = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfQueryInterface>(System.Runtime.InteropServices.__vtable_IUnknown.QueryInterface),
pfnAddRef = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfAddRef>(System.Runtime.InteropServices.__vtable_IUnknown.AddRef),
pfnRelease = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfRelease>(System.Runtime.InteropServices.__vtable_IUnknown.Release),
pfnInvoke_Windows_Foundation__EventHandler_A_Windows_UI_Xaml_Controls_DatePickerValueChangedEventArgs_V_ = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget95>(global::System.EventHandler_A_Windows_UI_Xaml_Controls_DatePickerValueChangedEventArgs_V___Impl.Vtbl.Invoke__STUB),
}
#endif
;
public static global::System.IntPtr pNativeVtable;
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int Invoke__STUB(
global::System.IntPtr pComThis,
global::System.Runtime.InteropServices.__vtable_IInspectable* unsafe_sender,
global::Windows.UI.Xaml.Controls.IDatePickerValueChangedEventArgs__Impl.Vtbl** unsafe_args)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::System.EventHandler<global::Windows.UI.Xaml.Controls.DatePickerValueChangedEventArgs>>(
__this,
0
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Proc_object__TArg0__<global::Windows.UI.Xaml.Controls.DatePickerValueChangedEventArgs>(
__this,
unsafe_sender,
unsafe_args,
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
private static class System_EventHandler_A_Windows_UI_Xaml_Controls_DatePickerValueChangedEventArgs_V___Impl_Vtbl_McgRvaContainer
{
[global::System.Runtime.CompilerServices.MethodAddrFixup(0, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "QueryInterface")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(4, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "AddRef")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(8, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "Release")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(12, typeof(global::System.EventHandler_A_Windows_UI_Xaml_Controls_DatePickerValueChangedEventArgs_V___Impl.Vtbl), "Invoke__STUB")]
[global::System.Runtime.CompilerServices.NonArray]
static readonly byte[] RVA_System_EventHandler_A_Windows_UI_Xaml_Controls_DatePickerValueChangedEventArgs_V___Impl_Vtbl_s_theCcwVtable = new byte[] {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
}
}
}
// System.EventHandler<Windows.UI.Xaml.Controls.TimePickerValueChangedEventArgs>
public unsafe static class EventHandler_A_Windows_UI_Xaml_Controls_TimePickerValueChangedEventArgs_V___Impl
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void Invoke(
this global::System.__ComObject __this,
object sender,
global::Windows.UI.Xaml.Controls.TimePickerValueChangedEventArgs args)
{
global::McgInterop.ForwardComSharedStubs.Proc_object__TArg0__<global::System.EventHandler<global::Windows.UI.Xaml.Controls.TimePickerValueChangedEventArgs>, global::Windows.UI.Xaml.Controls.TimePickerValueChangedEventArgs>(
__this,
sender,
args,
global::System.EventHandler_A_Windows_UI_Xaml_Controls_TimePickerValueChangedEventArgs_V___Impl.Vtbl.idx_Invoke
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// v-table for 'System.EventHandler<Windows.UI.Xaml.Controls.TimePickerValueChangedEventArgs>'
[global::System.Runtime.InteropServices.McgRootsType(typeof(global::System.EventHandler<global::Windows.UI.Xaml.Controls.TimePickerValueChangedEventArgs>))]
public unsafe partial struct Vtbl
{
global::System.IntPtr pfnQueryInterface;
global::System.IntPtr pfnAddRef;
global::System.IntPtr pfnRelease;
// Windows_Foundation__EventHandler_A_Windows_UI_Xaml_Controls_TimePickerValueChangedEventArgs_V_
global::System.IntPtr pfnInvoke_Windows_Foundation__EventHandler_A_Windows_UI_Xaml_Controls_TimePickerValueChangedEventArgs_V_;
internal const int idx_Invoke = 3;
[global::System.Runtime.CompilerServices.InitDataBlob(typeof(global::System.EventHandler_A_Windows_UI_Xaml_Controls_TimePickerValueChangedEventArgs_V___Impl.Vtbl.System_EventHandler_A_Windows_UI_Xaml_Controls_TimePickerValueChangedEventArgs_V___Impl_Vtbl_McgRvaContainer), "RVA_System_EventHandler_A_Windows_UI_Xaml_Controls_TimePickerValueChangedEventArgs_V___Impl_Vtbl_s_theCcwVtable")]
public static global::System.EventHandler_A_Windows_UI_Xaml_Controls_TimePickerValueChangedEventArgs_V___Impl.Vtbl s_theCcwVtable
#if false
= new global::System.EventHandler_A_Windows_UI_Xaml_Controls_TimePickerValueChangedEventArgs_V___Impl.Vtbl() {
pfnQueryInterface = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfQueryInterface>(System.Runtime.InteropServices.__vtable_IUnknown.QueryInterface),
pfnAddRef = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfAddRef>(System.Runtime.InteropServices.__vtable_IUnknown.AddRef),
pfnRelease = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfRelease>(System.Runtime.InteropServices.__vtable_IUnknown.Release),
pfnInvoke_Windows_Foundation__EventHandler_A_Windows_UI_Xaml_Controls_TimePickerValueChangedEventArgs_V_ = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget97>(global::System.EventHandler_A_Windows_UI_Xaml_Controls_TimePickerValueChangedEventArgs_V___Impl.Vtbl.Invoke__STUB),
}
#endif
;
public static global::System.IntPtr pNativeVtable;
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int Invoke__STUB(
global::System.IntPtr pComThis,
global::System.Runtime.InteropServices.__vtable_IInspectable* unsafe_sender,
global::Windows.UI.Xaml.Controls.ITimePickerValueChangedEventArgs__Impl.Vtbl** unsafe_args)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::System.EventHandler<global::Windows.UI.Xaml.Controls.TimePickerValueChangedEventArgs>>(
__this,
0
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Proc_object__TArg0__<global::Windows.UI.Xaml.Controls.TimePickerValueChangedEventArgs>(
__this,
unsafe_sender,
unsafe_args,
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
private static class System_EventHandler_A_Windows_UI_Xaml_Controls_TimePickerValueChangedEventArgs_V___Impl_Vtbl_McgRvaContainer
{
[global::System.Runtime.CompilerServices.MethodAddrFixup(0, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "QueryInterface")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(4, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "AddRef")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(8, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "Release")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(12, typeof(global::System.EventHandler_A_Windows_UI_Xaml_Controls_TimePickerValueChangedEventArgs_V___Impl.Vtbl), "Invoke__STUB")]
[global::System.Runtime.CompilerServices.NonArray]
static readonly byte[] RVA_System_EventHandler_A_Windows_UI_Xaml_Controls_TimePickerValueChangedEventArgs_V___Impl_Vtbl_s_theCcwVtable = new byte[] {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
}
}
}
// System.Nullable<Windows.UI.Color>
public unsafe static class Nullable_A_Windows_UI_Color_V___Impl
{
// StubClass for 'System.Nullable<Windows.UI.Color>'
public static partial class StubClass
{
// Signature, System.Nullable<Windows.UI.Color>.get_Value, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] Windows_UI_Color__Windows_UI__Color,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Color get_Value(global::System.__ComObject __this)
{
// Setup
global::Windows.UI.Color unsafe___value__retval;
global::Windows.UI.Color __value__retval;
int unsafe___return__;
// Marshalling
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.Foundation.IReference<global::Windows.UI.Color>).TypeHandle,
global::System.Nullable_A_Windows_UI_Color_V___Impl.Vtbl.idx_get_Value,
&(unsafe___value__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
__value__retval = unsafe___value__retval;
// Return
return __value__retval;
}
}
// v-table for 'System.Nullable<Windows.UI.Color>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.IReference<global::Windows.UI.Color>))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Value = 6;
}
}
// System.Nullable<Windows.UI.Xaml.CornerRadius>
public unsafe static class Nullable_A_Windows_UI_Xaml_CornerRadius_V___Impl
{
// StubClass for 'System.Nullable<Windows.UI.Xaml.CornerRadius>'
public static partial class StubClass
{
// Signature, System.Nullable<Windows.UI.Xaml.CornerRadius>.get_Value, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] Windows_UI_Xaml_CornerRadius__Windows_UI_Xaml__CornerRadius,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.CornerRadius get_Value(global::System.__ComObject __this)
{
// Setup
global::Windows.UI.Xaml.CornerRadius unsafe___value__retval;
global::Windows.UI.Xaml.CornerRadius __value__retval;
int unsafe___return__;
// Marshalling
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.Foundation.IReference<global::Windows.UI.Xaml.CornerRadius>).TypeHandle,
global::System.Nullable_A_Windows_UI_Xaml_CornerRadius_V___Impl.Vtbl.idx_get_Value,
&(unsafe___value__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
__value__retval = unsafe___value__retval;
// Return
return __value__retval;
}
}
// v-table for 'System.Nullable<Windows.UI.Xaml.CornerRadius>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.IReference<global::Windows.UI.Xaml.CornerRadius>))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Value = 6;
}
}
// System.Nullable<Windows.UI.Xaml.Duration>
public unsafe static class Nullable_A_Windows_UI_Xaml_Duration_V___Impl
{
// StubClass for 'System.Nullable<Windows.UI.Xaml.Duration>'
public static partial class StubClass
{
// Signature, System.Nullable<Windows.UI.Xaml.Duration>.get_Value, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] Windows_UI_Xaml_Duration__Windows_UI_Xaml__Duration,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.Duration get_Value(global::System.__ComObject __this)
{
// Setup
global::Windows.UI.Xaml.Duration unsafe___value__retval;
global::Windows.UI.Xaml.Duration __value__retval;
int unsafe___return__;
// Marshalling
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.Foundation.IReference<global::Windows.UI.Xaml.Duration>).TypeHandle,
global::System.Nullable_A_Windows_UI_Xaml_Duration_V___Impl.Vtbl.idx_get_Value,
&(unsafe___value__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
__value__retval = unsafe___value__retval;
// Return
return __value__retval;
}
}
// v-table for 'System.Nullable<Windows.UI.Xaml.Duration>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.IReference<global::Windows.UI.Xaml.Duration>))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Value = 6;
}
}
// System.Nullable<Windows.UI.Xaml.GridLength>
public unsafe static class Nullable_A_Windows_UI_Xaml_GridLength_V___Impl
{
// StubClass for 'System.Nullable<Windows.UI.Xaml.GridLength>'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.GridLength get_Value(global::System.__ComObject __this)
{
global::Windows.UI.Xaml.GridLength __ret = global::McgInterop.ForwardComSharedStubs.Func_UI_Xaml_GridLength__<global::Windows.Foundation.IReference<global::Windows.UI.Xaml.GridLength>>(
__this,
global::System.Nullable_A_Windows_UI_Xaml_GridLength_V___Impl.Vtbl.idx_get_Value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
}
// v-table for 'System.Nullable<Windows.UI.Xaml.GridLength>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.IReference<global::Windows.UI.Xaml.GridLength>))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Value = 6;
}
}
// System.Nullable<Windows.UI.Xaml.Thickness>
public unsafe static class Nullable_A_Windows_UI_Xaml_Thickness_V___Impl
{
// StubClass for 'System.Nullable<Windows.UI.Xaml.Thickness>'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.Thickness get_Value(global::System.__ComObject __this)
{
global::Windows.UI.Xaml.Thickness __ret = global::McgInterop.ForwardComSharedStubs.Func_UI_Xaml_Thickness__<global::Windows.Foundation.IReference<global::Windows.UI.Xaml.Thickness>>(
__this,
global::System.Nullable_A_Windows_UI_Xaml_Thickness_V___Impl.Vtbl.idx_get_Value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
}
// v-table for 'System.Nullable<Windows.UI.Xaml.Thickness>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.IReference<global::Windows.UI.Xaml.Thickness>))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Value = 6;
}
}
// System.Nullable<Windows.UI.Xaml.Controls.Primitives.GeneratorPosition>
public unsafe static class Nullable_A_Windows_UI_Xaml_Controls_Primitives_GeneratorPosition_V___Impl
{
// StubClass for 'System.Nullable<Windows.UI.Xaml.Controls.Primitives.GeneratorPosition>'
public static partial class StubClass
{
// Signature, System.Nullable<Windows.UI.Xaml.Controls.Primitives.GeneratorPosition>.get_Value, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] Windows_UI_Xaml_Controls_Primitives_GeneratorPosition__Windows_UI_Xaml_Controls_Primitives__GeneratorPosition,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.Controls.Primitives.GeneratorPosition get_Value(global::System.__ComObject __this)
{
// Setup
global::Windows.UI.Xaml.Controls.Primitives.GeneratorPosition unsafe___value__retval;
global::Windows.UI.Xaml.Controls.Primitives.GeneratorPosition __value__retval;
int unsafe___return__;
// Marshalling
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.Foundation.IReference<global::Windows.UI.Xaml.Controls.Primitives.GeneratorPosition>).TypeHandle,
global::System.Nullable_A_Windows_UI_Xaml_Controls_Primitives_GeneratorPosition_V___Impl.Vtbl.idx_get_Value,
&(unsafe___value__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
__value__retval = unsafe___value__retval;
// Return
return __value__retval;
}
}
// v-table for 'System.Nullable<Windows.UI.Xaml.Controls.Primitives.GeneratorPosition>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.IReference<global::Windows.UI.Xaml.Controls.Primitives.GeneratorPosition>))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Value = 6;
}
}
// System.Nullable<Windows.UI.Xaml.Media.Matrix>
public unsafe static class Nullable_A_Windows_UI_Xaml_Media_Matrix_V___Impl
{
// StubClass for 'System.Nullable<Windows.UI.Xaml.Media.Matrix>'
public static partial class StubClass
{
// Signature, System.Nullable<Windows.UI.Xaml.Media.Matrix>.get_Value, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] Windows_UI_Xaml_Media_Matrix__Windows_UI_Xaml_Media__Matrix,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.Media.Matrix get_Value(global::System.__ComObject __this)
{
// Setup
global::Windows.UI.Xaml.Media.Matrix unsafe___value__retval;
global::Windows.UI.Xaml.Media.Matrix __value__retval;
int unsafe___return__;
// Marshalling
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.Foundation.IReference<global::Windows.UI.Xaml.Media.Matrix>).TypeHandle,
global::System.Nullable_A_Windows_UI_Xaml_Media_Matrix_V___Impl.Vtbl.idx_get_Value,
&(unsafe___value__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
__value__retval = unsafe___value__retval;
// Return
return __value__retval;
}
}
// v-table for 'System.Nullable<Windows.UI.Xaml.Media.Matrix>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.IReference<global::Windows.UI.Xaml.Media.Matrix>))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Value = 6;
}
}
// System.Nullable<Windows.UI.Xaml.Media.Animation.KeyTime>
public unsafe static class Nullable_A_Windows_UI_Xaml_Media_Animation_KeyTime_V___Impl
{
// StubClass for 'System.Nullable<Windows.UI.Xaml.Media.Animation.KeyTime>'
public static partial class StubClass
{
// Signature, System.Nullable<Windows.UI.Xaml.Media.Animation.KeyTime>.get_Value, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] Windows_UI_Xaml_Media_Animation_KeyTime__Windows_UI_Xaml_Media_Animation__KeyTime,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.Media.Animation.KeyTime get_Value(global::System.__ComObject __this)
{
// Setup
global::Windows.UI.Xaml.Media.Animation.KeyTime unsafe___value__retval;
global::Windows.UI.Xaml.Media.Animation.KeyTime __value__retval;
int unsafe___return__;
// Marshalling
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.Foundation.IReference<global::Windows.UI.Xaml.Media.Animation.KeyTime>).TypeHandle,
global::System.Nullable_A_Windows_UI_Xaml_Media_Animation_KeyTime_V___Impl.Vtbl.idx_get_Value,
&(unsafe___value__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
__value__retval = unsafe___value__retval;
// Return
return __value__retval;
}
}
// v-table for 'System.Nullable<Windows.UI.Xaml.Media.Animation.KeyTime>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.IReference<global::Windows.UI.Xaml.Media.Animation.KeyTime>))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Value = 6;
}
}
// System.Nullable<Windows.UI.Xaml.Media.Animation.RepeatBehavior>
public unsafe static class Nullable_A_Windows_UI_Xaml_Media_Animation_RepeatBehavior_V___Impl
{
// StubClass for 'System.Nullable<Windows.UI.Xaml.Media.Animation.RepeatBehavior>'
public static partial class StubClass
{
// Signature, System.Nullable<Windows.UI.Xaml.Media.Animation.RepeatBehavior>.get_Value, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] Windows_UI_Xaml_Media_Animation_RepeatBehavior__Windows_UI_Xaml_Media_Animation__RepeatBehavior,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.Media.Animation.RepeatBehavior get_Value(global::System.__ComObject __this)
{
// Setup
global::Windows.UI.Xaml.Media.Animation.RepeatBehavior unsafe___value__retval;
global::Windows.UI.Xaml.Media.Animation.RepeatBehavior __value__retval;
int unsafe___return__;
// Marshalling
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.Foundation.IReference<global::Windows.UI.Xaml.Media.Animation.RepeatBehavior>).TypeHandle,
global::System.Nullable_A_Windows_UI_Xaml_Media_Animation_RepeatBehavior_V___Impl.Vtbl.idx_get_Value,
&(unsafe___value__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
__value__retval = unsafe___value__retval;
// Return
return __value__retval;
}
}
// v-table for 'System.Nullable<Windows.UI.Xaml.Media.Animation.RepeatBehavior>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.IReference<global::Windows.UI.Xaml.Media.Animation.RepeatBehavior>))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Value = 6;
}
}
// System.Nullable<Windows.UI.Xaml.Media.Media3D.Matrix3D>
public unsafe static class Nullable_A_Windows_UI_Xaml_Media_Media3D_Matrix3D_V___Impl
{
// StubClass for 'System.Nullable<Windows.UI.Xaml.Media.Media3D.Matrix3D>'
public static partial class StubClass
{
// Signature, System.Nullable<Windows.UI.Xaml.Media.Media3D.Matrix3D>.get_Value, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] Windows_UI_Xaml_Media_Media3D_Matrix3D__Windows_UI_Xaml_Media_Media3D__Matrix3D,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.Media.Media3D.Matrix3D get_Value(global::System.__ComObject __this)
{
// Setup
global::Windows.UI.Xaml.Media.Media3D.Matrix3D unsafe___value__retval;
global::Windows.UI.Xaml.Media.Media3D.Matrix3D __value__retval;
int unsafe___return__;
// Marshalling
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.Foundation.IReference<global::Windows.UI.Xaml.Media.Media3D.Matrix3D>).TypeHandle,
global::System.Nullable_A_Windows_UI_Xaml_Media_Media3D_Matrix3D_V___Impl.Vtbl.idx_get_Value,
&(unsafe___value__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
__value__retval = unsafe___value__retval;
// Return
return __value__retval;
}
}
// v-table for 'System.Nullable<Windows.UI.Xaml.Media.Media3D.Matrix3D>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.IReference<global::Windows.UI.Xaml.Media.Media3D.Matrix3D>))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Value = 6;
}
}
// System.Nullable<System.Numerics.Vector2>
public unsafe static class Nullable_A_System_Numerics_Vector2_V___Impl
{
// StubClass for 'System.Nullable<System.Numerics.Vector2>'
public static partial class StubClass
{
// Signature, System.Nullable<System.Numerics.Vector2>.get_Value, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] System_Numerics_Vector2__Windows_Foundation_Numerics__Vector2,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Numerics.Vector2 get_Value(global::System.__ComObject __this)
{
// Setup
global::System.Numerics.Vector2 unsafe___value__retval;
global::System.Numerics.Vector2 __value__retval;
int unsafe___return__;
// Marshalling
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.Foundation.IReference<global::System.Numerics.Vector2>).TypeHandle,
global::System.Nullable_A_System_Numerics_Vector2_V___Impl.Vtbl.idx_get_Value,
&(unsafe___value__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
__value__retval = unsafe___value__retval;
// Return
return __value__retval;
}
}
// v-table for 'System.Nullable<System.Numerics.Vector2>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.IReference<global::System.Numerics.Vector2>))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Value = 6;
}
}
// System.Nullable<System.Numerics.Vector3>
public unsafe static class Nullable_A_System_Numerics_Vector3_V___Impl
{
// StubClass for 'System.Nullable<System.Numerics.Vector3>'
public static partial class StubClass
{
// Signature, System.Nullable<System.Numerics.Vector3>.get_Value, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] System_Numerics_Vector3__Windows_Foundation_Numerics__Vector3,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Numerics.Vector3 get_Value(global::System.__ComObject __this)
{
// Setup
global::System.Numerics.Vector3 unsafe___value__retval;
global::System.Numerics.Vector3 __value__retval;
int unsafe___return__;
// Marshalling
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.Foundation.IReference<global::System.Numerics.Vector3>).TypeHandle,
global::System.Nullable_A_System_Numerics_Vector3_V___Impl.Vtbl.idx_get_Value,
&(unsafe___value__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
__value__retval = unsafe___value__retval;
// Return
return __value__retval;
}
}
// v-table for 'System.Nullable<System.Numerics.Vector3>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.IReference<global::System.Numerics.Vector3>))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Value = 6;
}
}
// System.Nullable<System.Numerics.Vector4>
public unsafe static class Nullable_A_System_Numerics_Vector4_V___Impl
{
// StubClass for 'System.Nullable<System.Numerics.Vector4>'
public static partial class StubClass
{
// Signature, System.Nullable<System.Numerics.Vector4>.get_Value, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] System_Numerics_Vector4__Windows_Foundation_Numerics__Vector4,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Numerics.Vector4 get_Value(global::System.__ComObject __this)
{
// Setup
global::System.Numerics.Vector4 unsafe___value__retval;
global::System.Numerics.Vector4 __value__retval;
int unsafe___return__;
// Marshalling
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.Foundation.IReference<global::System.Numerics.Vector4>).TypeHandle,
global::System.Nullable_A_System_Numerics_Vector4_V___Impl.Vtbl.idx_get_Value,
&(unsafe___value__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
__value__retval = unsafe___value__retval;
// Return
return __value__retval;
}
}
// v-table for 'System.Nullable<System.Numerics.Vector4>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.IReference<global::System.Numerics.Vector4>))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Value = 6;
}
}
// System.Nullable<System.Numerics.Matrix3x2>
public unsafe static class Nullable_A_System_Numerics_Matrix3x2_V___Impl
{
// StubClass for 'System.Nullable<System.Numerics.Matrix3x2>'
public static partial class StubClass
{
// Signature, System.Nullable<System.Numerics.Matrix3x2>.get_Value, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] System_Numerics_Matrix3x2__Windows_Foundation_Numerics__Matrix3x2,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Numerics.Matrix3x2 get_Value(global::System.__ComObject __this)
{
// Setup
global::System.Numerics.Matrix3x2 unsafe___value__retval;
global::System.Numerics.Matrix3x2 __value__retval;
int unsafe___return__;
// Marshalling
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.Foundation.IReference<global::System.Numerics.Matrix3x2>).TypeHandle,
global::System.Nullable_A_System_Numerics_Matrix3x2_V___Impl.Vtbl.idx_get_Value,
&(unsafe___value__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
__value__retval = unsafe___value__retval;
// Return
return __value__retval;
}
}
// v-table for 'System.Nullable<System.Numerics.Matrix3x2>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.IReference<global::System.Numerics.Matrix3x2>))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Value = 6;
}
}
// System.Nullable<System.Numerics.Matrix4x4>
public unsafe static class Nullable_A_System_Numerics_Matrix4x4_V___Impl
{
// StubClass for 'System.Nullable<System.Numerics.Matrix4x4>'
public static partial class StubClass
{
// Signature, System.Nullable<System.Numerics.Matrix4x4>.get_Value, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] System_Numerics_Matrix4x4__Windows_Foundation_Numerics__Matrix4x4,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Numerics.Matrix4x4 get_Value(global::System.__ComObject __this)
{
// Setup
global::System.Numerics.Matrix4x4 unsafe___value__retval;
global::System.Numerics.Matrix4x4 __value__retval;
int unsafe___return__;
// Marshalling
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.Foundation.IReference<global::System.Numerics.Matrix4x4>).TypeHandle,
global::System.Nullable_A_System_Numerics_Matrix4x4_V___Impl.Vtbl.idx_get_Value,
&(unsafe___value__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
__value__retval = unsafe___value__retval;
// Return
return __value__retval;
}
}
// v-table for 'System.Nullable<System.Numerics.Matrix4x4>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.IReference<global::System.Numerics.Matrix4x4>))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Value = 6;
}
}
// System.Nullable<System.Numerics.Plane>
public unsafe static class Nullable_A_System_Numerics_Plane_V___Impl
{
// StubClass for 'System.Nullable<System.Numerics.Plane>'
public static partial class StubClass
{
// Signature, System.Nullable<System.Numerics.Plane>.get_Value, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] System_Numerics_Plane__Windows_Foundation_Numerics__Plane,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Numerics.Plane get_Value(global::System.__ComObject __this)
{
// Setup
global::System.Numerics.Plane unsafe___value__retval;
global::System.Numerics.Plane __value__retval;
int unsafe___return__;
// Marshalling
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.Foundation.IReference<global::System.Numerics.Plane>).TypeHandle,
global::System.Nullable_A_System_Numerics_Plane_V___Impl.Vtbl.idx_get_Value,
&(unsafe___value__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
__value__retval = unsafe___value__retval;
// Return
return __value__retval;
}
}
// v-table for 'System.Nullable<System.Numerics.Plane>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.IReference<global::System.Numerics.Plane>))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Value = 6;
}
}
// System.Nullable<System.Numerics.Quaternion>
public unsafe static class Nullable_A_System_Numerics_Quaternion_V___Impl
{
// StubClass for 'System.Nullable<System.Numerics.Quaternion>'
public static partial class StubClass
{
// Signature, System.Nullable<System.Numerics.Quaternion>.get_Value, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] System_Numerics_Quaternion__Windows_Foundation_Numerics__Quaternion,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Numerics.Quaternion get_Value(global::System.__ComObject __this)
{
// Setup
global::System.Numerics.Quaternion unsafe___value__retval;
global::System.Numerics.Quaternion __value__retval;
int unsafe___return__;
// Marshalling
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.Foundation.IReference<global::System.Numerics.Quaternion>).TypeHandle,
global::System.Nullable_A_System_Numerics_Quaternion_V___Impl.Vtbl.idx_get_Value,
&(unsafe___value__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
__value__retval = unsafe___value__retval;
// Return
return __value__retval;
}
}
// v-table for 'System.Nullable<System.Numerics.Quaternion>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.IReference<global::System.Numerics.Quaternion>))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Value = 6;
}
}
// System.Nullable<Windows.System.Threading.TimerElapsedHandler>
public unsafe static class Nullable_A_Windows_System_Threading_TimerElapsedHandler_V___Impl
{
// StubClass for 'System.Nullable<Windows.System.Threading.TimerElapsedHandler>'
public static partial class StubClass
{
// Signature, System.Nullable<Windows.System.Threading.TimerElapsedHandler>.get_Value, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.WinRTDelegateMarshaller] Windows_System_Threading_TimerElapsedHandler__Windows_System_Threading__TimerElapsedHandler *,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.System.Threading.TimerElapsedHandler get_Value(global::System.__ComObject __this)
{
// Setup
global::Windows.System.Threading.TimerElapsedHandler__Impl.Vtbl** unsafe___value__retval = default(global::Windows.System.Threading.TimerElapsedHandler__Impl.Vtbl**);
global::Windows.System.Threading.TimerElapsedHandler __value__retval = default(global::Windows.System.Threading.TimerElapsedHandler);
int unsafe___return__;
try
{
// Marshalling
unsafe___value__retval = null;
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.Foundation.IReference<global::Windows.System.Threading.TimerElapsedHandler>).TypeHandle,
global::System.Nullable_A_Windows_System_Threading_TimerElapsedHandler_V___Impl.Vtbl.idx_get_Value,
&(unsafe___value__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
__value__retval = (global::Windows.System.Threading.TimerElapsedHandler)global::System.Runtime.InteropServices.McgModuleManager.ComInterfaceToDelegate(
((global::System.IntPtr)unsafe___value__retval),
typeof(global::Windows.System.Threading.TimerElapsedHandler).TypeHandle,
global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget121>(global::Windows.System.Threading.TimerElapsedHandler__Impl.Invoke)
);
// Return
return __value__retval;
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe___value__retval)));
}
}
}
// v-table for 'System.Nullable<Windows.System.Threading.TimerElapsedHandler>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.IReference<global::Windows.System.Threading.TimerElapsedHandler>))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Value = 6;
}
}
// System.EventHandler<Windows.Foundation.Diagnostics.TracingStatusChangedEventArgs>
public unsafe static class EventHandler_A_Windows_Foundation_Diagnostics_TracingStatusChangedEventArgs_V___Impl
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void Invoke(
this global::System.__ComObject __this,
object sender,
global::Windows.Foundation.Diagnostics.TracingStatusChangedEventArgs args)
{
global::McgInterop.ForwardComSharedStubs.Proc_object__TArg0__<global::System.EventHandler<global::Windows.Foundation.Diagnostics.TracingStatusChangedEventArgs>, global::Windows.Foundation.Diagnostics.TracingStatusChangedEventArgs>(
__this,
sender,
args,
global::System.EventHandler_A_Windows_Foundation_Diagnostics_TracingStatusChangedEventArgs_V___Impl.Vtbl.idx_Invoke
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// v-table for 'System.EventHandler<Windows.Foundation.Diagnostics.TracingStatusChangedEventArgs>'
[global::System.Runtime.InteropServices.McgRootsType(typeof(global::System.EventHandler<global::Windows.Foundation.Diagnostics.TracingStatusChangedEventArgs>))]
public unsafe partial struct Vtbl
{
global::System.IntPtr pfnQueryInterface;
global::System.IntPtr pfnAddRef;
global::System.IntPtr pfnRelease;
// Windows_Foundation__EventHandler_A_Windows_Foundation_Diagnostics_TracingStatusChangedEventArgs_V_
global::System.IntPtr pfnInvoke_Windows_Foundation__EventHandler_A_Windows_Foundation_Diagnostics_TracingStatusChangedEventArgs_V_;
internal const int idx_Invoke = 3;
[global::System.Runtime.CompilerServices.InitDataBlob(typeof(global::System.EventHandler_A_Windows_Foundation_Diagnostics_TracingStatusChangedEventArgs_V___Impl.Vtbl.System_EventHandler_A_Windows_Foundation_Diagnostics_TracingStatusChangedEventArgs_V___Impl_Vtbl_McgRvaContainer), "RVA_System_EventHandler_A_Windows_Foundation_Diagnostics_TracingStatusChangedEventArgs_V___Impl_Vtbl_s_theCcwVta" +
"ble")]
public static global::System.EventHandler_A_Windows_Foundation_Diagnostics_TracingStatusChangedEventArgs_V___Impl.Vtbl s_theCcwVtable
#if false
= new global::System.EventHandler_A_Windows_Foundation_Diagnostics_TracingStatusChangedEventArgs_V___Impl.Vtbl() {
pfnQueryInterface = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfQueryInterface>(System.Runtime.InteropServices.__vtable_IUnknown.QueryInterface),
pfnAddRef = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfAddRef>(System.Runtime.InteropServices.__vtable_IUnknown.AddRef),
pfnRelease = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfRelease>(System.Runtime.InteropServices.__vtable_IUnknown.Release),
pfnInvoke_Windows_Foundation__EventHandler_A_Windows_Foundation_Diagnostics_TracingStatusChangedEventArgs_V_ = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget124>(global::System.EventHandler_A_Windows_Foundation_Diagnostics_TracingStatusChangedEventArgs_V___Impl.Vtbl.Invoke__STUB),
}
#endif
;
public static global::System.IntPtr pNativeVtable;
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int Invoke__STUB(
global::System.IntPtr pComThis,
global::System.Runtime.InteropServices.__vtable_IInspectable* unsafe_sender,
global::Windows.Foundation.Diagnostics.ITracingStatusChangedEventArgs__Impl.Vtbl** unsafe_args)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::System.EventHandler<global::Windows.Foundation.Diagnostics.TracingStatusChangedEventArgs>>(
__this,
0
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Proc_object__TArg0__<global::Windows.Foundation.Diagnostics.TracingStatusChangedEventArgs>(
__this,
unsafe_sender,
unsafe_args,
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
private static class System_EventHandler_A_Windows_Foundation_Diagnostics_TracingStatusChangedEventArgs_V___Impl_Vtbl_McgRvaContainer
{
[global::System.Runtime.CompilerServices.MethodAddrFixup(0, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "QueryInterface")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(4, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "AddRef")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(8, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "Release")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(12, typeof(global::System.EventHandler_A_Windows_Foundation_Diagnostics_TracingStatusChangedEventArgs_V___Impl.Vtbl), "Invoke__STUB")]
[global::System.Runtime.CompilerServices.NonArray]
static readonly byte[] RVA_System_EventHandler_A_Windows_Foundation_Diagnostics_TracingStatusChangedEventArgs_V___Impl_Vtbl_s_theCcwVtable = new byte[] {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
}
}
}
// System.Nullable<Windows.Foundation.AsyncOperationProgressHandler<uint,uint>>
public unsafe static class Nullable_A_Windows_Foundation_AsyncOperationProgressHandler_A_uint_j_uint_V__V___Impl
{
// StubClass for 'System.Nullable<Windows.Foundation.AsyncOperationProgressHandler<uint,uint>>'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.Foundation.AsyncOperationProgressHandler<uint, uint> get_Value(global::System.__ComObject __this)
{
global::Windows.Foundation.AsyncOperationProgressHandler<uint, uint> __ret = global::McgInterop.ForwardComSharedStubs.Func__AsyncOperationProgressHandler_2_uint__uint___<global::Windows.Foundation.IReference<global::Windows.Foundation.AsyncOperationProgressHandler<uint, uint>>>(
__this,
global::System.Nullable_A_Windows_Foundation_AsyncOperationProgressHandler_A_uint_j_uint_V__V___Impl.Vtbl.idx_get_Value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
}
// v-table for 'System.Nullable<Windows.Foundation.AsyncOperationProgressHandler<uint,uint>>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.IReference<global::Windows.Foundation.AsyncOperationProgressHandler<uint, uint>>))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Value = 6;
}
}
// System.Nullable<Windows.Foundation.AsyncOperationProgressHandler<Windows.Storage.Streams.IBuffer,uint>>
public unsafe static class Nullable_A_Windows_Foundation_AsyncOperationProgressHandler_A_Windows_Storage_Streams_IBuffer_j_uint_V__V___Impl
{
// StubClass for 'System.Nullable<Windows.Foundation.AsyncOperationProgressHandler<Windows.Storage.Streams.IBuffer,uint>>'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.Foundation.AsyncOperationProgressHandler<global::Windows.Storage.Streams.IBuffer, uint> get_Value(global::System.__ComObject __this)
{
global::Windows.Foundation.AsyncOperationProgressHandler<global::Windows.Storage.Streams.IBuffer, uint> __ret = global::McgInterop.ForwardComSharedStubs.Func__AsyncOperationProgressHandler_2_Storage_Streams_IBuffer__uint___<global::Windows.Foundation.IReference<global::Windows.Foundation.AsyncOperationProgressHandler<global::Windows.Storage.Streams.IBuffer, uint>>>(
__this,
global::System.Nullable_A_Windows_Foundation_AsyncOperationProgressHandler_A_Windows_Storage_Streams_IBuffer_j_uint_V__V___Impl.Vtbl.idx_get_Value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
}
// v-table for 'System.Nullable<Windows.Foundation.AsyncOperationProgressHandler<Windows.Storage.Streams.IBuffer,uint>>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.IReference<global::Windows.Foundation.AsyncOperationProgressHandler<global::Windows.Storage.Streams.IBuffer, uint>>))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Value = 6;
}
}
}
namespace System.Collections.Generic
{
// System.Collections.Generic.IReadOnlyList<byte>
public unsafe static class IReadOnlyList_A_byte_V___Impl
{
// v-table for 'System.Collections.Generic.IReadOnlyList<byte>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IReadOnlyList<byte>))]
public unsafe partial struct Vtbl
{
internal const int idx_GetAt = 6;
internal const int idx_get_Size = 7;
internal const int idx_IndexOf = 8;
internal const int idx_GetMany = 9;
}
}
// System.Collections.Generic.IList<Windows.UI.Xaml.Automation.Peers.AutomationPeer>
public unsafe static class IList_A_Windows_UI_Xaml_Automation_Peers_AutomationPeer_V___Impl
{
// DispatchClass for 'System.Collections.Generic.IList<Windows.UI.Xaml.Automation.Peers.AutomationPeer>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IList<global::Windows.UI.Xaml.Automation.Peers.AutomationPeer>))]
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.ICollection<global::Windows.UI.Xaml.Automation.Peers.AutomationPeer>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::System.Collections.Generic.IList<global::Windows.UI.Xaml.Automation.Peers.AutomationPeer>, global::System.Collections.Generic.ICollection<global::Windows.UI.Xaml.Automation.Peers.AutomationPeer>
{
global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Automation.Peers.AutomationPeer> global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.AutomationPeer>.GetEnumerator()
{
return (global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Automation.Peers.AutomationPeer>)global::McgInterop.McgHelpers.GetGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.AutomationPeer>).TypeHandle
);
}
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return global::McgInterop.McgHelpers.GetNonGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.AutomationPeer>).TypeHandle
);
}
int global::System.Collections.Generic.ICollection<global::Windows.UI.Xaml.Automation.Peers.AutomationPeer>.Count
{
get
{
return global::System.Runtime.InteropServices.WindowsRuntime.IVectorSharedReferenceTypesRCWAdapter.Count(this);
}
}
bool global::System.Collections.Generic.ICollection<global::Windows.UI.Xaml.Automation.Peers.AutomationPeer>.IsReadOnly
{
get
{
return global::System.Runtime.InteropServices.WindowsRuntime.IVectorSharedReferenceTypesRCWAdapter.IsReadOnly(this);
}
}
void global::System.Collections.Generic.ICollection<global::Windows.UI.Xaml.Automation.Peers.AutomationPeer>.Add(global::Windows.UI.Xaml.Automation.Peers.AutomationPeer item)
{
global::System.Runtime.InteropServices.WindowsRuntime.IVectorSharedReferenceTypesRCWAdapter.Add(
this,
item
);
}
void global::System.Collections.Generic.ICollection<global::Windows.UI.Xaml.Automation.Peers.AutomationPeer>.Clear()
{
global::System.Runtime.InteropServices.WindowsRuntime.IVectorSharedReferenceTypesRCWAdapter.Clear(this);
}
bool global::System.Collections.Generic.ICollection<global::Windows.UI.Xaml.Automation.Peers.AutomationPeer>.Contains(global::Windows.UI.Xaml.Automation.Peers.AutomationPeer item)
{
return global::System.Runtime.InteropServices.WindowsRuntime.IVectorSharedReferenceTypesRCWAdapter.Contains(
this,
item
);
}
void global::System.Collections.Generic.ICollection<global::Windows.UI.Xaml.Automation.Peers.AutomationPeer>.CopyTo(
global::Windows.UI.Xaml.Automation.Peers.AutomationPeer[] array,
int arrayindex)
{
global::System.Runtime.InteropServices.WindowsRuntime.IVectorSharedReferenceTypesRCWAdapter.CopyTo(
this,
array,
arrayindex
);
}
bool global::System.Collections.Generic.ICollection<global::Windows.UI.Xaml.Automation.Peers.AutomationPeer>.Remove(global::Windows.UI.Xaml.Automation.Peers.AutomationPeer item)
{
return global::System.Runtime.InteropServices.WindowsRuntime.IVectorSharedReferenceTypesRCWAdapter.Remove(
this,
item
);
}
global::Windows.UI.Xaml.Automation.Peers.AutomationPeer global::System.Collections.Generic.IList<global::Windows.UI.Xaml.Automation.Peers.AutomationPeer>.this[int index]
{
get
{
return global::System.Runtime.InteropServices.WindowsRuntime.IVectorSharedReferenceTypesRCWAdapter.Indexer_Get(
this,
index
);
}
set
{
global::System.Runtime.InteropServices.WindowsRuntime.IVectorSharedReferenceTypesRCWAdapter.Indexer_Set(
this,
index,
value
);
}
}
int global::System.Collections.Generic.IList<global::Windows.UI.Xaml.Automation.Peers.AutomationPeer>.IndexOf(global::Windows.UI.Xaml.Automation.Peers.AutomationPeer item)
{
return global::System.Runtime.InteropServices.WindowsRuntime.IVectorSharedReferenceTypesRCWAdapter.IndexOf(
this,
item
);
}
void global::System.Collections.Generic.IList<global::Windows.UI.Xaml.Automation.Peers.AutomationPeer>.Insert(
int index,
global::Windows.UI.Xaml.Automation.Peers.AutomationPeer item)
{
global::System.Runtime.InteropServices.WindowsRuntime.IVectorSharedReferenceTypesRCWAdapter.Insert(
this,
index,
item
);
}
void global::System.Collections.Generic.IList<global::Windows.UI.Xaml.Automation.Peers.AutomationPeer>.RemoveAt(int index)
{
global::System.Runtime.InteropServices.WindowsRuntime.IVectorSharedReferenceTypesRCWAdapter.RemoveAt(
this,
index
);
}
}
// v-table for 'System.Collections.Generic.IList<Windows.UI.Xaml.Automation.Peers.AutomationPeer>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IList<global::Windows.UI.Xaml.Automation.Peers.AutomationPeer>))]
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.ICollection<global::Windows.UI.Xaml.Automation.Peers.AutomationPeer>))]
public unsafe partial struct Vtbl
{
internal const int idx_GetAt = 6;
internal const int idx_get_Size = 7;
internal const int idx_GetView = 8;
internal const int idx_IndexOf = 9;
internal const int idx_SetAt = 10;
internal const int idx_InsertAt = 11;
internal const int idx_RemoveAt = 12;
internal const int idx_Append = 13;
internal const int idx_RemoveAtEnd = 14;
internal const int idx_Clear = 15;
internal const int idx_GetMany = 16;
internal const int idx_ReplaceAll = 17;
}
}
// System.Collections.Generic.IEnumerable<Windows.UI.Xaml.Automation.Peers.AutomationPeer>
public unsafe static class IEnumerable_A_Windows_UI_Xaml_Automation_Peers_AutomationPeer_V___Impl
{
// DispatchClass for 'System.Collections.Generic.IEnumerable<Windows.UI.Xaml.Automation.Peers.AutomationPeer>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.AutomationPeer>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.AutomationPeer>
{
global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Automation.Peers.AutomationPeer> global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.AutomationPeer>.GetEnumerator()
{
global::System.RuntimeTypeHandle dummySharedDynamicAdapter = typeof(global::System.Runtime.InteropServices.WindowsRuntime.IIterableSharedReferenceTypesDynamicAdapter<global::Windows.UI.Xaml.Automation.Peers.AutomationPeer>).TypeHandle;
return (global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Automation.Peers.AutomationPeer>)global::McgInterop.McgHelpers.GetGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.AutomationPeer>).TypeHandle
);
}
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return global::McgInterop.McgHelpers.GetNonGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.AutomationPeer>).TypeHandle
);
}
}
// v-table for 'System.Collections.Generic.IEnumerable<Windows.UI.Xaml.Automation.Peers.AutomationPeer>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.AutomationPeer>))]
public unsafe partial struct Vtbl
{
internal const int idx_First = 6;
}
}
// System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.Automation.Peers.AutomationPeer>
public unsafe static class IReadOnlyList_A_Windows_UI_Xaml_Automation_Peers_AutomationPeer_V___Impl
{
// DispatchClass for 'System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.Automation.Peers.AutomationPeer>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Automation.Peers.AutomationPeer>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Automation.Peers.AutomationPeer>, global::System.Collections.Generic.IReadOnlyCollection<global::Windows.UI.Xaml.Automation.Peers.AutomationPeer>
{
global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Automation.Peers.AutomationPeer> global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.AutomationPeer>.GetEnumerator()
{
global::System.RuntimeTypeHandle dummySharedDynamicAdapter = typeof(global::System.Runtime.InteropServices.WindowsRuntime.IVectorViewSharedReferenceTypesDynamicAdapter<global::Windows.UI.Xaml.Automation.Peers.AutomationPeer>).TypeHandle;
return (global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Automation.Peers.AutomationPeer>)global::McgInterop.McgHelpers.GetGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.AutomationPeer>).TypeHandle
);
}
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return global::McgInterop.McgHelpers.GetNonGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.AutomationPeer>).TypeHandle
);
}
int global::System.Collections.Generic.IReadOnlyCollection<global::Windows.UI.Xaml.Automation.Peers.AutomationPeer>.Count
{
get
{
return global::McgInterop.McgHelpers.GetReadOnlyCollectionCount(
this,
typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Automation.Peers.AutomationPeer>).TypeHandle
);
}
}
global::Windows.UI.Xaml.Automation.Peers.AutomationPeer global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Automation.Peers.AutomationPeer>.this[int index]
{
get
{
return global::System.Runtime.InteropServices.McgMarshal.FastCast<global::System.Runtime.InteropServices.WindowsRuntime.IReadOnlyListAdapter<global::Windows.UI.Xaml.Automation.Peers.AutomationPeer>>(global::System.Runtime.InteropServices.McgModuleManager.GetDynamicAdapter(
this,
typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Automation.Peers.AutomationPeer>).TypeHandle
))[index];
}
}
}
// v-table for 'System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.Automation.Peers.AutomationPeer>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Automation.Peers.AutomationPeer>))]
public unsafe partial struct Vtbl
{
internal const int idx_GetAt = 6;
internal const int idx_get_Size = 7;
internal const int idx_IndexOf = 8;
internal const int idx_GetMany = 9;
}
}
// System.Collections.Generic.IList<Windows.UI.Xaml.Automation.Peers.AutomationPeerAnnotation>
public unsafe static class IList_A_Windows_UI_Xaml_Automation_Peers_AutomationPeerAnnotation_V___Impl
{
// DispatchClass for 'System.Collections.Generic.IList<Windows.UI.Xaml.Automation.Peers.AutomationPeerAnnotation>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IList<global::Windows.UI.Xaml.Automation.Peers.AutomationPeerAnnotation>))]
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.ICollection<global::Windows.UI.Xaml.Automation.Peers.AutomationPeerAnnotation>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::System.Collections.Generic.IList<global::Windows.UI.Xaml.Automation.Peers.AutomationPeerAnnotation>, global::System.Collections.Generic.ICollection<global::Windows.UI.Xaml.Automation.Peers.AutomationPeerAnnotation>
{
global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Automation.Peers.AutomationPeerAnnotation> global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.AutomationPeerAnnotation>.GetEnumerator()
{
return (global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Automation.Peers.AutomationPeerAnnotation>)global::McgInterop.McgHelpers.GetGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.AutomationPeerAnnotation>).TypeHandle
);
}
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return global::McgInterop.McgHelpers.GetNonGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.AutomationPeerAnnotation>).TypeHandle
);
}
int global::System.Collections.Generic.ICollection<global::Windows.UI.Xaml.Automation.Peers.AutomationPeerAnnotation>.Count
{
get
{
return global::System.Runtime.InteropServices.WindowsRuntime.IVectorSharedReferenceTypesRCWAdapter.Count(this);
}
}
bool global::System.Collections.Generic.ICollection<global::Windows.UI.Xaml.Automation.Peers.AutomationPeerAnnotation>.IsReadOnly
{
get
{
return global::System.Runtime.InteropServices.WindowsRuntime.IVectorSharedReferenceTypesRCWAdapter.IsReadOnly(this);
}
}
void global::System.Collections.Generic.ICollection<global::Windows.UI.Xaml.Automation.Peers.AutomationPeerAnnotation>.Add(global::Windows.UI.Xaml.Automation.Peers.AutomationPeerAnnotation item)
{
global::System.Runtime.InteropServices.WindowsRuntime.IVectorSharedReferenceTypesRCWAdapter.Add(
this,
item
);
}
void global::System.Collections.Generic.ICollection<global::Windows.UI.Xaml.Automation.Peers.AutomationPeerAnnotation>.Clear()
{
global::System.Runtime.InteropServices.WindowsRuntime.IVectorSharedReferenceTypesRCWAdapter.Clear(this);
}
bool global::System.Collections.Generic.ICollection<global::Windows.UI.Xaml.Automation.Peers.AutomationPeerAnnotation>.Contains(global::Windows.UI.Xaml.Automation.Peers.AutomationPeerAnnotation item)
{
return global::System.Runtime.InteropServices.WindowsRuntime.IVectorSharedReferenceTypesRCWAdapter.Contains(
this,
item
);
}
void global::System.Collections.Generic.ICollection<global::Windows.UI.Xaml.Automation.Peers.AutomationPeerAnnotation>.CopyTo(
global::Windows.UI.Xaml.Automation.Peers.AutomationPeerAnnotation[] array,
int arrayindex)
{
global::System.Runtime.InteropServices.WindowsRuntime.IVectorSharedReferenceTypesRCWAdapter.CopyTo(
this,
array,
arrayindex
);
}
bool global::System.Collections.Generic.ICollection<global::Windows.UI.Xaml.Automation.Peers.AutomationPeerAnnotation>.Remove(global::Windows.UI.Xaml.Automation.Peers.AutomationPeerAnnotation item)
{
return global::System.Runtime.InteropServices.WindowsRuntime.IVectorSharedReferenceTypesRCWAdapter.Remove(
this,
item
);
}
global::Windows.UI.Xaml.Automation.Peers.AutomationPeerAnnotation global::System.Collections.Generic.IList<global::Windows.UI.Xaml.Automation.Peers.AutomationPeerAnnotation>.this[int index]
{
get
{
return global::System.Runtime.InteropServices.WindowsRuntime.IVectorSharedReferenceTypesRCWAdapter.Indexer_Get(
this,
index
);
}
set
{
global::System.Runtime.InteropServices.WindowsRuntime.IVectorSharedReferenceTypesRCWAdapter.Indexer_Set(
this,
index,
value
);
}
}
int global::System.Collections.Generic.IList<global::Windows.UI.Xaml.Automation.Peers.AutomationPeerAnnotation>.IndexOf(global::Windows.UI.Xaml.Automation.Peers.AutomationPeerAnnotation item)
{
return global::System.Runtime.InteropServices.WindowsRuntime.IVectorSharedReferenceTypesRCWAdapter.IndexOf(
this,
item
);
}
void global::System.Collections.Generic.IList<global::Windows.UI.Xaml.Automation.Peers.AutomationPeerAnnotation>.Insert(
int index,
global::Windows.UI.Xaml.Automation.Peers.AutomationPeerAnnotation item)
{
global::System.Runtime.InteropServices.WindowsRuntime.IVectorSharedReferenceTypesRCWAdapter.Insert(
this,
index,
item
);
}
void global::System.Collections.Generic.IList<global::Windows.UI.Xaml.Automation.Peers.AutomationPeerAnnotation>.RemoveAt(int index)
{
global::System.Runtime.InteropServices.WindowsRuntime.IVectorSharedReferenceTypesRCWAdapter.RemoveAt(
this,
index
);
}
}
// v-table for 'System.Collections.Generic.IList<Windows.UI.Xaml.Automation.Peers.AutomationPeerAnnotation>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IList<global::Windows.UI.Xaml.Automation.Peers.AutomationPeerAnnotation>))]
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.ICollection<global::Windows.UI.Xaml.Automation.Peers.AutomationPeerAnnotation>))]
public unsafe partial struct Vtbl
{
internal const int idx_GetAt = 6;
internal const int idx_get_Size = 7;
internal const int idx_GetView = 8;
internal const int idx_IndexOf = 9;
internal const int idx_SetAt = 10;
internal const int idx_InsertAt = 11;
internal const int idx_RemoveAt = 12;
internal const int idx_Append = 13;
internal const int idx_RemoveAtEnd = 14;
internal const int idx_Clear = 15;
internal const int idx_GetMany = 16;
internal const int idx_ReplaceAll = 17;
}
}
// System.Collections.Generic.IEnumerable<Windows.UI.Xaml.Automation.Peers.AutomationPeerAnnotation>
public unsafe static class IEnumerable_A_Windows_UI_Xaml_Automation_Peers_AutomationPeerAnnotation_V___Impl
{
// DispatchClass for 'System.Collections.Generic.IEnumerable<Windows.UI.Xaml.Automation.Peers.AutomationPeerAnnotation>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.AutomationPeerAnnotation>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.AutomationPeerAnnotation>
{
global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Automation.Peers.AutomationPeerAnnotation> global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.AutomationPeerAnnotation>.GetEnumerator()
{
global::System.RuntimeTypeHandle dummySharedDynamicAdapter = typeof(global::System.Runtime.InteropServices.WindowsRuntime.IIterableSharedReferenceTypesDynamicAdapter<global::Windows.UI.Xaml.Automation.Peers.AutomationPeerAnnotation>).TypeHandle;
return (global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Automation.Peers.AutomationPeerAnnotation>)global::McgInterop.McgHelpers.GetGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.AutomationPeerAnnotation>).TypeHandle
);
}
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return global::McgInterop.McgHelpers.GetNonGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.AutomationPeerAnnotation>).TypeHandle
);
}
}
// v-table for 'System.Collections.Generic.IEnumerable<Windows.UI.Xaml.Automation.Peers.AutomationPeerAnnotation>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.AutomationPeerAnnotation>))]
public unsafe partial struct Vtbl
{
internal const int idx_First = 6;
}
}
// System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.Automation.Peers.AutomationPeerAnnotation>
public unsafe static class IReadOnlyList_A_Windows_UI_Xaml_Automation_Peers_AutomationPeerAnnotation_V___Impl
{
// v-table for 'System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.Automation.Peers.AutomationPeerAnnotation>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Automation.Peers.AutomationPeerAnnotation>))]
public unsafe partial struct Vtbl
{
internal const int idx_GetAt = 6;
internal const int idx_get_Size = 7;
internal const int idx_IndexOf = 8;
internal const int idx_GetMany = 9;
}
}
// System.Collections.Generic.IEnumerable<Windows.Foundation.Point>
public unsafe static class IEnumerable_A_Windows_Foundation_Point_V___Impl
{
// v-table for 'System.Collections.Generic.IEnumerable<Windows.Foundation.Point>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IEnumerable<global::Windows.Foundation.Point>))]
public unsafe partial struct Vtbl
{
internal const int idx_First = 6;
}
}
// System.Collections.Generic.IEnumerable<System.Collections.Generic.IEnumerable<Windows.Foundation.Point>>
public unsafe static class IEnumerable_A_System_Collections_Generic_IEnumerable_A_Windows_Foundation_Point_V__V___Impl
{
// DispatchClass for 'System.Collections.Generic.IEnumerable<System.Collections.Generic.IEnumerable<Windows.Foundation.Point>>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IEnumerable<global::System.Collections.Generic.IEnumerable<global::Windows.Foundation.Point>>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::System.Collections.Generic.IEnumerable<global::System.Collections.Generic.IEnumerable<global::Windows.Foundation.Point>>
{
global::System.Collections.Generic.IEnumerator<global::System.Collections.Generic.IEnumerable<global::Windows.Foundation.Point>> global::System.Collections.Generic.IEnumerable<global::System.Collections.Generic.IEnumerable<global::Windows.Foundation.Point>>.GetEnumerator()
{
global::System.RuntimeTypeHandle dummySharedDynamicAdapter = typeof(global::System.Runtime.InteropServices.WindowsRuntime.IIterableSharedReferenceTypesDynamicAdapter<global::System.Collections.Generic.IEnumerable<global::Windows.Foundation.Point>>).TypeHandle;
return (global::System.Collections.Generic.IEnumerator<global::System.Collections.Generic.IEnumerable<global::Windows.Foundation.Point>>)global::McgInterop.McgHelpers.GetGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::System.Collections.Generic.IEnumerable<global::Windows.Foundation.Point>>).TypeHandle
);
}
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return global::McgInterop.McgHelpers.GetNonGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::System.Collections.Generic.IEnumerable<global::Windows.Foundation.Point>>).TypeHandle
);
}
}
// v-table for 'System.Collections.Generic.IEnumerable<System.Collections.Generic.IEnumerable<Windows.Foundation.Point>>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IEnumerable<global::System.Collections.Generic.IEnumerable<global::Windows.Foundation.Point>>))]
public unsafe partial struct Vtbl
{
internal const int idx_First = 6;
}
}
// System.Collections.Generic.IDictionary<System.Object,System.Object>
public unsafe static class IDictionary_A_System_Object_j_System_Object_V___Impl
{
// DispatchClass for 'System.Collections.Generic.IDictionary<System.Object,System.Object>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IDictionary<object, object>))]
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.ICollection<object>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::System.Collections.Generic.IDictionary<object, object>, global::System.Collections.Generic.ICollection<global::System.Collections.Generic.KeyValuePair<object, object>>
{
global::System.Collections.Generic.IEnumerator<global::System.Collections.Generic.KeyValuePair<object, object>> global::System.Collections.Generic.IEnumerable<global::System.Collections.Generic.KeyValuePair<object, object>>.GetEnumerator()
{
return (global::System.Collections.Generic.IEnumerator<global::System.Collections.Generic.KeyValuePair<object, object>>)global::McgInterop.McgHelpers.GetGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::System.Collections.Generic.KeyValuePair<object, object>>).TypeHandle
);
}
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return global::McgInterop.McgHelpers.GetNonGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::System.Collections.Generic.KeyValuePair<object, object>>).TypeHandle
);
}
int global::System.Collections.Generic.ICollection<global::System.Collections.Generic.KeyValuePair<object, object>>.Count
{
get
{
return global::System.Runtime.InteropServices.WindowsRuntime.IMapSharedReferenceTypesRCWAdapter.Count(this);
}
}
bool global::System.Collections.Generic.ICollection<global::System.Collections.Generic.KeyValuePair<object, object>>.IsReadOnly
{
get
{
return global::System.Runtime.InteropServices.WindowsRuntime.IMapSharedReferenceTypesRCWAdapter.IsReadOnly(this);
}
}
void global::System.Collections.Generic.ICollection<global::System.Collections.Generic.KeyValuePair<object, object>>.Add(global::System.Collections.Generic.KeyValuePair<object, object> item)
{
global::System.Runtime.InteropServices.WindowsRuntime.IMapSharedReferenceTypesRCWAdapter.Add(
this,
item
);
}
void global::System.Collections.Generic.ICollection<global::System.Collections.Generic.KeyValuePair<object, object>>.Clear()
{
global::System.Runtime.InteropServices.WindowsRuntime.IMapSharedReferenceTypesRCWAdapter.Clear(this);
}
bool global::System.Collections.Generic.ICollection<global::System.Collections.Generic.KeyValuePair<object, object>>.Contains(global::System.Collections.Generic.KeyValuePair<object, object> item)
{
return global::System.Runtime.InteropServices.WindowsRuntime.IMapSharedReferenceTypesRCWAdapter.Contains(
this,
item
);
}
void global::System.Collections.Generic.ICollection<global::System.Collections.Generic.KeyValuePair<object, object>>.CopyTo(
global::System.Collections.Generic.KeyValuePair<object, object>[] array,
int arrayindex)
{
global::System.Runtime.InteropServices.WindowsRuntime.IMapSharedReferenceTypesRCWAdapter.CopyTo(
this,
array,
arrayindex
);
}
bool global::System.Collections.Generic.ICollection<global::System.Collections.Generic.KeyValuePair<object, object>>.Remove(global::System.Collections.Generic.KeyValuePair<object, object> item)
{
return global::System.Runtime.InteropServices.WindowsRuntime.IMapSharedReferenceTypesRCWAdapter.Remove(
this,
item
);
}
object global::System.Collections.Generic.IDictionary<object, object>.this[object index]
{
get
{
return global::System.Runtime.InteropServices.WindowsRuntime.IMapSharedReferenceTypesRCWAdapter.Indexer_Get(
this,
index
);
}
set
{
global::System.Runtime.InteropServices.WindowsRuntime.IMapSharedReferenceTypesRCWAdapter.Indexer_Set(
this,
index,
value
);
}
}
global::System.Collections.Generic.ICollection<object> global::System.Collections.Generic.IDictionary<object, object>.Keys
{
get
{
return global::System.Runtime.InteropServices.WindowsRuntime.IMapSharedReferenceTypesRCWAdapter.Keys(this);
}
}
global::System.Collections.Generic.ICollection<object> global::System.Collections.Generic.IDictionary<object, object>.Values
{
get
{
return global::System.Runtime.InteropServices.WindowsRuntime.IMapSharedReferenceTypesRCWAdapter.Values(this);
}
}
void global::System.Collections.Generic.IDictionary<object, object>.Add(
object key,
object value)
{
global::System.Runtime.InteropServices.WindowsRuntime.IMapSharedReferenceTypesRCWAdapter.Add(
this,
key,
value
);
}
bool global::System.Collections.Generic.IDictionary<object, object>.ContainsKey(object key)
{
return global::System.Runtime.InteropServices.WindowsRuntime.IMapSharedReferenceTypesRCWAdapter.ContainsKey(
this,
key
);
}
bool global::System.Collections.Generic.IDictionary<object, object>.Remove(object key)
{
return global::System.Runtime.InteropServices.WindowsRuntime.IMapSharedReferenceTypesRCWAdapter.Remove(
this,
key
);
}
bool global::System.Collections.Generic.IDictionary<object, object>.TryGetValue(
object key,
out object value)
{
return global::System.Runtime.InteropServices.WindowsRuntime.IMapSharedReferenceTypesRCWAdapter.TryGetValue(
this,
key,
out value
);
}
}
// v-table for 'System.Collections.Generic.IDictionary<System.Object,System.Object>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IDictionary<object, object>))]
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.ICollection<object>))]
public unsafe partial struct Vtbl
{
internal const int idx_Lookup = 6;
internal const int idx_get_Size = 7;
internal const int idx_HasKey = 8;
internal const int idx_GetView = 9;
internal const int idx_Insert = 10;
internal const int idx_Remove = 11;
internal const int idx_Clear = 12;
}
}
// System.Collections.Generic.KeyValuePair<System.Object,System.Object>
public unsafe static class KeyValuePair_A_System_Object_j_System_Object_V___Impl
{
// StubClass for 'System.Collections.Generic.KeyValuePair<System.Object,System.Object>'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static object get_Key(global::System.__ComObject __this)
{
object __ret = global::McgInterop.ForwardComSharedStubs.Func_object__<global::Windows.Foundation.Collections.IKeyValuePair<object, object>>(
__this,
global::System.Collections.Generic.KeyValuePair_A_System_Object_j_System_Object_V___Impl.Vtbl.idx_get_Key
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static object get_Value(global::System.__ComObject __this)
{
object __ret = global::McgInterop.ForwardComSharedStubs.Func_object__<global::Windows.Foundation.Collections.IKeyValuePair<object, object>>(
__this,
global::System.Collections.Generic.KeyValuePair_A_System_Object_j_System_Object_V___Impl.Vtbl.idx_get_Value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
}
// DispatchClass for 'System.Collections.Generic.KeyValuePair<System.Object,System.Object>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IKeyValuePair<object, object>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Foundation.Collections.IKeyValuePair<object, object>
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IKeyValuePair`2.Key")]
object global::Windows.Foundation.Collections.IKeyValuePair<object, object>.get_Key()
{
object __retVal = global::System.Collections.Generic.KeyValuePair_A_System_Object_j_System_Object_V___Impl.StubClass.get_Key(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IKeyValuePair`2.Value")]
object global::Windows.Foundation.Collections.IKeyValuePair<object, object>.get_Value()
{
object __retVal = global::System.Collections.Generic.KeyValuePair_A_System_Object_j_System_Object_V___Impl.StubClass.get_Value(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'System.Collections.Generic.KeyValuePair<System.Object,System.Object>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IKeyValuePair<object, object>))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Key = 6;
internal const int idx_get_Value = 7;
}
}
// System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.Object,System.Object>>
public unsafe static class IEnumerable_A_System_Collections_Generic_KeyValuePair_A_System_Object_j_System_Object_V__V___Impl
{
// StubClass for 'System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.Object,System.Object>>'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.Foundation.Collections.IIterator<global::System.Collections.Generic.KeyValuePair<object, object>> First(global::System.__ComObject __this)
{
global::Windows.Foundation.Collections.IIterator<global::System.Collections.Generic.KeyValuePair<object, object>> __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::System.Collections.Generic.IEnumerable<global::System.Collections.Generic.KeyValuePair<object, object>>, global::Windows.Foundation.Collections.IIterator<global::System.Collections.Generic.KeyValuePair<object, object>>>(
__this,
global::System.Collections.Generic.IEnumerable_A_System_Collections_Generic_KeyValuePair_A_System_Object_j_System_Object_V__V___Impl.Vtbl.idx_First
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
}
// DispatchClass for 'System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.Object,System.Object>>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IEnumerable<global::System.Collections.Generic.KeyValuePair<object, object>>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::System.Collections.Generic.IEnumerable<global::System.Collections.Generic.KeyValuePair<object, object>>
{
global::System.Collections.Generic.IEnumerator<global::System.Collections.Generic.KeyValuePair<object, object>> global::System.Collections.Generic.IEnumerable<global::System.Collections.Generic.KeyValuePair<object, object>>.GetEnumerator()
{
return (global::System.Collections.Generic.IEnumerator<global::System.Collections.Generic.KeyValuePair<object, object>>)global::McgInterop.McgHelpers.GetGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::System.Collections.Generic.KeyValuePair<object, object>>).TypeHandle
);
}
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return global::McgInterop.McgHelpers.GetNonGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::System.Collections.Generic.KeyValuePair<object, object>>).TypeHandle
);
}
}
[System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IEnumerable<global::System.Collections.Generic.KeyValuePair<object,object>>))]
public class DynamicRCWAdapterClass : global::System.Runtime.InteropServices.ComInterfaceDynamicAdapter, global::System.Collections.IEnumerable
{
public global::System.Collections.IEnumerator GetEnumerator()
{
return new IIterator_PrivateRCWAdapter<global::System.Collections.Generic.KeyValuePair<object,object>>(global::System.Collections.Generic.IEnumerable_A_System_Collections_Generic_KeyValuePair_A_System_Object_j_System_Object_V__V___Impl.StubClass.First(ComObject));
}
}
// v-table for 'System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.Object,System.Object>>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IEnumerable<global::System.Collections.Generic.KeyValuePair<object, object>>))]
public unsafe partial struct Vtbl
{
internal const int idx_First = 6;
}
}
// System.Collections.Generic.IReadOnlyDictionary<System.Object,System.Object>
public unsafe static class IReadOnlyDictionary_A_System_Object_j_System_Object_V___Impl
{
// DispatchClass for 'System.Collections.Generic.IReadOnlyDictionary<System.Object,System.Object>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IReadOnlyDictionary<object, object>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::System.Collections.Generic.IReadOnlyDictionary<object, object>, global::System.Collections.Generic.IReadOnlyCollection<global::System.Collections.Generic.KeyValuePair<object, object>>
{
global::System.Collections.Generic.IEnumerator<global::System.Collections.Generic.KeyValuePair<object, object>> global::System.Collections.Generic.IEnumerable<global::System.Collections.Generic.KeyValuePair<object, object>>.GetEnumerator()
{
return (global::System.Collections.Generic.IEnumerator<global::System.Collections.Generic.KeyValuePair<object, object>>)global::McgInterop.McgHelpers.GetGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::System.Collections.Generic.KeyValuePair<object, object>>).TypeHandle
);
}
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return global::McgInterop.McgHelpers.GetNonGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::System.Collections.Generic.KeyValuePair<object, object>>).TypeHandle
);
}
int global::System.Collections.Generic.IReadOnlyCollection<global::System.Collections.Generic.KeyValuePair<object, object>>.Count
{
get
{
return global::System.Runtime.InteropServices.WindowsRuntime.IMapViewSharedReferenceTypesRCWAdapter.Count_Get(this);
}
}
object global::System.Collections.Generic.IReadOnlyDictionary<object, object>.this[object index]
{
get
{
return global::System.Runtime.InteropServices.WindowsRuntime.IMapViewSharedReferenceTypesRCWAdapter.Indexer_Get(
this,
index
);
}
}
global::System.Collections.Generic.IEnumerable<object> global::System.Collections.Generic.IReadOnlyDictionary<object, object>.Keys
{
get
{
return global::System.Runtime.InteropServices.WindowsRuntime.IMapViewSharedReferenceTypesRCWAdapter.Keys(this);
}
}
global::System.Collections.Generic.IEnumerable<object> global::System.Collections.Generic.IReadOnlyDictionary<object, object>.Values
{
get
{
return global::System.Runtime.InteropServices.WindowsRuntime.IMapViewSharedReferenceTypesRCWAdapter.Values(this);
}
}
bool global::System.Collections.Generic.IReadOnlyDictionary<object, object>.ContainsKey(object key)
{
return global::System.Runtime.InteropServices.WindowsRuntime.IMapViewSharedReferenceTypesRCWAdapter.ContainsKey(
this,
key
);
}
bool global::System.Collections.Generic.IReadOnlyDictionary<object, object>.TryGetValue(
object key,
out object value)
{
return global::System.Runtime.InteropServices.WindowsRuntime.IMapViewSharedReferenceTypesRCWAdapter.TryGetValue(
this,
key,
out value
);
}
}
// v-table for 'System.Collections.Generic.IReadOnlyDictionary<System.Object,System.Object>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IReadOnlyDictionary<object, object>))]
public unsafe partial struct Vtbl
{
internal const int idx_Lookup = 6;
internal const int idx_get_Size = 7;
internal const int idx_HasKey = 8;
internal const int idx_Split = 9;
}
}
// System.Collections.Generic.IList<Windows.UI.Xaml.UIElement>
public unsafe static class IList_A_Windows_UI_Xaml_UIElement_V___Impl
{
// DispatchClass for 'System.Collections.Generic.IList<Windows.UI.Xaml.UIElement>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IList<global::Windows.UI.Xaml.UIElement>))]
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.ICollection<global::Windows.UI.Xaml.UIElement>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::System.Collections.Generic.IList<global::Windows.UI.Xaml.UIElement>, global::System.Collections.Generic.ICollection<global::Windows.UI.Xaml.UIElement>
{
global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.UIElement> global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.UIElement>.GetEnumerator()
{
return (global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.UIElement>)global::McgInterop.McgHelpers.GetGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.UIElement>).TypeHandle
);
}
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return global::McgInterop.McgHelpers.GetNonGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.UIElement>).TypeHandle
);
}
int global::System.Collections.Generic.ICollection<global::Windows.UI.Xaml.UIElement>.Count
{
get
{
return global::System.Runtime.InteropServices.WindowsRuntime.IVectorSharedReferenceTypesRCWAdapter.Count(this);
}
}
bool global::System.Collections.Generic.ICollection<global::Windows.UI.Xaml.UIElement>.IsReadOnly
{
get
{
return global::System.Runtime.InteropServices.WindowsRuntime.IVectorSharedReferenceTypesRCWAdapter.IsReadOnly(this);
}
}
void global::System.Collections.Generic.ICollection<global::Windows.UI.Xaml.UIElement>.Add(global::Windows.UI.Xaml.UIElement item)
{
global::System.Runtime.InteropServices.WindowsRuntime.IVectorSharedReferenceTypesRCWAdapter.Add(
this,
item
);
}
void global::System.Collections.Generic.ICollection<global::Windows.UI.Xaml.UIElement>.Clear()
{
global::System.Runtime.InteropServices.WindowsRuntime.IVectorSharedReferenceTypesRCWAdapter.Clear(this);
}
bool global::System.Collections.Generic.ICollection<global::Windows.UI.Xaml.UIElement>.Contains(global::Windows.UI.Xaml.UIElement item)
{
return global::System.Runtime.InteropServices.WindowsRuntime.IVectorSharedReferenceTypesRCWAdapter.Contains(
this,
item
);
}
void global::System.Collections.Generic.ICollection<global::Windows.UI.Xaml.UIElement>.CopyTo(
global::Windows.UI.Xaml.UIElement[] array,
int arrayindex)
{
global::System.Runtime.InteropServices.WindowsRuntime.IVectorSharedReferenceTypesRCWAdapter.CopyTo(
this,
array,
arrayindex
);
}
bool global::System.Collections.Generic.ICollection<global::Windows.UI.Xaml.UIElement>.Remove(global::Windows.UI.Xaml.UIElement item)
{
return global::System.Runtime.InteropServices.WindowsRuntime.IVectorSharedReferenceTypesRCWAdapter.Remove(
this,
item
);
}
global::Windows.UI.Xaml.UIElement global::System.Collections.Generic.IList<global::Windows.UI.Xaml.UIElement>.this[int index]
{
get
{
return global::System.Runtime.InteropServices.WindowsRuntime.IVectorSharedReferenceTypesRCWAdapter.Indexer_Get(
this,
index
);
}
set
{
global::System.Runtime.InteropServices.WindowsRuntime.IVectorSharedReferenceTypesRCWAdapter.Indexer_Set(
this,
index,
value
);
}
}
int global::System.Collections.Generic.IList<global::Windows.UI.Xaml.UIElement>.IndexOf(global::Windows.UI.Xaml.UIElement item)
{
return global::System.Runtime.InteropServices.WindowsRuntime.IVectorSharedReferenceTypesRCWAdapter.IndexOf(
this,
item
);
}
void global::System.Collections.Generic.IList<global::Windows.UI.Xaml.UIElement>.Insert(
int index,
global::Windows.UI.Xaml.UIElement item)
{
global::System.Runtime.InteropServices.WindowsRuntime.IVectorSharedReferenceTypesRCWAdapter.Insert(
this,
index,
item
);
}
void global::System.Collections.Generic.IList<global::Windows.UI.Xaml.UIElement>.RemoveAt(int index)
{
global::System.Runtime.InteropServices.WindowsRuntime.IVectorSharedReferenceTypesRCWAdapter.RemoveAt(
this,
index
);
}
}
// v-table for 'System.Collections.Generic.IList<Windows.UI.Xaml.UIElement>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IList<global::Windows.UI.Xaml.UIElement>))]
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.ICollection<global::Windows.UI.Xaml.UIElement>))]
public unsafe partial struct Vtbl
{
internal const int idx_GetAt = 6;
internal const int idx_get_Size = 7;
internal const int idx_GetView = 8;
internal const int idx_IndexOf = 9;
internal const int idx_SetAt = 10;
internal const int idx_InsertAt = 11;
internal const int idx_RemoveAt = 12;
internal const int idx_Append = 13;
internal const int idx_RemoveAtEnd = 14;
internal const int idx_Clear = 15;
internal const int idx_GetMany = 16;
internal const int idx_ReplaceAll = 17;
}
}
// System.Collections.Generic.IEnumerable<Windows.UI.Xaml.UIElement>
public unsafe static class IEnumerable_A_Windows_UI_Xaml_UIElement_V___Impl
{
// DispatchClass for 'System.Collections.Generic.IEnumerable<Windows.UI.Xaml.UIElement>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.UIElement>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.UIElement>
{
global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.UIElement> global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.UIElement>.GetEnumerator()
{
global::System.RuntimeTypeHandle dummySharedDynamicAdapter = typeof(global::System.Runtime.InteropServices.WindowsRuntime.IIterableSharedReferenceTypesDynamicAdapter<global::Windows.UI.Xaml.UIElement>).TypeHandle;
return (global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.UIElement>)global::McgInterop.McgHelpers.GetGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.UIElement>).TypeHandle
);
}
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return global::McgInterop.McgHelpers.GetNonGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.UIElement>).TypeHandle
);
}
}
// v-table for 'System.Collections.Generic.IEnumerable<Windows.UI.Xaml.UIElement>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.UIElement>))]
public unsafe partial struct Vtbl
{
internal const int idx_First = 6;
}
}
// System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.UIElement>
public unsafe static class IReadOnlyList_A_Windows_UI_Xaml_UIElement_V___Impl
{
// DispatchClass for 'System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.UIElement>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.UIElement>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.UIElement>, global::System.Collections.Generic.IReadOnlyCollection<global::Windows.UI.Xaml.UIElement>
{
global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.UIElement> global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.UIElement>.GetEnumerator()
{
global::System.RuntimeTypeHandle dummySharedDynamicAdapter = typeof(global::System.Runtime.InteropServices.WindowsRuntime.IVectorViewSharedReferenceTypesDynamicAdapter<global::Windows.UI.Xaml.UIElement>).TypeHandle;
return (global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.UIElement>)global::McgInterop.McgHelpers.GetGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.UIElement>).TypeHandle
);
}
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return global::McgInterop.McgHelpers.GetNonGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.UIElement>).TypeHandle
);
}
int global::System.Collections.Generic.IReadOnlyCollection<global::Windows.UI.Xaml.UIElement>.Count
{
get
{
return global::McgInterop.McgHelpers.GetReadOnlyCollectionCount(
this,
typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.UIElement>).TypeHandle
);
}
}
global::Windows.UI.Xaml.UIElement global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.UIElement>.this[int index]
{
get
{
return global::System.Runtime.InteropServices.McgMarshal.FastCast<global::System.Runtime.InteropServices.WindowsRuntime.IReadOnlyListAdapter<global::Windows.UI.Xaml.UIElement>>(global::System.Runtime.InteropServices.McgModuleManager.GetDynamicAdapter(
this,
typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.UIElement>).TypeHandle
))[index];
}
}
}
// v-table for 'System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.UIElement>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.UIElement>))]
public unsafe partial struct Vtbl
{
internal const int idx_GetAt = 6;
internal const int idx_get_Size = 7;
internal const int idx_IndexOf = 8;
internal const int idx_GetMany = 9;
}
}
// System.Collections.Generic.IList<Windows.UI.Xaml.Controls.RowDefinition>
public unsafe static class IList_A_Windows_UI_Xaml_Controls_RowDefinition_V___Impl
{
// DispatchClass for 'System.Collections.Generic.IList<Windows.UI.Xaml.Controls.RowDefinition>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IList<global::Windows.UI.Xaml.Controls.RowDefinition>))]
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.ICollection<global::Windows.UI.Xaml.Controls.RowDefinition>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::System.Collections.Generic.IList<global::Windows.UI.Xaml.Controls.RowDefinition>, global::System.Collections.Generic.ICollection<global::Windows.UI.Xaml.Controls.RowDefinition>
{
global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Controls.RowDefinition> global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Controls.RowDefinition>.GetEnumerator()
{
return (global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Controls.RowDefinition>)global::McgInterop.McgHelpers.GetGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Controls.RowDefinition>).TypeHandle
);
}
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return global::McgInterop.McgHelpers.GetNonGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Controls.RowDefinition>).TypeHandle
);
}
int global::System.Collections.Generic.ICollection<global::Windows.UI.Xaml.Controls.RowDefinition>.Count
{
get
{
return global::System.Runtime.InteropServices.WindowsRuntime.IVectorSharedReferenceTypesRCWAdapter.Count(this);
}
}
bool global::System.Collections.Generic.ICollection<global::Windows.UI.Xaml.Controls.RowDefinition>.IsReadOnly
{
get
{
return global::System.Runtime.InteropServices.WindowsRuntime.IVectorSharedReferenceTypesRCWAdapter.IsReadOnly(this);
}
}
void global::System.Collections.Generic.ICollection<global::Windows.UI.Xaml.Controls.RowDefinition>.Add(global::Windows.UI.Xaml.Controls.RowDefinition item)
{
global::System.Runtime.InteropServices.WindowsRuntime.IVectorSharedReferenceTypesRCWAdapter.Add(
this,
item
);
}
void global::System.Collections.Generic.ICollection<global::Windows.UI.Xaml.Controls.RowDefinition>.Clear()
{
global::System.Runtime.InteropServices.WindowsRuntime.IVectorSharedReferenceTypesRCWAdapter.Clear(this);
}
bool global::System.Collections.Generic.ICollection<global::Windows.UI.Xaml.Controls.RowDefinition>.Contains(global::Windows.UI.Xaml.Controls.RowDefinition item)
{
return global::System.Runtime.InteropServices.WindowsRuntime.IVectorSharedReferenceTypesRCWAdapter.Contains(
this,
item
);
}
void global::System.Collections.Generic.ICollection<global::Windows.UI.Xaml.Controls.RowDefinition>.CopyTo(
global::Windows.UI.Xaml.Controls.RowDefinition[] array,
int arrayindex)
{
global::System.Runtime.InteropServices.WindowsRuntime.IVectorSharedReferenceTypesRCWAdapter.CopyTo(
this,
array,
arrayindex
);
}
bool global::System.Collections.Generic.ICollection<global::Windows.UI.Xaml.Controls.RowDefinition>.Remove(global::Windows.UI.Xaml.Controls.RowDefinition item)
{
return global::System.Runtime.InteropServices.WindowsRuntime.IVectorSharedReferenceTypesRCWAdapter.Remove(
this,
item
);
}
global::Windows.UI.Xaml.Controls.RowDefinition global::System.Collections.Generic.IList<global::Windows.UI.Xaml.Controls.RowDefinition>.this[int index]
{
get
{
return global::System.Runtime.InteropServices.WindowsRuntime.IVectorSharedReferenceTypesRCWAdapter.Indexer_Get(
this,
index
);
}
set
{
global::System.Runtime.InteropServices.WindowsRuntime.IVectorSharedReferenceTypesRCWAdapter.Indexer_Set(
this,
index,
value
);
}
}
int global::System.Collections.Generic.IList<global::Windows.UI.Xaml.Controls.RowDefinition>.IndexOf(global::Windows.UI.Xaml.Controls.RowDefinition item)
{
return global::System.Runtime.InteropServices.WindowsRuntime.IVectorSharedReferenceTypesRCWAdapter.IndexOf(
this,
item
);
}
void global::System.Collections.Generic.IList<global::Windows.UI.Xaml.Controls.RowDefinition>.Insert(
int index,
global::Windows.UI.Xaml.Controls.RowDefinition item)
{
global::System.Runtime.InteropServices.WindowsRuntime.IVectorSharedReferenceTypesRCWAdapter.Insert(
this,
index,
item
);
}
void global::System.Collections.Generic.IList<global::Windows.UI.Xaml.Controls.RowDefinition>.RemoveAt(int index)
{
global::System.Runtime.InteropServices.WindowsRuntime.IVectorSharedReferenceTypesRCWAdapter.RemoveAt(
this,
index
);
}
}
// v-table for 'System.Collections.Generic.IList<Windows.UI.Xaml.Controls.RowDefinition>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IList<global::Windows.UI.Xaml.Controls.RowDefinition>))]
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.ICollection<global::Windows.UI.Xaml.Controls.RowDefinition>))]
public unsafe partial struct Vtbl
{
internal const int idx_GetAt = 6;
internal const int idx_get_Size = 7;
internal const int idx_GetView = 8;
internal const int idx_IndexOf = 9;
internal const int idx_SetAt = 10;
internal const int idx_InsertAt = 11;
internal const int idx_RemoveAt = 12;
internal const int idx_Append = 13;
internal const int idx_RemoveAtEnd = 14;
internal const int idx_Clear = 15;
internal const int idx_GetMany = 16;
internal const int idx_ReplaceAll = 17;
}
}
// System.Collections.Generic.IEnumerable<Windows.UI.Xaml.Controls.RowDefinition>
public unsafe static class IEnumerable_A_Windows_UI_Xaml_Controls_RowDefinition_V___Impl
{
// DispatchClass for 'System.Collections.Generic.IEnumerable<Windows.UI.Xaml.Controls.RowDefinition>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Controls.RowDefinition>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Controls.RowDefinition>
{
global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Controls.RowDefinition> global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Controls.RowDefinition>.GetEnumerator()
{
global::System.RuntimeTypeHandle dummySharedDynamicAdapter = typeof(global::System.Runtime.InteropServices.WindowsRuntime.IIterableSharedReferenceTypesDynamicAdapter<global::Windows.UI.Xaml.Controls.RowDefinition>).TypeHandle;
return (global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Controls.RowDefinition>)global::McgInterop.McgHelpers.GetGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Controls.RowDefinition>).TypeHandle
);
}
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return global::McgInterop.McgHelpers.GetNonGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Controls.RowDefinition>).TypeHandle
);
}
}
// v-table for 'System.Collections.Generic.IEnumerable<Windows.UI.Xaml.Controls.RowDefinition>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Controls.RowDefinition>))]
public unsafe partial struct Vtbl
{
internal const int idx_First = 6;
}
}
// System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.Controls.RowDefinition>
public unsafe static class IReadOnlyList_A_Windows_UI_Xaml_Controls_RowDefinition_V___Impl
{
// DispatchClass for 'System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.Controls.RowDefinition>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Controls.RowDefinition>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Controls.RowDefinition>, global::System.Collections.Generic.IReadOnlyCollection<global::Windows.UI.Xaml.Controls.RowDefinition>
{
global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Controls.RowDefinition> global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Controls.RowDefinition>.GetEnumerator()
{
global::System.RuntimeTypeHandle dummySharedDynamicAdapter = typeof(global::System.Runtime.InteropServices.WindowsRuntime.IVectorViewSharedReferenceTypesDynamicAdapter<global::Windows.UI.Xaml.Controls.RowDefinition>).TypeHandle;
return (global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Controls.RowDefinition>)global::McgInterop.McgHelpers.GetGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Controls.RowDefinition>).TypeHandle
);
}
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return global::McgInterop.McgHelpers.GetNonGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Controls.RowDefinition>).TypeHandle
);
}
int global::System.Collections.Generic.IReadOnlyCollection<global::Windows.UI.Xaml.Controls.RowDefinition>.Count
{
get
{
return global::McgInterop.McgHelpers.GetReadOnlyCollectionCount(
this,
typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Controls.RowDefinition>).TypeHandle
);
}
}
global::Windows.UI.Xaml.Controls.RowDefinition global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Controls.RowDefinition>.this[int index]
{
get
{
return global::System.Runtime.InteropServices.McgMarshal.FastCast<global::System.Runtime.InteropServices.WindowsRuntime.IReadOnlyListAdapter<global::Windows.UI.Xaml.Controls.RowDefinition>>(global::System.Runtime.InteropServices.McgModuleManager.GetDynamicAdapter(
this,
typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Controls.RowDefinition>).TypeHandle
))[index];
}
}
}
// v-table for 'System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.Controls.RowDefinition>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Controls.RowDefinition>))]
public unsafe partial struct Vtbl
{
internal const int idx_GetAt = 6;
internal const int idx_get_Size = 7;
internal const int idx_IndexOf = 8;
internal const int idx_GetMany = 9;
}
}
// System.Collections.Generic.IEnumerable<Windows.UI.Xaml.DependencyObject>
public unsafe static class IEnumerable_A_Windows_UI_Xaml_DependencyObject_V___Impl
{
// DispatchClass for 'System.Collections.Generic.IEnumerable<Windows.UI.Xaml.DependencyObject>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.DependencyObject>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.DependencyObject>
{
global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.DependencyObject> global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.DependencyObject>.GetEnumerator()
{
global::System.RuntimeTypeHandle dummySharedDynamicAdapter = typeof(global::System.Runtime.InteropServices.WindowsRuntime.IIterableSharedReferenceTypesDynamicAdapter<global::Windows.UI.Xaml.DependencyObject>).TypeHandle;
return (global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.DependencyObject>)global::McgInterop.McgHelpers.GetGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.DependencyObject>).TypeHandle
);
}
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return global::McgInterop.McgHelpers.GetNonGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.DependencyObject>).TypeHandle
);
}
}
// v-table for 'System.Collections.Generic.IEnumerable<Windows.UI.Xaml.DependencyObject>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.DependencyObject>))]
public unsafe partial struct Vtbl
{
internal const int idx_First = 6;
}
}
// System.Collections.Generic.IEnumerable<Windows.UI.Xaml.IDependencyObject>
public unsafe static class IEnumerable_A_Windows_UI_Xaml_IDependencyObject_V___Impl
{
// DispatchClass for 'System.Collections.Generic.IEnumerable<Windows.UI.Xaml.IDependencyObject>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.IDependencyObject>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.IDependencyObject>
{
global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.IDependencyObject> global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.IDependencyObject>.GetEnumerator()
{
global::System.RuntimeTypeHandle dummySharedDynamicAdapter = typeof(global::System.Runtime.InteropServices.WindowsRuntime.IIterableSharedReferenceTypesDynamicAdapter<global::Windows.UI.Xaml.IDependencyObject>).TypeHandle;
return (global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.IDependencyObject>)global::McgInterop.McgHelpers.GetGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.IDependencyObject>).TypeHandle
);
}
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return global::McgInterop.McgHelpers.GetNonGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.IDependencyObject>).TypeHandle
);
}
}
// v-table for 'System.Collections.Generic.IEnumerable<Windows.UI.Xaml.IDependencyObject>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.IDependencyObject>))]
public unsafe partial struct Vtbl
{
internal const int idx_First = 6;
}
}
// System.Collections.Generic.IEnumerable<Windows.UI.Xaml.IDependencyObject2>
public unsafe static class IEnumerable_A_Windows_UI_Xaml_IDependencyObject2_V___Impl
{
// DispatchClass for 'System.Collections.Generic.IEnumerable<Windows.UI.Xaml.IDependencyObject2>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.IDependencyObject2>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.IDependencyObject2>
{
global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.IDependencyObject2> global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.IDependencyObject2>.GetEnumerator()
{
global::System.RuntimeTypeHandle dummySharedDynamicAdapter = typeof(global::System.Runtime.InteropServices.WindowsRuntime.IIterableSharedReferenceTypesDynamicAdapter<global::Windows.UI.Xaml.IDependencyObject2>).TypeHandle;
return (global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.IDependencyObject2>)global::McgInterop.McgHelpers.GetGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.IDependencyObject2>).TypeHandle
);
}
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return global::McgInterop.McgHelpers.GetNonGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.IDependencyObject2>).TypeHandle
);
}
}
// v-table for 'System.Collections.Generic.IEnumerable<Windows.UI.Xaml.IDependencyObject2>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.IDependencyObject2>))]
public unsafe partial struct Vtbl
{
internal const int idx_First = 6;
}
}
// System.Collections.Generic.IEnumerable<Windows.UI.Xaml.IUIElement>
public unsafe static class IEnumerable_A_Windows_UI_Xaml_IUIElement_V___Impl
{
// DispatchClass for 'System.Collections.Generic.IEnumerable<Windows.UI.Xaml.IUIElement>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.IUIElement>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.IUIElement>
{
global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.IUIElement> global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.IUIElement>.GetEnumerator()
{
global::System.RuntimeTypeHandle dummySharedDynamicAdapter = typeof(global::System.Runtime.InteropServices.WindowsRuntime.IIterableSharedReferenceTypesDynamicAdapter<global::Windows.UI.Xaml.IUIElement>).TypeHandle;
return (global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.IUIElement>)global::McgInterop.McgHelpers.GetGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.IUIElement>).TypeHandle
);
}
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return global::McgInterop.McgHelpers.GetNonGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.IUIElement>).TypeHandle
);
}
}
// v-table for 'System.Collections.Generic.IEnumerable<Windows.UI.Xaml.IUIElement>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.IUIElement>))]
public unsafe partial struct Vtbl
{
internal const int idx_First = 6;
}
}
// System.Collections.Generic.IEnumerable<Windows.UI.Xaml.IUIElementOverrides>
public unsafe static class IEnumerable_A_Windows_UI_Xaml_IUIElementOverrides_V___Impl
{
// DispatchClass for 'System.Collections.Generic.IEnumerable<Windows.UI.Xaml.IUIElementOverrides>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.IUIElementOverrides>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.IUIElementOverrides>
{
global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.IUIElementOverrides> global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.IUIElementOverrides>.GetEnumerator()
{
global::System.RuntimeTypeHandle dummySharedDynamicAdapter = typeof(global::System.Runtime.InteropServices.WindowsRuntime.IIterableSharedReferenceTypesDynamicAdapter<global::Windows.UI.Xaml.IUIElementOverrides>).TypeHandle;
return (global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.IUIElementOverrides>)global::McgInterop.McgHelpers.GetGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.IUIElementOverrides>).TypeHandle
);
}
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return global::McgInterop.McgHelpers.GetNonGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.IUIElementOverrides>).TypeHandle
);
}
}
// v-table for 'System.Collections.Generic.IEnumerable<Windows.UI.Xaml.IUIElementOverrides>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.IUIElementOverrides>))]
public unsafe partial struct Vtbl
{
internal const int idx_First = 6;
}
}
// System.Collections.Generic.IEnumerable<Windows.UI.Xaml.IUIElement2>
public unsafe static class IEnumerable_A_Windows_UI_Xaml_IUIElement2_V___Impl
{
// DispatchClass for 'System.Collections.Generic.IEnumerable<Windows.UI.Xaml.IUIElement2>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.IUIElement2>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.IUIElement2>
{
global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.IUIElement2> global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.IUIElement2>.GetEnumerator()
{
global::System.RuntimeTypeHandle dummySharedDynamicAdapter = typeof(global::System.Runtime.InteropServices.WindowsRuntime.IIterableSharedReferenceTypesDynamicAdapter<global::Windows.UI.Xaml.IUIElement2>).TypeHandle;
return (global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.IUIElement2>)global::McgInterop.McgHelpers.GetGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.IUIElement2>).TypeHandle
);
}
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return global::McgInterop.McgHelpers.GetNonGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.IUIElement2>).TypeHandle
);
}
}
// v-table for 'System.Collections.Generic.IEnumerable<Windows.UI.Xaml.IUIElement2>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.IUIElement2>))]
public unsafe partial struct Vtbl
{
internal const int idx_First = 6;
}
}
// System.Collections.Generic.IEnumerable<Windows.UI.Xaml.IUIElement3>
public unsafe static class IEnumerable_A_Windows_UI_Xaml_IUIElement3_V___Impl
{
// DispatchClass for 'System.Collections.Generic.IEnumerable<Windows.UI.Xaml.IUIElement3>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.IUIElement3>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.IUIElement3>
{
global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.IUIElement3> global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.IUIElement3>.GetEnumerator()
{
global::System.RuntimeTypeHandle dummySharedDynamicAdapter = typeof(global::System.Runtime.InteropServices.WindowsRuntime.IIterableSharedReferenceTypesDynamicAdapter<global::Windows.UI.Xaml.IUIElement3>).TypeHandle;
return (global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.IUIElement3>)global::McgInterop.McgHelpers.GetGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.IUIElement3>).TypeHandle
);
}
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return global::McgInterop.McgHelpers.GetNonGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.IUIElement3>).TypeHandle
);
}
}
// v-table for 'System.Collections.Generic.IEnumerable<Windows.UI.Xaml.IUIElement3>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.IUIElement3>))]
public unsafe partial struct Vtbl
{
internal const int idx_First = 6;
}
}
// System.Collections.Generic.IEnumerable<Windows.UI.Xaml.IUIElement4>
public unsafe static class IEnumerable_A_Windows_UI_Xaml_IUIElement4_V___Impl
{
// DispatchClass for 'System.Collections.Generic.IEnumerable<Windows.UI.Xaml.IUIElement4>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.IUIElement4>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.IUIElement4>
{
global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.IUIElement4> global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.IUIElement4>.GetEnumerator()
{
global::System.RuntimeTypeHandle dummySharedDynamicAdapter = typeof(global::System.Runtime.InteropServices.WindowsRuntime.IIterableSharedReferenceTypesDynamicAdapter<global::Windows.UI.Xaml.IUIElement4>).TypeHandle;
return (global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.IUIElement4>)global::McgInterop.McgHelpers.GetGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.IUIElement4>).TypeHandle
);
}
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return global::McgInterop.McgHelpers.GetNonGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.IUIElement4>).TypeHandle
);
}
}
// v-table for 'System.Collections.Generic.IEnumerable<Windows.UI.Xaml.IUIElement4>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.IUIElement4>))]
public unsafe partial struct Vtbl
{
internal const int idx_First = 6;
}
}
// System.Collections.Generic.IEnumerable<Windows.UI.Xaml.Controls.IRowDefinition>
public unsafe static class IEnumerable_A_Windows_UI_Xaml_Controls_IRowDefinition_V___Impl
{
// DispatchClass for 'System.Collections.Generic.IEnumerable<Windows.UI.Xaml.Controls.IRowDefinition>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Controls.IRowDefinition>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Controls.IRowDefinition>
{
global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Controls.IRowDefinition> global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Controls.IRowDefinition>.GetEnumerator()
{
global::System.RuntimeTypeHandle dummySharedDynamicAdapter = typeof(global::System.Runtime.InteropServices.WindowsRuntime.IIterableSharedReferenceTypesDynamicAdapter<global::Windows.UI.Xaml.Controls.IRowDefinition>).TypeHandle;
return (global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Controls.IRowDefinition>)global::McgInterop.McgHelpers.GetGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Controls.IRowDefinition>).TypeHandle
);
}
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return global::McgInterop.McgHelpers.GetNonGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Controls.IRowDefinition>).TypeHandle
);
}
}
// v-table for 'System.Collections.Generic.IEnumerable<Windows.UI.Xaml.Controls.IRowDefinition>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Controls.IRowDefinition>))]
public unsafe partial struct Vtbl
{
internal const int idx_First = 6;
}
}
// System.Collections.Generic.IList<Windows.UI.Xaml.Documents.Inline>
public unsafe static class IList_A_Windows_UI_Xaml_Documents_Inline_V___Impl
{
// DispatchClass for 'System.Collections.Generic.IList<Windows.UI.Xaml.Documents.Inline>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IList<global::Windows.UI.Xaml.Documents.Inline>))]
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.ICollection<global::Windows.UI.Xaml.Documents.Inline>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::System.Collections.Generic.IList<global::Windows.UI.Xaml.Documents.Inline>, global::System.Collections.Generic.ICollection<global::Windows.UI.Xaml.Documents.Inline>
{
global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Documents.Inline> global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Documents.Inline>.GetEnumerator()
{
return (global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Documents.Inline>)global::McgInterop.McgHelpers.GetGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Documents.Inline>).TypeHandle
);
}
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return global::McgInterop.McgHelpers.GetNonGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Documents.Inline>).TypeHandle
);
}
int global::System.Collections.Generic.ICollection<global::Windows.UI.Xaml.Documents.Inline>.Count
{
get
{
return global::System.Runtime.InteropServices.WindowsRuntime.IVectorSharedReferenceTypesRCWAdapter.Count(this);
}
}
bool global::System.Collections.Generic.ICollection<global::Windows.UI.Xaml.Documents.Inline>.IsReadOnly
{
get
{
return global::System.Runtime.InteropServices.WindowsRuntime.IVectorSharedReferenceTypesRCWAdapter.IsReadOnly(this);
}
}
void global::System.Collections.Generic.ICollection<global::Windows.UI.Xaml.Documents.Inline>.Add(global::Windows.UI.Xaml.Documents.Inline item)
{
global::System.Runtime.InteropServices.WindowsRuntime.IVectorSharedReferenceTypesRCWAdapter.Add(
this,
item
);
}
void global::System.Collections.Generic.ICollection<global::Windows.UI.Xaml.Documents.Inline>.Clear()
{
global::System.Runtime.InteropServices.WindowsRuntime.IVectorSharedReferenceTypesRCWAdapter.Clear(this);
}
bool global::System.Collections.Generic.ICollection<global::Windows.UI.Xaml.Documents.Inline>.Contains(global::Windows.UI.Xaml.Documents.Inline item)
{
return global::System.Runtime.InteropServices.WindowsRuntime.IVectorSharedReferenceTypesRCWAdapter.Contains(
this,
item
);
}
void global::System.Collections.Generic.ICollection<global::Windows.UI.Xaml.Documents.Inline>.CopyTo(
global::Windows.UI.Xaml.Documents.Inline[] array,
int arrayindex)
{
global::System.Runtime.InteropServices.WindowsRuntime.IVectorSharedReferenceTypesRCWAdapter.CopyTo(
this,
array,
arrayindex
);
}
bool global::System.Collections.Generic.ICollection<global::Windows.UI.Xaml.Documents.Inline>.Remove(global::Windows.UI.Xaml.Documents.Inline item)
{
return global::System.Runtime.InteropServices.WindowsRuntime.IVectorSharedReferenceTypesRCWAdapter.Remove(
this,
item
);
}
global::Windows.UI.Xaml.Documents.Inline global::System.Collections.Generic.IList<global::Windows.UI.Xaml.Documents.Inline>.this[int index]
{
get
{
return global::System.Runtime.InteropServices.WindowsRuntime.IVectorSharedReferenceTypesRCWAdapter.Indexer_Get(
this,
index
);
}
set
{
global::System.Runtime.InteropServices.WindowsRuntime.IVectorSharedReferenceTypesRCWAdapter.Indexer_Set(
this,
index,
value
);
}
}
int global::System.Collections.Generic.IList<global::Windows.UI.Xaml.Documents.Inline>.IndexOf(global::Windows.UI.Xaml.Documents.Inline item)
{
return global::System.Runtime.InteropServices.WindowsRuntime.IVectorSharedReferenceTypesRCWAdapter.IndexOf(
this,
item
);
}
void global::System.Collections.Generic.IList<global::Windows.UI.Xaml.Documents.Inline>.Insert(
int index,
global::Windows.UI.Xaml.Documents.Inline item)
{
global::System.Runtime.InteropServices.WindowsRuntime.IVectorSharedReferenceTypesRCWAdapter.Insert(
this,
index,
item
);
}
void global::System.Collections.Generic.IList<global::Windows.UI.Xaml.Documents.Inline>.RemoveAt(int index)
{
global::System.Runtime.InteropServices.WindowsRuntime.IVectorSharedReferenceTypesRCWAdapter.RemoveAt(
this,
index
);
}
}
// v-table for 'System.Collections.Generic.IList<Windows.UI.Xaml.Documents.Inline>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IList<global::Windows.UI.Xaml.Documents.Inline>))]
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.ICollection<global::Windows.UI.Xaml.Documents.Inline>))]
public unsafe partial struct Vtbl
{
internal const int idx_GetAt = 6;
internal const int idx_get_Size = 7;
internal const int idx_GetView = 8;
internal const int idx_IndexOf = 9;
internal const int idx_SetAt = 10;
internal const int idx_InsertAt = 11;
internal const int idx_RemoveAt = 12;
internal const int idx_Append = 13;
internal const int idx_RemoveAtEnd = 14;
internal const int idx_Clear = 15;
internal const int idx_GetMany = 16;
internal const int idx_ReplaceAll = 17;
}
}
// System.Collections.Generic.IEnumerable<Windows.UI.Xaml.Documents.Inline>
public unsafe static class IEnumerable_A_Windows_UI_Xaml_Documents_Inline_V___Impl
{
// DispatchClass for 'System.Collections.Generic.IEnumerable<Windows.UI.Xaml.Documents.Inline>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Documents.Inline>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Documents.Inline>
{
global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Documents.Inline> global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Documents.Inline>.GetEnumerator()
{
global::System.RuntimeTypeHandle dummySharedDynamicAdapter = typeof(global::System.Runtime.InteropServices.WindowsRuntime.IIterableSharedReferenceTypesDynamicAdapter<global::Windows.UI.Xaml.Documents.Inline>).TypeHandle;
return (global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Documents.Inline>)global::McgInterop.McgHelpers.GetGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Documents.Inline>).TypeHandle
);
}
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return global::McgInterop.McgHelpers.GetNonGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Documents.Inline>).TypeHandle
);
}
}
// v-table for 'System.Collections.Generic.IEnumerable<Windows.UI.Xaml.Documents.Inline>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Documents.Inline>))]
public unsafe partial struct Vtbl
{
internal const int idx_First = 6;
}
}
// System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.Documents.Inline>
public unsafe static class IReadOnlyList_A_Windows_UI_Xaml_Documents_Inline_V___Impl
{
// DispatchClass for 'System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.Documents.Inline>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Documents.Inline>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Documents.Inline>, global::System.Collections.Generic.IReadOnlyCollection<global::Windows.UI.Xaml.Documents.Inline>
{
global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Documents.Inline> global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Documents.Inline>.GetEnumerator()
{
global::System.RuntimeTypeHandle dummySharedDynamicAdapter = typeof(global::System.Runtime.InteropServices.WindowsRuntime.IVectorViewSharedReferenceTypesDynamicAdapter<global::Windows.UI.Xaml.Documents.Inline>).TypeHandle;
return (global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Documents.Inline>)global::McgInterop.McgHelpers.GetGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Documents.Inline>).TypeHandle
);
}
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return global::McgInterop.McgHelpers.GetNonGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Documents.Inline>).TypeHandle
);
}
int global::System.Collections.Generic.IReadOnlyCollection<global::Windows.UI.Xaml.Documents.Inline>.Count
{
get
{
return global::McgInterop.McgHelpers.GetReadOnlyCollectionCount(
this,
typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Documents.Inline>).TypeHandle
);
}
}
global::Windows.UI.Xaml.Documents.Inline global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Documents.Inline>.this[int index]
{
get
{
return global::System.Runtime.InteropServices.McgMarshal.FastCast<global::System.Runtime.InteropServices.WindowsRuntime.IReadOnlyListAdapter<global::Windows.UI.Xaml.Documents.Inline>>(global::System.Runtime.InteropServices.McgModuleManager.GetDynamicAdapter(
this,
typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Documents.Inline>).TypeHandle
))[index];
}
}
}
// v-table for 'System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.Documents.Inline>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Documents.Inline>))]
public unsafe partial struct Vtbl
{
internal const int idx_GetAt = 6;
internal const int idx_get_Size = 7;
internal const int idx_IndexOf = 8;
internal const int idx_GetMany = 9;
}
}
// System.Collections.Generic.IEnumerable<Windows.UI.Xaml.Documents.TextElement>
public unsafe static class IEnumerable_A_Windows_UI_Xaml_Documents_TextElement_V___Impl
{
// DispatchClass for 'System.Collections.Generic.IEnumerable<Windows.UI.Xaml.Documents.TextElement>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Documents.TextElement>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Documents.TextElement>
{
global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Documents.TextElement> global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Documents.TextElement>.GetEnumerator()
{
global::System.RuntimeTypeHandle dummySharedDynamicAdapter = typeof(global::System.Runtime.InteropServices.WindowsRuntime.IIterableSharedReferenceTypesDynamicAdapter<global::Windows.UI.Xaml.Documents.TextElement>).TypeHandle;
return (global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Documents.TextElement>)global::McgInterop.McgHelpers.GetGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Documents.TextElement>).TypeHandle
);
}
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return global::McgInterop.McgHelpers.GetNonGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Documents.TextElement>).TypeHandle
);
}
}
// v-table for 'System.Collections.Generic.IEnumerable<Windows.UI.Xaml.Documents.TextElement>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Documents.TextElement>))]
public unsafe partial struct Vtbl
{
internal const int idx_First = 6;
}
}
// System.Collections.Generic.IEnumerable<Windows.UI.Xaml.Documents.ITextElement>
public unsafe static class IEnumerable_A_Windows_UI_Xaml_Documents_ITextElement_V___Impl
{
// DispatchClass for 'System.Collections.Generic.IEnumerable<Windows.UI.Xaml.Documents.ITextElement>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Documents.ITextElement>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Documents.ITextElement>
{
global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Documents.ITextElement> global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Documents.ITextElement>.GetEnumerator()
{
global::System.RuntimeTypeHandle dummySharedDynamicAdapter = typeof(global::System.Runtime.InteropServices.WindowsRuntime.IIterableSharedReferenceTypesDynamicAdapter<global::Windows.UI.Xaml.Documents.ITextElement>).TypeHandle;
return (global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Documents.ITextElement>)global::McgInterop.McgHelpers.GetGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Documents.ITextElement>).TypeHandle
);
}
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return global::McgInterop.McgHelpers.GetNonGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Documents.ITextElement>).TypeHandle
);
}
}
// v-table for 'System.Collections.Generic.IEnumerable<Windows.UI.Xaml.Documents.ITextElement>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Documents.ITextElement>))]
public unsafe partial struct Vtbl
{
internal const int idx_First = 6;
}
}
// System.Collections.Generic.IEnumerable<Windows.UI.Xaml.Documents.ITextElementOverrides>
public unsafe static class IEnumerable_A_Windows_UI_Xaml_Documents_ITextElementOverrides_V___Impl
{
// DispatchClass for 'System.Collections.Generic.IEnumerable<Windows.UI.Xaml.Documents.ITextElementOverrides>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Documents.ITextElementOverrides>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Documents.ITextElementOverrides>
{
global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Documents.ITextElementOverrides> global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Documents.ITextElementOverrides>.GetEnumerator()
{
global::System.RuntimeTypeHandle dummySharedDynamicAdapter = typeof(global::System.Runtime.InteropServices.WindowsRuntime.IIterableSharedReferenceTypesDynamicAdapter<global::Windows.UI.Xaml.Documents.ITextElementOverrides>).TypeHandle;
return (global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Documents.ITextElementOverrides>)global::McgInterop.McgHelpers.GetGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Documents.ITextElementOverrides>).TypeHandle
);
}
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return global::McgInterop.McgHelpers.GetNonGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Documents.ITextElementOverrides>).TypeHandle
);
}
}
// v-table for 'System.Collections.Generic.IEnumerable<Windows.UI.Xaml.Documents.ITextElementOverrides>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Documents.ITextElementOverrides>))]
public unsafe partial struct Vtbl
{
internal const int idx_First = 6;
}
}
// System.Collections.Generic.IEnumerable<Windows.UI.Xaml.Documents.ITextElement2>
public unsafe static class IEnumerable_A_Windows_UI_Xaml_Documents_ITextElement2_V___Impl
{
// DispatchClass for 'System.Collections.Generic.IEnumerable<Windows.UI.Xaml.Documents.ITextElement2>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Documents.ITextElement2>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Documents.ITextElement2>
{
global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Documents.ITextElement2> global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Documents.ITextElement2>.GetEnumerator()
{
global::System.RuntimeTypeHandle dummySharedDynamicAdapter = typeof(global::System.Runtime.InteropServices.WindowsRuntime.IIterableSharedReferenceTypesDynamicAdapter<global::Windows.UI.Xaml.Documents.ITextElement2>).TypeHandle;
return (global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Documents.ITextElement2>)global::McgInterop.McgHelpers.GetGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Documents.ITextElement2>).TypeHandle
);
}
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return global::McgInterop.McgHelpers.GetNonGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Documents.ITextElement2>).TypeHandle
);
}
}
// v-table for 'System.Collections.Generic.IEnumerable<Windows.UI.Xaml.Documents.ITextElement2>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Documents.ITextElement2>))]
public unsafe partial struct Vtbl
{
internal const int idx_First = 6;
}
}
// System.Collections.Generic.IEnumerable<Windows.UI.Xaml.Documents.ITextElement3>
public unsafe static class IEnumerable_A_Windows_UI_Xaml_Documents_ITextElement3_V___Impl
{
// DispatchClass for 'System.Collections.Generic.IEnumerable<Windows.UI.Xaml.Documents.ITextElement3>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Documents.ITextElement3>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Documents.ITextElement3>
{
global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Documents.ITextElement3> global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Documents.ITextElement3>.GetEnumerator()
{
global::System.RuntimeTypeHandle dummySharedDynamicAdapter = typeof(global::System.Runtime.InteropServices.WindowsRuntime.IIterableSharedReferenceTypesDynamicAdapter<global::Windows.UI.Xaml.Documents.ITextElement3>).TypeHandle;
return (global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Documents.ITextElement3>)global::McgInterop.McgHelpers.GetGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Documents.ITextElement3>).TypeHandle
);
}
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return global::McgInterop.McgHelpers.GetNonGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Documents.ITextElement3>).TypeHandle
);
}
}
// v-table for 'System.Collections.Generic.IEnumerable<Windows.UI.Xaml.Documents.ITextElement3>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Documents.ITextElement3>))]
public unsafe partial struct Vtbl
{
internal const int idx_First = 6;
}
}
// System.Collections.Generic.IEnumerable<Windows.UI.Xaml.Documents.IInline>
public unsafe static class IEnumerable_A_Windows_UI_Xaml_Documents_IInline_V___Impl
{
// DispatchClass for 'System.Collections.Generic.IEnumerable<Windows.UI.Xaml.Documents.IInline>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Documents.IInline>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Documents.IInline>
{
global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Documents.IInline> global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Documents.IInline>.GetEnumerator()
{
global::System.RuntimeTypeHandle dummySharedDynamicAdapter = typeof(global::System.Runtime.InteropServices.WindowsRuntime.IIterableSharedReferenceTypesDynamicAdapter<global::Windows.UI.Xaml.Documents.IInline>).TypeHandle;
return (global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Documents.IInline>)global::McgInterop.McgHelpers.GetGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Documents.IInline>).TypeHandle
);
}
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return global::McgInterop.McgHelpers.GetNonGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Documents.IInline>).TypeHandle
);
}
}
// v-table for 'System.Collections.Generic.IEnumerable<Windows.UI.Xaml.Documents.IInline>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Documents.IInline>))]
public unsafe partial struct Vtbl
{
internal const int idx_First = 6;
}
}
// System.Collections.Generic.IDictionary<string,string>
public unsafe static class IDictionary_A_string_j_string_V___Impl
{
// DispatchClass for 'System.Collections.Generic.IDictionary<string,string>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IDictionary<string, string>))]
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.ICollection<string>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::System.Collections.Generic.IDictionary<string, string>, global::System.Collections.Generic.ICollection<global::System.Collections.Generic.KeyValuePair<string, string>>
{
global::System.Collections.Generic.IEnumerator<global::System.Collections.Generic.KeyValuePair<string, string>> global::System.Collections.Generic.IEnumerable<global::System.Collections.Generic.KeyValuePair<string, string>>.GetEnumerator()
{
return (global::System.Collections.Generic.IEnumerator<global::System.Collections.Generic.KeyValuePair<string, string>>)global::McgInterop.McgHelpers.GetGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::System.Collections.Generic.KeyValuePair<string, string>>).TypeHandle
);
}
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return global::McgInterop.McgHelpers.GetNonGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::System.Collections.Generic.KeyValuePair<string, string>>).TypeHandle
);
}
int global::System.Collections.Generic.ICollection<global::System.Collections.Generic.KeyValuePair<string, string>>.Count
{
get
{
return global::System.Runtime.InteropServices.WindowsRuntime.IMapSharedReferenceTypesRCWAdapter.Count(this);
}
}
bool global::System.Collections.Generic.ICollection<global::System.Collections.Generic.KeyValuePair<string, string>>.IsReadOnly
{
get
{
return global::System.Runtime.InteropServices.WindowsRuntime.IMapSharedReferenceTypesRCWAdapter.IsReadOnly(this);
}
}
void global::System.Collections.Generic.ICollection<global::System.Collections.Generic.KeyValuePair<string, string>>.Add(global::System.Collections.Generic.KeyValuePair<string, string> item)
{
global::System.Runtime.InteropServices.WindowsRuntime.IMapSharedReferenceTypesRCWAdapter.Add(
this,
item
);
}
void global::System.Collections.Generic.ICollection<global::System.Collections.Generic.KeyValuePair<string, string>>.Clear()
{
global::System.Runtime.InteropServices.WindowsRuntime.IMapSharedReferenceTypesRCWAdapter.Clear(this);
}
bool global::System.Collections.Generic.ICollection<global::System.Collections.Generic.KeyValuePair<string, string>>.Contains(global::System.Collections.Generic.KeyValuePair<string, string> item)
{
return global::System.Runtime.InteropServices.WindowsRuntime.IMapSharedReferenceTypesRCWAdapter.Contains(
this,
item
);
}
void global::System.Collections.Generic.ICollection<global::System.Collections.Generic.KeyValuePair<string, string>>.CopyTo(
global::System.Collections.Generic.KeyValuePair<string, string>[] array,
int arrayindex)
{
global::System.Runtime.InteropServices.WindowsRuntime.IMapSharedReferenceTypesRCWAdapter.CopyTo(
this,
array,
arrayindex
);
}
bool global::System.Collections.Generic.ICollection<global::System.Collections.Generic.KeyValuePair<string, string>>.Remove(global::System.Collections.Generic.KeyValuePair<string, string> item)
{
return global::System.Runtime.InteropServices.WindowsRuntime.IMapSharedReferenceTypesRCWAdapter.Remove(
this,
item
);
}
string global::System.Collections.Generic.IDictionary<string, string>.this[string index]
{
get
{
return global::System.Runtime.InteropServices.WindowsRuntime.IMapSharedReferenceTypesRCWAdapter.Indexer_Get(
this,
index
);
}
set
{
global::System.Runtime.InteropServices.WindowsRuntime.IMapSharedReferenceTypesRCWAdapter.Indexer_Set(
this,
index,
value
);
}
}
global::System.Collections.Generic.ICollection<string> global::System.Collections.Generic.IDictionary<string, string>.Keys
{
get
{
return global::System.Runtime.InteropServices.WindowsRuntime.IMapSharedReferenceTypesRCWAdapter.Keys(this);
}
}
global::System.Collections.Generic.ICollection<string> global::System.Collections.Generic.IDictionary<string, string>.Values
{
get
{
return global::System.Runtime.InteropServices.WindowsRuntime.IMapSharedReferenceTypesRCWAdapter.Values(this);
}
}
void global::System.Collections.Generic.IDictionary<string, string>.Add(
string key,
string value)
{
global::System.Runtime.InteropServices.WindowsRuntime.IMapSharedReferenceTypesRCWAdapter.Add(
this,
key,
value
);
}
bool global::System.Collections.Generic.IDictionary<string, string>.ContainsKey(string key)
{
return global::System.Runtime.InteropServices.WindowsRuntime.IMapSharedReferenceTypesRCWAdapter.ContainsKey(
this,
key
);
}
bool global::System.Collections.Generic.IDictionary<string, string>.Remove(string key)
{
return global::System.Runtime.InteropServices.WindowsRuntime.IMapSharedReferenceTypesRCWAdapter.Remove(
this,
key
);
}
bool global::System.Collections.Generic.IDictionary<string, string>.TryGetValue(
string key,
out string value)
{
return global::System.Runtime.InteropServices.WindowsRuntime.IMapSharedReferenceTypesRCWAdapter.TryGetValue(
this,
key,
out value
);
}
}
// v-table for 'System.Collections.Generic.IDictionary<string,string>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IDictionary<string, string>))]
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.ICollection<string>))]
public unsafe partial struct Vtbl
{
internal const int idx_Lookup = 6;
internal const int idx_get_Size = 7;
internal const int idx_HasKey = 8;
internal const int idx_GetView = 9;
internal const int idx_Insert = 10;
internal const int idx_Remove = 11;
internal const int idx_Clear = 12;
}
}
// System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string,string>>
public unsafe static class IEnumerable_A_System_Collections_Generic_KeyValuePair_A_string_j_string_V__V___Impl
{
// StubClass for 'System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string,string>>'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.Foundation.Collections.IIterator<global::System.Collections.Generic.KeyValuePair<string, string>> First(global::System.__ComObject __this)
{
global::Windows.Foundation.Collections.IIterator<global::System.Collections.Generic.KeyValuePair<string, string>> __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::System.Collections.Generic.IEnumerable<global::System.Collections.Generic.KeyValuePair<string, string>>, global::Windows.Foundation.Collections.IIterator<global::System.Collections.Generic.KeyValuePair<string, string>>>(
__this,
global::System.Collections.Generic.IEnumerable_A_System_Collections_Generic_KeyValuePair_A_string_j_string_V__V___Impl.Vtbl.idx_First
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
}
// DispatchClass for 'System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string,string>>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IEnumerable<global::System.Collections.Generic.KeyValuePair<string, string>>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::System.Collections.Generic.IEnumerable<global::System.Collections.Generic.KeyValuePair<string, string>>
{
global::System.Collections.Generic.IEnumerator<global::System.Collections.Generic.KeyValuePair<string, string>> global::System.Collections.Generic.IEnumerable<global::System.Collections.Generic.KeyValuePair<string, string>>.GetEnumerator()
{
return (global::System.Collections.Generic.IEnumerator<global::System.Collections.Generic.KeyValuePair<string, string>>)global::McgInterop.McgHelpers.GetGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::System.Collections.Generic.KeyValuePair<string, string>>).TypeHandle
);
}
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return global::McgInterop.McgHelpers.GetNonGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::System.Collections.Generic.KeyValuePair<string, string>>).TypeHandle
);
}
}
[System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IEnumerable<global::System.Collections.Generic.KeyValuePair<string,string>>))]
public class DynamicRCWAdapterClass : global::System.Runtime.InteropServices.ComInterfaceDynamicAdapter, global::System.Collections.IEnumerable
{
public global::System.Collections.IEnumerator GetEnumerator()
{
return new IIterator_PrivateRCWAdapter<global::System.Collections.Generic.KeyValuePair<string,string>>(global::System.Collections.Generic.IEnumerable_A_System_Collections_Generic_KeyValuePair_A_string_j_string_V__V___Impl.StubClass.First(ComObject));
}
}
// v-table for 'System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string,string>>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IEnumerable<global::System.Collections.Generic.KeyValuePair<string, string>>))]
public unsafe partial struct Vtbl
{
internal const int idx_First = 6;
}
}
// System.Collections.Generic.IReadOnlyDictionary<string,string>
public unsafe static class IReadOnlyDictionary_A_string_j_string_V___Impl
{
// v-table for 'System.Collections.Generic.IReadOnlyDictionary<string,string>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IReadOnlyDictionary<string, string>))]
public unsafe partial struct Vtbl
{
internal const int idx_Lookup = 6;
internal const int idx_get_Size = 7;
internal const int idx_HasKey = 8;
internal const int idx_Split = 9;
}
}
// System.Collections.Generic.IReadOnlyDictionary<string,Windows.ApplicationModel.Resources.Core.NamedResource>
public unsafe static class IReadOnlyDictionary_A_string_j_Windows_ApplicationModel_Resources_Core_NamedResource_V___Impl
{
// DispatchClass for 'System.Collections.Generic.IReadOnlyDictionary<string,Windows.ApplicationModel.Resources.Core.NamedResource>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IReadOnlyDictionary<string, global::Windows.ApplicationModel.Resources.Core.NamedResource>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::System.Collections.Generic.IReadOnlyDictionary<string, global::Windows.ApplicationModel.Resources.Core.NamedResource>, global::System.Collections.Generic.IReadOnlyCollection<global::System.Collections.Generic.KeyValuePair<string, global::Windows.ApplicationModel.Resources.Core.NamedResource>>
{
global::System.Collections.Generic.IEnumerator<global::System.Collections.Generic.KeyValuePair<string, global::Windows.ApplicationModel.Resources.Core.NamedResource>> global::System.Collections.Generic.IEnumerable<global::System.Collections.Generic.KeyValuePair<string, global::Windows.ApplicationModel.Resources.Core.NamedResource>>.GetEnumerator()
{
return (global::System.Collections.Generic.IEnumerator<global::System.Collections.Generic.KeyValuePair<string, global::Windows.ApplicationModel.Resources.Core.NamedResource>>)global::McgInterop.McgHelpers.GetGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::System.Collections.Generic.KeyValuePair<string, global::Windows.ApplicationModel.Resources.Core.NamedResource>>).TypeHandle
);
}
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return global::McgInterop.McgHelpers.GetNonGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::System.Collections.Generic.KeyValuePair<string, global::Windows.ApplicationModel.Resources.Core.NamedResource>>).TypeHandle
);
}
int global::System.Collections.Generic.IReadOnlyCollection<global::System.Collections.Generic.KeyValuePair<string, global::Windows.ApplicationModel.Resources.Core.NamedResource>>.Count
{
get
{
return global::System.Runtime.InteropServices.WindowsRuntime.IMapViewSharedReferenceTypesRCWAdapter.Count_Get(this);
}
}
global::Windows.ApplicationModel.Resources.Core.NamedResource global::System.Collections.Generic.IReadOnlyDictionary<string, global::Windows.ApplicationModel.Resources.Core.NamedResource>.this[string index]
{
get
{
return global::System.Runtime.InteropServices.WindowsRuntime.IMapViewSharedReferenceTypesRCWAdapter.Indexer_Get(
this,
index
);
}
}
global::System.Collections.Generic.IEnumerable<string> global::System.Collections.Generic.IReadOnlyDictionary<string, global::Windows.ApplicationModel.Resources.Core.NamedResource>.Keys
{
get
{
return global::System.Runtime.InteropServices.WindowsRuntime.IMapViewSharedReferenceTypesRCWAdapter.Keys(this);
}
}
global::System.Collections.Generic.IEnumerable<global::Windows.ApplicationModel.Resources.Core.NamedResource> global::System.Collections.Generic.IReadOnlyDictionary<string, global::Windows.ApplicationModel.Resources.Core.NamedResource>.Values
{
get
{
return global::System.Runtime.InteropServices.WindowsRuntime.IMapViewSharedReferenceTypesRCWAdapter.Values(this);
}
}
bool global::System.Collections.Generic.IReadOnlyDictionary<string, global::Windows.ApplicationModel.Resources.Core.NamedResource>.ContainsKey(string key)
{
return global::System.Runtime.InteropServices.WindowsRuntime.IMapViewSharedReferenceTypesRCWAdapter.ContainsKey(
this,
key
);
}
bool global::System.Collections.Generic.IReadOnlyDictionary<string, global::Windows.ApplicationModel.Resources.Core.NamedResource>.TryGetValue(
string key,
out global::Windows.ApplicationModel.Resources.Core.NamedResource value)
{
return global::System.Runtime.InteropServices.WindowsRuntime.IMapViewSharedReferenceTypesRCWAdapter.TryGetValue(
this,
key,
out value
);
}
}
// v-table for 'System.Collections.Generic.IReadOnlyDictionary<string,Windows.ApplicationModel.Resources.Core.NamedResource>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IReadOnlyDictionary<string, global::Windows.ApplicationModel.Resources.Core.NamedResource>))]
public unsafe partial struct Vtbl
{
internal const int idx_Lookup = 6;
internal const int idx_get_Size = 7;
internal const int idx_HasKey = 8;
internal const int idx_Split = 9;
}
}
// System.Collections.Generic.KeyValuePair<string,Windows.ApplicationModel.Resources.Core.NamedResource>
public unsafe static class KeyValuePair_A_string_j_Windows_ApplicationModel_Resources_Core_NamedResource_V___Impl
{
// StubClass for 'System.Collections.Generic.KeyValuePair<string,Windows.ApplicationModel.Resources.Core.NamedResource>'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static string get_Key(global::System.__ComObject __this)
{
string __ret = global::McgInterop.ForwardComSharedStubs.Func_string__<global::Windows.Foundation.Collections.IKeyValuePair<string, global::Windows.ApplicationModel.Resources.Core.NamedResource>>(
__this,
global::System.Collections.Generic.KeyValuePair_A_string_j_Windows_ApplicationModel_Resources_Core_NamedResource_V___Impl.Vtbl.idx_get_Key
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.ApplicationModel.Resources.Core.NamedResource get_Value(global::System.__ComObject __this)
{
global::Windows.ApplicationModel.Resources.Core.NamedResource __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.Foundation.Collections.IKeyValuePair<string, global::Windows.ApplicationModel.Resources.Core.NamedResource>, global::Windows.ApplicationModel.Resources.Core.NamedResource>(
__this,
global::System.Collections.Generic.KeyValuePair_A_string_j_Windows_ApplicationModel_Resources_Core_NamedResource_V___Impl.Vtbl.idx_get_Value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
}
// DispatchClass for 'System.Collections.Generic.KeyValuePair<string,Windows.ApplicationModel.Resources.Core.NamedResource>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IKeyValuePair<string, global::Windows.ApplicationModel.Resources.Core.NamedResource>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Foundation.Collections.IKeyValuePair<string, global::Windows.ApplicationModel.Resources.Core.NamedResource>
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IKeyValuePair`2.Key")]
string global::Windows.Foundation.Collections.IKeyValuePair<string, global::Windows.ApplicationModel.Resources.Core.NamedResource>.get_Key()
{
string __retVal = global::System.Collections.Generic.KeyValuePair_A_string_j_Windows_ApplicationModel_Resources_Core_NamedResource_V___Impl.StubClass.get_Key(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IKeyValuePair`2.Value")]
global::Windows.ApplicationModel.Resources.Core.NamedResource global::Windows.Foundation.Collections.IKeyValuePair<string, global::Windows.ApplicationModel.Resources.Core.NamedResource>.get_Value()
{
global::Windows.ApplicationModel.Resources.Core.NamedResource __retVal = global::System.Collections.Generic.KeyValuePair_A_string_j_Windows_ApplicationModel_Resources_Core_NamedResource_V___Impl.StubClass.get_Value(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'System.Collections.Generic.KeyValuePair<string,Windows.ApplicationModel.Resources.Core.NamedResource>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IKeyValuePair<string, global::Windows.ApplicationModel.Resources.Core.NamedResource>))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Key = 6;
internal const int idx_get_Value = 7;
}
}
// System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string,Windows.ApplicationModel.Resources.Core.NamedResource>>
public unsafe static class IEnumerable_A_System_Collections_Generic_KeyValuePair_A_string_j_Windows_ApplicationModel_Resources_Core_NamedResource_V__V___Impl
{
// StubClass for 'System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string,Windows.ApplicationModel.Resources.Core.NamedResource>>'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.Foundation.Collections.IIterator<global::System.Collections.Generic.KeyValuePair<string, global::Windows.ApplicationModel.Resources.Core.NamedResource>> First(global::System.__ComObject __this)
{
global::Windows.Foundation.Collections.IIterator<global::System.Collections.Generic.KeyValuePair<string, global::Windows.ApplicationModel.Resources.Core.NamedResource>> __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::System.Collections.Generic.IEnumerable<global::System.Collections.Generic.KeyValuePair<string, global::Windows.ApplicationModel.Resources.Core.NamedResource>>, global::Windows.Foundation.Collections.IIterator<global::System.Collections.Generic.KeyValuePair<string, global::Windows.ApplicationModel.Resources.Core.NamedResource>>>(
__this,
global::System.Collections.Generic.IEnumerable_A_System_Collections_Generic_KeyValuePair_A_string_j_Windows_ApplicationModel_Resources_Core_NamedResource_V__V___Impl.Vtbl.idx_First
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
}
// DispatchClass for 'System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string,Windows.ApplicationModel.Resources.Core.NamedResource>>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IEnumerable<global::System.Collections.Generic.KeyValuePair<string, global::Windows.ApplicationModel.Resources.Core.NamedResource>>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::System.Collections.Generic.IEnumerable<global::System.Collections.Generic.KeyValuePair<string, global::Windows.ApplicationModel.Resources.Core.NamedResource>>
{
global::System.Collections.Generic.IEnumerator<global::System.Collections.Generic.KeyValuePair<string, global::Windows.ApplicationModel.Resources.Core.NamedResource>> global::System.Collections.Generic.IEnumerable<global::System.Collections.Generic.KeyValuePair<string, global::Windows.ApplicationModel.Resources.Core.NamedResource>>.GetEnumerator()
{
return (global::System.Collections.Generic.IEnumerator<global::System.Collections.Generic.KeyValuePair<string, global::Windows.ApplicationModel.Resources.Core.NamedResource>>)global::McgInterop.McgHelpers.GetGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::System.Collections.Generic.KeyValuePair<string, global::Windows.ApplicationModel.Resources.Core.NamedResource>>).TypeHandle
);
}
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return global::McgInterop.McgHelpers.GetNonGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::System.Collections.Generic.KeyValuePair<string, global::Windows.ApplicationModel.Resources.Core.NamedResource>>).TypeHandle
);
}
}
[System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IEnumerable<global::System.Collections.Generic.KeyValuePair<string,global::Windows.ApplicationModel.Resources.Core.NamedResource>>))]
public class DynamicRCWAdapterClass : global::System.Runtime.InteropServices.ComInterfaceDynamicAdapter, global::System.Collections.IEnumerable
{
public global::System.Collections.IEnumerator GetEnumerator()
{
return new IIterator_PrivateRCWAdapter<global::System.Collections.Generic.KeyValuePair<string,global::Windows.ApplicationModel.Resources.Core.NamedResource>>(global::System.Collections.Generic.IEnumerable_A_System_Collections_Generic_KeyValuePair_A_string_j_Windows_ApplicationModel_Resources_Core_NamedResource_V__V___Impl.StubClass.First(ComObject));
}
}
// v-table for 'System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string,Windows.ApplicationModel.Resources.Core.NamedResource>>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IEnumerable<global::System.Collections.Generic.KeyValuePair<string, global::Windows.ApplicationModel.Resources.Core.NamedResource>>))]
public unsafe partial struct Vtbl
{
internal const int idx_First = 6;
}
}
// System.Collections.Generic.IReadOnlyList<Windows.Devices.Enumeration.DeviceInformation>
public unsafe static class IReadOnlyList_A_Windows_Devices_Enumeration_DeviceInformation_V___Impl
{
// DispatchClass for 'System.Collections.Generic.IReadOnlyList<Windows.Devices.Enumeration.DeviceInformation>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.Devices.Enumeration.DeviceInformation>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::System.Collections.Generic.IReadOnlyList<global::Windows.Devices.Enumeration.DeviceInformation>, global::System.Collections.Generic.IReadOnlyCollection<global::Windows.Devices.Enumeration.DeviceInformation>
{
global::System.Collections.Generic.IEnumerator<global::Windows.Devices.Enumeration.DeviceInformation> global::System.Collections.Generic.IEnumerable<global::Windows.Devices.Enumeration.DeviceInformation>.GetEnumerator()
{
global::System.RuntimeTypeHandle dummySharedDynamicAdapter = typeof(global::System.Runtime.InteropServices.WindowsRuntime.IVectorViewSharedReferenceTypesDynamicAdapter<global::Windows.Devices.Enumeration.DeviceInformation>).TypeHandle;
return (global::System.Collections.Generic.IEnumerator<global::Windows.Devices.Enumeration.DeviceInformation>)global::McgInterop.McgHelpers.GetGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.Devices.Enumeration.DeviceInformation>).TypeHandle
);
}
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return global::McgInterop.McgHelpers.GetNonGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.Devices.Enumeration.DeviceInformation>).TypeHandle
);
}
int global::System.Collections.Generic.IReadOnlyCollection<global::Windows.Devices.Enumeration.DeviceInformation>.Count
{
get
{
return global::McgInterop.McgHelpers.GetReadOnlyCollectionCount(
this,
typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.Devices.Enumeration.DeviceInformation>).TypeHandle
);
}
}
global::Windows.Devices.Enumeration.DeviceInformation global::System.Collections.Generic.IReadOnlyList<global::Windows.Devices.Enumeration.DeviceInformation>.this[int index]
{
get
{
return global::System.Runtime.InteropServices.McgMarshal.FastCast<global::System.Runtime.InteropServices.WindowsRuntime.IReadOnlyListAdapter<global::Windows.Devices.Enumeration.DeviceInformation>>(global::System.Runtime.InteropServices.McgModuleManager.GetDynamicAdapter(
this,
typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.Devices.Enumeration.DeviceInformation>).TypeHandle
))[index];
}
}
}
// v-table for 'System.Collections.Generic.IReadOnlyList<Windows.Devices.Enumeration.DeviceInformation>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.Devices.Enumeration.DeviceInformation>))]
public unsafe partial struct Vtbl
{
internal const int idx_GetAt = 6;
internal const int idx_get_Size = 7;
internal const int idx_IndexOf = 8;
internal const int idx_GetMany = 9;
}
}
// System.Collections.Generic.IEnumerable<Windows.Devices.Enumeration.DeviceInformation>
public unsafe static class IEnumerable_A_Windows_Devices_Enumeration_DeviceInformation_V___Impl
{
// DispatchClass for 'System.Collections.Generic.IEnumerable<Windows.Devices.Enumeration.DeviceInformation>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IEnumerable<global::Windows.Devices.Enumeration.DeviceInformation>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::System.Collections.Generic.IEnumerable<global::Windows.Devices.Enumeration.DeviceInformation>
{
global::System.Collections.Generic.IEnumerator<global::Windows.Devices.Enumeration.DeviceInformation> global::System.Collections.Generic.IEnumerable<global::Windows.Devices.Enumeration.DeviceInformation>.GetEnumerator()
{
global::System.RuntimeTypeHandle dummySharedDynamicAdapter = typeof(global::System.Runtime.InteropServices.WindowsRuntime.IIterableSharedReferenceTypesDynamicAdapter<global::Windows.Devices.Enumeration.DeviceInformation>).TypeHandle;
return (global::System.Collections.Generic.IEnumerator<global::Windows.Devices.Enumeration.DeviceInformation>)global::McgInterop.McgHelpers.GetGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.Devices.Enumeration.DeviceInformation>).TypeHandle
);
}
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return global::McgInterop.McgHelpers.GetNonGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.Devices.Enumeration.DeviceInformation>).TypeHandle
);
}
}
// v-table for 'System.Collections.Generic.IEnumerable<Windows.Devices.Enumeration.DeviceInformation>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IEnumerable<global::Windows.Devices.Enumeration.DeviceInformation>))]
public unsafe partial struct Vtbl
{
internal const int idx_First = 6;
}
}
// System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.DependencyObject>
public unsafe static class IReadOnlyList_A_Windows_UI_Xaml_DependencyObject_V___Impl
{
// DispatchClass for 'System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.DependencyObject>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.DependencyObject>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.DependencyObject>, global::System.Collections.Generic.IReadOnlyCollection<global::Windows.UI.Xaml.DependencyObject>
{
global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.DependencyObject> global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.DependencyObject>.GetEnumerator()
{
global::System.RuntimeTypeHandle dummySharedDynamicAdapter = typeof(global::System.Runtime.InteropServices.WindowsRuntime.IVectorViewSharedReferenceTypesDynamicAdapter<global::Windows.UI.Xaml.DependencyObject>).TypeHandle;
return (global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.DependencyObject>)global::McgInterop.McgHelpers.GetGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.DependencyObject>).TypeHandle
);
}
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return global::McgInterop.McgHelpers.GetNonGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.DependencyObject>).TypeHandle
);
}
int global::System.Collections.Generic.IReadOnlyCollection<global::Windows.UI.Xaml.DependencyObject>.Count
{
get
{
return global::McgInterop.McgHelpers.GetReadOnlyCollectionCount(
this,
typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.DependencyObject>).TypeHandle
);
}
}
global::Windows.UI.Xaml.DependencyObject global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.DependencyObject>.this[int index]
{
get
{
return global::System.Runtime.InteropServices.McgMarshal.FastCast<global::System.Runtime.InteropServices.WindowsRuntime.IReadOnlyListAdapter<global::Windows.UI.Xaml.DependencyObject>>(global::System.Runtime.InteropServices.McgModuleManager.GetDynamicAdapter(
this,
typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.DependencyObject>).TypeHandle
))[index];
}
}
}
// v-table for 'System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.DependencyObject>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.DependencyObject>))]
public unsafe partial struct Vtbl
{
internal const int idx_GetAt = 6;
internal const int idx_get_Size = 7;
internal const int idx_IndexOf = 8;
internal const int idx_GetMany = 9;
}
}
// System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.IDependencyObject>
public unsafe static class IReadOnlyList_A_Windows_UI_Xaml_IDependencyObject_V___Impl
{
// DispatchClass for 'System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.IDependencyObject>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.IDependencyObject>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.IDependencyObject>, global::System.Collections.Generic.IReadOnlyCollection<global::Windows.UI.Xaml.IDependencyObject>
{
global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.IDependencyObject> global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.IDependencyObject>.GetEnumerator()
{
global::System.RuntimeTypeHandle dummySharedDynamicAdapter = typeof(global::System.Runtime.InteropServices.WindowsRuntime.IVectorViewSharedReferenceTypesDynamicAdapter<global::Windows.UI.Xaml.IDependencyObject>).TypeHandle;
return (global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.IDependencyObject>)global::McgInterop.McgHelpers.GetGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.IDependencyObject>).TypeHandle
);
}
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return global::McgInterop.McgHelpers.GetNonGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.IDependencyObject>).TypeHandle
);
}
int global::System.Collections.Generic.IReadOnlyCollection<global::Windows.UI.Xaml.IDependencyObject>.Count
{
get
{
return global::McgInterop.McgHelpers.GetReadOnlyCollectionCount(
this,
typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.IDependencyObject>).TypeHandle
);
}
}
global::Windows.UI.Xaml.IDependencyObject global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.IDependencyObject>.this[int index]
{
get
{
return global::System.Runtime.InteropServices.McgMarshal.FastCast<global::System.Runtime.InteropServices.WindowsRuntime.IReadOnlyListAdapter<global::Windows.UI.Xaml.IDependencyObject>>(global::System.Runtime.InteropServices.McgModuleManager.GetDynamicAdapter(
this,
typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.IDependencyObject>).TypeHandle
))[index];
}
}
}
// v-table for 'System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.IDependencyObject>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.IDependencyObject>))]
public unsafe partial struct Vtbl
{
internal const int idx_GetAt = 6;
internal const int idx_get_Size = 7;
internal const int idx_IndexOf = 8;
internal const int idx_GetMany = 9;
}
}
// System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.IDependencyObject2>
public unsafe static class IReadOnlyList_A_Windows_UI_Xaml_IDependencyObject2_V___Impl
{
// DispatchClass for 'System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.IDependencyObject2>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.IDependencyObject2>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.IDependencyObject2>, global::System.Collections.Generic.IReadOnlyCollection<global::Windows.UI.Xaml.IDependencyObject2>
{
global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.IDependencyObject2> global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.IDependencyObject2>.GetEnumerator()
{
global::System.RuntimeTypeHandle dummySharedDynamicAdapter = typeof(global::System.Runtime.InteropServices.WindowsRuntime.IVectorViewSharedReferenceTypesDynamicAdapter<global::Windows.UI.Xaml.IDependencyObject2>).TypeHandle;
return (global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.IDependencyObject2>)global::McgInterop.McgHelpers.GetGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.IDependencyObject2>).TypeHandle
);
}
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return global::McgInterop.McgHelpers.GetNonGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.IDependencyObject2>).TypeHandle
);
}
int global::System.Collections.Generic.IReadOnlyCollection<global::Windows.UI.Xaml.IDependencyObject2>.Count
{
get
{
return global::McgInterop.McgHelpers.GetReadOnlyCollectionCount(
this,
typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.IDependencyObject2>).TypeHandle
);
}
}
global::Windows.UI.Xaml.IDependencyObject2 global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.IDependencyObject2>.this[int index]
{
get
{
return global::System.Runtime.InteropServices.McgMarshal.FastCast<global::System.Runtime.InteropServices.WindowsRuntime.IReadOnlyListAdapter<global::Windows.UI.Xaml.IDependencyObject2>>(global::System.Runtime.InteropServices.McgModuleManager.GetDynamicAdapter(
this,
typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.IDependencyObject2>).TypeHandle
))[index];
}
}
}
// v-table for 'System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.IDependencyObject2>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.IDependencyObject2>))]
public unsafe partial struct Vtbl
{
internal const int idx_GetAt = 6;
internal const int idx_get_Size = 7;
internal const int idx_IndexOf = 8;
internal const int idx_GetMany = 9;
}
}
// System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.Controls.IRowDefinition>
public unsafe static class IReadOnlyList_A_Windows_UI_Xaml_Controls_IRowDefinition_V___Impl
{
// DispatchClass for 'System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.Controls.IRowDefinition>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Controls.IRowDefinition>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Controls.IRowDefinition>, global::System.Collections.Generic.IReadOnlyCollection<global::Windows.UI.Xaml.Controls.IRowDefinition>
{
global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Controls.IRowDefinition> global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Controls.IRowDefinition>.GetEnumerator()
{
global::System.RuntimeTypeHandle dummySharedDynamicAdapter = typeof(global::System.Runtime.InteropServices.WindowsRuntime.IVectorViewSharedReferenceTypesDynamicAdapter<global::Windows.UI.Xaml.Controls.IRowDefinition>).TypeHandle;
return (global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Controls.IRowDefinition>)global::McgInterop.McgHelpers.GetGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Controls.IRowDefinition>).TypeHandle
);
}
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return global::McgInterop.McgHelpers.GetNonGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Controls.IRowDefinition>).TypeHandle
);
}
int global::System.Collections.Generic.IReadOnlyCollection<global::Windows.UI.Xaml.Controls.IRowDefinition>.Count
{
get
{
return global::McgInterop.McgHelpers.GetReadOnlyCollectionCount(
this,
typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Controls.IRowDefinition>).TypeHandle
);
}
}
global::Windows.UI.Xaml.Controls.IRowDefinition global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Controls.IRowDefinition>.this[int index]
{
get
{
return global::System.Runtime.InteropServices.McgMarshal.FastCast<global::System.Runtime.InteropServices.WindowsRuntime.IReadOnlyListAdapter<global::Windows.UI.Xaml.Controls.IRowDefinition>>(global::System.Runtime.InteropServices.McgModuleManager.GetDynamicAdapter(
this,
typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Controls.IRowDefinition>).TypeHandle
))[index];
}
}
}
// v-table for 'System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.Controls.IRowDefinition>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Controls.IRowDefinition>))]
public unsafe partial struct Vtbl
{
internal const int idx_GetAt = 6;
internal const int idx_get_Size = 7;
internal const int idx_IndexOf = 8;
internal const int idx_GetMany = 9;
}
}
// System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.IUIElement>
public unsafe static class IReadOnlyList_A_Windows_UI_Xaml_IUIElement_V___Impl
{
// DispatchClass for 'System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.IUIElement>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.IUIElement>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.IUIElement>, global::System.Collections.Generic.IReadOnlyCollection<global::Windows.UI.Xaml.IUIElement>
{
global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.IUIElement> global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.IUIElement>.GetEnumerator()
{
global::System.RuntimeTypeHandle dummySharedDynamicAdapter = typeof(global::System.Runtime.InteropServices.WindowsRuntime.IVectorViewSharedReferenceTypesDynamicAdapter<global::Windows.UI.Xaml.IUIElement>).TypeHandle;
return (global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.IUIElement>)global::McgInterop.McgHelpers.GetGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.IUIElement>).TypeHandle
);
}
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return global::McgInterop.McgHelpers.GetNonGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.IUIElement>).TypeHandle
);
}
int global::System.Collections.Generic.IReadOnlyCollection<global::Windows.UI.Xaml.IUIElement>.Count
{
get
{
return global::McgInterop.McgHelpers.GetReadOnlyCollectionCount(
this,
typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.IUIElement>).TypeHandle
);
}
}
global::Windows.UI.Xaml.IUIElement global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.IUIElement>.this[int index]
{
get
{
return global::System.Runtime.InteropServices.McgMarshal.FastCast<global::System.Runtime.InteropServices.WindowsRuntime.IReadOnlyListAdapter<global::Windows.UI.Xaml.IUIElement>>(global::System.Runtime.InteropServices.McgModuleManager.GetDynamicAdapter(
this,
typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.IUIElement>).TypeHandle
))[index];
}
}
}
// v-table for 'System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.IUIElement>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.IUIElement>))]
public unsafe partial struct Vtbl
{
internal const int idx_GetAt = 6;
internal const int idx_get_Size = 7;
internal const int idx_IndexOf = 8;
internal const int idx_GetMany = 9;
}
}
// System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.IUIElementOverrides>
public unsafe static class IReadOnlyList_A_Windows_UI_Xaml_IUIElementOverrides_V___Impl
{
// DispatchClass for 'System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.IUIElementOverrides>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.IUIElementOverrides>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.IUIElementOverrides>, global::System.Collections.Generic.IReadOnlyCollection<global::Windows.UI.Xaml.IUIElementOverrides>
{
global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.IUIElementOverrides> global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.IUIElementOverrides>.GetEnumerator()
{
global::System.RuntimeTypeHandle dummySharedDynamicAdapter = typeof(global::System.Runtime.InteropServices.WindowsRuntime.IVectorViewSharedReferenceTypesDynamicAdapter<global::Windows.UI.Xaml.IUIElementOverrides>).TypeHandle;
return (global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.IUIElementOverrides>)global::McgInterop.McgHelpers.GetGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.IUIElementOverrides>).TypeHandle
);
}
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return global::McgInterop.McgHelpers.GetNonGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.IUIElementOverrides>).TypeHandle
);
}
int global::System.Collections.Generic.IReadOnlyCollection<global::Windows.UI.Xaml.IUIElementOverrides>.Count
{
get
{
return global::McgInterop.McgHelpers.GetReadOnlyCollectionCount(
this,
typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.IUIElementOverrides>).TypeHandle
);
}
}
global::Windows.UI.Xaml.IUIElementOverrides global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.IUIElementOverrides>.this[int index]
{
get
{
return global::System.Runtime.InteropServices.McgMarshal.FastCast<global::System.Runtime.InteropServices.WindowsRuntime.IReadOnlyListAdapter<global::Windows.UI.Xaml.IUIElementOverrides>>(global::System.Runtime.InteropServices.McgModuleManager.GetDynamicAdapter(
this,
typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.IUIElementOverrides>).TypeHandle
))[index];
}
}
}
// v-table for 'System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.IUIElementOverrides>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.IUIElementOverrides>))]
public unsafe partial struct Vtbl
{
internal const int idx_GetAt = 6;
internal const int idx_get_Size = 7;
internal const int idx_IndexOf = 8;
internal const int idx_GetMany = 9;
}
}
// System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.IUIElement2>
public unsafe static class IReadOnlyList_A_Windows_UI_Xaml_IUIElement2_V___Impl
{
// DispatchClass for 'System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.IUIElement2>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.IUIElement2>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.IUIElement2>, global::System.Collections.Generic.IReadOnlyCollection<global::Windows.UI.Xaml.IUIElement2>
{
global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.IUIElement2> global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.IUIElement2>.GetEnumerator()
{
global::System.RuntimeTypeHandle dummySharedDynamicAdapter = typeof(global::System.Runtime.InteropServices.WindowsRuntime.IVectorViewSharedReferenceTypesDynamicAdapter<global::Windows.UI.Xaml.IUIElement2>).TypeHandle;
return (global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.IUIElement2>)global::McgInterop.McgHelpers.GetGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.IUIElement2>).TypeHandle
);
}
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return global::McgInterop.McgHelpers.GetNonGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.IUIElement2>).TypeHandle
);
}
int global::System.Collections.Generic.IReadOnlyCollection<global::Windows.UI.Xaml.IUIElement2>.Count
{
get
{
return global::McgInterop.McgHelpers.GetReadOnlyCollectionCount(
this,
typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.IUIElement2>).TypeHandle
);
}
}
global::Windows.UI.Xaml.IUIElement2 global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.IUIElement2>.this[int index]
{
get
{
return global::System.Runtime.InteropServices.McgMarshal.FastCast<global::System.Runtime.InteropServices.WindowsRuntime.IReadOnlyListAdapter<global::Windows.UI.Xaml.IUIElement2>>(global::System.Runtime.InteropServices.McgModuleManager.GetDynamicAdapter(
this,
typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.IUIElement2>).TypeHandle
))[index];
}
}
}
// v-table for 'System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.IUIElement2>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.IUIElement2>))]
public unsafe partial struct Vtbl
{
internal const int idx_GetAt = 6;
internal const int idx_get_Size = 7;
internal const int idx_IndexOf = 8;
internal const int idx_GetMany = 9;
}
}
// System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.IUIElement3>
public unsafe static class IReadOnlyList_A_Windows_UI_Xaml_IUIElement3_V___Impl
{
// DispatchClass for 'System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.IUIElement3>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.IUIElement3>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.IUIElement3>, global::System.Collections.Generic.IReadOnlyCollection<global::Windows.UI.Xaml.IUIElement3>
{
global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.IUIElement3> global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.IUIElement3>.GetEnumerator()
{
global::System.RuntimeTypeHandle dummySharedDynamicAdapter = typeof(global::System.Runtime.InteropServices.WindowsRuntime.IVectorViewSharedReferenceTypesDynamicAdapter<global::Windows.UI.Xaml.IUIElement3>).TypeHandle;
return (global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.IUIElement3>)global::McgInterop.McgHelpers.GetGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.IUIElement3>).TypeHandle
);
}
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return global::McgInterop.McgHelpers.GetNonGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.IUIElement3>).TypeHandle
);
}
int global::System.Collections.Generic.IReadOnlyCollection<global::Windows.UI.Xaml.IUIElement3>.Count
{
get
{
return global::McgInterop.McgHelpers.GetReadOnlyCollectionCount(
this,
typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.IUIElement3>).TypeHandle
);
}
}
global::Windows.UI.Xaml.IUIElement3 global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.IUIElement3>.this[int index]
{
get
{
return global::System.Runtime.InteropServices.McgMarshal.FastCast<global::System.Runtime.InteropServices.WindowsRuntime.IReadOnlyListAdapter<global::Windows.UI.Xaml.IUIElement3>>(global::System.Runtime.InteropServices.McgModuleManager.GetDynamicAdapter(
this,
typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.IUIElement3>).TypeHandle
))[index];
}
}
}
// v-table for 'System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.IUIElement3>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.IUIElement3>))]
public unsafe partial struct Vtbl
{
internal const int idx_GetAt = 6;
internal const int idx_get_Size = 7;
internal const int idx_IndexOf = 8;
internal const int idx_GetMany = 9;
}
}
// System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.IUIElement4>
public unsafe static class IReadOnlyList_A_Windows_UI_Xaml_IUIElement4_V___Impl
{
// DispatchClass for 'System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.IUIElement4>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.IUIElement4>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.IUIElement4>, global::System.Collections.Generic.IReadOnlyCollection<global::Windows.UI.Xaml.IUIElement4>
{
global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.IUIElement4> global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.IUIElement4>.GetEnumerator()
{
global::System.RuntimeTypeHandle dummySharedDynamicAdapter = typeof(global::System.Runtime.InteropServices.WindowsRuntime.IVectorViewSharedReferenceTypesDynamicAdapter<global::Windows.UI.Xaml.IUIElement4>).TypeHandle;
return (global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.IUIElement4>)global::McgInterop.McgHelpers.GetGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.IUIElement4>).TypeHandle
);
}
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return global::McgInterop.McgHelpers.GetNonGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.IUIElement4>).TypeHandle
);
}
int global::System.Collections.Generic.IReadOnlyCollection<global::Windows.UI.Xaml.IUIElement4>.Count
{
get
{
return global::McgInterop.McgHelpers.GetReadOnlyCollectionCount(
this,
typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.IUIElement4>).TypeHandle
);
}
}
global::Windows.UI.Xaml.IUIElement4 global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.IUIElement4>.this[int index]
{
get
{
return global::System.Runtime.InteropServices.McgMarshal.FastCast<global::System.Runtime.InteropServices.WindowsRuntime.IReadOnlyListAdapter<global::Windows.UI.Xaml.IUIElement4>>(global::System.Runtime.InteropServices.McgModuleManager.GetDynamicAdapter(
this,
typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.IUIElement4>).TypeHandle
))[index];
}
}
}
// v-table for 'System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.IUIElement4>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.IUIElement4>))]
public unsafe partial struct Vtbl
{
internal const int idx_GetAt = 6;
internal const int idx_get_Size = 7;
internal const int idx_IndexOf = 8;
internal const int idx_GetMany = 9;
}
}
// System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.Documents.TextElement>
public unsafe static class IReadOnlyList_A_Windows_UI_Xaml_Documents_TextElement_V___Impl
{
// DispatchClass for 'System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.Documents.TextElement>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Documents.TextElement>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Documents.TextElement>, global::System.Collections.Generic.IReadOnlyCollection<global::Windows.UI.Xaml.Documents.TextElement>
{
global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Documents.TextElement> global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Documents.TextElement>.GetEnumerator()
{
global::System.RuntimeTypeHandle dummySharedDynamicAdapter = typeof(global::System.Runtime.InteropServices.WindowsRuntime.IVectorViewSharedReferenceTypesDynamicAdapter<global::Windows.UI.Xaml.Documents.TextElement>).TypeHandle;
return (global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Documents.TextElement>)global::McgInterop.McgHelpers.GetGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Documents.TextElement>).TypeHandle
);
}
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return global::McgInterop.McgHelpers.GetNonGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Documents.TextElement>).TypeHandle
);
}
int global::System.Collections.Generic.IReadOnlyCollection<global::Windows.UI.Xaml.Documents.TextElement>.Count
{
get
{
return global::McgInterop.McgHelpers.GetReadOnlyCollectionCount(
this,
typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Documents.TextElement>).TypeHandle
);
}
}
global::Windows.UI.Xaml.Documents.TextElement global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Documents.TextElement>.this[int index]
{
get
{
return global::System.Runtime.InteropServices.McgMarshal.FastCast<global::System.Runtime.InteropServices.WindowsRuntime.IReadOnlyListAdapter<global::Windows.UI.Xaml.Documents.TextElement>>(global::System.Runtime.InteropServices.McgModuleManager.GetDynamicAdapter(
this,
typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Documents.TextElement>).TypeHandle
))[index];
}
}
}
// v-table for 'System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.Documents.TextElement>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Documents.TextElement>))]
public unsafe partial struct Vtbl
{
internal const int idx_GetAt = 6;
internal const int idx_get_Size = 7;
internal const int idx_IndexOf = 8;
internal const int idx_GetMany = 9;
}
}
// System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.Documents.ITextElement>
public unsafe static class IReadOnlyList_A_Windows_UI_Xaml_Documents_ITextElement_V___Impl
{
// DispatchClass for 'System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.Documents.ITextElement>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Documents.ITextElement>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Documents.ITextElement>, global::System.Collections.Generic.IReadOnlyCollection<global::Windows.UI.Xaml.Documents.ITextElement>
{
global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Documents.ITextElement> global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Documents.ITextElement>.GetEnumerator()
{
global::System.RuntimeTypeHandle dummySharedDynamicAdapter = typeof(global::System.Runtime.InteropServices.WindowsRuntime.IVectorViewSharedReferenceTypesDynamicAdapter<global::Windows.UI.Xaml.Documents.ITextElement>).TypeHandle;
return (global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Documents.ITextElement>)global::McgInterop.McgHelpers.GetGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Documents.ITextElement>).TypeHandle
);
}
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return global::McgInterop.McgHelpers.GetNonGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Documents.ITextElement>).TypeHandle
);
}
int global::System.Collections.Generic.IReadOnlyCollection<global::Windows.UI.Xaml.Documents.ITextElement>.Count
{
get
{
return global::McgInterop.McgHelpers.GetReadOnlyCollectionCount(
this,
typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Documents.ITextElement>).TypeHandle
);
}
}
global::Windows.UI.Xaml.Documents.ITextElement global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Documents.ITextElement>.this[int index]
{
get
{
return global::System.Runtime.InteropServices.McgMarshal.FastCast<global::System.Runtime.InteropServices.WindowsRuntime.IReadOnlyListAdapter<global::Windows.UI.Xaml.Documents.ITextElement>>(global::System.Runtime.InteropServices.McgModuleManager.GetDynamicAdapter(
this,
typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Documents.ITextElement>).TypeHandle
))[index];
}
}
}
// v-table for 'System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.Documents.ITextElement>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Documents.ITextElement>))]
public unsafe partial struct Vtbl
{
internal const int idx_GetAt = 6;
internal const int idx_get_Size = 7;
internal const int idx_IndexOf = 8;
internal const int idx_GetMany = 9;
}
}
// System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.Documents.ITextElementOverrides>
public unsafe static class IReadOnlyList_A_Windows_UI_Xaml_Documents_ITextElementOverrides_V___Impl
{
// DispatchClass for 'System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.Documents.ITextElementOverrides>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Documents.ITextElementOverrides>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Documents.ITextElementOverrides>, global::System.Collections.Generic.IReadOnlyCollection<global::Windows.UI.Xaml.Documents.ITextElementOverrides>
{
global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Documents.ITextElementOverrides> global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Documents.ITextElementOverrides>.GetEnumerator()
{
global::System.RuntimeTypeHandle dummySharedDynamicAdapter = typeof(global::System.Runtime.InteropServices.WindowsRuntime.IVectorViewSharedReferenceTypesDynamicAdapter<global::Windows.UI.Xaml.Documents.ITextElementOverrides>).TypeHandle;
return (global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Documents.ITextElementOverrides>)global::McgInterop.McgHelpers.GetGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Documents.ITextElementOverrides>).TypeHandle
);
}
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return global::McgInterop.McgHelpers.GetNonGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Documents.ITextElementOverrides>).TypeHandle
);
}
int global::System.Collections.Generic.IReadOnlyCollection<global::Windows.UI.Xaml.Documents.ITextElementOverrides>.Count
{
get
{
return global::McgInterop.McgHelpers.GetReadOnlyCollectionCount(
this,
typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Documents.ITextElementOverrides>).TypeHandle
);
}
}
global::Windows.UI.Xaml.Documents.ITextElementOverrides global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Documents.ITextElementOverrides>.this[int index]
{
get
{
return global::System.Runtime.InteropServices.McgMarshal.FastCast<global::System.Runtime.InteropServices.WindowsRuntime.IReadOnlyListAdapter<global::Windows.UI.Xaml.Documents.ITextElementOverrides>>(global::System.Runtime.InteropServices.McgModuleManager.GetDynamicAdapter(
this,
typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Documents.ITextElementOverrides>).TypeHandle
))[index];
}
}
}
// v-table for 'System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.Documents.ITextElementOverrides>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Documents.ITextElementOverrides>))]
public unsafe partial struct Vtbl
{
internal const int idx_GetAt = 6;
internal const int idx_get_Size = 7;
internal const int idx_IndexOf = 8;
internal const int idx_GetMany = 9;
}
}
// System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.Documents.ITextElement2>
public unsafe static class IReadOnlyList_A_Windows_UI_Xaml_Documents_ITextElement2_V___Impl
{
// DispatchClass for 'System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.Documents.ITextElement2>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Documents.ITextElement2>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Documents.ITextElement2>, global::System.Collections.Generic.IReadOnlyCollection<global::Windows.UI.Xaml.Documents.ITextElement2>
{
global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Documents.ITextElement2> global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Documents.ITextElement2>.GetEnumerator()
{
global::System.RuntimeTypeHandle dummySharedDynamicAdapter = typeof(global::System.Runtime.InteropServices.WindowsRuntime.IVectorViewSharedReferenceTypesDynamicAdapter<global::Windows.UI.Xaml.Documents.ITextElement2>).TypeHandle;
return (global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Documents.ITextElement2>)global::McgInterop.McgHelpers.GetGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Documents.ITextElement2>).TypeHandle
);
}
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return global::McgInterop.McgHelpers.GetNonGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Documents.ITextElement2>).TypeHandle
);
}
int global::System.Collections.Generic.IReadOnlyCollection<global::Windows.UI.Xaml.Documents.ITextElement2>.Count
{
get
{
return global::McgInterop.McgHelpers.GetReadOnlyCollectionCount(
this,
typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Documents.ITextElement2>).TypeHandle
);
}
}
global::Windows.UI.Xaml.Documents.ITextElement2 global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Documents.ITextElement2>.this[int index]
{
get
{
return global::System.Runtime.InteropServices.McgMarshal.FastCast<global::System.Runtime.InteropServices.WindowsRuntime.IReadOnlyListAdapter<global::Windows.UI.Xaml.Documents.ITextElement2>>(global::System.Runtime.InteropServices.McgModuleManager.GetDynamicAdapter(
this,
typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Documents.ITextElement2>).TypeHandle
))[index];
}
}
}
// v-table for 'System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.Documents.ITextElement2>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Documents.ITextElement2>))]
public unsafe partial struct Vtbl
{
internal const int idx_GetAt = 6;
internal const int idx_get_Size = 7;
internal const int idx_IndexOf = 8;
internal const int idx_GetMany = 9;
}
}
// System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.Documents.ITextElement3>
public unsafe static class IReadOnlyList_A_Windows_UI_Xaml_Documents_ITextElement3_V___Impl
{
// DispatchClass for 'System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.Documents.ITextElement3>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Documents.ITextElement3>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Documents.ITextElement3>, global::System.Collections.Generic.IReadOnlyCollection<global::Windows.UI.Xaml.Documents.ITextElement3>
{
global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Documents.ITextElement3> global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Documents.ITextElement3>.GetEnumerator()
{
global::System.RuntimeTypeHandle dummySharedDynamicAdapter = typeof(global::System.Runtime.InteropServices.WindowsRuntime.IVectorViewSharedReferenceTypesDynamicAdapter<global::Windows.UI.Xaml.Documents.ITextElement3>).TypeHandle;
return (global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Documents.ITextElement3>)global::McgInterop.McgHelpers.GetGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Documents.ITextElement3>).TypeHandle
);
}
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return global::McgInterop.McgHelpers.GetNonGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Documents.ITextElement3>).TypeHandle
);
}
int global::System.Collections.Generic.IReadOnlyCollection<global::Windows.UI.Xaml.Documents.ITextElement3>.Count
{
get
{
return global::McgInterop.McgHelpers.GetReadOnlyCollectionCount(
this,
typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Documents.ITextElement3>).TypeHandle
);
}
}
global::Windows.UI.Xaml.Documents.ITextElement3 global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Documents.ITextElement3>.this[int index]
{
get
{
return global::System.Runtime.InteropServices.McgMarshal.FastCast<global::System.Runtime.InteropServices.WindowsRuntime.IReadOnlyListAdapter<global::Windows.UI.Xaml.Documents.ITextElement3>>(global::System.Runtime.InteropServices.McgModuleManager.GetDynamicAdapter(
this,
typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Documents.ITextElement3>).TypeHandle
))[index];
}
}
}
// v-table for 'System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.Documents.ITextElement3>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Documents.ITextElement3>))]
public unsafe partial struct Vtbl
{
internal const int idx_GetAt = 6;
internal const int idx_get_Size = 7;
internal const int idx_IndexOf = 8;
internal const int idx_GetMany = 9;
}
}
// System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.Documents.IInline>
public unsafe static class IReadOnlyList_A_Windows_UI_Xaml_Documents_IInline_V___Impl
{
// DispatchClass for 'System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.Documents.IInline>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Documents.IInline>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Documents.IInline>, global::System.Collections.Generic.IReadOnlyCollection<global::Windows.UI.Xaml.Documents.IInline>
{
global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Documents.IInline> global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Documents.IInline>.GetEnumerator()
{
global::System.RuntimeTypeHandle dummySharedDynamicAdapter = typeof(global::System.Runtime.InteropServices.WindowsRuntime.IVectorViewSharedReferenceTypesDynamicAdapter<global::Windows.UI.Xaml.Documents.IInline>).TypeHandle;
return (global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Documents.IInline>)global::McgInterop.McgHelpers.GetGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Documents.IInline>).TypeHandle
);
}
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return global::McgInterop.McgHelpers.GetNonGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Documents.IInline>).TypeHandle
);
}
int global::System.Collections.Generic.IReadOnlyCollection<global::Windows.UI.Xaml.Documents.IInline>.Count
{
get
{
return global::McgInterop.McgHelpers.GetReadOnlyCollectionCount(
this,
typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Documents.IInline>).TypeHandle
);
}
}
global::Windows.UI.Xaml.Documents.IInline global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Documents.IInline>.this[int index]
{
get
{
return global::System.Runtime.InteropServices.McgMarshal.FastCast<global::System.Runtime.InteropServices.WindowsRuntime.IReadOnlyListAdapter<global::Windows.UI.Xaml.Documents.IInline>>(global::System.Runtime.InteropServices.McgModuleManager.GetDynamicAdapter(
this,
typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Documents.IInline>).TypeHandle
))[index];
}
}
}
// v-table for 'System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.Documents.IInline>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Documents.IInline>))]
public unsafe partial struct Vtbl
{
internal const int idx_GetAt = 6;
internal const int idx_get_Size = 7;
internal const int idx_IndexOf = 8;
internal const int idx_GetMany = 9;
}
}
// System.Collections.Generic.IEnumerable<Windows.ApplicationModel.Resources.Core.NamedResource>
public unsafe static class IEnumerable_A_Windows_ApplicationModel_Resources_Core_NamedResource_V___Impl
{
// DispatchClass for 'System.Collections.Generic.IEnumerable<Windows.ApplicationModel.Resources.Core.NamedResource>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IEnumerable<global::Windows.ApplicationModel.Resources.Core.NamedResource>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::System.Collections.Generic.IEnumerable<global::Windows.ApplicationModel.Resources.Core.NamedResource>
{
global::System.Collections.Generic.IEnumerator<global::Windows.ApplicationModel.Resources.Core.NamedResource> global::System.Collections.Generic.IEnumerable<global::Windows.ApplicationModel.Resources.Core.NamedResource>.GetEnumerator()
{
global::System.RuntimeTypeHandle dummySharedDynamicAdapter = typeof(global::System.Runtime.InteropServices.WindowsRuntime.IIterableSharedReferenceTypesDynamicAdapter<global::Windows.ApplicationModel.Resources.Core.NamedResource>).TypeHandle;
return (global::System.Collections.Generic.IEnumerator<global::Windows.ApplicationModel.Resources.Core.NamedResource>)global::McgInterop.McgHelpers.GetGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.ApplicationModel.Resources.Core.NamedResource>).TypeHandle
);
}
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return global::McgInterop.McgHelpers.GetNonGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.ApplicationModel.Resources.Core.NamedResource>).TypeHandle
);
}
}
// v-table for 'System.Collections.Generic.IEnumerable<Windows.ApplicationModel.Resources.Core.NamedResource>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IEnumerable<global::Windows.ApplicationModel.Resources.Core.NamedResource>))]
public unsafe partial struct Vtbl
{
internal const int idx_First = 6;
}
}
// System.Collections.Generic.IEnumerable<Windows.ApplicationModel.Resources.Core.INamedResource>
public unsafe static class IEnumerable_A_Windows_ApplicationModel_Resources_Core_INamedResource_V___Impl
{
// DispatchClass for 'System.Collections.Generic.IEnumerable<Windows.ApplicationModel.Resources.Core.INamedResource>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IEnumerable<global::Windows.ApplicationModel.Resources.Core.INamedResource>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::System.Collections.Generic.IEnumerable<global::Windows.ApplicationModel.Resources.Core.INamedResource>
{
global::System.Collections.Generic.IEnumerator<global::Windows.ApplicationModel.Resources.Core.INamedResource> global::System.Collections.Generic.IEnumerable<global::Windows.ApplicationModel.Resources.Core.INamedResource>.GetEnumerator()
{
global::System.RuntimeTypeHandle dummySharedDynamicAdapter = typeof(global::System.Runtime.InteropServices.WindowsRuntime.IIterableSharedReferenceTypesDynamicAdapter<global::Windows.ApplicationModel.Resources.Core.INamedResource>).TypeHandle;
return (global::System.Collections.Generic.IEnumerator<global::Windows.ApplicationModel.Resources.Core.INamedResource>)global::McgInterop.McgHelpers.GetGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.ApplicationModel.Resources.Core.INamedResource>).TypeHandle
);
}
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return global::McgInterop.McgHelpers.GetNonGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.ApplicationModel.Resources.Core.INamedResource>).TypeHandle
);
}
}
// v-table for 'System.Collections.Generic.IEnumerable<Windows.ApplicationModel.Resources.Core.INamedResource>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IEnumerable<global::Windows.ApplicationModel.Resources.Core.INamedResource>))]
public unsafe partial struct Vtbl
{
internal const int idx_First = 6;
}
}
// System.Collections.Generic.IEnumerable<Windows.UI.Xaml.Automation.Peers.IAutomationPeer>
public unsafe static class IEnumerable_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeer_V___Impl
{
// DispatchClass for 'System.Collections.Generic.IEnumerable<Windows.UI.Xaml.Automation.Peers.IAutomationPeer>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer>
{
global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer> global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer>.GetEnumerator()
{
global::System.RuntimeTypeHandle dummySharedDynamicAdapter = typeof(global::System.Runtime.InteropServices.WindowsRuntime.IIterableSharedReferenceTypesDynamicAdapter<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer>).TypeHandle;
return (global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer>)global::McgInterop.McgHelpers.GetGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer>).TypeHandle
);
}
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return global::McgInterop.McgHelpers.GetNonGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer>).TypeHandle
);
}
}
// v-table for 'System.Collections.Generic.IEnumerable<Windows.UI.Xaml.Automation.Peers.IAutomationPeer>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer>))]
public unsafe partial struct Vtbl
{
internal const int idx_First = 6;
}
}
// System.Collections.Generic.IEnumerable<Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides>
public unsafe static class IEnumerable_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeerOverrides_V___Impl
{
// DispatchClass for 'System.Collections.Generic.IEnumerable<Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides>
{
global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides> global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides>.GetEnumerator()
{
global::System.RuntimeTypeHandle dummySharedDynamicAdapter = typeof(global::System.Runtime.InteropServices.WindowsRuntime.IIterableSharedReferenceTypesDynamicAdapter<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides>).TypeHandle;
return (global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides>)global::McgInterop.McgHelpers.GetGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides>).TypeHandle
);
}
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return global::McgInterop.McgHelpers.GetNonGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides>).TypeHandle
);
}
}
// v-table for 'System.Collections.Generic.IEnumerable<Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides>))]
public unsafe partial struct Vtbl
{
internal const int idx_First = 6;
}
}
// System.Collections.Generic.IEnumerable<Windows.UI.Xaml.Automation.Peers.IAutomationPeerProtected>
public unsafe static class IEnumerable_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeerProtected_V___Impl
{
// DispatchClass for 'System.Collections.Generic.IEnumerable<Windows.UI.Xaml.Automation.Peers.IAutomationPeerProtected>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerProtected>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerProtected>
{
global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerProtected> global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerProtected>.GetEnumerator()
{
global::System.RuntimeTypeHandle dummySharedDynamicAdapter = typeof(global::System.Runtime.InteropServices.WindowsRuntime.IIterableSharedReferenceTypesDynamicAdapter<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerProtected>).TypeHandle;
return (global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerProtected>)global::McgInterop.McgHelpers.GetGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerProtected>).TypeHandle
);
}
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return global::McgInterop.McgHelpers.GetNonGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerProtected>).TypeHandle
);
}
}
// v-table for 'System.Collections.Generic.IEnumerable<Windows.UI.Xaml.Automation.Peers.IAutomationPeerProtected>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerProtected>))]
public unsafe partial struct Vtbl
{
internal const int idx_First = 6;
}
}
// System.Collections.Generic.IEnumerable<Windows.UI.Xaml.Automation.Peers.IAutomationPeer2>
public unsafe static class IEnumerable_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeer2_V___Impl
{
// DispatchClass for 'System.Collections.Generic.IEnumerable<Windows.UI.Xaml.Automation.Peers.IAutomationPeer2>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer2>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer2>
{
global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer2> global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer2>.GetEnumerator()
{
global::System.RuntimeTypeHandle dummySharedDynamicAdapter = typeof(global::System.Runtime.InteropServices.WindowsRuntime.IIterableSharedReferenceTypesDynamicAdapter<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer2>).TypeHandle;
return (global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer2>)global::McgInterop.McgHelpers.GetGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer2>).TypeHandle
);
}
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return global::McgInterop.McgHelpers.GetNonGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer2>).TypeHandle
);
}
}
// v-table for 'System.Collections.Generic.IEnumerable<Windows.UI.Xaml.Automation.Peers.IAutomationPeer2>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer2>))]
public unsafe partial struct Vtbl
{
internal const int idx_First = 6;
}
}
// System.Collections.Generic.IEnumerable<Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides2>
public unsafe static class IEnumerable_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeerOverrides2_V___Impl
{
// DispatchClass for 'System.Collections.Generic.IEnumerable<Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides2>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides2>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides2>
{
global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides2> global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides2>.GetEnumerator()
{
global::System.RuntimeTypeHandle dummySharedDynamicAdapter = typeof(global::System.Runtime.InteropServices.WindowsRuntime.IIterableSharedReferenceTypesDynamicAdapter<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides2>).TypeHandle;
return (global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides2>)global::McgInterop.McgHelpers.GetGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides2>).TypeHandle
);
}
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return global::McgInterop.McgHelpers.GetNonGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides2>).TypeHandle
);
}
}
// v-table for 'System.Collections.Generic.IEnumerable<Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides2>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides2>))]
public unsafe partial struct Vtbl
{
internal const int idx_First = 6;
}
}
// System.Collections.Generic.IEnumerable<Windows.UI.Xaml.Automation.Peers.IAutomationPeer3>
public unsafe static class IEnumerable_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeer3_V___Impl
{
// DispatchClass for 'System.Collections.Generic.IEnumerable<Windows.UI.Xaml.Automation.Peers.IAutomationPeer3>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer3>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer3>
{
global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer3> global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer3>.GetEnumerator()
{
global::System.RuntimeTypeHandle dummySharedDynamicAdapter = typeof(global::System.Runtime.InteropServices.WindowsRuntime.IIterableSharedReferenceTypesDynamicAdapter<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer3>).TypeHandle;
return (global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer3>)global::McgInterop.McgHelpers.GetGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer3>).TypeHandle
);
}
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return global::McgInterop.McgHelpers.GetNonGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer3>).TypeHandle
);
}
}
// v-table for 'System.Collections.Generic.IEnumerable<Windows.UI.Xaml.Automation.Peers.IAutomationPeer3>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer3>))]
public unsafe partial struct Vtbl
{
internal const int idx_First = 6;
}
}
// System.Collections.Generic.IEnumerable<Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3>
public unsafe static class IEnumerable_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeerOverrides3_V___Impl
{
// DispatchClass for 'System.Collections.Generic.IEnumerable<Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3>
{
global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3> global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3>.GetEnumerator()
{
global::System.RuntimeTypeHandle dummySharedDynamicAdapter = typeof(global::System.Runtime.InteropServices.WindowsRuntime.IIterableSharedReferenceTypesDynamicAdapter<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3>).TypeHandle;
return (global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3>)global::McgInterop.McgHelpers.GetGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3>).TypeHandle
);
}
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return global::McgInterop.McgHelpers.GetNonGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3>).TypeHandle
);
}
}
// v-table for 'System.Collections.Generic.IEnumerable<Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3>))]
public unsafe partial struct Vtbl
{
internal const int idx_First = 6;
}
}
// System.Collections.Generic.IEnumerable<Windows.UI.Xaml.Automation.Peers.IAutomationPeer4>
public unsafe static class IEnumerable_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeer4_V___Impl
{
// DispatchClass for 'System.Collections.Generic.IEnumerable<Windows.UI.Xaml.Automation.Peers.IAutomationPeer4>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer4>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer4>
{
global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer4> global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer4>.GetEnumerator()
{
global::System.RuntimeTypeHandle dummySharedDynamicAdapter = typeof(global::System.Runtime.InteropServices.WindowsRuntime.IIterableSharedReferenceTypesDynamicAdapter<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer4>).TypeHandle;
return (global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer4>)global::McgInterop.McgHelpers.GetGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer4>).TypeHandle
);
}
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return global::McgInterop.McgHelpers.GetNonGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer4>).TypeHandle
);
}
}
// v-table for 'System.Collections.Generic.IEnumerable<Windows.UI.Xaml.Automation.Peers.IAutomationPeer4>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer4>))]
public unsafe partial struct Vtbl
{
internal const int idx_First = 6;
}
}
// System.Collections.Generic.IEnumerable<Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides4>
public unsafe static class IEnumerable_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeerOverrides4_V___Impl
{
// DispatchClass for 'System.Collections.Generic.IEnumerable<Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides4>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides4>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides4>
{
global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides4> global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides4>.GetEnumerator()
{
global::System.RuntimeTypeHandle dummySharedDynamicAdapter = typeof(global::System.Runtime.InteropServices.WindowsRuntime.IIterableSharedReferenceTypesDynamicAdapter<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides4>).TypeHandle;
return (global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides4>)global::McgInterop.McgHelpers.GetGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides4>).TypeHandle
);
}
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return global::McgInterop.McgHelpers.GetNonGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides4>).TypeHandle
);
}
}
// v-table for 'System.Collections.Generic.IEnumerable<Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides4>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides4>))]
public unsafe partial struct Vtbl
{
internal const int idx_First = 6;
}
}
// System.Collections.Generic.IEnumerable<Windows.UI.Xaml.Automation.Peers.IAutomationPeer5>
public unsafe static class IEnumerable_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeer5_V___Impl
{
// DispatchClass for 'System.Collections.Generic.IEnumerable<Windows.UI.Xaml.Automation.Peers.IAutomationPeer5>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer5>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer5>
{
global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer5> global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer5>.GetEnumerator()
{
global::System.RuntimeTypeHandle dummySharedDynamicAdapter = typeof(global::System.Runtime.InteropServices.WindowsRuntime.IIterableSharedReferenceTypesDynamicAdapter<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer5>).TypeHandle;
return (global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer5>)global::McgInterop.McgHelpers.GetGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer5>).TypeHandle
);
}
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return global::McgInterop.McgHelpers.GetNonGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer5>).TypeHandle
);
}
}
// v-table for 'System.Collections.Generic.IEnumerable<Windows.UI.Xaml.Automation.Peers.IAutomationPeer5>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer5>))]
public unsafe partial struct Vtbl
{
internal const int idx_First = 6;
}
}
// System.Collections.Generic.IEnumerable<Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5>
public unsafe static class IEnumerable_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeerOverrides5_V___Impl
{
// DispatchClass for 'System.Collections.Generic.IEnumerable<Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5>
{
global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5> global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5>.GetEnumerator()
{
global::System.RuntimeTypeHandle dummySharedDynamicAdapter = typeof(global::System.Runtime.InteropServices.WindowsRuntime.IIterableSharedReferenceTypesDynamicAdapter<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5>).TypeHandle;
return (global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5>)global::McgInterop.McgHelpers.GetGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5>).TypeHandle
);
}
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return global::McgInterop.McgHelpers.GetNonGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5>).TypeHandle
);
}
}
// v-table for 'System.Collections.Generic.IEnumerable<Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5>))]
public unsafe partial struct Vtbl
{
internal const int idx_First = 6;
}
}
// System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.Automation.Peers.IAutomationPeer>
public unsafe static class IReadOnlyList_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeer_V___Impl
{
// DispatchClass for 'System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.Automation.Peers.IAutomationPeer>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer>, global::System.Collections.Generic.IReadOnlyCollection<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer>
{
global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer> global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer>.GetEnumerator()
{
global::System.RuntimeTypeHandle dummySharedDynamicAdapter = typeof(global::System.Runtime.InteropServices.WindowsRuntime.IVectorViewSharedReferenceTypesDynamicAdapter<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer>).TypeHandle;
return (global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer>)global::McgInterop.McgHelpers.GetGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer>).TypeHandle
);
}
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return global::McgInterop.McgHelpers.GetNonGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer>).TypeHandle
);
}
int global::System.Collections.Generic.IReadOnlyCollection<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer>.Count
{
get
{
return global::McgInterop.McgHelpers.GetReadOnlyCollectionCount(
this,
typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer>).TypeHandle
);
}
}
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer>.this[int index]
{
get
{
return global::System.Runtime.InteropServices.McgMarshal.FastCast<global::System.Runtime.InteropServices.WindowsRuntime.IReadOnlyListAdapter<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer>>(global::System.Runtime.InteropServices.McgModuleManager.GetDynamicAdapter(
this,
typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer>).TypeHandle
))[index];
}
}
}
// v-table for 'System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.Automation.Peers.IAutomationPeer>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer>))]
public unsafe partial struct Vtbl
{
internal const int idx_GetAt = 6;
internal const int idx_get_Size = 7;
internal const int idx_IndexOf = 8;
internal const int idx_GetMany = 9;
}
}
// System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides>
public unsafe static class IReadOnlyList_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeerOverrides_V___Impl
{
// DispatchClass for 'System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides>, global::System.Collections.Generic.IReadOnlyCollection<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides>
{
global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides> global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides>.GetEnumerator()
{
global::System.RuntimeTypeHandle dummySharedDynamicAdapter = typeof(global::System.Runtime.InteropServices.WindowsRuntime.IVectorViewSharedReferenceTypesDynamicAdapter<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides>).TypeHandle;
return (global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides>)global::McgInterop.McgHelpers.GetGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides>).TypeHandle
);
}
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return global::McgInterop.McgHelpers.GetNonGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides>).TypeHandle
);
}
int global::System.Collections.Generic.IReadOnlyCollection<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides>.Count
{
get
{
return global::McgInterop.McgHelpers.GetReadOnlyCollectionCount(
this,
typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides>).TypeHandle
);
}
}
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides>.this[int index]
{
get
{
return global::System.Runtime.InteropServices.McgMarshal.FastCast<global::System.Runtime.InteropServices.WindowsRuntime.IReadOnlyListAdapter<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides>>(global::System.Runtime.InteropServices.McgModuleManager.GetDynamicAdapter(
this,
typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides>).TypeHandle
))[index];
}
}
}
// v-table for 'System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides>))]
public unsafe partial struct Vtbl
{
internal const int idx_GetAt = 6;
internal const int idx_get_Size = 7;
internal const int idx_IndexOf = 8;
internal const int idx_GetMany = 9;
}
}
// System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.Automation.Peers.IAutomationPeerProtected>
public unsafe static class IReadOnlyList_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeerProtected_V___Impl
{
// DispatchClass for 'System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.Automation.Peers.IAutomationPeerProtected>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerProtected>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerProtected>, global::System.Collections.Generic.IReadOnlyCollection<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerProtected>
{
global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerProtected> global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerProtected>.GetEnumerator()
{
global::System.RuntimeTypeHandle dummySharedDynamicAdapter = typeof(global::System.Runtime.InteropServices.WindowsRuntime.IVectorViewSharedReferenceTypesDynamicAdapter<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerProtected>).TypeHandle;
return (global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerProtected>)global::McgInterop.McgHelpers.GetGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerProtected>).TypeHandle
);
}
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return global::McgInterop.McgHelpers.GetNonGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerProtected>).TypeHandle
);
}
int global::System.Collections.Generic.IReadOnlyCollection<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerProtected>.Count
{
get
{
return global::McgInterop.McgHelpers.GetReadOnlyCollectionCount(
this,
typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerProtected>).TypeHandle
);
}
}
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerProtected global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerProtected>.this[int index]
{
get
{
return global::System.Runtime.InteropServices.McgMarshal.FastCast<global::System.Runtime.InteropServices.WindowsRuntime.IReadOnlyListAdapter<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerProtected>>(global::System.Runtime.InteropServices.McgModuleManager.GetDynamicAdapter(
this,
typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerProtected>).TypeHandle
))[index];
}
}
}
// v-table for 'System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.Automation.Peers.IAutomationPeerProtected>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerProtected>))]
public unsafe partial struct Vtbl
{
internal const int idx_GetAt = 6;
internal const int idx_get_Size = 7;
internal const int idx_IndexOf = 8;
internal const int idx_GetMany = 9;
}
}
// System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.Automation.Peers.IAutomationPeer2>
public unsafe static class IReadOnlyList_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeer2_V___Impl
{
// DispatchClass for 'System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.Automation.Peers.IAutomationPeer2>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer2>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer2>, global::System.Collections.Generic.IReadOnlyCollection<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer2>
{
global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer2> global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer2>.GetEnumerator()
{
global::System.RuntimeTypeHandle dummySharedDynamicAdapter = typeof(global::System.Runtime.InteropServices.WindowsRuntime.IVectorViewSharedReferenceTypesDynamicAdapter<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer2>).TypeHandle;
return (global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer2>)global::McgInterop.McgHelpers.GetGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer2>).TypeHandle
);
}
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return global::McgInterop.McgHelpers.GetNonGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer2>).TypeHandle
);
}
int global::System.Collections.Generic.IReadOnlyCollection<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer2>.Count
{
get
{
return global::McgInterop.McgHelpers.GetReadOnlyCollectionCount(
this,
typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer2>).TypeHandle
);
}
}
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer2 global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer2>.this[int index]
{
get
{
return global::System.Runtime.InteropServices.McgMarshal.FastCast<global::System.Runtime.InteropServices.WindowsRuntime.IReadOnlyListAdapter<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer2>>(global::System.Runtime.InteropServices.McgModuleManager.GetDynamicAdapter(
this,
typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer2>).TypeHandle
))[index];
}
}
}
// v-table for 'System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.Automation.Peers.IAutomationPeer2>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer2>))]
public unsafe partial struct Vtbl
{
internal const int idx_GetAt = 6;
internal const int idx_get_Size = 7;
internal const int idx_IndexOf = 8;
internal const int idx_GetMany = 9;
}
}
// System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides2>
public unsafe static class IReadOnlyList_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeerOverrides2_V___Impl
{
// DispatchClass for 'System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides2>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides2>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides2>, global::System.Collections.Generic.IReadOnlyCollection<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides2>
{
global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides2> global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides2>.GetEnumerator()
{
global::System.RuntimeTypeHandle dummySharedDynamicAdapter = typeof(global::System.Runtime.InteropServices.WindowsRuntime.IVectorViewSharedReferenceTypesDynamicAdapter<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides2>).TypeHandle;
return (global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides2>)global::McgInterop.McgHelpers.GetGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides2>).TypeHandle
);
}
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return global::McgInterop.McgHelpers.GetNonGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides2>).TypeHandle
);
}
int global::System.Collections.Generic.IReadOnlyCollection<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides2>.Count
{
get
{
return global::McgInterop.McgHelpers.GetReadOnlyCollectionCount(
this,
typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides2>).TypeHandle
);
}
}
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides2 global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides2>.this[int index]
{
get
{
return global::System.Runtime.InteropServices.McgMarshal.FastCast<global::System.Runtime.InteropServices.WindowsRuntime.IReadOnlyListAdapter<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides2>>(global::System.Runtime.InteropServices.McgModuleManager.GetDynamicAdapter(
this,
typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides2>).TypeHandle
))[index];
}
}
}
// v-table for 'System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides2>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides2>))]
public unsafe partial struct Vtbl
{
internal const int idx_GetAt = 6;
internal const int idx_get_Size = 7;
internal const int idx_IndexOf = 8;
internal const int idx_GetMany = 9;
}
}
// System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.Automation.Peers.IAutomationPeer3>
public unsafe static class IReadOnlyList_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeer3_V___Impl
{
// DispatchClass for 'System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.Automation.Peers.IAutomationPeer3>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer3>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer3>, global::System.Collections.Generic.IReadOnlyCollection<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer3>
{
global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer3> global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer3>.GetEnumerator()
{
global::System.RuntimeTypeHandle dummySharedDynamicAdapter = typeof(global::System.Runtime.InteropServices.WindowsRuntime.IVectorViewSharedReferenceTypesDynamicAdapter<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer3>).TypeHandle;
return (global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer3>)global::McgInterop.McgHelpers.GetGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer3>).TypeHandle
);
}
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return global::McgInterop.McgHelpers.GetNonGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer3>).TypeHandle
);
}
int global::System.Collections.Generic.IReadOnlyCollection<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer3>.Count
{
get
{
return global::McgInterop.McgHelpers.GetReadOnlyCollectionCount(
this,
typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer3>).TypeHandle
);
}
}
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer3 global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer3>.this[int index]
{
get
{
return global::System.Runtime.InteropServices.McgMarshal.FastCast<global::System.Runtime.InteropServices.WindowsRuntime.IReadOnlyListAdapter<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer3>>(global::System.Runtime.InteropServices.McgModuleManager.GetDynamicAdapter(
this,
typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer3>).TypeHandle
))[index];
}
}
}
// v-table for 'System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.Automation.Peers.IAutomationPeer3>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer3>))]
public unsafe partial struct Vtbl
{
internal const int idx_GetAt = 6;
internal const int idx_get_Size = 7;
internal const int idx_IndexOf = 8;
internal const int idx_GetMany = 9;
}
}
// System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3>
public unsafe static class IReadOnlyList_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeerOverrides3_V___Impl
{
// DispatchClass for 'System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3>, global::System.Collections.Generic.IReadOnlyCollection<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3>
{
global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3> global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3>.GetEnumerator()
{
global::System.RuntimeTypeHandle dummySharedDynamicAdapter = typeof(global::System.Runtime.InteropServices.WindowsRuntime.IVectorViewSharedReferenceTypesDynamicAdapter<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3>).TypeHandle;
return (global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3>)global::McgInterop.McgHelpers.GetGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3>).TypeHandle
);
}
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return global::McgInterop.McgHelpers.GetNonGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3>).TypeHandle
);
}
int global::System.Collections.Generic.IReadOnlyCollection<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3>.Count
{
get
{
return global::McgInterop.McgHelpers.GetReadOnlyCollectionCount(
this,
typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3>).TypeHandle
);
}
}
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3 global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3>.this[int index]
{
get
{
return global::System.Runtime.InteropServices.McgMarshal.FastCast<global::System.Runtime.InteropServices.WindowsRuntime.IReadOnlyListAdapter<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3>>(global::System.Runtime.InteropServices.McgModuleManager.GetDynamicAdapter(
this,
typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3>).TypeHandle
))[index];
}
}
}
// v-table for 'System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3>))]
public unsafe partial struct Vtbl
{
internal const int idx_GetAt = 6;
internal const int idx_get_Size = 7;
internal const int idx_IndexOf = 8;
internal const int idx_GetMany = 9;
}
}
// System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.Automation.Peers.IAutomationPeer4>
public unsafe static class IReadOnlyList_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeer4_V___Impl
{
// DispatchClass for 'System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.Automation.Peers.IAutomationPeer4>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer4>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer4>, global::System.Collections.Generic.IReadOnlyCollection<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer4>
{
global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer4> global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer4>.GetEnumerator()
{
global::System.RuntimeTypeHandle dummySharedDynamicAdapter = typeof(global::System.Runtime.InteropServices.WindowsRuntime.IVectorViewSharedReferenceTypesDynamicAdapter<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer4>).TypeHandle;
return (global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer4>)global::McgInterop.McgHelpers.GetGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer4>).TypeHandle
);
}
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return global::McgInterop.McgHelpers.GetNonGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer4>).TypeHandle
);
}
int global::System.Collections.Generic.IReadOnlyCollection<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer4>.Count
{
get
{
return global::McgInterop.McgHelpers.GetReadOnlyCollectionCount(
this,
typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer4>).TypeHandle
);
}
}
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer4 global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer4>.this[int index]
{
get
{
return global::System.Runtime.InteropServices.McgMarshal.FastCast<global::System.Runtime.InteropServices.WindowsRuntime.IReadOnlyListAdapter<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer4>>(global::System.Runtime.InteropServices.McgModuleManager.GetDynamicAdapter(
this,
typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer4>).TypeHandle
))[index];
}
}
}
// v-table for 'System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.Automation.Peers.IAutomationPeer4>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer4>))]
public unsafe partial struct Vtbl
{
internal const int idx_GetAt = 6;
internal const int idx_get_Size = 7;
internal const int idx_IndexOf = 8;
internal const int idx_GetMany = 9;
}
}
// System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides4>
public unsafe static class IReadOnlyList_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeerOverrides4_V___Impl
{
// DispatchClass for 'System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides4>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides4>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides4>, global::System.Collections.Generic.IReadOnlyCollection<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides4>
{
global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides4> global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides4>.GetEnumerator()
{
global::System.RuntimeTypeHandle dummySharedDynamicAdapter = typeof(global::System.Runtime.InteropServices.WindowsRuntime.IVectorViewSharedReferenceTypesDynamicAdapter<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides4>).TypeHandle;
return (global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides4>)global::McgInterop.McgHelpers.GetGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides4>).TypeHandle
);
}
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return global::McgInterop.McgHelpers.GetNonGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides4>).TypeHandle
);
}
int global::System.Collections.Generic.IReadOnlyCollection<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides4>.Count
{
get
{
return global::McgInterop.McgHelpers.GetReadOnlyCollectionCount(
this,
typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides4>).TypeHandle
);
}
}
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides4 global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides4>.this[int index]
{
get
{
return global::System.Runtime.InteropServices.McgMarshal.FastCast<global::System.Runtime.InteropServices.WindowsRuntime.IReadOnlyListAdapter<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides4>>(global::System.Runtime.InteropServices.McgModuleManager.GetDynamicAdapter(
this,
typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides4>).TypeHandle
))[index];
}
}
}
// v-table for 'System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides4>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides4>))]
public unsafe partial struct Vtbl
{
internal const int idx_GetAt = 6;
internal const int idx_get_Size = 7;
internal const int idx_IndexOf = 8;
internal const int idx_GetMany = 9;
}
}
// System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.Automation.Peers.IAutomationPeer5>
public unsafe static class IReadOnlyList_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeer5_V___Impl
{
// DispatchClass for 'System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.Automation.Peers.IAutomationPeer5>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer5>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer5>, global::System.Collections.Generic.IReadOnlyCollection<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer5>
{
global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer5> global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer5>.GetEnumerator()
{
global::System.RuntimeTypeHandle dummySharedDynamicAdapter = typeof(global::System.Runtime.InteropServices.WindowsRuntime.IVectorViewSharedReferenceTypesDynamicAdapter<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer5>).TypeHandle;
return (global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer5>)global::McgInterop.McgHelpers.GetGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer5>).TypeHandle
);
}
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return global::McgInterop.McgHelpers.GetNonGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer5>).TypeHandle
);
}
int global::System.Collections.Generic.IReadOnlyCollection<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer5>.Count
{
get
{
return global::McgInterop.McgHelpers.GetReadOnlyCollectionCount(
this,
typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer5>).TypeHandle
);
}
}
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer5 global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer5>.this[int index]
{
get
{
return global::System.Runtime.InteropServices.McgMarshal.FastCast<global::System.Runtime.InteropServices.WindowsRuntime.IReadOnlyListAdapter<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer5>>(global::System.Runtime.InteropServices.McgModuleManager.GetDynamicAdapter(
this,
typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer5>).TypeHandle
))[index];
}
}
}
// v-table for 'System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.Automation.Peers.IAutomationPeer5>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer5>))]
public unsafe partial struct Vtbl
{
internal const int idx_GetAt = 6;
internal const int idx_get_Size = 7;
internal const int idx_IndexOf = 8;
internal const int idx_GetMany = 9;
}
}
// System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5>
public unsafe static class IReadOnlyList_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeerOverrides5_V___Impl
{
// DispatchClass for 'System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5>, global::System.Collections.Generic.IReadOnlyCollection<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5>
{
global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5> global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5>.GetEnumerator()
{
global::System.RuntimeTypeHandle dummySharedDynamicAdapter = typeof(global::System.Runtime.InteropServices.WindowsRuntime.IVectorViewSharedReferenceTypesDynamicAdapter<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5>).TypeHandle;
return (global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5>)global::McgInterop.McgHelpers.GetGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5>).TypeHandle
);
}
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return global::McgInterop.McgHelpers.GetNonGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5>).TypeHandle
);
}
int global::System.Collections.Generic.IReadOnlyCollection<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5>.Count
{
get
{
return global::McgInterop.McgHelpers.GetReadOnlyCollectionCount(
this,
typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5>).TypeHandle
);
}
}
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5 global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5>.this[int index]
{
get
{
return global::System.Runtime.InteropServices.McgMarshal.FastCast<global::System.Runtime.InteropServices.WindowsRuntime.IReadOnlyListAdapter<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5>>(global::System.Runtime.InteropServices.McgModuleManager.GetDynamicAdapter(
this,
typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5>).TypeHandle
))[index];
}
}
}
// v-table for 'System.Collections.Generic.IReadOnlyList<Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5>))]
public unsafe partial struct Vtbl
{
internal const int idx_GetAt = 6;
internal const int idx_get_Size = 7;
internal const int idx_IndexOf = 8;
internal const int idx_GetMany = 9;
}
}
// System.Collections.Generic.IEnumerable<Windows.UI.Xaml.Automation.Peers.IAutomationPeerAnnotation>
public unsafe static class IEnumerable_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeerAnnotation_V___Impl
{
// DispatchClass for 'System.Collections.Generic.IEnumerable<Windows.UI.Xaml.Automation.Peers.IAutomationPeerAnnotation>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerAnnotation>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerAnnotation>
{
global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerAnnotation> global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerAnnotation>.GetEnumerator()
{
global::System.RuntimeTypeHandle dummySharedDynamicAdapter = typeof(global::System.Runtime.InteropServices.WindowsRuntime.IIterableSharedReferenceTypesDynamicAdapter<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerAnnotation>).TypeHandle;
return (global::System.Collections.Generic.IEnumerator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerAnnotation>)global::McgInterop.McgHelpers.GetGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerAnnotation>).TypeHandle
);
}
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return global::McgInterop.McgHelpers.GetNonGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerAnnotation>).TypeHandle
);
}
}
// v-table for 'System.Collections.Generic.IEnumerable<Windows.UI.Xaml.Automation.Peers.IAutomationPeerAnnotation>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerAnnotation>))]
public unsafe partial struct Vtbl
{
internal const int idx_First = 6;
}
}
// System.Collections.Generic.KeyValuePair<string,Windows.UI.Xaml.Markup.IXamlType>
public unsafe static class KeyValuePair_A_string_j_Windows_UI_Xaml_Markup_IXamlType_V___Impl
{
// StubClass for 'System.Collections.Generic.KeyValuePair<string,Windows.UI.Xaml.Markup.IXamlType>'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static string get_Key(global::System.__ComObject __this)
{
string __ret = global::McgInterop.ForwardComSharedStubs.Func_string__<global::Windows.Foundation.Collections.IKeyValuePair<string, global::Windows.UI.Xaml.Markup.IXamlType>>(
__this,
global::System.Collections.Generic.KeyValuePair_A_string_j_Windows_UI_Xaml_Markup_IXamlType_V___Impl.Vtbl.idx_get_Key
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.Markup.IXamlType get_Value(global::System.__ComObject __this)
{
global::Windows.UI.Xaml.Markup.IXamlType __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.Foundation.Collections.IKeyValuePair<string, global::Windows.UI.Xaml.Markup.IXamlType>, global::Windows.UI.Xaml.Markup.IXamlType>(
__this,
global::System.Collections.Generic.KeyValuePair_A_string_j_Windows_UI_Xaml_Markup_IXamlType_V___Impl.Vtbl.idx_get_Value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
}
// DispatchClass for 'System.Collections.Generic.KeyValuePair<string,Windows.UI.Xaml.Markup.IXamlType>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IKeyValuePair<string, global::Windows.UI.Xaml.Markup.IXamlType>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Foundation.Collections.IKeyValuePair<string, global::Windows.UI.Xaml.Markup.IXamlType>
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IKeyValuePair`2.Key")]
string global::Windows.Foundation.Collections.IKeyValuePair<string, global::Windows.UI.Xaml.Markup.IXamlType>.get_Key()
{
string __retVal = global::System.Collections.Generic.KeyValuePair_A_string_j_Windows_UI_Xaml_Markup_IXamlType_V___Impl.StubClass.get_Key(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IKeyValuePair`2.Value")]
global::Windows.UI.Xaml.Markup.IXamlType global::Windows.Foundation.Collections.IKeyValuePair<string, global::Windows.UI.Xaml.Markup.IXamlType>.get_Value()
{
global::Windows.UI.Xaml.Markup.IXamlType __retVal = global::System.Collections.Generic.KeyValuePair_A_string_j_Windows_UI_Xaml_Markup_IXamlType_V___Impl.StubClass.get_Value(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'System.Collections.Generic.KeyValuePair<string,Windows.UI.Xaml.Markup.IXamlType>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IKeyValuePair<string, global::Windows.UI.Xaml.Markup.IXamlType>))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Key = 6;
internal const int idx_get_Value = 7;
}
}
// System.Collections.Generic.KeyValuePair<System.Type,Windows.UI.Xaml.Markup.IXamlType>
public unsafe static class KeyValuePair_A_System_Type_j_Windows_UI_Xaml_Markup_IXamlType_V___Impl
{
// StubClass for 'System.Collections.Generic.KeyValuePair<System.Type,Windows.UI.Xaml.Markup.IXamlType>'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Type get_Key(global::System.__ComObject __this)
{
global::System.Type __ret = global::McgInterop.ForwardComSharedStubs.Func_Type__<global::Windows.Foundation.Collections.IKeyValuePair<global::System.Type, global::Windows.UI.Xaml.Markup.IXamlType>>(
__this,
global::System.Collections.Generic.KeyValuePair_A_System_Type_j_Windows_UI_Xaml_Markup_IXamlType_V___Impl.Vtbl.idx_get_Key
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.Markup.IXamlType get_Value(global::System.__ComObject __this)
{
global::Windows.UI.Xaml.Markup.IXamlType __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.Foundation.Collections.IKeyValuePair<global::System.Type, global::Windows.UI.Xaml.Markup.IXamlType>, global::Windows.UI.Xaml.Markup.IXamlType>(
__this,
global::System.Collections.Generic.KeyValuePair_A_System_Type_j_Windows_UI_Xaml_Markup_IXamlType_V___Impl.Vtbl.idx_get_Value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
}
// DispatchClass for 'System.Collections.Generic.KeyValuePair<System.Type,Windows.UI.Xaml.Markup.IXamlType>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IKeyValuePair<global::System.Type, global::Windows.UI.Xaml.Markup.IXamlType>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Foundation.Collections.IKeyValuePair<global::System.Type, global::Windows.UI.Xaml.Markup.IXamlType>
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IKeyValuePair`2.Key")]
global::System.Type global::Windows.Foundation.Collections.IKeyValuePair<global::System.Type, global::Windows.UI.Xaml.Markup.IXamlType>.get_Key()
{
global::System.Type __retVal = global::System.Collections.Generic.KeyValuePair_A_System_Type_j_Windows_UI_Xaml_Markup_IXamlType_V___Impl.StubClass.get_Key(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IKeyValuePair`2.Value")]
global::Windows.UI.Xaml.Markup.IXamlType global::Windows.Foundation.Collections.IKeyValuePair<global::System.Type, global::Windows.UI.Xaml.Markup.IXamlType>.get_Value()
{
global::Windows.UI.Xaml.Markup.IXamlType __retVal = global::System.Collections.Generic.KeyValuePair_A_System_Type_j_Windows_UI_Xaml_Markup_IXamlType_V___Impl.StubClass.get_Value(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'System.Collections.Generic.KeyValuePair<System.Type,Windows.UI.Xaml.Markup.IXamlType>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IKeyValuePair<global::System.Type, global::Windows.UI.Xaml.Markup.IXamlType>))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Key = 6;
internal const int idx_get_Value = 7;
}
}
// System.Collections.Generic.KeyValuePair<string,Windows.UI.Xaml.Markup.IXamlMember>
public unsafe static class KeyValuePair_A_string_j_Windows_UI_Xaml_Markup_IXamlMember_V___Impl
{
// StubClass for 'System.Collections.Generic.KeyValuePair<string,Windows.UI.Xaml.Markup.IXamlMember>'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static string get_Key(global::System.__ComObject __this)
{
string __ret = global::McgInterop.ForwardComSharedStubs.Func_string__<global::Windows.Foundation.Collections.IKeyValuePair<string, global::Windows.UI.Xaml.Markup.IXamlMember>>(
__this,
global::System.Collections.Generic.KeyValuePair_A_string_j_Windows_UI_Xaml_Markup_IXamlMember_V___Impl.Vtbl.idx_get_Key
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.Markup.IXamlMember get_Value(global::System.__ComObject __this)
{
global::Windows.UI.Xaml.Markup.IXamlMember __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.Foundation.Collections.IKeyValuePair<string, global::Windows.UI.Xaml.Markup.IXamlMember>, global::Windows.UI.Xaml.Markup.IXamlMember>(
__this,
global::System.Collections.Generic.KeyValuePair_A_string_j_Windows_UI_Xaml_Markup_IXamlMember_V___Impl.Vtbl.idx_get_Value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
}
// DispatchClass for 'System.Collections.Generic.KeyValuePair<string,Windows.UI.Xaml.Markup.IXamlMember>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IKeyValuePair<string, global::Windows.UI.Xaml.Markup.IXamlMember>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Foundation.Collections.IKeyValuePair<string, global::Windows.UI.Xaml.Markup.IXamlMember>
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IKeyValuePair`2.Key")]
string global::Windows.Foundation.Collections.IKeyValuePair<string, global::Windows.UI.Xaml.Markup.IXamlMember>.get_Key()
{
string __retVal = global::System.Collections.Generic.KeyValuePair_A_string_j_Windows_UI_Xaml_Markup_IXamlMember_V___Impl.StubClass.get_Key(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IKeyValuePair`2.Value")]
global::Windows.UI.Xaml.Markup.IXamlMember global::Windows.Foundation.Collections.IKeyValuePair<string, global::Windows.UI.Xaml.Markup.IXamlMember>.get_Value()
{
global::Windows.UI.Xaml.Markup.IXamlMember __retVal = global::System.Collections.Generic.KeyValuePair_A_string_j_Windows_UI_Xaml_Markup_IXamlMember_V___Impl.StubClass.get_Value(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'System.Collections.Generic.KeyValuePair<string,Windows.UI.Xaml.Markup.IXamlMember>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IKeyValuePair<string, global::Windows.UI.Xaml.Markup.IXamlMember>))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Key = 6;
internal const int idx_get_Value = 7;
}
}
// System.Collections.Generic.IEnumerable<Windows.Devices.Enumeration.IDeviceInformation>
public unsafe static class IEnumerable_A_Windows_Devices_Enumeration_IDeviceInformation_V___Impl
{
// DispatchClass for 'System.Collections.Generic.IEnumerable<Windows.Devices.Enumeration.IDeviceInformation>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IEnumerable<global::Windows.Devices.Enumeration.IDeviceInformation>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::System.Collections.Generic.IEnumerable<global::Windows.Devices.Enumeration.IDeviceInformation>
{
global::System.Collections.Generic.IEnumerator<global::Windows.Devices.Enumeration.IDeviceInformation> global::System.Collections.Generic.IEnumerable<global::Windows.Devices.Enumeration.IDeviceInformation>.GetEnumerator()
{
global::System.RuntimeTypeHandle dummySharedDynamicAdapter = typeof(global::System.Runtime.InteropServices.WindowsRuntime.IIterableSharedReferenceTypesDynamicAdapter<global::Windows.Devices.Enumeration.IDeviceInformation>).TypeHandle;
return (global::System.Collections.Generic.IEnumerator<global::Windows.Devices.Enumeration.IDeviceInformation>)global::McgInterop.McgHelpers.GetGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.Devices.Enumeration.IDeviceInformation>).TypeHandle
);
}
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return global::McgInterop.McgHelpers.GetNonGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.Devices.Enumeration.IDeviceInformation>).TypeHandle
);
}
}
// v-table for 'System.Collections.Generic.IEnumerable<Windows.Devices.Enumeration.IDeviceInformation>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IEnumerable<global::Windows.Devices.Enumeration.IDeviceInformation>))]
public unsafe partial struct Vtbl
{
internal const int idx_First = 6;
}
}
// System.Collections.Generic.IEnumerable<Windows.Devices.Enumeration.IDeviceInformation2>
public unsafe static class IEnumerable_A_Windows_Devices_Enumeration_IDeviceInformation2_V___Impl
{
// DispatchClass for 'System.Collections.Generic.IEnumerable<Windows.Devices.Enumeration.IDeviceInformation2>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IEnumerable<global::Windows.Devices.Enumeration.IDeviceInformation2>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::System.Collections.Generic.IEnumerable<global::Windows.Devices.Enumeration.IDeviceInformation2>
{
global::System.Collections.Generic.IEnumerator<global::Windows.Devices.Enumeration.IDeviceInformation2> global::System.Collections.Generic.IEnumerable<global::Windows.Devices.Enumeration.IDeviceInformation2>.GetEnumerator()
{
global::System.RuntimeTypeHandle dummySharedDynamicAdapter = typeof(global::System.Runtime.InteropServices.WindowsRuntime.IIterableSharedReferenceTypesDynamicAdapter<global::Windows.Devices.Enumeration.IDeviceInformation2>).TypeHandle;
return (global::System.Collections.Generic.IEnumerator<global::Windows.Devices.Enumeration.IDeviceInformation2>)global::McgInterop.McgHelpers.GetGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.Devices.Enumeration.IDeviceInformation2>).TypeHandle
);
}
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return global::McgInterop.McgHelpers.GetNonGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.Devices.Enumeration.IDeviceInformation2>).TypeHandle
);
}
}
// v-table for 'System.Collections.Generic.IEnumerable<Windows.Devices.Enumeration.IDeviceInformation2>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IEnumerable<global::Windows.Devices.Enumeration.IDeviceInformation2>))]
public unsafe partial struct Vtbl
{
internal const int idx_First = 6;
}
}
// System.Collections.Generic.IReadOnlyList<Windows.Devices.Enumeration.IDeviceInformation>
public unsafe static class IReadOnlyList_A_Windows_Devices_Enumeration_IDeviceInformation_V___Impl
{
// DispatchClass for 'System.Collections.Generic.IReadOnlyList<Windows.Devices.Enumeration.IDeviceInformation>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.Devices.Enumeration.IDeviceInformation>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::System.Collections.Generic.IReadOnlyList<global::Windows.Devices.Enumeration.IDeviceInformation>, global::System.Collections.Generic.IReadOnlyCollection<global::Windows.Devices.Enumeration.IDeviceInformation>
{
global::System.Collections.Generic.IEnumerator<global::Windows.Devices.Enumeration.IDeviceInformation> global::System.Collections.Generic.IEnumerable<global::Windows.Devices.Enumeration.IDeviceInformation>.GetEnumerator()
{
global::System.RuntimeTypeHandle dummySharedDynamicAdapter = typeof(global::System.Runtime.InteropServices.WindowsRuntime.IVectorViewSharedReferenceTypesDynamicAdapter<global::Windows.Devices.Enumeration.IDeviceInformation>).TypeHandle;
return (global::System.Collections.Generic.IEnumerator<global::Windows.Devices.Enumeration.IDeviceInformation>)global::McgInterop.McgHelpers.GetGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.Devices.Enumeration.IDeviceInformation>).TypeHandle
);
}
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return global::McgInterop.McgHelpers.GetNonGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.Devices.Enumeration.IDeviceInformation>).TypeHandle
);
}
int global::System.Collections.Generic.IReadOnlyCollection<global::Windows.Devices.Enumeration.IDeviceInformation>.Count
{
get
{
return global::McgInterop.McgHelpers.GetReadOnlyCollectionCount(
this,
typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.Devices.Enumeration.IDeviceInformation>).TypeHandle
);
}
}
global::Windows.Devices.Enumeration.IDeviceInformation global::System.Collections.Generic.IReadOnlyList<global::Windows.Devices.Enumeration.IDeviceInformation>.this[int index]
{
get
{
return global::System.Runtime.InteropServices.McgMarshal.FastCast<global::System.Runtime.InteropServices.WindowsRuntime.IReadOnlyListAdapter<global::Windows.Devices.Enumeration.IDeviceInformation>>(global::System.Runtime.InteropServices.McgModuleManager.GetDynamicAdapter(
this,
typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.Devices.Enumeration.IDeviceInformation>).TypeHandle
))[index];
}
}
}
// v-table for 'System.Collections.Generic.IReadOnlyList<Windows.Devices.Enumeration.IDeviceInformation>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.Devices.Enumeration.IDeviceInformation>))]
public unsafe partial struct Vtbl
{
internal const int idx_GetAt = 6;
internal const int idx_get_Size = 7;
internal const int idx_IndexOf = 8;
internal const int idx_GetMany = 9;
}
}
// System.Collections.Generic.IReadOnlyList<Windows.Devices.Enumeration.IDeviceInformation2>
public unsafe static class IReadOnlyList_A_Windows_Devices_Enumeration_IDeviceInformation2_V___Impl
{
// DispatchClass for 'System.Collections.Generic.IReadOnlyList<Windows.Devices.Enumeration.IDeviceInformation2>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.Devices.Enumeration.IDeviceInformation2>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::System.Collections.Generic.IReadOnlyList<global::Windows.Devices.Enumeration.IDeviceInformation2>, global::System.Collections.Generic.IReadOnlyCollection<global::Windows.Devices.Enumeration.IDeviceInformation2>
{
global::System.Collections.Generic.IEnumerator<global::Windows.Devices.Enumeration.IDeviceInformation2> global::System.Collections.Generic.IEnumerable<global::Windows.Devices.Enumeration.IDeviceInformation2>.GetEnumerator()
{
global::System.RuntimeTypeHandle dummySharedDynamicAdapter = typeof(global::System.Runtime.InteropServices.WindowsRuntime.IVectorViewSharedReferenceTypesDynamicAdapter<global::Windows.Devices.Enumeration.IDeviceInformation2>).TypeHandle;
return (global::System.Collections.Generic.IEnumerator<global::Windows.Devices.Enumeration.IDeviceInformation2>)global::McgInterop.McgHelpers.GetGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.Devices.Enumeration.IDeviceInformation2>).TypeHandle
);
}
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return global::McgInterop.McgHelpers.GetNonGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.Devices.Enumeration.IDeviceInformation2>).TypeHandle
);
}
int global::System.Collections.Generic.IReadOnlyCollection<global::Windows.Devices.Enumeration.IDeviceInformation2>.Count
{
get
{
return global::McgInterop.McgHelpers.GetReadOnlyCollectionCount(
this,
typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.Devices.Enumeration.IDeviceInformation2>).TypeHandle
);
}
}
global::Windows.Devices.Enumeration.IDeviceInformation2 global::System.Collections.Generic.IReadOnlyList<global::Windows.Devices.Enumeration.IDeviceInformation2>.this[int index]
{
get
{
return global::System.Runtime.InteropServices.McgMarshal.FastCast<global::System.Runtime.InteropServices.WindowsRuntime.IReadOnlyListAdapter<global::Windows.Devices.Enumeration.IDeviceInformation2>>(global::System.Runtime.InteropServices.McgModuleManager.GetDynamicAdapter(
this,
typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.Devices.Enumeration.IDeviceInformation2>).TypeHandle
))[index];
}
}
}
// v-table for 'System.Collections.Generic.IReadOnlyList<Windows.Devices.Enumeration.IDeviceInformation2>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Collections.Generic.IReadOnlyList<global::Windows.Devices.Enumeration.IDeviceInformation2>))]
public unsafe partial struct Vtbl
{
internal const int idx_GetAt = 6;
internal const int idx_get_Size = 7;
internal const int idx_IndexOf = 8;
internal const int idx_GetMany = 9;
}
}
}
namespace System.Runtime.InteropServices
{
// System.Runtime.InteropServices.IMarshal__System_Runtime_WindowsRuntime
public unsafe static class IMarshal__System_Runtime_WindowsRuntime__Impl
{
// StubClass for 'System.Runtime.InteropServices.IMarshal__System_Runtime_WindowsRuntime'
public static partial class StubClass
{
// Signature, System.Runtime.InteropServices.IMarshal__System_Runtime_WindowsRuntime.GetUnmarshalClass, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [managedbyref] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] System_Guid__System.Guid, [fwd] [in] [Mcg.CodeGen.BlittableValueMarshaller] System_IntPtr____w64 int, [fwd] [in] [Mcg.CodeGen.BlittableValueMarshaller] uint__unsigned int, [fwd] [in] [Mcg.CodeGen.BlittableValueMarshaller] System_IntPtr____w64 int, [fwd] [in] [Mcg.CodeGen.BlittableValueMarshaller] uint__unsigned int, [fwd] [out] [managedbyref] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] System_Guid__System.Guid,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void GetUnmarshalClass(
global::System.__ComObject __this,
ref global::System.Guid riid,
global::System.IntPtr pv,
uint dwDestContext,
global::System.IntPtr pvDestContext,
uint mshlFlags,
out global::System.Guid pCid)
{
// Setup
global::System.Guid unsafe_riid;
global::System.Guid unsafe_pCid;
int unsafe___return__;
// Marshalling
unsafe_riid = riid;
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
global::System.Runtime.InteropServices.TypeOfHelper.RuntimeTypeHandleOf("System.Runtime.InteropServices.IMarshal,System.Runtime.WindowsRuntime, Version=4.0.10.0, Culture=neutral, Public" +
"KeyToken=b77a5c561934e089"),
global::System.Runtime.InteropServices.IMarshal__System_Runtime_WindowsRuntime__Impl.Vtbl.idx_GetUnmarshalClass,
&(unsafe_riid),
pv,
dwDestContext,
pvDestContext,
mshlFlags,
&(unsafe_pCid)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
pCid = unsafe_pCid;
// Return
}
// Signature, System.Runtime.InteropServices.IMarshal__System_Runtime_WindowsRuntime.GetMarshalSizeMax, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [managedbyref] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] System_Guid__System.Guid, [fwd] [in] [Mcg.CodeGen.BlittableValueMarshaller] System_IntPtr____w64 int, [fwd] [in] [Mcg.CodeGen.BlittableValueMarshaller] uint__unsigned int, [fwd] [in] [Mcg.CodeGen.BlittableValueMarshaller] System_IntPtr____w64 int, [fwd] [in] [Mcg.CodeGen.BlittableValueMarshaller] uint__unsigned int, [fwd] [out] [managedbyref] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] uint__unsigned int,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void GetMarshalSizeMax(
global::System.__ComObject __this,
ref global::System.Guid riid,
global::System.IntPtr pv,
uint dwDestContext,
global::System.IntPtr pvDestContext,
uint mshlflags,
out uint pSize)
{
// Setup
global::System.Guid unsafe_riid;
uint unsafe_pSize;
int unsafe___return__;
// Marshalling
unsafe_riid = riid;
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
global::System.Runtime.InteropServices.TypeOfHelper.RuntimeTypeHandleOf("System.Runtime.InteropServices.IMarshal,System.Runtime.WindowsRuntime, Version=4.0.10.0, Culture=neutral, Public" +
"KeyToken=b77a5c561934e089"),
global::System.Runtime.InteropServices.IMarshal__System_Runtime_WindowsRuntime__Impl.Vtbl.idx_GetMarshalSizeMax,
&(unsafe_riid),
pv,
dwDestContext,
pvDestContext,
mshlflags,
&(unsafe_pSize)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
pSize = unsafe_pSize;
// Return
}
// Signature, System.Runtime.InteropServices.IMarshal__System_Runtime_WindowsRuntime.MarshalInterface, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.BlittableValueMarshaller] System_IntPtr____w64 int, [fwd] [in] [managedbyref] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] System_Guid__System.Guid, [fwd] [in] [Mcg.CodeGen.BlittableValueMarshaller] System_IntPtr____w64 int, [fwd] [in] [Mcg.CodeGen.BlittableValueMarshaller] uint__unsigned int, [fwd] [in] [Mcg.CodeGen.BlittableValueMarshaller] System_IntPtr____w64 int, [fwd] [in] [Mcg.CodeGen.BlittableValueMarshaller] uint__unsigned int,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void MarshalInterface(
global::System.__ComObject __this,
global::System.IntPtr pStm,
ref global::System.Guid riid,
global::System.IntPtr pv,
uint dwDestContext,
global::System.IntPtr pvDestContext,
uint mshlflags)
{
// Setup
global::System.Guid unsafe_riid;
int unsafe___return__;
// Marshalling
unsafe_riid = riid;
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
global::System.Runtime.InteropServices.TypeOfHelper.RuntimeTypeHandleOf("System.Runtime.InteropServices.IMarshal,System.Runtime.WindowsRuntime, Version=4.0.10.0, Culture=neutral, Public" +
"KeyToken=b77a5c561934e089"),
global::System.Runtime.InteropServices.IMarshal__System_Runtime_WindowsRuntime__Impl.Vtbl.idx_MarshalInterface,
pStm,
&(unsafe_riid),
pv,
dwDestContext,
pvDestContext,
mshlflags
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
// Return
}
// Signature, System.Runtime.InteropServices.IMarshal__System_Runtime_WindowsRuntime.UnmarshalInterface, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.BlittableValueMarshaller] System_IntPtr____w64 int, [fwd] [in] [managedbyref] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] System_Guid__System.Guid, [fwd] [out] [managedbyref] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] System_IntPtr____w64 int,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void UnmarshalInterface(
global::System.__ComObject __this,
global::System.IntPtr pStm,
ref global::System.Guid riid,
out global::System.IntPtr ppv)
{
// Setup
global::System.Guid unsafe_riid;
global::System.IntPtr unsafe_ppv;
int unsafe___return__;
// Marshalling
unsafe_riid = riid;
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
global::System.Runtime.InteropServices.TypeOfHelper.RuntimeTypeHandleOf("System.Runtime.InteropServices.IMarshal,System.Runtime.WindowsRuntime, Version=4.0.10.0, Culture=neutral, Public" +
"KeyToken=b77a5c561934e089"),
global::System.Runtime.InteropServices.IMarshal__System_Runtime_WindowsRuntime__Impl.Vtbl.idx_UnmarshalInterface,
pStm,
&(unsafe_riid),
&(unsafe_ppv)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
ppv = unsafe_ppv;
// Return
}
// Signature, System.Runtime.InteropServices.IMarshal__System_Runtime_WindowsRuntime.ReleaseMarshalData, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.BlittableValueMarshaller] System_IntPtr____w64 int,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void ReleaseMarshalData(
global::System.__ComObject __this,
global::System.IntPtr pStm)
{
// Setup
int unsafe___return__;
// Marshalling
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
global::System.Runtime.InteropServices.TypeOfHelper.RuntimeTypeHandleOf("System.Runtime.InteropServices.IMarshal,System.Runtime.WindowsRuntime, Version=4.0.10.0, Culture=neutral, Public" +
"KeyToken=b77a5c561934e089"),
global::System.Runtime.InteropServices.IMarshal__System_Runtime_WindowsRuntime__Impl.Vtbl.idx_ReleaseMarshalData,
pStm
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
// Return
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void DisconnectObject(
global::System.__ComObject __this,
uint dwReserved)
{
global::McgInterop.ForwardComSharedStubs.Proc_uint__<global::System.Runtime.InteropServices.IMarshal__System_Runtime_WindowsRuntime>(
__this,
dwReserved,
global::System.Runtime.InteropServices.IMarshal__System_Runtime_WindowsRuntime__Impl.Vtbl.idx_DisconnectObject
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// DispatchClass for 'System.Runtime.InteropServices.IMarshal__System_Runtime_WindowsRuntime'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Runtime.InteropServices.IMarshal__System_Runtime_WindowsRuntime))]
public abstract partial class DispatchClass : global::System.__ComObject, global::System.Runtime.InteropServices.IMarshal__System_Runtime_WindowsRuntime
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::System.Runtime.InteropServices.IMarshal__System_Runtime_WindowsRuntime.GetUnmarshalClass(
ref global::System.Guid riid,
global::System.IntPtr pv,
uint dwDestContext,
global::System.IntPtr pvDestContext,
uint mshlFlags,
out global::System.Guid pCid)
{
global::System.Runtime.InteropServices.IMarshal__System_Runtime_WindowsRuntime__Impl.StubClass.GetUnmarshalClass(
this,
ref riid,
pv,
dwDestContext,
pvDestContext,
mshlFlags,
out pCid
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::System.Runtime.InteropServices.IMarshal__System_Runtime_WindowsRuntime.GetMarshalSizeMax(
ref global::System.Guid riid,
global::System.IntPtr pv,
uint dwDestContext,
global::System.IntPtr pvDestContext,
uint mshlflags,
out uint pSize)
{
global::System.Runtime.InteropServices.IMarshal__System_Runtime_WindowsRuntime__Impl.StubClass.GetMarshalSizeMax(
this,
ref riid,
pv,
dwDestContext,
pvDestContext,
mshlflags,
out pSize
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::System.Runtime.InteropServices.IMarshal__System_Runtime_WindowsRuntime.MarshalInterface(
global::System.IntPtr pStm,
ref global::System.Guid riid,
global::System.IntPtr pv,
uint dwDestContext,
global::System.IntPtr pvDestContext,
uint mshlflags)
{
global::System.Runtime.InteropServices.IMarshal__System_Runtime_WindowsRuntime__Impl.StubClass.MarshalInterface(
this,
pStm,
ref riid,
pv,
dwDestContext,
pvDestContext,
mshlflags
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::System.Runtime.InteropServices.IMarshal__System_Runtime_WindowsRuntime.UnmarshalInterface(
global::System.IntPtr pStm,
ref global::System.Guid riid,
out global::System.IntPtr ppv)
{
global::System.Runtime.InteropServices.IMarshal__System_Runtime_WindowsRuntime__Impl.StubClass.UnmarshalInterface(
this,
pStm,
ref riid,
out ppv
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::System.Runtime.InteropServices.IMarshal__System_Runtime_WindowsRuntime.ReleaseMarshalData(global::System.IntPtr pStm)
{
global::System.Runtime.InteropServices.IMarshal__System_Runtime_WindowsRuntime__Impl.StubClass.ReleaseMarshalData(
this,
pStm
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::System.Runtime.InteropServices.IMarshal__System_Runtime_WindowsRuntime.DisconnectObject(uint dwReserved)
{
global::System.Runtime.InteropServices.IMarshal__System_Runtime_WindowsRuntime__Impl.StubClass.DisconnectObject(
this,
dwReserved
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// v-table for 'System.Runtime.InteropServices.IMarshal__System_Runtime_WindowsRuntime'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Runtime.InteropServices.IMarshal__System_Runtime_WindowsRuntime))]
[global::System.Runtime.InteropServices.McgRootsType(typeof(global::System.Runtime.InteropServices.IMarshal__System_Runtime_WindowsRuntime))]
public unsafe partial struct Vtbl
{
global::System.IntPtr pfnQueryInterface;
global::System.IntPtr pfnAddRef;
global::System.IntPtr pfnRelease;
// System_Runtime_InteropServices__IMarshal__System_Runtime_WindowsRuntime
global::System.IntPtr pfnGetUnmarshalClass_System_Runtime_InteropServices__IMarshal__System_Runtime_WindowsRuntime;
global::System.IntPtr pfnGetMarshalSizeMax_System_Runtime_InteropServices__IMarshal__System_Runtime_WindowsRuntime;
global::System.IntPtr pfnMarshalInterface_System_Runtime_InteropServices__IMarshal__System_Runtime_WindowsRuntime;
global::System.IntPtr pfnUnmarshalInterface_System_Runtime_InteropServices__IMarshal__System_Runtime_WindowsRuntime;
global::System.IntPtr pfnReleaseMarshalData_System_Runtime_InteropServices__IMarshal__System_Runtime_WindowsRuntime;
global::System.IntPtr pfnDisconnectObject_System_Runtime_InteropServices__IMarshal__System_Runtime_WindowsRuntime;
internal const int idx_GetUnmarshalClass = 3;
internal const int idx_GetMarshalSizeMax = 4;
internal const int idx_MarshalInterface = 5;
internal const int idx_UnmarshalInterface = 6;
internal const int idx_ReleaseMarshalData = 7;
internal const int idx_DisconnectObject = 8;
[global::System.Runtime.CompilerServices.InitDataBlob(typeof(global::System.Runtime.InteropServices.IMarshal__System_Runtime_WindowsRuntime__Impl.Vtbl.System_Runtime_InteropServices_IMarshal__System_Runtime_WindowsRuntime__Impl_Vtbl_McgRvaContainer), "RVA_System_Runtime_InteropServices_IMarshal__System_Runtime_WindowsRuntime__Impl_Vtbl_s_theCcwVtable")]
public static global::System.Runtime.InteropServices.IMarshal__System_Runtime_WindowsRuntime__Impl.Vtbl s_theCcwVtable
#if false
= new global::System.Runtime.InteropServices.IMarshal__System_Runtime_WindowsRuntime__Impl.Vtbl() {
pfnQueryInterface = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfQueryInterface>(System.Runtime.InteropServices.__vtable_IUnknown.QueryInterface),
pfnAddRef = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfAddRef>(System.Runtime.InteropServices.__vtable_IUnknown.AddRef),
pfnRelease = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfRelease>(System.Runtime.InteropServices.__vtable_IUnknown.Release),
pfnGetUnmarshalClass_System_Runtime_InteropServices__IMarshal__System_Runtime_WindowsRuntime = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget157>(global::System.Runtime.InteropServices.IMarshal__System_Runtime_WindowsRuntime__Impl.Vtbl.GetUnmarshalClass__STUB),
pfnGetMarshalSizeMax_System_Runtime_InteropServices__IMarshal__System_Runtime_WindowsRuntime = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget158>(global::System.Runtime.InteropServices.IMarshal__System_Runtime_WindowsRuntime__Impl.Vtbl.GetMarshalSizeMax__STUB),
pfnMarshalInterface_System_Runtime_InteropServices__IMarshal__System_Runtime_WindowsRuntime = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget159>(global::System.Runtime.InteropServices.IMarshal__System_Runtime_WindowsRuntime__Impl.Vtbl.MarshalInterface__STUB),
pfnUnmarshalInterface_System_Runtime_InteropServices__IMarshal__System_Runtime_WindowsRuntime = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget160>(global::System.Runtime.InteropServices.IMarshal__System_Runtime_WindowsRuntime__Impl.Vtbl.UnmarshalInterface__STUB),
pfnReleaseMarshalData_System_Runtime_InteropServices__IMarshal__System_Runtime_WindowsRuntime = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget1>(global::System.Runtime.InteropServices.IMarshal__System_Runtime_WindowsRuntime__Impl.Vtbl.ReleaseMarshalData__STUB),
pfnDisconnectObject_System_Runtime_InteropServices__IMarshal__System_Runtime_WindowsRuntime = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget135>(global::System.Runtime.InteropServices.IMarshal__System_Runtime_WindowsRuntime__Impl.Vtbl.DisconnectObject__STUB),
}
#endif
;
public static global::System.IntPtr pNativeVtable;
// Signature, System.Runtime.InteropServices.IMarshal__System_Runtime_WindowsRuntime.GetUnmarshalClass, [rev] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [rev] [in] [managedbyref] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] System_Guid__System.Guid, [rev] [in] [Mcg.CodeGen.BlittableValueMarshaller] System_IntPtr____w64 int, [rev] [in] [Mcg.CodeGen.BlittableValueMarshaller] uint__unsigned int, [rev] [in] [Mcg.CodeGen.BlittableValueMarshaller] System_IntPtr____w64 int, [rev] [in] [Mcg.CodeGen.BlittableValueMarshaller] uint__unsigned int, [rev] [out] [managedbyref] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] System_Guid__System.Guid,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int GetUnmarshalClass__STUB(
global::System.IntPtr pComThis,
global::System.Guid* unsafe_riid,
global::System.IntPtr unsafe_pv,
uint unsafe_dwDestContext,
global::System.IntPtr unsafe_pvDestContext,
uint unsafe_mshlFlags,
global::System.Guid* unsafe_pCid)
{
// Setup
global::System.Guid riid;
global::System.Guid pCid;
try
{
// Marshalling
riid = (*(unsafe_riid));
// Call to managed method
global::System.Runtime.InteropServices.McgMarshal.FastCast<global::System.Runtime.InteropServices.IMarshal__System_Runtime_WindowsRuntime>(global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis)).GetUnmarshalClass(
ref riid,
unsafe_pv,
unsafe_dwDestContext,
unsafe_pvDestContext,
unsafe_mshlFlags,
out pCid
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
(*(unsafe_pCid)) = pCid;
// Return
return global::McgInterop.Helpers.S_OK;
}
catch (global::System.Exception hrExcep)
{
// ExceptionCleanup
if (unsafe_pCid != null)
(*(unsafe_pCid)) = default(global::System.Guid);
// ExceptionReturn
return global::System.Runtime.InteropServices.McgMarshal.GetHRForException(hrExcep);
}
}
// Signature, System.Runtime.InteropServices.IMarshal__System_Runtime_WindowsRuntime.GetMarshalSizeMax, [rev] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [rev] [in] [managedbyref] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] System_Guid__System.Guid, [rev] [in] [Mcg.CodeGen.BlittableValueMarshaller] System_IntPtr____w64 int, [rev] [in] [Mcg.CodeGen.BlittableValueMarshaller] uint__unsigned int, [rev] [in] [Mcg.CodeGen.BlittableValueMarshaller] System_IntPtr____w64 int, [rev] [in] [Mcg.CodeGen.BlittableValueMarshaller] uint__unsigned int, [rev] [out] [managedbyref] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] uint__unsigned int,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int GetMarshalSizeMax__STUB(
global::System.IntPtr pComThis,
global::System.Guid* unsafe_riid,
global::System.IntPtr unsafe_pv,
uint unsafe_dwDestContext,
global::System.IntPtr unsafe_pvDestContext,
uint unsafe_mshlflags,
uint* unsafe_pSize)
{
// Setup
global::System.Guid riid;
uint pSize;
try
{
// Marshalling
riid = (*(unsafe_riid));
// Call to managed method
global::System.Runtime.InteropServices.McgMarshal.FastCast<global::System.Runtime.InteropServices.IMarshal__System_Runtime_WindowsRuntime>(global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis)).GetMarshalSizeMax(
ref riid,
unsafe_pv,
unsafe_dwDestContext,
unsafe_pvDestContext,
unsafe_mshlflags,
out pSize
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
(*(unsafe_pSize)) = pSize;
// Return
return global::McgInterop.Helpers.S_OK;
}
catch (global::System.Exception hrExcep)
{
// ExceptionCleanup
if (unsafe_pSize != null)
(*(unsafe_pSize)) = 0;
// ExceptionReturn
return global::System.Runtime.InteropServices.McgMarshal.GetHRForException(hrExcep);
}
}
// Signature, System.Runtime.InteropServices.IMarshal__System_Runtime_WindowsRuntime.MarshalInterface, [rev] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [rev] [in] [Mcg.CodeGen.BlittableValueMarshaller] System_IntPtr____w64 int, [rev] [in] [managedbyref] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] System_Guid__System.Guid, [rev] [in] [Mcg.CodeGen.BlittableValueMarshaller] System_IntPtr____w64 int, [rev] [in] [Mcg.CodeGen.BlittableValueMarshaller] uint__unsigned int, [rev] [in] [Mcg.CodeGen.BlittableValueMarshaller] System_IntPtr____w64 int, [rev] [in] [Mcg.CodeGen.BlittableValueMarshaller] uint__unsigned int,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int MarshalInterface__STUB(
global::System.IntPtr pComThis,
global::System.IntPtr unsafe_pStm,
global::System.Guid* unsafe_riid,
global::System.IntPtr unsafe_pv,
uint unsafe_dwDestContext,
global::System.IntPtr unsafe_pvDestContext,
uint unsafe_mshlflags)
{
// Setup
global::System.Guid riid;
try
{
// Marshalling
riid = (*(unsafe_riid));
// Call to managed method
global::System.Runtime.InteropServices.McgMarshal.FastCast<global::System.Runtime.InteropServices.IMarshal__System_Runtime_WindowsRuntime>(global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis)).MarshalInterface(
unsafe_pStm,
ref riid,
unsafe_pv,
unsafe_dwDestContext,
unsafe_pvDestContext,
unsafe_mshlflags
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
// Return
return global::McgInterop.Helpers.S_OK;
}
catch (global::System.Exception hrExcep)
{
// ExceptionReturn
return global::System.Runtime.InteropServices.McgMarshal.GetHRForException(hrExcep);
}
}
// Signature, System.Runtime.InteropServices.IMarshal__System_Runtime_WindowsRuntime.UnmarshalInterface, [rev] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [rev] [in] [Mcg.CodeGen.BlittableValueMarshaller] System_IntPtr____w64 int, [rev] [in] [managedbyref] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] System_Guid__System.Guid, [rev] [out] [managedbyref] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] System_IntPtr____w64 int,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int UnmarshalInterface__STUB(
global::System.IntPtr pComThis,
global::System.IntPtr unsafe_pStm,
global::System.Guid* unsafe_riid,
global::System.IntPtr* unsafe_ppv)
{
// Setup
global::System.Guid riid;
global::System.IntPtr ppv;
try
{
// Marshalling
riid = (*(unsafe_riid));
// Call to managed method
global::System.Runtime.InteropServices.McgMarshal.FastCast<global::System.Runtime.InteropServices.IMarshal__System_Runtime_WindowsRuntime>(global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis)).UnmarshalInterface(
unsafe_pStm,
ref riid,
out ppv
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
(*(unsafe_ppv)) = ppv;
// Return
return global::McgInterop.Helpers.S_OK;
}
catch (global::System.Exception hrExcep)
{
// ExceptionCleanup
if (unsafe_ppv != null)
(*(unsafe_ppv)) = default(global::System.IntPtr);
// ExceptionReturn
return global::System.Runtime.InteropServices.McgMarshal.GetHRForException(hrExcep);
}
}
// Signature, System.Runtime.InteropServices.IMarshal__System_Runtime_WindowsRuntime.ReleaseMarshalData, [rev] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [rev] [in] [Mcg.CodeGen.BlittableValueMarshaller] System_IntPtr____w64 int,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int ReleaseMarshalData__STUB(
global::System.IntPtr pComThis,
global::System.IntPtr unsafe_pStm)
{
try
{
// Marshalling
// Call to managed method
global::System.Runtime.InteropServices.McgMarshal.FastCast<global::System.Runtime.InteropServices.IMarshal__System_Runtime_WindowsRuntime>(global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis)).ReleaseMarshalData(unsafe_pStm);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
// Return
return global::McgInterop.Helpers.S_OK;
}
catch (global::System.Exception hrExcep)
{
// ExceptionReturn
return global::System.Runtime.InteropServices.McgMarshal.GetHRForException(hrExcep);
}
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int DisconnectObject__STUB(
global::System.IntPtr pComThis,
uint unsafe_dwReserved)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::System.Runtime.InteropServices.IMarshal__System_Runtime_WindowsRuntime>(
__this,
5
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Proc_uint__(
__this,
unsafe_dwReserved,
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
private static class System_Runtime_InteropServices_IMarshal__System_Runtime_WindowsRuntime__Impl_Vtbl_McgRvaContainer
{
[global::System.Runtime.CompilerServices.MethodAddrFixup(0, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "QueryInterface")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(4, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "AddRef")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(8, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "Release")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(12, typeof(global::System.Runtime.InteropServices.IMarshal__System_Runtime_WindowsRuntime__Impl.Vtbl), "GetUnmarshalClass__STUB")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(16, typeof(global::System.Runtime.InteropServices.IMarshal__System_Runtime_WindowsRuntime__Impl.Vtbl), "GetMarshalSizeMax__STUB")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(20, typeof(global::System.Runtime.InteropServices.IMarshal__System_Runtime_WindowsRuntime__Impl.Vtbl), "MarshalInterface__STUB")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(24, typeof(global::System.Runtime.InteropServices.IMarshal__System_Runtime_WindowsRuntime__Impl.Vtbl), "UnmarshalInterface__STUB")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(28, typeof(global::System.Runtime.InteropServices.IMarshal__System_Runtime_WindowsRuntime__Impl.Vtbl), "ReleaseMarshalData__STUB")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(32, typeof(global::System.Runtime.InteropServices.IMarshal__System_Runtime_WindowsRuntime__Impl.Vtbl), "DisconnectObject__STUB")]
[global::System.Runtime.CompilerServices.NonArray]
static readonly byte[] RVA_System_Runtime_InteropServices_IMarshal__System_Runtime_WindowsRuntime__Impl_Vtbl_s_theCcwVtable = new byte[] {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
}
}
}
// System.Runtime.InteropServices.IAgileObject__System_Runtime_WindowsRuntime
public unsafe static class IAgileObject__System_Runtime_WindowsRuntime__Impl
{
// v-table for 'System.Runtime.InteropServices.IAgileObject__System_Runtime_WindowsRuntime'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Runtime.InteropServices.IAgileObject__System_Runtime_WindowsRuntime))]
[global::System.Runtime.InteropServices.McgRootsType(typeof(global::System.Runtime.InteropServices.IAgileObject__System_Runtime_WindowsRuntime))]
public unsafe partial struct Vtbl
{
global::System.IntPtr pfnQueryInterface;
global::System.IntPtr pfnAddRef;
global::System.IntPtr pfnRelease;
[global::System.Runtime.CompilerServices.InitDataBlob(typeof(global::System.Runtime.InteropServices.IAgileObject__System_Runtime_WindowsRuntime__Impl.Vtbl.System_Runtime_InteropServices_IAgileObject__System_Runtime_WindowsRuntime__Impl_Vtbl_McgRvaContainer), "RVA_System_Runtime_InteropServices_IAgileObject__System_Runtime_WindowsRuntime__Impl_Vtbl_s_theCcwVtable")]
public static global::System.Runtime.InteropServices.IAgileObject__System_Runtime_WindowsRuntime__Impl.Vtbl s_theCcwVtable
#if false
= new global::System.Runtime.InteropServices.IAgileObject__System_Runtime_WindowsRuntime__Impl.Vtbl() {
pfnQueryInterface = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfQueryInterface>(System.Runtime.InteropServices.__vtable_IUnknown.QueryInterface),
pfnAddRef = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfAddRef>(System.Runtime.InteropServices.__vtable_IUnknown.AddRef),
pfnRelease = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfRelease>(System.Runtime.InteropServices.__vtable_IUnknown.Release),
}
#endif
;
public static global::System.IntPtr pNativeVtable;
private static class System_Runtime_InteropServices_IAgileObject__System_Runtime_WindowsRuntime__Impl_Vtbl_McgRvaContainer
{
[global::System.Runtime.CompilerServices.MethodAddrFixup(0, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "QueryInterface")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(4, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "AddRef")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(8, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "Release")]
[global::System.Runtime.CompilerServices.NonArray]
static readonly byte[] RVA_System_Runtime_InteropServices_IAgileObject__System_Runtime_WindowsRuntime__Impl_Vtbl_s_theCcwVtable = new byte[] {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
}
}
}
// System.Runtime.InteropServices.HSTRING__System_Private_Interop
public unsafe static class HSTRING__System_Private_Interop__Impl
{
}
}
namespace System.Runtime.InteropServices.ComTypes
{
// System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop
public unsafe static class ITypeInfo__System_Private_Interop__Impl
{
// StubClass for 'System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void GetTypeAttr(
global::System.__ComObject __this,
out global::System.IntPtr ppTypeAttr)
{
global::McgInterop.ForwardComSharedStubs.Proc_out_IntPtr__<global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop>(
__this,
out ppTypeAttr,
global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop__Impl.Vtbl.idx_GetTypeAttr
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void GetTypeComp(
global::System.__ComObject __this,
out global::System.Runtime.InteropServices.ComTypes.ITypeComp__System_Private_Interop ppTComp)
{
global::McgInterop.ForwardComSharedStubs.Proc_out__ComTypes_ITypeComp__Private_Interop__<global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop>(
__this,
out ppTComp,
global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop__Impl.Vtbl.idx_GetTypeComp
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void GetFuncDesc(
global::System.__ComObject __this,
int index,
out global::System.IntPtr ppFuncDesc)
{
global::McgInterop.ForwardComSharedStubs.Proc_int__out_IntPtr__<global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop>(
__this,
index,
out ppFuncDesc,
global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop__Impl.Vtbl.idx_GetFuncDesc
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void GetVarDesc(
global::System.__ComObject __this,
int index,
out global::System.IntPtr ppVarDesc)
{
global::McgInterop.ForwardComSharedStubs.Proc_int__out_IntPtr__<global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop>(
__this,
index,
out ppVarDesc,
global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop__Impl.Vtbl.idx_GetVarDesc
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// Signature, System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop.GetNames, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.BlittableValueMarshaller] int__int, [fwd] [out] [Mcg.CodeGen.ArrayMarshaller] rg_string__wchar_t * *, [fwd] [in] [Mcg.CodeGen.BlittableValueMarshaller] int__int, [fwd] [out] [managedbyref] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] int__int,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void GetNames(
global::System.__ComObject __this,
int memid,
string[] rgBstrNames,
int cMaxNames,
out int pcNames)
{
// Setup
ushort** unsafe_rgBstrNames = default(ushort**);
int unsafe_pcNames;
int unsafe___return__;
try
{
// Marshalling
if (rgBstrNames != null)
unsafe_rgBstrNames = (ushort**)global::McgInterop.McgHelpers.CoTaskMemAllocAndZeroMemory(((global::System.IntPtr)checked(rgBstrNames.Length * sizeof(ushort*))));
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
global::System.Runtime.InteropServices.TypeOfHelper.RuntimeTypeHandleOf("System.Runtime.InteropServices.ComTypes.ITypeInfo,System.Private.Interop, Version=4.0.0.0, Culture=neutral, Publ" +
"icKeyToken=<KEY>"),
global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop__Impl.Vtbl.idx_GetNames,
memid,
unsafe_rgBstrNames,
cMaxNames,
&(unsafe_pcNames)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
pcNames = unsafe_pcNames;
if (rgBstrNames != null)
for (uint mcgIdx = 0; (mcgIdx < rgBstrNames.Length); mcgIdx++)
{
// [fwd] [out] [optional] [Mcg.CodeGen.BstrMarshaller] string__wchar_t * rgBstrNames
rgBstrNames[mcgIdx] = global::McgInterop.Helpers.ConvertBSTRToString(unsafe_rgBstrNames[mcgIdx]);
}
// Return
}
finally
{
// Cleanup
if (unsafe_rgBstrNames != null)
for (uint mcgIdx_1 = 0; (mcgIdx_1 < rgBstrNames.Length); mcgIdx_1++)
{
// [fwd] [in] [out] [optional] [Mcg.CodeGen.BstrMarshaller] string__wchar_t * rgBstrNames
global::System.Runtime.InteropServices.ExternalInterop.SysFreeString(unsafe_rgBstrNames[mcgIdx_1]);
}
global::System.Runtime.InteropServices.ExternalInterop.SafeCoTaskMemFree(unsafe_rgBstrNames);
}
}
// Signature, System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop.GetRefTypeOfImplType, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.BlittableValueMarshaller] int__int, [fwd] [out] [managedbyref] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] int__int,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void GetRefTypeOfImplType(
global::System.__ComObject __this,
int index,
out int href)
{
// Setup
int unsafe_href;
int unsafe___return__;
// Marshalling
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
global::System.Runtime.InteropServices.TypeOfHelper.RuntimeTypeHandleOf("System.Runtime.InteropServices.ComTypes.ITypeInfo,System.Private.Interop, Version=4.0.0.0, Culture=neutral, Publ" +
"icKeyToken=<KEY>"),
global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop__Impl.Vtbl.idx_GetRefTypeOfImplType,
index,
&(unsafe_href)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
href = unsafe_href;
// Return
}
// Signature, System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop.GetImplTypeFlags, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.BlittableValueMarshaller] int__int, [fwd] [out] [managedbyref] [nativebyref] [Mcg.CodeGen.EnumMarshaller] System_Runtime_InteropServices_ComTypes_IMPLTYPEFLAGS__System_Private_Interop__IMPLTYPEFLAGS__System_Private_Interop,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void GetImplTypeFlags(
global::System.__ComObject __this,
int index,
out global::System.Runtime.InteropServices.ComTypes.IMPLTYPEFLAGS__System_Private_Interop pImplTypeFlags)
{
// Setup
global::System.Runtime.InteropServices.ComTypes.IMPLTYPEFLAGS__System_Private_Interop unsafe_pImplTypeFlags;
int unsafe___return__;
// Marshalling
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
global::System.Runtime.InteropServices.TypeOfHelper.RuntimeTypeHandleOf("System.Runtime.InteropServices.ComTypes.ITypeInfo,System.Private.Interop, Version=4.0.0.0, Culture=neutral, Publ" +
"icKeyToken=<KEY>"),
global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop__Impl.Vtbl.idx_GetImplTypeFlags,
index,
&(unsafe_pImplTypeFlags)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
pImplTypeFlags = unsafe_pImplTypeFlags;
// Return
}
// Signature, System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop.GetIDsOfNames, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.ArrayMarshaller] rg_string__wchar_t * *, [fwd] [in] [Mcg.CodeGen.BlittableValueMarshaller] int__int, [fwd] [out] [Mcg.CodeGen.BlittableArrayMarshaller] rg_int__int *,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void GetIDsOfNames(
global::System.__ComObject __this,
string[] rgszNames,
int cNames,
int[] pMemId)
{
// Setup
ushort** unsafe_rgszNames = default(ushort**);
int* unsafe_pMemId;
int unsafe___return__;
try
{
// Marshalling
if (rgszNames == null)
unsafe_rgszNames = null;
else
{
if (rgszNames != null)
unsafe_rgszNames = (ushort**)global::McgInterop.McgHelpers.CoTaskMemAllocAndZeroMemory(((global::System.IntPtr)checked(rgszNames.Length * sizeof(ushort*))));
if (rgszNames != null)
for (uint mcgIdx = 0; (mcgIdx < rgszNames.Length); mcgIdx++)
{
// [fwd] [in] [optional] [Mcg.CodeGen.UnicodeStringMarshaller] string__wchar_t * rgszNames
unsafe_rgszNames[mcgIdx] = (ushort*)global::McgInterop.McgHelpers.AllocUnicodeBuffer(rgszNames[mcgIdx]);
global::McgInterop.McgHelpers.CopyUnicodeString(
rgszNames[mcgIdx],
unsafe_rgszNames[mcgIdx]
);
}
}
fixed (int* pinned_pMemId = global::McgInterop.McgCoreHelpers.GetArrayForCompat(pMemId))
{
unsafe_pMemId = (int*)pinned_pMemId;
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
global::System.Runtime.InteropServices.TypeOfHelper.RuntimeTypeHandleOf("System.Runtime.InteropServices.ComTypes.ITypeInfo,System.Private.Interop, Version=4.0.0.0, Culture=neutral, Publ" +
"icKeyToken=<KEY>"),
global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop__Impl.Vtbl.idx_GetIDsOfNames,
unsafe_rgszNames,
cNames,
unsafe_pMemId
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// Return
}
finally
{
// Cleanup
if (unsafe_rgszNames != null)
for (uint mcgIdx_1 = 0; (mcgIdx_1 < rgszNames.Length); mcgIdx_1++)
{
// [fwd] [in] [out] [optional] [Mcg.CodeGen.UnicodeStringMarshaller] string__wchar_t * rgszNames
global::System.Runtime.InteropServices.ExternalInterop.SafeCoTaskMemFree(unsafe_rgszNames[mcgIdx_1]);
}
global::System.Runtime.InteropServices.ExternalInterop.SafeCoTaskMemFree(unsafe_rgszNames);
}
}
// Signature, System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop.Invoke, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.ObjectMarshaller] object____mcg_IUnknown *, [fwd] [in] [Mcg.CodeGen.BlittableValueMarshaller] int__int, [fwd] [in] [Mcg.CodeGen.BlittableValueMarshaller] short__short, [fwd] [in] [out] [managedbyref] [nativebyref] [Mcg.CodeGen.BlittableStructMarshaller] System_Runtime_InteropServices_ComTypes_DISPPARAMS__System_Private_Interop__System_Runtime_InteropServices_ComTypes__DISPPARAMS__System_Private_Interop, [fwd] [in] [Mcg.CodeGen.BlittableValueMarshaller] System_IntPtr____w64 int, [fwd] [in] [Mcg.CodeGen.BlittableValueMarshaller] System_IntPtr____w64 int, [fwd] [out] [managedbyref] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] int__int,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void Invoke(
global::System.__ComObject __this,
object pvInstance,
int memid,
short wFlags,
ref global::System.Runtime.InteropServices.ComTypes.DISPPARAMS__System_Private_Interop pDispParams,
global::System.IntPtr pVarResult,
global::System.IntPtr pExcepInfo,
out int puArgErr)
{
// Setup
global::System.Runtime.InteropServices.__vtable_IUnknown** unsafe_pvInstance = default(global::System.Runtime.InteropServices.__vtable_IUnknown**);
global::System.Runtime.InteropServices.ComTypes.DISPPARAMS__System_Private_Interop unsafe_pDispParams;
int unsafe_puArgErr;
int unsafe___return__;
try
{
// Marshalling
unsafe_pvInstance = (global::System.Runtime.InteropServices.__vtable_IUnknown**)global::System.Runtime.InteropServices.McgMarshal.ObjectToComInterface(
pvInstance,
global::System.Runtime.InteropServices.McgModuleManager.IUnknown
);
unsafe_pDispParams = pDispParams;
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
global::System.Runtime.InteropServices.TypeOfHelper.RuntimeTypeHandleOf("System.Runtime.InteropServices.ComTypes.ITypeInfo,System.Private.Interop, Version=4.0.0.0, Culture=neutral, Publ" +
"icKeyToken=<KEY>"),
global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop__Impl.Vtbl.idx_Invoke,
unsafe_pvInstance,
memid,
wFlags,
&(unsafe_pDispParams),
pVarResult,
pExcepInfo,
&(unsafe_puArgErr)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
puArgErr = unsafe_puArgErr;
pDispParams = unsafe_pDispParams;
// Return
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_pvInstance)));
}
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void GetDocumentation(
global::System.__ComObject __this,
int index,
out string strName,
out string strDocString,
out int dwHelpContext,
out string strHelpFile)
{
global::McgInterop.ForwardComSharedStubs.Proc_int__out_string__out_string__out_int__out_string__<global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop>(
__this,
index,
out strName,
out strDocString,
out dwHelpContext,
out strHelpFile,
global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop__Impl.Vtbl.idx_GetDocumentation
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// Signature, System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop.GetDllEntry, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.BlittableValueMarshaller] int__int, [fwd] [in] [Mcg.CodeGen.EnumMarshaller] System_Runtime_InteropServices_ComTypes_INVOKEKIND__System_Private_Interop__INVOKEKIND__System_Private_Interop, [fwd] [in] [Mcg.CodeGen.BlittableValueMarshaller] System_IntPtr____w64 int, [fwd] [in] [Mcg.CodeGen.BlittableValueMarshaller] System_IntPtr____w64 int, [fwd] [in] [Mcg.CodeGen.BlittableValueMarshaller] System_IntPtr____w64 int,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void GetDllEntry(
global::System.__ComObject __this,
int memid,
global::System.Runtime.InteropServices.ComTypes.INVOKEKIND__System_Private_Interop invKind,
global::System.IntPtr pBstrDllName,
global::System.IntPtr pBstrName,
global::System.IntPtr pwOrdinal)
{
// Setup
int unsafe___return__;
// Marshalling
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
global::System.Runtime.InteropServices.TypeOfHelper.RuntimeTypeHandleOf("System.Runtime.InteropServices.ComTypes.ITypeInfo,System.Private.Interop, Version=4.0.0.0, Culture=neutral, Publ" +
"icKeyToken=<KEY>"),
global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop__Impl.Vtbl.idx_GetDllEntry,
memid,
invKind,
pBstrDllName,
pBstrName,
pwOrdinal
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
// Return
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void GetRefTypeInfo(
global::System.__ComObject __this,
int hRef,
out global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop ppTI)
{
global::McgInterop.ForwardComSharedStubs.Proc_int__out__ComTypes_ITypeInfo__Private_Interop__<global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop>(
__this,
hRef,
out ppTI,
global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop__Impl.Vtbl.idx_GetRefTypeInfo
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// Signature, System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop.AddressOfMember, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.BlittableValueMarshaller] int__int, [fwd] [in] [Mcg.CodeGen.EnumMarshaller] System_Runtime_InteropServices_ComTypes_INVOKEKIND__System_Private_Interop__INVOKEKIND__System_Private_Interop, [fwd] [out] [managedbyref] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] System_IntPtr____w64 int,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void AddressOfMember(
global::System.__ComObject __this,
int memid,
global::System.Runtime.InteropServices.ComTypes.INVOKEKIND__System_Private_Interop invKind,
out global::System.IntPtr ppv)
{
// Setup
global::System.IntPtr unsafe_ppv;
int unsafe___return__;
// Marshalling
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
global::System.Runtime.InteropServices.TypeOfHelper.RuntimeTypeHandleOf("System.Runtime.InteropServices.ComTypes.ITypeInfo,System.Private.Interop, Version=4.0.0.0, Culture=neutral, Publ" +
"icKeyToken=<KEY>"),
global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop__Impl.Vtbl.idx_AddressOfMember,
memid,
invKind,
&(unsafe_ppv)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
ppv = unsafe_ppv;
// Return
}
// Signature, System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop.CreateInstance, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.ObjectMarshaller] object____mcg_IUnknown *, [fwd] [in] [managedbyref] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] System_Guid__System.Guid, [fwd] [out] [managedbyref] [nativebyref] [Mcg.CodeGen.ObjectMarshaller] object____mcg_IUnknown *,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void CreateInstance(
global::System.__ComObject __this,
object pUnkOuter,
ref global::System.Guid riid,
out object ppvObj)
{
// Setup
global::System.Runtime.InteropServices.__vtable_IUnknown** unsafe_pUnkOuter = default(global::System.Runtime.InteropServices.__vtable_IUnknown**);
global::System.Guid unsafe_riid;
global::System.Runtime.InteropServices.__vtable_IUnknown** unsafe_ppvObj = default(global::System.Runtime.InteropServices.__vtable_IUnknown**);
int unsafe___return__;
try
{
// Marshalling
unsafe_pUnkOuter = (global::System.Runtime.InteropServices.__vtable_IUnknown**)global::System.Runtime.InteropServices.McgMarshal.ObjectToComInterface(
pUnkOuter,
global::System.Runtime.InteropServices.McgModuleManager.IUnknown
);
unsafe_riid = riid;
unsafe_ppvObj = null;
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
global::System.Runtime.InteropServices.TypeOfHelper.RuntimeTypeHandleOf("System.Runtime.InteropServices.ComTypes.ITypeInfo,System.Private.Interop, Version=4.0.0.0, Culture=neutral, Publ" +
"icKeyToken=<KEY>"),
global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop__Impl.Vtbl.idx_CreateInstance,
unsafe_pUnkOuter,
&(unsafe_riid),
&(unsafe_ppvObj)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
ppvObj = (object)global::System.Runtime.InteropServices.McgModuleManager.ComInterfaceToObject(
((global::System.IntPtr)unsafe_ppvObj),
global::System.Runtime.InteropServices.McgModuleManager.IUnknown
);
// Return
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_pUnkOuter)));
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_ppvObj)));
}
}
// Signature, System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop.GetMops, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.BlittableValueMarshaller] int__int, [fwd] [out] [managedbyref] [nativebyref] [Mcg.CodeGen.BstrMarshaller] string__wchar_t *,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void GetMops(
global::System.__ComObject __this,
int memid,
out string pBstrMops)
{
// Setup
ushort* unsafe_pBstrMops = default(ushort*);
int unsafe___return__;
try
{
// Marshalling
unsafe_pBstrMops = null;
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
global::System.Runtime.InteropServices.TypeOfHelper.RuntimeTypeHandleOf("System.Runtime.InteropServices.ComTypes.ITypeInfo,System.Private.Interop, Version=4.0.0.0, Culture=neutral, Publ" +
"icKeyToken=<KEY>"),
global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop__Impl.Vtbl.idx_GetMops,
memid,
&(unsafe_pBstrMops)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
pBstrMops = global::McgInterop.Helpers.ConvertBSTRToString(unsafe_pBstrMops);
// Return
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.ExternalInterop.SysFreeString(unsafe_pBstrMops);
}
}
// Signature, System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop.GetContainingTypeLib, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [out] [managedbyref] [nativebyref] [Mcg.CodeGen.ComInterfaceMarshaller] System_Runtime_InteropServices_ComTypes_ITypeLib__System_Private_Interop__System_Runtime_InteropServices_ComTypes__ITypeLib__System_Private_Interop *, [fwd] [out] [managedbyref] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] int__int,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void GetContainingTypeLib(
global::System.__ComObject __this,
out global::System.Runtime.InteropServices.ComTypes.ITypeLib__System_Private_Interop ppTLB,
out int pIndex)
{
// Setup
global::System.Runtime.InteropServices.ComTypes.ITypeLib__System_Private_Interop__Impl.Vtbl** unsafe_ppTLB = default(global::System.Runtime.InteropServices.ComTypes.ITypeLib__System_Private_Interop__Impl.Vtbl**);
int unsafe_pIndex;
int unsafe___return__;
try
{
// Marshalling
unsafe_ppTLB = null;
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
global::System.Runtime.InteropServices.TypeOfHelper.RuntimeTypeHandleOf("System.Runtime.InteropServices.ComTypes.ITypeInfo,System.Private.Interop, Version=4.0.0.0, Culture=neutral, Publ" +
"icKeyToken=<KEY>"),
global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop__Impl.Vtbl.idx_GetContainingTypeLib,
&(unsafe_ppTLB),
&(unsafe_pIndex)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
pIndex = unsafe_pIndex;
ppTLB = (global::System.Runtime.InteropServices.ComTypes.ITypeLib__System_Private_Interop)global::System.Runtime.InteropServices.McgModuleManager.ComInterfaceToObject(
((global::System.IntPtr)unsafe_ppTLB),
global::System.Runtime.InteropServices.TypeOfHelper.RuntimeTypeHandleOf("System.Runtime.InteropServices.ComTypes.ITypeLib,System.Private.Interop, Version=4.0.0.0, Culture=neutral, Publi" +
"cKeyToken=b03f5f7f11d50a3a")
);
// Return
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_ppTLB)));
}
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void ReleaseTypeAttr(
global::System.__ComObject __this,
global::System.IntPtr pTypeAttr)
{
global::McgInterop.ForwardComSharedStubs.Proc_void__IntPtr__<global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop>(
__this,
pTypeAttr,
global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop__Impl.Vtbl.idx_ReleaseTypeAttr
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void ReleaseFuncDesc(
global::System.__ComObject __this,
global::System.IntPtr pFuncDesc)
{
global::McgInterop.ForwardComSharedStubs.Proc_void__IntPtr__<global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop>(
__this,
pFuncDesc,
global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop__Impl.Vtbl.idx_ReleaseFuncDesc
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void ReleaseVarDesc(
global::System.__ComObject __this,
global::System.IntPtr pVarDesc)
{
global::McgInterop.ForwardComSharedStubs.Proc_void__IntPtr__<global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop>(
__this,
pVarDesc,
global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop__Impl.Vtbl.idx_ReleaseVarDesc
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// DispatchClass for 'System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop))]
public abstract partial class DispatchClass : global::System.__ComObject, global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop.GetTypeAttr(out global::System.IntPtr ppTypeAttr)
{
global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop__Impl.StubClass.GetTypeAttr(
this,
out ppTypeAttr
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop.GetTypeComp(out global::System.Runtime.InteropServices.ComTypes.ITypeComp__System_Private_Interop ppTComp)
{
global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop__Impl.StubClass.GetTypeComp(
this,
out ppTComp
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop.GetFuncDesc(
int index,
out global::System.IntPtr ppFuncDesc)
{
global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop__Impl.StubClass.GetFuncDesc(
this,
index,
out ppFuncDesc
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop.GetVarDesc(
int index,
out global::System.IntPtr ppVarDesc)
{
global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop__Impl.StubClass.GetVarDesc(
this,
index,
out ppVarDesc
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop.GetNames(
int memid,
string[] rgBstrNames,
int cMaxNames,
out int pcNames)
{
global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop__Impl.StubClass.GetNames(
this,
memid,
rgBstrNames,
cMaxNames,
out pcNames
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop.GetRefTypeOfImplType(
int index,
out int href)
{
global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop__Impl.StubClass.GetRefTypeOfImplType(
this,
index,
out href
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop.GetImplTypeFlags(
int index,
out global::System.Runtime.InteropServices.ComTypes.IMPLTYPEFLAGS__System_Private_Interop pImplTypeFlags)
{
global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop__Impl.StubClass.GetImplTypeFlags(
this,
index,
out pImplTypeFlags
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop.GetIDsOfNames(
string[] rgszNames,
int cNames,
int[] pMemId)
{
global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop__Impl.StubClass.GetIDsOfNames(
this,
rgszNames,
cNames,
pMemId
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop.Invoke(
object pvInstance,
int memid,
short wFlags,
ref global::System.Runtime.InteropServices.ComTypes.DISPPARAMS__System_Private_Interop pDispParams,
global::System.IntPtr pVarResult,
global::System.IntPtr pExcepInfo,
out int puArgErr)
{
global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop__Impl.StubClass.Invoke(
this,
pvInstance,
memid,
wFlags,
ref pDispParams,
pVarResult,
pExcepInfo,
out puArgErr
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop.GetDocumentation(
int index,
out string strName,
out string strDocString,
out int dwHelpContext,
out string strHelpFile)
{
global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop__Impl.StubClass.GetDocumentation(
this,
index,
out strName,
out strDocString,
out dwHelpContext,
out strHelpFile
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop.GetDllEntry(
int memid,
global::System.Runtime.InteropServices.ComTypes.INVOKEKIND__System_Private_Interop invKind,
global::System.IntPtr pBstrDllName,
global::System.IntPtr pBstrName,
global::System.IntPtr pwOrdinal)
{
global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop__Impl.StubClass.GetDllEntry(
this,
memid,
invKind,
pBstrDllName,
pBstrName,
pwOrdinal
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop.GetRefTypeInfo(
int hRef,
out global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop ppTI)
{
global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop__Impl.StubClass.GetRefTypeInfo(
this,
hRef,
out ppTI
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop.AddressOfMember(
int memid,
global::System.Runtime.InteropServices.ComTypes.INVOKEKIND__System_Private_Interop invKind,
out global::System.IntPtr ppv)
{
global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop__Impl.StubClass.AddressOfMember(
this,
memid,
invKind,
out ppv
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop.CreateInstance(
object pUnkOuter,
ref global::System.Guid riid,
out object ppvObj)
{
global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop__Impl.StubClass.CreateInstance(
this,
pUnkOuter,
ref riid,
out ppvObj
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop.GetMops(
int memid,
out string pBstrMops)
{
global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop__Impl.StubClass.GetMops(
this,
memid,
out pBstrMops
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop.GetContainingTypeLib(
out global::System.Runtime.InteropServices.ComTypes.ITypeLib__System_Private_Interop ppTLB,
out int pIndex)
{
global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop__Impl.StubClass.GetContainingTypeLib(
this,
out ppTLB,
out pIndex
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop.ReleaseTypeAttr(global::System.IntPtr pTypeAttr)
{
global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop__Impl.StubClass.ReleaseTypeAttr(
this,
pTypeAttr
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop.ReleaseFuncDesc(global::System.IntPtr pFuncDesc)
{
global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop__Impl.StubClass.ReleaseFuncDesc(
this,
pFuncDesc
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop.ReleaseVarDesc(global::System.IntPtr pVarDesc)
{
global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop__Impl.StubClass.ReleaseVarDesc(
this,
pVarDesc
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// v-table for 'System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop))]
public unsafe partial struct Vtbl
{
internal const int idx_GetTypeAttr = 3;
internal const int idx_GetTypeComp = 4;
internal const int idx_GetFuncDesc = 5;
internal const int idx_GetVarDesc = 6;
internal const int idx_GetNames = 7;
internal const int idx_GetRefTypeOfImplType = 8;
internal const int idx_GetImplTypeFlags = 9;
internal const int idx_GetIDsOfNames = 10;
internal const int idx_Invoke = 11;
internal const int idx_GetDocumentation = 12;
internal const int idx_GetDllEntry = 13;
internal const int idx_GetRefTypeInfo = 14;
internal const int idx_AddressOfMember = 15;
internal const int idx_CreateInstance = 16;
internal const int idx_GetMops = 17;
internal const int idx_GetContainingTypeLib = 18;
internal const int idx_ReleaseTypeAttr = 19;
internal const int idx_ReleaseFuncDesc = 20;
internal const int idx_ReleaseVarDesc = 21;
}
}
// System.Runtime.InteropServices.ComTypes.ITypeComp__System_Private_Interop
public unsafe static class ITypeComp__System_Private_Interop__Impl
{
// StubClass for 'System.Runtime.InteropServices.ComTypes.ITypeComp__System_Private_Interop'
public static partial class StubClass
{
// Signature, System.Runtime.InteropServices.ComTypes.ITypeComp__System_Private_Interop.Bind, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.UnicodeStringMarshaller] string__wchar_t *, [fwd] [in] [Mcg.CodeGen.BlittableValueMarshaller] int__int, [fwd] [in] [Mcg.CodeGen.BlittableValueMarshaller] short__short, [fwd] [out] [managedbyref] [nativebyref] [Mcg.CodeGen.ComInterfaceMarshaller] System_Runtime_InteropServices_ComTypes_ITypeInfo__System_Private_Interop__System_Runtime_InteropServices_ComTypes__ITypeInfo__System_Private_Interop *, [fwd] [out] [managedbyref] [nativebyref] [Mcg.CodeGen.EnumMarshaller] System_Runtime_InteropServices_ComTypes_DESCKIND__System_Private_Interop__DESCKIND__System_Private_Interop, [fwd] [out] [managedbyref] [nativebyref] [Mcg.CodeGen.BlittableStructMarshaller] System_Runtime_InteropServices_ComTypes_BINDPTR__System_Private_Interop__System_Runtime_InteropServices_ComTypes__BINDPTR__System_Private_Interop,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void Bind(
global::System.__ComObject __this,
string szName,
int lHashVal,
short wFlags,
out global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop ppTInfo,
out global::System.Runtime.InteropServices.ComTypes.DESCKIND__System_Private_Interop pDescKind,
out global::System.Runtime.InteropServices.ComTypes.BINDPTR__System_Private_Interop pBindPtr)
{
// Setup
ushort* unsafe_szName = default(ushort*);
global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop__Impl.Vtbl** unsafe_ppTInfo = default(global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop__Impl.Vtbl**);
global::System.Runtime.InteropServices.ComTypes.DESCKIND__System_Private_Interop unsafe_pDescKind;
global::System.Runtime.InteropServices.ComTypes.BINDPTR__System_Private_Interop unsafe_pBindPtr;
int unsafe___return__;
try
{
// Marshalling
fixed (char* pinned_szName = szName)
{
unsafe_szName = (ushort*)pinned_szName;
unsafe_ppTInfo = null;
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
global::System.Runtime.InteropServices.TypeOfHelper.RuntimeTypeHandleOf("System.Runtime.InteropServices.ComTypes.ITypeComp,System.Private.Interop, Version=4.0.0.0, Culture=neutral, Publ" +
"icKeyToken=<KEY>"),
global::System.Runtime.InteropServices.ComTypes.ITypeComp__System_Private_Interop__Impl.Vtbl.idx_Bind,
unsafe_szName,
lHashVal,
wFlags,
&(unsafe_ppTInfo),
&(unsafe_pDescKind),
&(unsafe_pBindPtr)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
pBindPtr = unsafe_pBindPtr;
pDescKind = unsafe_pDescKind;
ppTInfo = (global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop)global::System.Runtime.InteropServices.McgModuleManager.ComInterfaceToObject(
((global::System.IntPtr)unsafe_ppTInfo),
global::System.Runtime.InteropServices.TypeOfHelper.RuntimeTypeHandleOf("System.Runtime.InteropServices.ComTypes.ITypeInfo,System.Private.Interop, Version=4.0.0.0, Culture=neutral, Publ" +
"icKeyToken=<KEY>")
);
}
// Return
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_ppTInfo)));
}
}
// Signature, System.Runtime.InteropServices.ComTypes.ITypeComp__System_Private_Interop.BindType, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.UnicodeStringMarshaller] string__wchar_t *, [fwd] [in] [Mcg.CodeGen.BlittableValueMarshaller] int__int, [fwd] [out] [managedbyref] [nativebyref] [Mcg.CodeGen.ComInterfaceMarshaller] System_Runtime_InteropServices_ComTypes_ITypeInfo__System_Private_Interop__System_Runtime_InteropServices_ComTypes__ITypeInfo__System_Private_Interop *, [fwd] [out] [managedbyref] [nativebyref] [Mcg.CodeGen.ComInterfaceMarshaller] System_Runtime_InteropServices_ComTypes_ITypeComp__System_Private_Interop__System_Runtime_InteropServices_ComTypes__ITypeComp__System_Private_Interop *,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void BindType(
global::System.__ComObject __this,
string szName,
int lHashVal,
out global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop ppTInfo,
out global::System.Runtime.InteropServices.ComTypes.ITypeComp__System_Private_Interop ppTComp)
{
// Setup
ushort* unsafe_szName = default(ushort*);
global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop__Impl.Vtbl** unsafe_ppTInfo = default(global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop__Impl.Vtbl**);
global::System.Runtime.InteropServices.ComTypes.ITypeComp__System_Private_Interop__Impl.Vtbl** unsafe_ppTComp = default(global::System.Runtime.InteropServices.ComTypes.ITypeComp__System_Private_Interop__Impl.Vtbl**);
int unsafe___return__;
try
{
// Marshalling
fixed (char* pinned_szName = szName)
{
unsafe_szName = (ushort*)pinned_szName;
unsafe_ppTInfo = null;
unsafe_ppTComp = null;
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
global::System.Runtime.InteropServices.TypeOfHelper.RuntimeTypeHandleOf("System.Runtime.InteropServices.ComTypes.ITypeComp,System.Private.Interop, Version=4.0.0.0, Culture=neutral, Publ" +
"icKeyToken=<KEY>"),
global::System.Runtime.InteropServices.ComTypes.ITypeComp__System_Private_Interop__Impl.Vtbl.idx_BindType,
unsafe_szName,
lHashVal,
&(unsafe_ppTInfo),
&(unsafe_ppTComp)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
ppTComp = (global::System.Runtime.InteropServices.ComTypes.ITypeComp__System_Private_Interop)global::System.Runtime.InteropServices.McgModuleManager.ComInterfaceToObject(
((global::System.IntPtr)unsafe_ppTComp),
global::System.Runtime.InteropServices.TypeOfHelper.RuntimeTypeHandleOf("System.Runtime.InteropServices.ComTypes.ITypeComp,System.Private.Interop, Version=4.0.0.0, Culture=neutral, Publ" +
"icKeyToken=<KEY>")
);
ppTInfo = (global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop)global::System.Runtime.InteropServices.McgModuleManager.ComInterfaceToObject(
((global::System.IntPtr)unsafe_ppTInfo),
global::System.Runtime.InteropServices.TypeOfHelper.RuntimeTypeHandleOf("System.Runtime.InteropServices.ComTypes.ITypeInfo,System.Private.Interop, Version=4.0.0.0, Culture=neutral, Publ" +
"icKeyToken=<KEY>")
);
}
// Return
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_ppTInfo)));
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_ppTComp)));
}
}
}
// DispatchClass for 'System.Runtime.InteropServices.ComTypes.ITypeComp__System_Private_Interop'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Runtime.InteropServices.ComTypes.ITypeComp__System_Private_Interop))]
public abstract partial class DispatchClass : global::System.__ComObject, global::System.Runtime.InteropServices.ComTypes.ITypeComp__System_Private_Interop
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::System.Runtime.InteropServices.ComTypes.ITypeComp__System_Private_Interop.Bind(
string szName,
int lHashVal,
short wFlags,
out global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop ppTInfo,
out global::System.Runtime.InteropServices.ComTypes.DESCKIND__System_Private_Interop pDescKind,
out global::System.Runtime.InteropServices.ComTypes.BINDPTR__System_Private_Interop pBindPtr)
{
global::System.Runtime.InteropServices.ComTypes.ITypeComp__System_Private_Interop__Impl.StubClass.Bind(
this,
szName,
lHashVal,
wFlags,
out ppTInfo,
out pDescKind,
out pBindPtr
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::System.Runtime.InteropServices.ComTypes.ITypeComp__System_Private_Interop.BindType(
string szName,
int lHashVal,
out global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop ppTInfo,
out global::System.Runtime.InteropServices.ComTypes.ITypeComp__System_Private_Interop ppTComp)
{
global::System.Runtime.InteropServices.ComTypes.ITypeComp__System_Private_Interop__Impl.StubClass.BindType(
this,
szName,
lHashVal,
out ppTInfo,
out ppTComp
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// v-table for 'System.Runtime.InteropServices.ComTypes.ITypeComp__System_Private_Interop'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Runtime.InteropServices.ComTypes.ITypeComp__System_Private_Interop))]
public unsafe partial struct Vtbl
{
internal const int idx_Bind = 3;
internal const int idx_BindType = 4;
}
}
// System.Runtime.InteropServices.ComTypes.ITypeLib__System_Private_Interop
public unsafe static class ITypeLib__System_Private_Interop__Impl
{
// StubClass for 'System.Runtime.InteropServices.ComTypes.ITypeLib__System_Private_Interop'
public static partial class StubClass
{
// Signature, System.Runtime.InteropServices.ComTypes.ITypeLib__System_Private_Interop.GetTypeInfoCount, [fwd] [return] [Mcg.CodeGen.BlittableValueMarshaller] int__int,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static int GetTypeInfoCount(global::System.__ComObject __this)
{
// Setup
int unsafe___value;
// Marshalling
// Call to native method
unsafe___value = global::McgInterop.ComCallHelpers.ComCall__int__(
__this,
global::System.Runtime.InteropServices.TypeOfHelper.RuntimeTypeHandleOf("System.Runtime.InteropServices.ComTypes.ITypeLib,System.Private.Interop, Version=4.0.0.0, Culture=neutral, Publi" +
"cKeyToken=<KEY>"),
global::System.Runtime.InteropServices.ComTypes.ITypeLib__System_Private_Interop__Impl.Vtbl.idx_GetTypeInfoCount
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
// Return
return unsafe___value;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void GetTypeInfo(
global::System.__ComObject __this,
int index,
out global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop ppTI)
{
global::McgInterop.ForwardComSharedStubs.Proc_int__out__ComTypes_ITypeInfo__Private_Interop__<global::System.Runtime.InteropServices.ComTypes.ITypeLib__System_Private_Interop>(
__this,
index,
out ppTI,
global::System.Runtime.InteropServices.ComTypes.ITypeLib__System_Private_Interop__Impl.Vtbl.idx_GetTypeInfo
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// Signature, System.Runtime.InteropServices.ComTypes.ITypeLib__System_Private_Interop.GetTypeInfoType, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.BlittableValueMarshaller] int__int, [fwd] [out] [managedbyref] [nativebyref] [Mcg.CodeGen.EnumMarshaller] System_Runtime_InteropServices_ComTypes_TYPEKIND__System_Private_Interop__TYPEKIND__System_Private_Interop,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void GetTypeInfoType(
global::System.__ComObject __this,
int index,
out global::System.Runtime.InteropServices.ComTypes.TYPEKIND__System_Private_Interop pTKind)
{
// Setup
global::System.Runtime.InteropServices.ComTypes.TYPEKIND__System_Private_Interop unsafe_pTKind;
int unsafe___return__;
// Marshalling
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
global::System.Runtime.InteropServices.TypeOfHelper.RuntimeTypeHandleOf("System.Runtime.InteropServices.ComTypes.ITypeLib,System.Private.Interop, Version=4.0.0.0, Culture=neutral, Publi" +
"cKeyToken=<KEY>"),
global::System.Runtime.InteropServices.ComTypes.ITypeLib__System_Private_Interop__Impl.Vtbl.idx_GetTypeInfoType,
index,
&(unsafe_pTKind)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
pTKind = unsafe_pTKind;
// Return
}
// Signature, System.Runtime.InteropServices.ComTypes.ITypeLib__System_Private_Interop.GetTypeInfoOfGuid, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [out] [managedbyref] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] System_Guid__System.Guid, [fwd] [out] [managedbyref] [nativebyref] [Mcg.CodeGen.ComInterfaceMarshaller] System_Runtime_InteropServices_ComTypes_ITypeInfo__System_Private_Interop__System_Runtime_InteropServices_ComTypes__ITypeInfo__System_Private_Interop *,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void GetTypeInfoOfGuid(
global::System.__ComObject __this,
ref global::System.Guid guid,
out global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop ppTInfo)
{
// Setup
global::System.Guid unsafe_guid;
global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop__Impl.Vtbl** unsafe_ppTInfo = default(global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop__Impl.Vtbl**);
int unsafe___return__;
try
{
// Marshalling
unsafe_guid = guid;
unsafe_ppTInfo = null;
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
global::System.Runtime.InteropServices.TypeOfHelper.RuntimeTypeHandleOf("System.Runtime.InteropServices.ComTypes.ITypeLib,System.Private.Interop, Version=4.0.0.0, Culture=neutral, Publi" +
"cKeyToken=<KEY>"),
global::System.Runtime.InteropServices.ComTypes.ITypeLib__System_Private_Interop__Impl.Vtbl.idx_GetTypeInfoOfGuid,
&(unsafe_guid),
&(unsafe_ppTInfo)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
ppTInfo = (global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop)global::System.Runtime.InteropServices.McgModuleManager.ComInterfaceToObject(
((global::System.IntPtr)unsafe_ppTInfo),
global::System.Runtime.InteropServices.TypeOfHelper.RuntimeTypeHandleOf("System.Runtime.InteropServices.ComTypes.ITypeInfo,System.Private.Interop, Version=4.0.0.0, Culture=neutral, Publ" +
"icKeyToken=<KEY>")
);
guid = unsafe_guid;
// Return
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_ppTInfo)));
}
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void GetLibAttr(
global::System.__ComObject __this,
out global::System.IntPtr ppTLibAttr)
{
global::McgInterop.ForwardComSharedStubs.Proc_out_IntPtr__<global::System.Runtime.InteropServices.ComTypes.ITypeLib__System_Private_Interop>(
__this,
out ppTLibAttr,
global::System.Runtime.InteropServices.ComTypes.ITypeLib__System_Private_Interop__Impl.Vtbl.idx_GetLibAttr
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void GetTypeComp(
global::System.__ComObject __this,
out global::System.Runtime.InteropServices.ComTypes.ITypeComp__System_Private_Interop ppTComp)
{
global::McgInterop.ForwardComSharedStubs.Proc_out__ComTypes_ITypeComp__Private_Interop__<global::System.Runtime.InteropServices.ComTypes.ITypeLib__System_Private_Interop>(
__this,
out ppTComp,
global::System.Runtime.InteropServices.ComTypes.ITypeLib__System_Private_Interop__Impl.Vtbl.idx_GetTypeComp
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void GetDocumentation(
global::System.__ComObject __this,
int index,
out string strName,
out string strDocString,
out int dwHelpContext,
out string strHelpFile)
{
global::McgInterop.ForwardComSharedStubs.Proc_int__out_string__out_string__out_int__out_string__<global::System.Runtime.InteropServices.ComTypes.ITypeLib__System_Private_Interop>(
__this,
index,
out strName,
out strDocString,
out dwHelpContext,
out strHelpFile,
global::System.Runtime.InteropServices.ComTypes.ITypeLib__System_Private_Interop__Impl.Vtbl.idx_GetDocumentation
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// Signature, System.Runtime.InteropServices.ComTypes.ITypeLib__System_Private_Interop.IsName, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.UnicodeStringMarshaller] string__wchar_t *, [fwd] [in] [Mcg.CodeGen.BlittableValueMarshaller] int__int, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.Win32BoolMarshaller] bool__System.Boolean,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool IsName(
global::System.__ComObject __this,
string szNameBuf,
int lHashVal)
{
// Setup
ushort* unsafe_szNameBuf = default(ushort*);
int unsafe___value__retval;
bool __value__retval;
int unsafe___return__;
// Marshalling
fixed (char* pinned_szNameBuf = szNameBuf)
{
unsafe_szNameBuf = (ushort*)pinned_szNameBuf;
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
global::System.Runtime.InteropServices.TypeOfHelper.RuntimeTypeHandleOf("System.Runtime.InteropServices.ComTypes.ITypeLib,System.Private.Interop, Version=4.0.0.0, Culture=neutral, Publi" +
"cKeyToken=<KEY>"),
global::System.Runtime.InteropServices.ComTypes.ITypeLib__System_Private_Interop__Impl.Vtbl.idx_IsName,
unsafe_szNameBuf,
lHashVal,
&(unsafe___value__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
__value__retval = unsafe___value__retval != 0;
}
// Return
return __value__retval;
}
// Signature, System.Runtime.InteropServices.ComTypes.ITypeLib__System_Private_Interop.FindName, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.UnicodeStringMarshaller] string__wchar_t *, [fwd] [in] [Mcg.CodeGen.BlittableValueMarshaller] int__int, [fwd] [out] [Mcg.CodeGen.ArrayMarshaller] rg_System_Runtime_InteropServices_ComTypes_ITypeInfo__System_Private_Interop__System_Runtime_InteropServices_ComTypes__ITypeInfo__System_Private_Interop * *, [fwd] [out] [Mcg.CodeGen.BlittableArrayMarshaller] rg_int__int *, [fwd] [in] [out] [managedbyref] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] short__short,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void FindName(
global::System.__ComObject __this,
string szNameBuf,
int lHashVal,
global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop[] ppTInfo,
int[] rgMemId,
ref short pcFound)
{
// Setup
ushort* unsafe_szNameBuf = default(ushort*);
global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop__Impl.Vtbl*** unsafe_ppTInfo = default(global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop__Impl.Vtbl***);
int* unsafe_rgMemId;
short unsafe_pcFound;
int unsafe___return__;
try
{
// Marshalling
fixed (char* pinned_szNameBuf = szNameBuf)
{
unsafe_szNameBuf = (ushort*)pinned_szNameBuf;
if (ppTInfo != null)
unsafe_ppTInfo = (global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop__Impl.Vtbl***)global::McgInterop.McgHelpers.CoTaskMemAllocAndZeroMemory(((global::System.IntPtr)checked(ppTInfo.Length * sizeof(global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop__Impl.Vtbl**))));
fixed (int* pinned_rgMemId = global::McgInterop.McgCoreHelpers.GetArrayForCompat(rgMemId))
{
unsafe_rgMemId = (int*)pinned_rgMemId;
unsafe_pcFound = pcFound;
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
global::System.Runtime.InteropServices.TypeOfHelper.RuntimeTypeHandleOf("System.Runtime.InteropServices.ComTypes.ITypeLib,System.Private.Interop, Version=4.0.0.0, Culture=neutral, Publi" +
"cKeyToken=<KEY>"),
global::System.Runtime.InteropServices.ComTypes.ITypeLib__System_Private_Interop__Impl.Vtbl.idx_FindName,
unsafe_szNameBuf,
lHashVal,
unsafe_ppTInfo,
unsafe_rgMemId,
&(unsafe_pcFound)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
pcFound = unsafe_pcFound;
}
if (ppTInfo != null)
for (uint mcgIdx = 0; (mcgIdx < ppTInfo.Length); mcgIdx++)
{
// [fwd] [out] [optional] [Mcg.CodeGen.ComInterfaceMarshaller] System_Runtime_InteropServices_ComTypes_ITypeInfo__System_Private_Interop__System_Runtime_InteropServices_ComTypes__ITypeInfo__System_Private_Interop * ppTInfo
ppTInfo[mcgIdx] = (global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop)global::System.Runtime.InteropServices.McgModuleManager.ComInterfaceToObject(
((global::System.IntPtr)unsafe_ppTInfo[mcgIdx]),
global::System.Runtime.InteropServices.TypeOfHelper.RuntimeTypeHandleOf("System.Runtime.InteropServices.ComTypes.ITypeInfo,System.Private.Interop, Version=4.0.0.0, Culture=neutral, Publ" +
"icKeyToken=<KEY>")
);
}
}
// Return
}
finally
{
// Cleanup
if (unsafe_ppTInfo != null)
for (uint mcgIdx_1 = 0; (mcgIdx_1 < ppTInfo.Length); mcgIdx_1++)
{
// [fwd] [in] [out] [optional] [Mcg.CodeGen.ComInterfaceMarshaller] System_Runtime_InteropServices_ComTypes_ITypeInfo__System_Private_Interop__System_Runtime_InteropServices_ComTypes__ITypeInfo__System_Private_Interop * ppTInfo
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_ppTInfo[mcgIdx_1])));
}
global::System.Runtime.InteropServices.ExternalInterop.SafeCoTaskMemFree(unsafe_ppTInfo);
}
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void ReleaseTLibAttr(
global::System.__ComObject __this,
global::System.IntPtr pTLibAttr)
{
global::McgInterop.ForwardComSharedStubs.Proc_void__IntPtr__<global::System.Runtime.InteropServices.ComTypes.ITypeLib__System_Private_Interop>(
__this,
pTLibAttr,
global::System.Runtime.InteropServices.ComTypes.ITypeLib__System_Private_Interop__Impl.Vtbl.idx_ReleaseTLibAttr
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// DispatchClass for 'System.Runtime.InteropServices.ComTypes.ITypeLib__System_Private_Interop'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Runtime.InteropServices.ComTypes.ITypeLib__System_Private_Interop))]
public abstract partial class DispatchClass : global::System.__ComObject, global::System.Runtime.InteropServices.ComTypes.ITypeLib__System_Private_Interop
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
int global::System.Runtime.InteropServices.ComTypes.ITypeLib__System_Private_Interop.GetTypeInfoCount()
{
int __retVal = global::System.Runtime.InteropServices.ComTypes.ITypeLib__System_Private_Interop__Impl.StubClass.GetTypeInfoCount(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::System.Runtime.InteropServices.ComTypes.ITypeLib__System_Private_Interop.GetTypeInfo(
int index,
out global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop ppTI)
{
global::System.Runtime.InteropServices.ComTypes.ITypeLib__System_Private_Interop__Impl.StubClass.GetTypeInfo(
this,
index,
out ppTI
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::System.Runtime.InteropServices.ComTypes.ITypeLib__System_Private_Interop.GetTypeInfoType(
int index,
out global::System.Runtime.InteropServices.ComTypes.TYPEKIND__System_Private_Interop pTKind)
{
global::System.Runtime.InteropServices.ComTypes.ITypeLib__System_Private_Interop__Impl.StubClass.GetTypeInfoType(
this,
index,
out pTKind
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::System.Runtime.InteropServices.ComTypes.ITypeLib__System_Private_Interop.GetTypeInfoOfGuid(
ref global::System.Guid guid,
out global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop ppTInfo)
{
global::System.Runtime.InteropServices.ComTypes.ITypeLib__System_Private_Interop__Impl.StubClass.GetTypeInfoOfGuid(
this,
ref guid,
out ppTInfo
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::System.Runtime.InteropServices.ComTypes.ITypeLib__System_Private_Interop.GetLibAttr(out global::System.IntPtr ppTLibAttr)
{
global::System.Runtime.InteropServices.ComTypes.ITypeLib__System_Private_Interop__Impl.StubClass.GetLibAttr(
this,
out ppTLibAttr
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::System.Runtime.InteropServices.ComTypes.ITypeLib__System_Private_Interop.GetTypeComp(out global::System.Runtime.InteropServices.ComTypes.ITypeComp__System_Private_Interop ppTComp)
{
global::System.Runtime.InteropServices.ComTypes.ITypeLib__System_Private_Interop__Impl.StubClass.GetTypeComp(
this,
out ppTComp
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::System.Runtime.InteropServices.ComTypes.ITypeLib__System_Private_Interop.GetDocumentation(
int index,
out string strName,
out string strDocString,
out int dwHelpContext,
out string strHelpFile)
{
global::System.Runtime.InteropServices.ComTypes.ITypeLib__System_Private_Interop__Impl.StubClass.GetDocumentation(
this,
index,
out strName,
out strDocString,
out dwHelpContext,
out strHelpFile
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
bool global::System.Runtime.InteropServices.ComTypes.ITypeLib__System_Private_Interop.IsName(
string szNameBuf,
int lHashVal)
{
bool __retVal = global::System.Runtime.InteropServices.ComTypes.ITypeLib__System_Private_Interop__Impl.StubClass.IsName(
this,
szNameBuf,
lHashVal
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::System.Runtime.InteropServices.ComTypes.ITypeLib__System_Private_Interop.FindName(
string szNameBuf,
int lHashVal,
global::System.Runtime.InteropServices.ComTypes.ITypeInfo__System_Private_Interop[] ppTInfo,
int[] rgMemId,
ref short pcFound)
{
global::System.Runtime.InteropServices.ComTypes.ITypeLib__System_Private_Interop__Impl.StubClass.FindName(
this,
szNameBuf,
lHashVal,
ppTInfo,
rgMemId,
ref pcFound
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::System.Runtime.InteropServices.ComTypes.ITypeLib__System_Private_Interop.ReleaseTLibAttr(global::System.IntPtr pTLibAttr)
{
global::System.Runtime.InteropServices.ComTypes.ITypeLib__System_Private_Interop__Impl.StubClass.ReleaseTLibAttr(
this,
pTLibAttr
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// v-table for 'System.Runtime.InteropServices.ComTypes.ITypeLib__System_Private_Interop'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Runtime.InteropServices.ComTypes.ITypeLib__System_Private_Interop))]
public unsafe partial struct Vtbl
{
internal const int idx_GetTypeInfoCount = 3;
internal const int idx_GetTypeInfo = 4;
internal const int idx_GetTypeInfoType = 5;
internal const int idx_GetTypeInfoOfGuid = 6;
internal const int idx_GetLibAttr = 7;
internal const int idx_GetTypeComp = 8;
internal const int idx_GetDocumentation = 9;
internal const int idx_IsName = 10;
internal const int idx_FindName = 11;
internal const int idx_ReleaseTLibAttr = 12;
}
}
// System.Runtime.InteropServices.ComTypes.BINDPTR__System_Private_Interop
public unsafe static class BINDPTR__System_Private_Interop__Impl
{
}
// System.Runtime.InteropServices.ComTypes.DISPPARAMS__System_Private_Interop
public unsafe static class DISPPARAMS__System_Private_Interop__Impl
{
}
}
namespace System.Runtime.InteropServices.WindowsRuntime
{
// System.Runtime.InteropServices.WindowsRuntime.IBufferByteAccess__System_Runtime_WindowsRuntime
public unsafe static class IBufferByteAccess__System_Runtime_WindowsRuntime__Impl
{
// StubClass for 'System.Runtime.InteropServices.WindowsRuntime.IBufferByteAccess__System_Runtime_WindowsRuntime'
public static partial class StubClass
{
// Signature, System.Runtime.InteropServices.WindowsRuntime.IBufferByteAccess__System_Runtime_WindowsRuntime.GetBuffer, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] System_IntPtr____w64 int,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.IntPtr GetBuffer(global::System.__ComObject __this)
{
// Setup
global::System.IntPtr unsafe___value__retval;
global::System.IntPtr __value__retval;
int unsafe___return__;
// Marshalling
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
global::System.Runtime.InteropServices.TypeOfHelper.RuntimeTypeHandleOf("System.Runtime.InteropServices.WindowsRuntime.IBufferByteAccess,System.Runtime.WindowsRuntime, Version=4.0.10.0," +
" Culture=neutral, PublicKeyToken=b77a5c561934e089"),
global::System.Runtime.InteropServices.WindowsRuntime.IBufferByteAccess__System_Runtime_WindowsRuntime__Impl.Vtbl.idx_GetBuffer,
&(unsafe___value__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
__value__retval = unsafe___value__retval;
// Return
return __value__retval;
}
}
// DispatchClass for 'System.Runtime.InteropServices.WindowsRuntime.IBufferByteAccess__System_Runtime_WindowsRuntime'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Runtime.InteropServices.WindowsRuntime.IBufferByteAccess__System_Runtime_WindowsRuntime))]
public abstract partial class DispatchClass : global::System.__ComObject, global::System.Runtime.InteropServices.WindowsRuntime.IBufferByteAccess__System_Runtime_WindowsRuntime
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
global::System.IntPtr global::System.Runtime.InteropServices.WindowsRuntime.IBufferByteAccess__System_Runtime_WindowsRuntime.GetBuffer()
{
global::System.IntPtr __retVal = global::System.Runtime.InteropServices.WindowsRuntime.IBufferByteAccess__System_Runtime_WindowsRuntime__Impl.StubClass.GetBuffer(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'System.Runtime.InteropServices.WindowsRuntime.IBufferByteAccess__System_Runtime_WindowsRuntime'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::System.Runtime.InteropServices.WindowsRuntime.IBufferByteAccess__System_Runtime_WindowsRuntime))]
[global::System.Runtime.InteropServices.McgRootsType(typeof(global::System.Runtime.InteropServices.WindowsRuntime.IBufferByteAccess__System_Runtime_WindowsRuntime))]
public unsafe partial struct Vtbl
{
global::System.IntPtr pfnQueryInterface;
global::System.IntPtr pfnAddRef;
global::System.IntPtr pfnRelease;
// System_Runtime_InteropServices_WindowsRuntime__IBufferByteAccess__System_Runtime_WindowsRuntime
global::System.IntPtr pfnGetBuffer_System_Runtime_InteropServices_WindowsRuntime__IBufferByteAccess__System_Runtime_WindowsRuntime;
internal const int idx_GetBuffer = 3;
[global::System.Runtime.CompilerServices.InitDataBlob(typeof(global::System.Runtime.InteropServices.WindowsRuntime.IBufferByteAccess__System_Runtime_WindowsRuntime__Impl.Vtbl.System_Runtime_InteropServices_WindowsRuntime_IBufferByteAccess__System_Runtime_WindowsRuntime__Impl_Vtbl_McgRvaContainer), "RVA_System_Runtime_InteropServices_WindowsRuntime_IBufferByteAccess__System_Runtime_WindowsRuntime__Impl_Vtbl_s_" +
"theCcwVtable")]
public static global::System.Runtime.InteropServices.WindowsRuntime.IBufferByteAccess__System_Runtime_WindowsRuntime__Impl.Vtbl s_theCcwVtable
#if false
= new global::System.Runtime.InteropServices.WindowsRuntime.IBufferByteAccess__System_Runtime_WindowsRuntime__Impl.Vtbl() {
pfnQueryInterface = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfQueryInterface>(System.Runtime.InteropServices.__vtable_IUnknown.QueryInterface),
pfnAddRef = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfAddRef>(System.Runtime.InteropServices.__vtable_IUnknown.AddRef),
pfnRelease = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfRelease>(System.Runtime.InteropServices.__vtable_IUnknown.Release),
pfnGetBuffer_System_Runtime_InteropServices_WindowsRuntime__IBufferByteAccess__System_Runtime_WindowsRuntime = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget156>(global::System.Runtime.InteropServices.WindowsRuntime.IBufferByteAccess__System_Runtime_WindowsRuntime__Impl.Vtbl.GetBuffer__STUB),
}
#endif
;
public static global::System.IntPtr pNativeVtable;
// Signature, System.Runtime.InteropServices.WindowsRuntime.IBufferByteAccess__System_Runtime_WindowsRuntime.GetBuffer, [rev] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [rev] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] System_IntPtr____w64 int,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int GetBuffer__STUB(
global::System.IntPtr pComThis,
global::System.IntPtr* unsafe___value__retval)
{
// Setup
global::System.IntPtr __value__retval;
try
{
// Marshalling
// Call to managed method
__value__retval = global::System.Runtime.InteropServices.McgMarshal.FastCast<global::System.Runtime.InteropServices.WindowsRuntime.IBufferByteAccess__System_Runtime_WindowsRuntime>(global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis)).GetBuffer();
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
if (unsafe___value__retval != null)
(*(unsafe___value__retval)) = __value__retval;
// Return
return global::McgInterop.Helpers.S_OK;
}
catch (global::System.Exception hrExcep)
{
// ExceptionCleanup
if (unsafe___value__retval != null)
(*(unsafe___value__retval)) = default(global::System.IntPtr);
// ExceptionReturn
return global::System.Runtime.InteropServices.McgMarshal.GetHRForException(hrExcep);
}
}
private static class System_Runtime_InteropServices_WindowsRuntime_IBufferByteAccess__System_Runtime_WindowsRuntime__Impl_Vtbl_McgRvaContainer
{
[global::System.Runtime.CompilerServices.MethodAddrFixup(0, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "QueryInterface")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(4, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "AddRef")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(8, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "Release")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(12, typeof(global::System.Runtime.InteropServices.WindowsRuntime.IBufferByteAccess__System_Runtime_WindowsRuntime__Impl.Vtbl), "GetBuffer__STUB")]
[global::System.Runtime.CompilerServices.NonArray]
static readonly byte[] RVA_System_Runtime_InteropServices_WindowsRuntime_IBufferByteAccess__System_Runtime_WindowsRuntime__Impl_Vtbl_s_theCcwVtable = new byte[] {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
}
}
}
}
namespace Windows.ApplicationModel
{
// Windows.ApplicationModel.ISuspendingEventArgs
public unsafe static class ISuspendingEventArgs__Impl
{
// StubClass for 'Windows.ApplicationModel.ISuspendingEventArgs'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.ApplicationModel.SuspendingOperation get_SuspendingOperation(global::System.__ComObject __this)
{
global::Windows.ApplicationModel.SuspendingOperation __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.ApplicationModel.ISuspendingEventArgs, global::Windows.ApplicationModel.SuspendingOperation>(
__this,
global::Windows.ApplicationModel.ISuspendingEventArgs__Impl.Vtbl.idx_get_SuspendingOperation
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
}
// DispatchClass for 'Windows.ApplicationModel.ISuspendingEventArgs'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.ApplicationModel.ISuspendingEventArgs))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.ApplicationModel.ISuspendingEventArgs
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.ApplicationModel.ISuspendingEventArgs.SuspendingOperation")]
global::Windows.ApplicationModel.SuspendingOperation global::Windows.ApplicationModel.ISuspendingEventArgs.get_SuspendingOperation()
{
global::Windows.ApplicationModel.SuspendingOperation __retVal = global::Windows.ApplicationModel.ISuspendingEventArgs__Impl.StubClass.get_SuspendingOperation(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.ApplicationModel.ISuspendingEventArgs'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.ApplicationModel.ISuspendingEventArgs))]
public unsafe partial struct Vtbl
{
internal const int idx_get_SuspendingOperation = 6;
}
}
// Windows.ApplicationModel.ISuspendingOperation
public unsafe static class ISuspendingOperation__Impl
{
// StubClass for 'Windows.ApplicationModel.ISuspendingOperation'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.ApplicationModel.SuspendingDeferral GetDeferral(global::System.__ComObject __this)
{
global::Windows.ApplicationModel.SuspendingDeferral __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.ApplicationModel.ISuspendingOperation, global::Windows.ApplicationModel.SuspendingDeferral>(
__this,
global::Windows.ApplicationModel.ISuspendingOperation__Impl.Vtbl.idx_GetDeferral
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
}
// DispatchClass for 'Windows.ApplicationModel.ISuspendingOperation'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.ApplicationModel.ISuspendingOperation))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.ApplicationModel.ISuspendingOperation
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
global::Windows.ApplicationModel.SuspendingDeferral global::Windows.ApplicationModel.ISuspendingOperation.GetDeferral()
{
global::Windows.ApplicationModel.SuspendingDeferral __retVal = global::Windows.ApplicationModel.ISuspendingOperation__Impl.StubClass.GetDeferral(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.ApplicationModel.ISuspendingOperation'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.ApplicationModel.ISuspendingOperation))]
public unsafe partial struct Vtbl
{
internal const int idx_GetDeferral = 6;
}
}
// Windows.ApplicationModel.ISuspendingDeferral
public unsafe static class ISuspendingDeferral__Impl
{
// StubClass for 'Windows.ApplicationModel.ISuspendingDeferral'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void Complete(global::System.__ComObject __this)
{
global::McgInterop.ForwardComSharedStubs.Proc_<global::Windows.ApplicationModel.ISuspendingDeferral>(
__this,
global::Windows.ApplicationModel.ISuspendingDeferral__Impl.Vtbl.idx_Complete
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// DispatchClass for 'Windows.ApplicationModel.ISuspendingDeferral'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.ApplicationModel.ISuspendingDeferral))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.ApplicationModel.ISuspendingDeferral
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.ApplicationModel.ISuspendingDeferral.Complete()
{
global::Windows.ApplicationModel.ISuspendingDeferral__Impl.StubClass.Complete(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// v-table for 'Windows.ApplicationModel.ISuspendingDeferral'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.ApplicationModel.ISuspendingDeferral))]
public unsafe partial struct Vtbl
{
internal const int idx_Complete = 6;
}
}
// Windows.ApplicationModel.ILeavingBackgroundEventArgs
public unsafe static class ILeavingBackgroundEventArgs__Impl
{
// v-table for 'Windows.ApplicationModel.ILeavingBackgroundEventArgs'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.ApplicationModel.ILeavingBackgroundEventArgs))]
public unsafe partial struct Vtbl
{
}
}
// Windows.ApplicationModel.IEnteredBackgroundEventArgs
public unsafe static class IEnteredBackgroundEventArgs__Impl
{
// v-table for 'Windows.ApplicationModel.IEnteredBackgroundEventArgs'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.ApplicationModel.IEnteredBackgroundEventArgs))]
public unsafe partial struct Vtbl
{
}
}
// Windows.ApplicationModel.IPackageStatics
public unsafe static class IPackageStatics__Impl
{
// StubClass for 'Windows.ApplicationModel.IPackageStatics'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.ApplicationModel.Package get_Current(global::System.__ComObject __this)
{
global::Windows.ApplicationModel.Package __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.ApplicationModel.IPackageStatics, global::Windows.ApplicationModel.Package>(
__this,
global::Windows.ApplicationModel.IPackageStatics__Impl.Vtbl.idx_get_Current
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
}
// DispatchClass for 'Windows.ApplicationModel.IPackageStatics'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.ApplicationModel.IPackageStatics))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.ApplicationModel.IPackageStatics
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.ApplicationModel.IPackageStatics.Current")]
global::Windows.ApplicationModel.Package global::Windows.ApplicationModel.IPackageStatics.get_Current()
{
global::Windows.ApplicationModel.Package __retVal = global::Windows.ApplicationModel.IPackageStatics__Impl.StubClass.get_Current(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.ApplicationModel.IPackageStatics'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.ApplicationModel.IPackageStatics))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Current = 6;
}
}
// Windows.ApplicationModel.IPackage
public unsafe static class IPackage__Impl
{
// StubClass for 'Windows.ApplicationModel.IPackage'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.Storage.StorageFolder get_InstalledLocation(global::System.__ComObject __this)
{
global::Windows.Storage.StorageFolder __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.ApplicationModel.IPackage, global::Windows.Storage.StorageFolder>(
__this,
global::Windows.ApplicationModel.IPackage__Impl.Vtbl.idx_get_InstalledLocation
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
}
// DispatchClass for 'Windows.ApplicationModel.IPackage'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.ApplicationModel.IPackage))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.ApplicationModel.IPackage
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.ApplicationModel.IPackage.InstalledLocation")]
global::Windows.Storage.StorageFolder global::Windows.ApplicationModel.IPackage.get_InstalledLocation()
{
global::Windows.Storage.StorageFolder __retVal = global::Windows.ApplicationModel.IPackage__Impl.StubClass.get_InstalledLocation(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.ApplicationModel.IPackage'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.ApplicationModel.IPackage))]
public unsafe partial struct Vtbl
{
internal const int idx_get_InstalledLocation = 7;
}
}
// Windows.ApplicationModel.IPackage2
public unsafe static class IPackage2__Impl
{
// v-table for 'Windows.ApplicationModel.IPackage2'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.ApplicationModel.IPackage2))]
public unsafe partial struct Vtbl
{
}
}
// Windows.ApplicationModel.IPackage3
public unsafe static class IPackage3__Impl
{
// v-table for 'Windows.ApplicationModel.IPackage3'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.ApplicationModel.IPackage3))]
public unsafe partial struct Vtbl
{
}
}
// Windows.ApplicationModel.IPackageWithMetadata
public unsafe static class IPackageWithMetadata__Impl
{
// v-table for 'Windows.ApplicationModel.IPackageWithMetadata'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.ApplicationModel.IPackageWithMetadata))]
public unsafe partial struct Vtbl
{
}
}
// Windows.ApplicationModel.IPackage4
public unsafe static class IPackage4__Impl
{
// v-table for 'Windows.ApplicationModel.IPackage4'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.ApplicationModel.IPackage4))]
public unsafe partial struct Vtbl
{
}
}
}
namespace Windows.ApplicationModel.Activation
{
// Windows.ApplicationModel.Activation.IActivatedEventArgs
public unsafe static class IActivatedEventArgs__Impl
{
// StubClass for 'Windows.ApplicationModel.Activation.IActivatedEventArgs'
public static partial class StubClass
{
// Signature, Windows.ApplicationModel.Activation.IActivatedEventArgs.get_PreviousExecutionState, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.EnumMarshaller] Windows_ApplicationModel_Activation_ApplicationExecutionState__Windows_ApplicationModel_Activation__ApplicationExecutionState,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.ApplicationModel.Activation.ApplicationExecutionState get_PreviousExecutionState(global::System.__ComObject __this)
{
// Setup
global::Windows.ApplicationModel.Activation.ApplicationExecutionState unsafe_value__retval;
global::Windows.ApplicationModel.Activation.ApplicationExecutionState value__retval;
int unsafe___return__;
// Marshalling
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.ApplicationModel.Activation.IActivatedEventArgs).TypeHandle,
global::Windows.ApplicationModel.Activation.IActivatedEventArgs__Impl.Vtbl.idx_get_PreviousExecutionState,
&(unsafe_value__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
value__retval = unsafe_value__retval;
// Return
return value__retval;
}
}
// DispatchClass for 'Windows.ApplicationModel.Activation.IActivatedEventArgs'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.ApplicationModel.Activation.IActivatedEventArgs))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.ApplicationModel.Activation.IActivatedEventArgs
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.ApplicationModel.Activation.IActivatedEventArgs.PreviousExecutionState")]
global::Windows.ApplicationModel.Activation.ApplicationExecutionState global::Windows.ApplicationModel.Activation.IActivatedEventArgs.get_PreviousExecutionState()
{
global::Windows.ApplicationModel.Activation.ApplicationExecutionState __retVal = global::Windows.ApplicationModel.Activation.IActivatedEventArgs__Impl.StubClass.get_PreviousExecutionState(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.ApplicationModel.Activation.IActivatedEventArgs'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.ApplicationModel.Activation.IActivatedEventArgs))]
public unsafe partial struct Vtbl
{
internal const int idx_get_PreviousExecutionState = 7;
}
}
// Windows.ApplicationModel.Activation.ILaunchActivatedEventArgs
public unsafe static class ILaunchActivatedEventArgs__Impl
{
// StubClass for 'Windows.ApplicationModel.Activation.ILaunchActivatedEventArgs'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static string get_Arguments(global::System.__ComObject __this)
{
string __ret = global::McgInterop.ForwardComSharedStubs.Func_string__<global::Windows.ApplicationModel.Activation.ILaunchActivatedEventArgs>(
__this,
global::Windows.ApplicationModel.Activation.ILaunchActivatedEventArgs__Impl.Vtbl.idx_get_Arguments
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
}
// DispatchClass for 'Windows.ApplicationModel.Activation.ILaunchActivatedEventArgs'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.ApplicationModel.Activation.ILaunchActivatedEventArgs))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.ApplicationModel.Activation.ILaunchActivatedEventArgs
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.ApplicationModel.Activation.IActivatedEventArgs.PreviousExecutionState")]
global::Windows.ApplicationModel.Activation.ApplicationExecutionState global::Windows.ApplicationModel.Activation.IActivatedEventArgs.get_PreviousExecutionState()
{
global::McgInterop.McgHelpers.FailFastForReducedMethod();
return default(global::Windows.ApplicationModel.Activation.ApplicationExecutionState);
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.ApplicationModel.Activation.ILaunchActivatedEventArgs.Arguments")]
string global::Windows.ApplicationModel.Activation.ILaunchActivatedEventArgs.get_Arguments()
{
string __retVal = global::Windows.ApplicationModel.Activation.ILaunchActivatedEventArgs__Impl.StubClass.get_Arguments(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.ApplicationModel.Activation.ILaunchActivatedEventArgs'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.ApplicationModel.Activation.ILaunchActivatedEventArgs))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Arguments = 6;
}
}
// Windows.ApplicationModel.Activation.IApplicationViewActivatedEventArgs
public unsafe static class IApplicationViewActivatedEventArgs__Impl
{
// v-table for 'Windows.ApplicationModel.Activation.IApplicationViewActivatedEventArgs'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.ApplicationModel.Activation.IApplicationViewActivatedEventArgs))]
public unsafe partial struct Vtbl
{
}
}
// Windows.ApplicationModel.Activation.IPrelaunchActivatedEventArgs
public unsafe static class IPrelaunchActivatedEventArgs__Impl
{
// StubClass for 'Windows.ApplicationModel.Activation.IPrelaunchActivatedEventArgs'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool get_PrelaunchActivated(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.ApplicationModel.Activation.IPrelaunchActivatedEventArgs>(
__this,
global::Windows.ApplicationModel.Activation.IPrelaunchActivatedEventArgs__Impl.Vtbl.idx_get_PrelaunchActivated
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
}
// DispatchClass for 'Windows.ApplicationModel.Activation.IPrelaunchActivatedEventArgs'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.ApplicationModel.Activation.IPrelaunchActivatedEventArgs))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.ApplicationModel.Activation.IPrelaunchActivatedEventArgs
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.ApplicationModel.Activation.IActivatedEventArgs.PreviousExecutionState")]
global::Windows.ApplicationModel.Activation.ApplicationExecutionState global::Windows.ApplicationModel.Activation.IActivatedEventArgs.get_PreviousExecutionState()
{
global::McgInterop.McgHelpers.FailFastForReducedMethod();
return default(global::Windows.ApplicationModel.Activation.ApplicationExecutionState);
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.ApplicationModel.Activation.IPrelaunchActivatedEventArgs.PrelaunchActivated")]
bool global::Windows.ApplicationModel.Activation.IPrelaunchActivatedEventArgs.get_PrelaunchActivated()
{
bool __retVal = global::Windows.ApplicationModel.Activation.IPrelaunchActivatedEventArgs__Impl.StubClass.get_PrelaunchActivated(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.ApplicationModel.Activation.IPrelaunchActivatedEventArgs'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.ApplicationModel.Activation.IPrelaunchActivatedEventArgs))]
public unsafe partial struct Vtbl
{
internal const int idx_get_PrelaunchActivated = 6;
}
}
// Windows.ApplicationModel.Activation.IViewSwitcherProvider
public unsafe static class IViewSwitcherProvider__Impl
{
// v-table for 'Windows.ApplicationModel.Activation.IViewSwitcherProvider'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.ApplicationModel.Activation.IViewSwitcherProvider))]
public unsafe partial struct Vtbl
{
}
}
// Windows.ApplicationModel.Activation.ILaunchActivatedEventArgs2
public unsafe static class ILaunchActivatedEventArgs2__Impl
{
// v-table for 'Windows.ApplicationModel.Activation.ILaunchActivatedEventArgs2'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.ApplicationModel.Activation.ILaunchActivatedEventArgs2))]
public unsafe partial struct Vtbl
{
}
}
// Windows.ApplicationModel.Activation.IActivatedEventArgsWithUser
public unsafe static class IActivatedEventArgsWithUser__Impl
{
// v-table for 'Windows.ApplicationModel.Activation.IActivatedEventArgsWithUser'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.ApplicationModel.Activation.IActivatedEventArgsWithUser))]
public unsafe partial struct Vtbl
{
}
}
// Windows.ApplicationModel.Activation.IFileActivatedEventArgs
public unsafe static class IFileActivatedEventArgs__Impl
{
// v-table for 'Windows.ApplicationModel.Activation.IFileActivatedEventArgs'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.ApplicationModel.Activation.IFileActivatedEventArgs))]
public unsafe partial struct Vtbl
{
}
}
// Windows.ApplicationModel.Activation.IFileActivatedEventArgsWithNeighboringFiles
public unsafe static class IFileActivatedEventArgsWithNeighboringFiles__Impl
{
// v-table for 'Windows.ApplicationModel.Activation.IFileActivatedEventArgsWithNeighboringFiles'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.ApplicationModel.Activation.IFileActivatedEventArgsWithNeighboringFiles))]
public unsafe partial struct Vtbl
{
}
}
// Windows.ApplicationModel.Activation.IFileActivatedEventArgsWithCallerPackageFamilyName
public unsafe static class IFileActivatedEventArgsWithCallerPackageFamilyName__Impl
{
// v-table for 'Windows.ApplicationModel.Activation.IFileActivatedEventArgsWithCallerPackageFamilyName'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.ApplicationModel.Activation.IFileActivatedEventArgsWithCallerPackageFamilyName))]
public unsafe partial struct Vtbl
{
}
}
// Windows.ApplicationModel.Activation.ISearchActivatedEventArgs
public unsafe static class ISearchActivatedEventArgs__Impl
{
// v-table for 'Windows.ApplicationModel.Activation.ISearchActivatedEventArgs'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.ApplicationModel.Activation.ISearchActivatedEventArgs))]
public unsafe partial struct Vtbl
{
}
}
// Windows.ApplicationModel.Activation.ISearchActivatedEventArgsWithLinguisticDetails
public unsafe static class ISearchActivatedEventArgsWithLinguisticDetails__Impl
{
// v-table for 'Windows.ApplicationModel.Activation.ISearchActivatedEventArgsWithLinguisticDetails'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.ApplicationModel.Activation.ISearchActivatedEventArgsWithLinguisticDetails))]
public unsafe partial struct Vtbl
{
}
}
// Windows.ApplicationModel.Activation.IShareTargetActivatedEventArgs
public unsafe static class IShareTargetActivatedEventArgs__Impl
{
// v-table for 'Windows.ApplicationModel.Activation.IShareTargetActivatedEventArgs'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.ApplicationModel.Activation.IShareTargetActivatedEventArgs))]
public unsafe partial struct Vtbl
{
}
}
// Windows.ApplicationModel.Activation.IFileOpenPickerActivatedEventArgs
public unsafe static class IFileOpenPickerActivatedEventArgs__Impl
{
// v-table for 'Windows.ApplicationModel.Activation.IFileOpenPickerActivatedEventArgs'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.ApplicationModel.Activation.IFileOpenPickerActivatedEventArgs))]
public unsafe partial struct Vtbl
{
}
}
// Windows.ApplicationModel.Activation.IFileOpenPickerActivatedEventArgs2
public unsafe static class IFileOpenPickerActivatedEventArgs2__Impl
{
// v-table for 'Windows.ApplicationModel.Activation.IFileOpenPickerActivatedEventArgs2'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.ApplicationModel.Activation.IFileOpenPickerActivatedEventArgs2))]
public unsafe partial struct Vtbl
{
}
}
// Windows.ApplicationModel.Activation.IFileSavePickerActivatedEventArgs
public unsafe static class IFileSavePickerActivatedEventArgs__Impl
{
// v-table for 'Windows.ApplicationModel.Activation.IFileSavePickerActivatedEventArgs'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.ApplicationModel.Activation.IFileSavePickerActivatedEventArgs))]
public unsafe partial struct Vtbl
{
}
}
// Windows.ApplicationModel.Activation.IFileSavePickerActivatedEventArgs2
public unsafe static class IFileSavePickerActivatedEventArgs2__Impl
{
// v-table for 'Windows.ApplicationModel.Activation.IFileSavePickerActivatedEventArgs2'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.ApplicationModel.Activation.IFileSavePickerActivatedEventArgs2))]
public unsafe partial struct Vtbl
{
}
}
// Windows.ApplicationModel.Activation.ICachedFileUpdaterActivatedEventArgs
public unsafe static class ICachedFileUpdaterActivatedEventArgs__Impl
{
// v-table for 'Windows.ApplicationModel.Activation.ICachedFileUpdaterActivatedEventArgs'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.ApplicationModel.Activation.ICachedFileUpdaterActivatedEventArgs))]
public unsafe partial struct Vtbl
{
}
}
// Windows.ApplicationModel.Activation.IBackgroundActivatedEventArgs
public unsafe static class IBackgroundActivatedEventArgs__Impl
{
// v-table for 'Windows.ApplicationModel.Activation.IBackgroundActivatedEventArgs'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.ApplicationModel.Activation.IBackgroundActivatedEventArgs))]
public unsafe partial struct Vtbl
{
}
}
}
namespace Windows.ApplicationModel.Core
{
// Windows.ApplicationModel.Core.ICoreApplicationView
public unsafe static class ICoreApplicationView__Impl
{
// StubClass for 'Windows.ApplicationModel.Core.ICoreApplicationView'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Core.CoreWindow get_CoreWindow(global::System.__ComObject __this)
{
global::Windows.UI.Core.CoreWindow __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.ApplicationModel.Core.ICoreApplicationView, global::Windows.UI.Core.CoreWindow>(
__this,
global::Windows.ApplicationModel.Core.ICoreApplicationView__Impl.Vtbl.idx_get_CoreWindow
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
}
// DispatchClass for 'Windows.ApplicationModel.Core.ICoreApplicationView'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.ApplicationModel.Core.ICoreApplicationView))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.ApplicationModel.Core.ICoreApplicationView
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.ApplicationModel.Core.ICoreApplicationView.CoreWindow")]
global::Windows.UI.Core.CoreWindow global::Windows.ApplicationModel.Core.ICoreApplicationView.get_CoreWindow()
{
global::Windows.UI.Core.CoreWindow __retVal = global::Windows.ApplicationModel.Core.ICoreApplicationView__Impl.StubClass.get_CoreWindow(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.ApplicationModel.Core.ICoreApplicationView'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.ApplicationModel.Core.ICoreApplicationView))]
public unsafe partial struct Vtbl
{
internal const int idx_get_CoreWindow = 6;
}
}
// Windows.ApplicationModel.Core.ICoreApplicationView2
public unsafe static class ICoreApplicationView2__Impl
{
// v-table for 'Windows.ApplicationModel.Core.ICoreApplicationView2'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.ApplicationModel.Core.ICoreApplicationView2))]
public unsafe partial struct Vtbl
{
}
}
// Windows.ApplicationModel.Core.ICoreApplicationView3
public unsafe static class ICoreApplicationView3__Impl
{
// v-table for 'Windows.ApplicationModel.Core.ICoreApplicationView3'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.ApplicationModel.Core.ICoreApplicationView3))]
public unsafe partial struct Vtbl
{
}
}
// Windows.ApplicationModel.Core.ICoreImmersiveApplication
public unsafe static class ICoreImmersiveApplication__Impl
{
// StubClass for 'Windows.ApplicationModel.Core.ICoreImmersiveApplication'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.ApplicationModel.Core.CoreApplicationView get_MainView(global::System.__ComObject __this)
{
global::Windows.ApplicationModel.Core.CoreApplicationView __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.ApplicationModel.Core.ICoreImmersiveApplication, global::Windows.ApplicationModel.Core.CoreApplicationView>(
__this,
global::Windows.ApplicationModel.Core.ICoreImmersiveApplication__Impl.Vtbl.idx_get_MainView
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
}
// DispatchClass for 'Windows.ApplicationModel.Core.ICoreImmersiveApplication'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.ApplicationModel.Core.ICoreImmersiveApplication))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.ApplicationModel.Core.ICoreImmersiveApplication
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.ApplicationModel.Core.ICoreImmersiveApplication.MainView")]
global::Windows.ApplicationModel.Core.CoreApplicationView global::Windows.ApplicationModel.Core.ICoreImmersiveApplication.get_MainView()
{
global::Windows.ApplicationModel.Core.CoreApplicationView __retVal = global::Windows.ApplicationModel.Core.ICoreImmersiveApplication__Impl.StubClass.get_MainView(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.ApplicationModel.Core.ICoreImmersiveApplication'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.ApplicationModel.Core.ICoreImmersiveApplication))]
public unsafe partial struct Vtbl
{
internal const int idx_get_MainView = 8;
}
}
}
namespace Windows.ApplicationModel.Resources.Core
{
// Windows.ApplicationModel.Resources.Core.IResourceMap
public unsafe static class IResourceMap__Impl
{
// StubClass for 'Windows.ApplicationModel.Resources.Core.IResourceMap'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.ApplicationModel.Resources.Core.ResourceCandidate GetValue(
global::System.__ComObject __this,
string resource,
global::Windows.ApplicationModel.Resources.Core.ResourceContext context)
{
global::Windows.ApplicationModel.Resources.Core.ResourceCandidate __ret = global::McgInterop.ForwardComSharedStubs.Func_string__TArg0__TResult__<global::Windows.ApplicationModel.Resources.Core.IResourceMap, global::Windows.ApplicationModel.Resources.Core.ResourceContext, global::Windows.ApplicationModel.Resources.Core.ResourceCandidate>(
__this,
resource,
context,
global::Windows.ApplicationModel.Resources.Core.IResourceMap__Impl.Vtbl.idx_GetValueForContext
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.ApplicationModel.Resources.Core.ResourceMap GetSubtree(
global::System.__ComObject __this,
string reference)
{
global::Windows.ApplicationModel.Resources.Core.ResourceMap __ret = global::McgInterop.ForwardComSharedStubs.Func_string__TResult__<global::Windows.ApplicationModel.Resources.Core.IResourceMap, global::Windows.ApplicationModel.Resources.Core.ResourceMap>(
__this,
reference,
global::Windows.ApplicationModel.Resources.Core.IResourceMap__Impl.Vtbl.idx_GetSubtree
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
}
// DispatchClass for 'Windows.ApplicationModel.Resources.Core.IResourceMap'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.ApplicationModel.Resources.Core.IResourceMap))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.ApplicationModel.Resources.Core.IResourceMap, global::System.Collections.Generic.IReadOnlyCollection<global::System.Collections.Generic.KeyValuePair<string, global::Windows.ApplicationModel.Resources.Core.NamedResource>>
{
int global::System.Collections.Generic.IReadOnlyCollection<global::System.Collections.Generic.KeyValuePair<string, global::Windows.ApplicationModel.Resources.Core.NamedResource>>.Count
{
get
{
return global::System.Runtime.InteropServices.WindowsRuntime.IMapViewSharedReferenceTypesRCWAdapter.Count_Get(this);
}
}
global::Windows.ApplicationModel.Resources.Core.NamedResource global::System.Collections.Generic.IReadOnlyDictionary<string, global::Windows.ApplicationModel.Resources.Core.NamedResource>.this[string index]
{
get
{
return global::System.Runtime.InteropServices.WindowsRuntime.IMapViewSharedReferenceTypesRCWAdapter.Indexer_Get(
this,
index
);
}
}
global::System.Collections.Generic.IEnumerable<string> global::System.Collections.Generic.IReadOnlyDictionary<string, global::Windows.ApplicationModel.Resources.Core.NamedResource>.Keys
{
get
{
return global::System.Runtime.InteropServices.WindowsRuntime.IMapViewSharedReferenceTypesRCWAdapter.Keys(this);
}
}
global::System.Collections.Generic.IEnumerable<global::Windows.ApplicationModel.Resources.Core.NamedResource> global::System.Collections.Generic.IReadOnlyDictionary<string, global::Windows.ApplicationModel.Resources.Core.NamedResource>.Values
{
get
{
return global::System.Runtime.InteropServices.WindowsRuntime.IMapViewSharedReferenceTypesRCWAdapter.Values(this);
}
}
bool global::System.Collections.Generic.IReadOnlyDictionary<string, global::Windows.ApplicationModel.Resources.Core.NamedResource>.ContainsKey(string key)
{
return global::System.Runtime.InteropServices.WindowsRuntime.IMapViewSharedReferenceTypesRCWAdapter.ContainsKey(
this,
key
);
}
bool global::System.Collections.Generic.IReadOnlyDictionary<string, global::Windows.ApplicationModel.Resources.Core.NamedResource>.TryGetValue(
string key,
out global::Windows.ApplicationModel.Resources.Core.NamedResource value)
{
return global::System.Runtime.InteropServices.WindowsRuntime.IMapViewSharedReferenceTypesRCWAdapter.TryGetValue(
this,
key,
out value
);
}
global::System.Collections.Generic.IEnumerator<global::System.Collections.Generic.KeyValuePair<string, global::Windows.ApplicationModel.Resources.Core.NamedResource>> global::System.Collections.Generic.IEnumerable<global::System.Collections.Generic.KeyValuePair<string, global::Windows.ApplicationModel.Resources.Core.NamedResource>>.GetEnumerator()
{
return (global::System.Collections.Generic.IEnumerator<global::System.Collections.Generic.KeyValuePair<string, global::Windows.ApplicationModel.Resources.Core.NamedResource>>)global::McgInterop.McgHelpers.GetGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::System.Collections.Generic.KeyValuePair<string, global::Windows.ApplicationModel.Resources.Core.NamedResource>>).TypeHandle
);
}
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return global::McgInterop.McgHelpers.GetNonGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::System.Collections.Generic.KeyValuePair<string, global::Windows.ApplicationModel.Resources.Core.NamedResource>>).TypeHandle
);
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
global::Windows.ApplicationModel.Resources.Core.ResourceCandidate global::Windows.ApplicationModel.Resources.Core.IResourceMap.GetValue(
string resource,
global::Windows.ApplicationModel.Resources.Core.ResourceContext context)
{
global::Windows.ApplicationModel.Resources.Core.ResourceCandidate __retVal = global::Windows.ApplicationModel.Resources.Core.IResourceMap__Impl.StubClass.GetValue(
this,
resource,
context
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
global::Windows.ApplicationModel.Resources.Core.ResourceMap global::Windows.ApplicationModel.Resources.Core.IResourceMap.GetSubtree(string reference)
{
global::Windows.ApplicationModel.Resources.Core.ResourceMap __retVal = global::Windows.ApplicationModel.Resources.Core.IResourceMap__Impl.StubClass.GetSubtree(
this,
reference
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.ApplicationModel.Resources.Core.IResourceMap'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.ApplicationModel.Resources.Core.IResourceMap))]
public unsafe partial struct Vtbl
{
internal const int idx_GetValueForContext = 8;
internal const int idx_GetSubtree = 9;
}
}
// Windows.ApplicationModel.Resources.Core.INamedResource
public unsafe static class INamedResource__Impl
{
// v-table for 'Windows.ApplicationModel.Resources.Core.INamedResource'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.ApplicationModel.Resources.Core.INamedResource))]
public unsafe partial struct Vtbl
{
}
}
// Windows.ApplicationModel.Resources.Core.IResourceContextStatics2
public unsafe static class IResourceContextStatics2__Impl
{
// StubClass for 'Windows.ApplicationModel.Resources.Core.IResourceContextStatics2'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.ApplicationModel.Resources.Core.ResourceContext GetForViewIndependentUse(global::System.__ComObject __this)
{
global::Windows.ApplicationModel.Resources.Core.ResourceContext __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.ApplicationModel.Resources.Core.IResourceContextStatics2, global::Windows.ApplicationModel.Resources.Core.ResourceContext>(
__this,
global::Windows.ApplicationModel.Resources.Core.IResourceContextStatics2__Impl.Vtbl.idx_GetForViewIndependentUse
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
}
// DispatchClass for 'Windows.ApplicationModel.Resources.Core.IResourceContextStatics2'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.ApplicationModel.Resources.Core.IResourceContextStatics2))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.ApplicationModel.Resources.Core.IResourceContextStatics2
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
global::Windows.ApplicationModel.Resources.Core.ResourceContext global::Windows.ApplicationModel.Resources.Core.IResourceContextStatics2.GetForViewIndependentUse()
{
global::Windows.ApplicationModel.Resources.Core.ResourceContext __retVal = global::Windows.ApplicationModel.Resources.Core.IResourceContextStatics2__Impl.StubClass.GetForViewIndependentUse(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.ApplicationModel.Resources.Core.IResourceContextStatics2'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.ApplicationModel.Resources.Core.IResourceContextStatics2))]
public unsafe partial struct Vtbl
{
internal const int idx_GetForViewIndependentUse = 10;
}
}
// Windows.ApplicationModel.Resources.Core.IResourceContext
public unsafe static class IResourceContext__Impl
{
// StubClass for 'Windows.ApplicationModel.Resources.Core.IResourceContext'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.Foundation.Collections.IObservableMap<string, string> get_QualifierValues(global::System.__ComObject __this)
{
global::Windows.Foundation.Collections.IObservableMap<string, string> __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.ApplicationModel.Resources.Core.IResourceContext, global::Windows.Foundation.Collections.IObservableMap<string, string>>(
__this,
global::Windows.ApplicationModel.Resources.Core.IResourceContext__Impl.Vtbl.idx_get_QualifierValues
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Collections.Generic.IReadOnlyList<string> get_Languages(global::System.__ComObject __this)
{
global::System.Collections.Generic.IReadOnlyList<string> __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.ApplicationModel.Resources.Core.IResourceContext, global::System.Collections.Generic.IReadOnlyList<string>>(
__this,
global::Windows.ApplicationModel.Resources.Core.IResourceContext__Impl.Vtbl.idx_get_Languages
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void put_Languages(
global::System.__ComObject __this,
global::System.Collections.Generic.IReadOnlyList<string> languages)
{
global::McgInterop.ForwardComSharedStubs.Proc_TArg0__<global::Windows.ApplicationModel.Resources.Core.IResourceContext, global::System.Collections.Generic.IReadOnlyList<string>>(
__this,
languages,
global::Windows.ApplicationModel.Resources.Core.IResourceContext__Impl.Vtbl.idx_put_Languages
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// DispatchClass for 'Windows.ApplicationModel.Resources.Core.IResourceContext'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.ApplicationModel.Resources.Core.IResourceContext))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.ApplicationModel.Resources.Core.IResourceContext
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.ApplicationModel.Resources.Core.IResourceContext.QualifierValues")]
global::Windows.Foundation.Collections.IObservableMap<string, string> global::Windows.ApplicationModel.Resources.Core.IResourceContext.get_QualifierValues()
{
global::Windows.Foundation.Collections.IObservableMap<string, string> __retVal = global::Windows.ApplicationModel.Resources.Core.IResourceContext__Impl.StubClass.get_QualifierValues(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.ApplicationModel.Resources.Core.IResourceContext.Languages")]
global::System.Collections.Generic.IReadOnlyList<string> global::Windows.ApplicationModel.Resources.Core.IResourceContext.get_Languages()
{
global::System.Collections.Generic.IReadOnlyList<string> __retVal = global::Windows.ApplicationModel.Resources.Core.IResourceContext__Impl.StubClass.get_Languages(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertySet, "Windows.ApplicationModel.Resources.Core.IResourceContext.Languages")]
void global::Windows.ApplicationModel.Resources.Core.IResourceContext.put_Languages(global::System.Collections.Generic.IReadOnlyList<string> languages)
{
global::Windows.ApplicationModel.Resources.Core.IResourceContext__Impl.StubClass.put_Languages(
this,
languages
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// v-table for 'Windows.ApplicationModel.Resources.Core.IResourceContext'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.ApplicationModel.Resources.Core.IResourceContext))]
public unsafe partial struct Vtbl
{
internal const int idx_get_QualifierValues = 6;
internal const int idx_get_Languages = 11;
internal const int idx_put_Languages = 12;
}
}
// Windows.ApplicationModel.Resources.Core.IResourceCandidate
public unsafe static class IResourceCandidate__Impl
{
// StubClass for 'Windows.ApplicationModel.Resources.Core.IResourceCandidate'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static string get_ValueAsString(global::System.__ComObject __this)
{
string __ret = global::McgInterop.ForwardComSharedStubs.Func_string__<global::Windows.ApplicationModel.Resources.Core.IResourceCandidate>(
__this,
global::Windows.ApplicationModel.Resources.Core.IResourceCandidate__Impl.Vtbl.idx_get_ValueAsString
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
}
// DispatchClass for 'Windows.ApplicationModel.Resources.Core.IResourceCandidate'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.ApplicationModel.Resources.Core.IResourceCandidate))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.ApplicationModel.Resources.Core.IResourceCandidate
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.ApplicationModel.Resources.Core.IResourceCandidate.ValueAsString")]
string global::Windows.ApplicationModel.Resources.Core.IResourceCandidate.get_ValueAsString()
{
string __retVal = global::Windows.ApplicationModel.Resources.Core.IResourceCandidate__Impl.StubClass.get_ValueAsString(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.ApplicationModel.Resources.Core.IResourceCandidate'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.ApplicationModel.Resources.Core.IResourceCandidate))]
public unsafe partial struct Vtbl
{
internal const int idx_get_ValueAsString = 10;
}
}
// Windows.ApplicationModel.Resources.Core.IResourceCandidate2
public unsafe static class IResourceCandidate2__Impl
{
// v-table for 'Windows.ApplicationModel.Resources.Core.IResourceCandidate2'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.ApplicationModel.Resources.Core.IResourceCandidate2))]
public unsafe partial struct Vtbl
{
}
}
// Windows.ApplicationModel.Resources.Core.IResourceManagerStatics
public unsafe static class IResourceManagerStatics__Impl
{
// StubClass for 'Windows.ApplicationModel.Resources.Core.IResourceManagerStatics'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.ApplicationModel.Resources.Core.ResourceManager get_Current(global::System.__ComObject __this)
{
global::Windows.ApplicationModel.Resources.Core.ResourceManager __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.ApplicationModel.Resources.Core.IResourceManagerStatics, global::Windows.ApplicationModel.Resources.Core.ResourceManager>(
__this,
global::Windows.ApplicationModel.Resources.Core.IResourceManagerStatics__Impl.Vtbl.idx_get_Current
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
}
// DispatchClass for 'Windows.ApplicationModel.Resources.Core.IResourceManagerStatics'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.ApplicationModel.Resources.Core.IResourceManagerStatics))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.ApplicationModel.Resources.Core.IResourceManagerStatics
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.ApplicationModel.Resources.Core.IResourceManagerStatics.Current")]
global::Windows.ApplicationModel.Resources.Core.ResourceManager global::Windows.ApplicationModel.Resources.Core.IResourceManagerStatics.get_Current()
{
global::Windows.ApplicationModel.Resources.Core.ResourceManager __retVal = global::Windows.ApplicationModel.Resources.Core.IResourceManagerStatics__Impl.StubClass.get_Current(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.ApplicationModel.Resources.Core.IResourceManagerStatics'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.ApplicationModel.Resources.Core.IResourceManagerStatics))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Current = 6;
}
}
// Windows.ApplicationModel.Resources.Core.IResourceManager
public unsafe static class IResourceManager__Impl
{
// StubClass for 'Windows.ApplicationModel.Resources.Core.IResourceManager'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.ApplicationModel.Resources.Core.ResourceMap get_MainResourceMap(global::System.__ComObject __this)
{
global::Windows.ApplicationModel.Resources.Core.ResourceMap __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.ApplicationModel.Resources.Core.IResourceManager, global::Windows.ApplicationModel.Resources.Core.ResourceMap>(
__this,
global::Windows.ApplicationModel.Resources.Core.IResourceManager__Impl.Vtbl.idx_get_MainResourceMap
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
}
// DispatchClass for 'Windows.ApplicationModel.Resources.Core.IResourceManager'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.ApplicationModel.Resources.Core.IResourceManager))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.ApplicationModel.Resources.Core.IResourceManager
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.ApplicationModel.Resources.Core.IResourceManager.MainResourceMap")]
global::Windows.ApplicationModel.Resources.Core.ResourceMap global::Windows.ApplicationModel.Resources.Core.IResourceManager.get_MainResourceMap()
{
global::Windows.ApplicationModel.Resources.Core.ResourceMap __retVal = global::Windows.ApplicationModel.Resources.Core.IResourceManager__Impl.StubClass.get_MainResourceMap(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.ApplicationModel.Resources.Core.IResourceManager'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.ApplicationModel.Resources.Core.IResourceManager))]
public unsafe partial struct Vtbl
{
internal const int idx_get_MainResourceMap = 6;
}
}
// Windows.ApplicationModel.Resources.Core.IResourceManager2
public unsafe static class IResourceManager2__Impl
{
// v-table for 'Windows.ApplicationModel.Resources.Core.IResourceManager2'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.ApplicationModel.Resources.Core.IResourceManager2))]
public unsafe partial struct Vtbl
{
}
}
}
namespace Windows.Devices
{
// Windows.Devices.DevicesLowLevelContract
public unsafe static class DevicesLowLevelContract__Impl
{
}
}
namespace Windows.Devices.Enumeration
{
// Windows.Devices.Enumeration.IDeviceInformationStatics
public unsafe static class IDeviceInformationStatics__Impl
{
// StubClass for 'Windows.Devices.Enumeration.IDeviceInformationStatics'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.Foundation.IAsyncOperation<global::Windows.Devices.Enumeration.DeviceInformationCollection> FindAllAsync(
global::System.__ComObject __this,
string aqsFilter)
{
global::Windows.Foundation.IAsyncOperation<global::Windows.Devices.Enumeration.DeviceInformationCollection> __ret = global::McgInterop.ForwardComSharedStubs.Func_string__TResult__<global::Windows.Devices.Enumeration.IDeviceInformationStatics, global::Windows.Foundation.IAsyncOperation<global::Windows.Devices.Enumeration.DeviceInformationCollection>>(
__this,
aqsFilter,
global::Windows.Devices.Enumeration.IDeviceInformationStatics__Impl.Vtbl.idx_FindAllAsyncAqsFilter
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
}
// DispatchClass for 'Windows.Devices.Enumeration.IDeviceInformationStatics'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Devices.Enumeration.IDeviceInformationStatics))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Devices.Enumeration.IDeviceInformationStatics
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
global::Windows.Foundation.IAsyncOperation<global::Windows.Devices.Enumeration.DeviceInformationCollection> global::Windows.Devices.Enumeration.IDeviceInformationStatics.FindAllAsync(string aqsFilter)
{
global::Windows.Foundation.IAsyncOperation<global::Windows.Devices.Enumeration.DeviceInformationCollection> __retVal = global::Windows.Devices.Enumeration.IDeviceInformationStatics__Impl.StubClass.FindAllAsync(
this,
aqsFilter
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.Devices.Enumeration.IDeviceInformationStatics'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Devices.Enumeration.IDeviceInformationStatics))]
public unsafe partial struct Vtbl
{
internal const int idx_FindAllAsyncAqsFilter = 10;
}
}
// Windows.Devices.Enumeration.IDeviceInformation
public unsafe static class IDeviceInformation__Impl
{
// StubClass for 'Windows.Devices.Enumeration.IDeviceInformation'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static string get_Id(global::System.__ComObject __this)
{
string __ret = global::McgInterop.ForwardComSharedStubs.Func_string__<global::Windows.Devices.Enumeration.IDeviceInformation>(
__this,
global::Windows.Devices.Enumeration.IDeviceInformation__Impl.Vtbl.idx_get_Id
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
}
// DispatchClass for 'Windows.Devices.Enumeration.IDeviceInformation'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Devices.Enumeration.IDeviceInformation))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Devices.Enumeration.IDeviceInformation
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Devices.Enumeration.IDeviceInformation.Id")]
string global::Windows.Devices.Enumeration.IDeviceInformation.get_Id()
{
string __retVal = global::Windows.Devices.Enumeration.IDeviceInformation__Impl.StubClass.get_Id(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.Devices.Enumeration.IDeviceInformation'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Devices.Enumeration.IDeviceInformation))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Id = 6;
}
}
// Windows.Devices.Enumeration.IDeviceInformation2
public unsafe static class IDeviceInformation2__Impl
{
// v-table for 'Windows.Devices.Enumeration.IDeviceInformation2'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Devices.Enumeration.IDeviceInformation2))]
public unsafe partial struct Vtbl
{
}
}
}
namespace Windows.Devices.Gpio
{
// Windows.Devices.Gpio.IGpioControllerStatics
public unsafe static class IGpioControllerStatics__Impl
{
// StubClass for 'Windows.Devices.Gpio.IGpioControllerStatics'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.Devices.Gpio.GpioController GetDefault(global::System.__ComObject __this)
{
global::Windows.Devices.Gpio.GpioController __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.Devices.Gpio.IGpioControllerStatics, global::Windows.Devices.Gpio.GpioController>(
__this,
global::Windows.Devices.Gpio.IGpioControllerStatics__Impl.Vtbl.idx_GetDefault
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
}
// DispatchClass for 'Windows.Devices.Gpio.IGpioControllerStatics'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Devices.Gpio.IGpioControllerStatics))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Devices.Gpio.IGpioControllerStatics
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
global::Windows.Devices.Gpio.GpioController global::Windows.Devices.Gpio.IGpioControllerStatics.GetDefault()
{
global::Windows.Devices.Gpio.GpioController __retVal = global::Windows.Devices.Gpio.IGpioControllerStatics__Impl.StubClass.GetDefault(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.Devices.Gpio.IGpioControllerStatics'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Devices.Gpio.IGpioControllerStatics))]
public unsafe partial struct Vtbl
{
internal const int idx_GetDefault = 6;
}
}
// Windows.Devices.Gpio.IGpioController
public unsafe static class IGpioController__Impl
{
// StubClass for 'Windows.Devices.Gpio.IGpioController'
public static partial class StubClass
{
// Signature, Windows.Devices.Gpio.IGpioController.TryOpenPin, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.BlittableValueMarshaller] int__int, [fwd] [in] [Mcg.CodeGen.EnumMarshaller] -> int, [fwd] [out] [managedbyref] [nativebyref] [Mcg.CodeGen.WinRTClassMarshaller] Windows_Devices_Gpio_GpioPin__Windows_Devices_Gpio__GpioPin *, [fwd] [out] [managedbyref] [nativebyref] [Mcg.CodeGen.EnumMarshaller] Windows_Devices_Gpio_GpioOpenStatus__Windows_Devices_Gpio__GpioOpenStatus, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.CBoolMarshaller] bool__bool,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool TryOpenPin(
global::System.__ComObject __this,
int pinNumber,
global::Windows.Devices.Gpio.GpioSharingMode sharingMode,
out global::Windows.Devices.Gpio.GpioPin pin,
out global::Windows.Devices.Gpio.GpioOpenStatus openStatus)
{
// Setup
global::Windows.Devices.Gpio.IGpioPin__Impl.Vtbl** unsafe_pin = default(global::Windows.Devices.Gpio.IGpioPin__Impl.Vtbl**);
global::Windows.Devices.Gpio.GpioOpenStatus unsafe_openStatus;
bool succeeded__retval;
sbyte unsafe_succeeded__retval;
int unsafe___return__;
try
{
// Marshalling
unsafe_pin = null;
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.Devices.Gpio.IGpioController).TypeHandle,
global::Windows.Devices.Gpio.IGpioController__Impl.Vtbl.idx_TryOpenPin,
pinNumber,
((int)sharingMode),
&(unsafe_pin),
&(unsafe_openStatus),
&(unsafe_succeeded__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
succeeded__retval = unsafe_succeeded__retval != 0;
openStatus = unsafe_openStatus;
pin = (global::Windows.Devices.Gpio.GpioPin)global::System.Runtime.InteropServices.McgModuleManager.ComInterfaceToObject(
((global::System.IntPtr)unsafe_pin),
typeof(global::Windows.Devices.Gpio.GpioPin).TypeHandle
);
// Return
return succeeded__retval;
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_pin)));
}
}
}
// DispatchClass for 'Windows.Devices.Gpio.IGpioController'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Devices.Gpio.IGpioController))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Devices.Gpio.IGpioController
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
bool global::Windows.Devices.Gpio.IGpioController.TryOpenPin(
int pinNumber,
global::Windows.Devices.Gpio.GpioSharingMode sharingMode,
out global::Windows.Devices.Gpio.GpioPin pin,
out global::Windows.Devices.Gpio.GpioOpenStatus openStatus)
{
bool __retVal = global::Windows.Devices.Gpio.IGpioController__Impl.StubClass.TryOpenPin(
this,
pinNumber,
sharingMode,
out pin,
out openStatus
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.Devices.Gpio.IGpioController'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Devices.Gpio.IGpioController))]
public unsafe partial struct Vtbl
{
internal const int idx_TryOpenPin = 9;
}
}
// Windows.Devices.Gpio.IGpioPin
public unsafe static class IGpioPin__Impl
{
// StubClass for 'Windows.Devices.Gpio.IGpioPin'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void SetDriveMode(
global::System.__ComObject __this,
global::Windows.Devices.Gpio.GpioPinDriveMode value)
{
global::McgInterop.ForwardComSharedStubs.Proc_int<global::Windows.Devices.Gpio.IGpioPin>(
__this,
((int)value),
global::Windows.Devices.Gpio.IGpioPin__Impl.Vtbl.idx_SetDriveMode
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void Write(
global::System.__ComObject __this,
global::Windows.Devices.Gpio.GpioPinValue value)
{
global::McgInterop.ForwardComSharedStubs.Proc_int<global::Windows.Devices.Gpio.IGpioPin>(
__this,
((int)value),
global::Windows.Devices.Gpio.IGpioPin__Impl.Vtbl.idx_Write
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// DispatchClass for 'Windows.Devices.Gpio.IGpioPin'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Devices.Gpio.IGpioPin))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Devices.Gpio.IGpioPin
{
public virtual void Dispose()
{
global::System.IDisposable__Impl.StubClass.Close(this);
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.Devices.Gpio.IGpioPin.SetDriveMode(global::Windows.Devices.Gpio.GpioPinDriveMode value)
{
global::Windows.Devices.Gpio.IGpioPin__Impl.StubClass.SetDriveMode(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.Devices.Gpio.IGpioPin.Write(global::Windows.Devices.Gpio.GpioPinValue value)
{
global::Windows.Devices.Gpio.IGpioPin__Impl.StubClass.Write(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// v-table for 'Windows.Devices.Gpio.IGpioPin'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Devices.Gpio.IGpioPin))]
public unsafe partial struct Vtbl
{
internal const int idx_SetDriveMode = 14;
internal const int idx_Write = 15;
}
}
}
namespace Windows.Devices.I2c
{
// Windows.Devices.I2c.II2cDeviceStatics
public unsafe static class II2cDeviceStatics__Impl
{
// StubClass for 'Windows.Devices.I2c.II2cDeviceStatics'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static string GetDeviceSelector(
global::System.__ComObject __this,
string friendlyName)
{
string __ret = global::McgInterop.ForwardComSharedStubs.Func_string__string__<global::Windows.Devices.I2c.II2cDeviceStatics>(
__this,
friendlyName,
global::Windows.Devices.I2c.II2cDeviceStatics__Impl.Vtbl.idx_GetDeviceSelectorFromFriendlyName
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.Foundation.IAsyncOperation<global::Windows.Devices.I2c.I2cDevice> FromIdAsync(
global::System.__ComObject __this,
string deviceId,
global::Windows.Devices.I2c.I2cConnectionSettings settings)
{
global::Windows.Foundation.IAsyncOperation<global::Windows.Devices.I2c.I2cDevice> __ret = global::McgInterop.ForwardComSharedStubs.Func_string__TArg0__TResult__<global::Windows.Devices.I2c.II2cDeviceStatics, global::Windows.Devices.I2c.I2cConnectionSettings, global::Windows.Foundation.IAsyncOperation<global::Windows.Devices.I2c.I2cDevice>>(
__this,
deviceId,
settings,
global::Windows.Devices.I2c.II2cDeviceStatics__Impl.Vtbl.idx_FromIdAsync
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
}
// DispatchClass for 'Windows.Devices.I2c.II2cDeviceStatics'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Devices.I2c.II2cDeviceStatics))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Devices.I2c.II2cDeviceStatics
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
string global::Windows.Devices.I2c.II2cDeviceStatics.GetDeviceSelector(string friendlyName)
{
string __retVal = global::Windows.Devices.I2c.II2cDeviceStatics__Impl.StubClass.GetDeviceSelector(
this,
friendlyName
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
global::Windows.Foundation.IAsyncOperation<global::Windows.Devices.I2c.I2cDevice> global::Windows.Devices.I2c.II2cDeviceStatics.FromIdAsync(
string deviceId,
global::Windows.Devices.I2c.I2cConnectionSettings settings)
{
global::Windows.Foundation.IAsyncOperation<global::Windows.Devices.I2c.I2cDevice> __retVal = global::Windows.Devices.I2c.II2cDeviceStatics__Impl.StubClass.FromIdAsync(
this,
deviceId,
settings
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.Devices.I2c.II2cDeviceStatics'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Devices.I2c.II2cDeviceStatics))]
public unsafe partial struct Vtbl
{
internal const int idx_GetDeviceSelectorFromFriendlyName = 7;
internal const int idx_FromIdAsync = 8;
}
}
// Windows.Devices.I2c.II2cConnectionSettingsFactory
public unsafe static class II2cConnectionSettingsFactory__Impl
{
// StubClass for 'Windows.Devices.I2c.II2cConnectionSettingsFactory'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.IntPtr Create(
global::System.__ComObject __this,
int slaveAddress)
{
global::System.IntPtr __ret = global::McgInterop.ForwardComSharedStubs.Func_int__IntPtr__<global::Windows.Devices.I2c.II2cConnectionSettingsFactory>(
__this,
slaveAddress,
global::Windows.Devices.I2c.II2cConnectionSettingsFactory__Impl.Vtbl.idx_Create
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
}
// DispatchClass for 'Windows.Devices.I2c.II2cConnectionSettingsFactory'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Devices.I2c.II2cConnectionSettingsFactory))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Devices.I2c.II2cConnectionSettingsFactory
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
global::System.IntPtr global::Windows.Devices.I2c.II2cConnectionSettingsFactory.Create(int slaveAddress)
{
global::System.IntPtr __retVal = global::Windows.Devices.I2c.II2cConnectionSettingsFactory__Impl.StubClass.Create(
this,
slaveAddress
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.Devices.I2c.II2cConnectionSettingsFactory'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Devices.I2c.II2cConnectionSettingsFactory))]
public unsafe partial struct Vtbl
{
internal const int idx_Create = 6;
}
}
// Windows.Devices.I2c.II2cConnectionSettings
public unsafe static class II2cConnectionSettings__Impl
{
// StubClass for 'Windows.Devices.I2c.II2cConnectionSettings'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void put_BusSpeed(
global::System.__ComObject __this,
global::Windows.Devices.I2c.I2cBusSpeed value)
{
global::McgInterop.ForwardComSharedStubs.Proc_int<global::Windows.Devices.I2c.II2cConnectionSettings>(
__this,
((int)value),
global::Windows.Devices.I2c.II2cConnectionSettings__Impl.Vtbl.idx_put_BusSpeed
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// DispatchClass for 'Windows.Devices.I2c.II2cConnectionSettings'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Devices.I2c.II2cConnectionSettings))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Devices.I2c.II2cConnectionSettings
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertySet, "Windows.Devices.I2c.II2cConnectionSettings.BusSpeed")]
void global::Windows.Devices.I2c.II2cConnectionSettings.put_BusSpeed(global::Windows.Devices.I2c.I2cBusSpeed value)
{
global::Windows.Devices.I2c.II2cConnectionSettings__Impl.StubClass.put_BusSpeed(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// v-table for 'Windows.Devices.I2c.II2cConnectionSettings'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Devices.I2c.II2cConnectionSettings))]
public unsafe partial struct Vtbl
{
internal const int idx_put_BusSpeed = 9;
}
}
// Windows.Devices.I2c.II2cDevice
public unsafe static class II2cDevice__Impl
{
// StubClass for 'Windows.Devices.I2c.II2cDevice'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void Write(
global::System.__ComObject __this,
byte[] buffer)
{
global::McgInterop.ForwardComSharedStubs.Proc_rg_byte__<global::Windows.Devices.I2c.II2cDevice>(
__this,
buffer,
global::Windows.Devices.I2c.II2cDevice__Impl.Vtbl.idx_Write
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void WriteRead(
global::System.__ComObject __this,
byte[] writeBuffer,
byte[] readBuffer)
{
global::McgInterop.ForwardComSharedStubs.Proc_rg_byte__out_rg_byte__<global::Windows.Devices.I2c.II2cDevice>(
__this,
writeBuffer,
readBuffer,
global::Windows.Devices.I2c.II2cDevice__Impl.Vtbl.idx_WriteRead
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// DispatchClass for 'Windows.Devices.I2c.II2cDevice'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Devices.I2c.II2cDevice))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Devices.I2c.II2cDevice
{
public virtual void Dispose()
{
global::System.IDisposable__Impl.StubClass.Close(this);
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.Devices.I2c.II2cDevice.Write(byte[] buffer)
{
global::Windows.Devices.I2c.II2cDevice__Impl.StubClass.Write(
this,
buffer
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.Devices.I2c.II2cDevice.WriteRead(
byte[] writeBuffer,
byte[] readBuffer)
{
global::Windows.Devices.I2c.II2cDevice__Impl.StubClass.WriteRead(
this,
writeBuffer,
readBuffer
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// v-table for 'Windows.Devices.I2c.II2cDevice'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Devices.I2c.II2cDevice))]
public unsafe partial struct Vtbl
{
internal const int idx_Write = 8;
internal const int idx_WriteRead = 12;
}
}
}
namespace Windows.Devices.Spi
{
// Windows.Devices.Spi.ISpiConnectionSettingsFactory
public unsafe static class ISpiConnectionSettingsFactory__Impl
{
// StubClass for 'Windows.Devices.Spi.ISpiConnectionSettingsFactory'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.IntPtr Create(
global::System.__ComObject __this,
int chipSelectLine)
{
global::System.IntPtr __ret = global::McgInterop.ForwardComSharedStubs.Func_int__IntPtr__<global::Windows.Devices.Spi.ISpiConnectionSettingsFactory>(
__this,
chipSelectLine,
global::Windows.Devices.Spi.ISpiConnectionSettingsFactory__Impl.Vtbl.idx_Create
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
}
// DispatchClass for 'Windows.Devices.Spi.ISpiConnectionSettingsFactory'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Devices.Spi.ISpiConnectionSettingsFactory))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Devices.Spi.ISpiConnectionSettingsFactory
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
global::System.IntPtr global::Windows.Devices.Spi.ISpiConnectionSettingsFactory.Create(int chipSelectLine)
{
global::System.IntPtr __retVal = global::Windows.Devices.Spi.ISpiConnectionSettingsFactory__Impl.StubClass.Create(
this,
chipSelectLine
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.Devices.Spi.ISpiConnectionSettingsFactory'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Devices.Spi.ISpiConnectionSettingsFactory))]
public unsafe partial struct Vtbl
{
internal const int idx_Create = 6;
}
}
// Windows.Devices.Spi.ISpiConnectionSettings
public unsafe static class ISpiConnectionSettings__Impl
{
// StubClass for 'Windows.Devices.Spi.ISpiConnectionSettings'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void put_Mode(
global::System.__ComObject __this,
global::Windows.Devices.Spi.SpiMode value)
{
global::McgInterop.ForwardComSharedStubs.Proc_int<global::Windows.Devices.Spi.ISpiConnectionSettings>(
__this,
((int)value),
global::Windows.Devices.Spi.ISpiConnectionSettings__Impl.Vtbl.idx_put_Mode
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void put_ClockFrequency(
global::System.__ComObject __this,
int value)
{
global::McgInterop.ForwardComSharedStubs.Proc_int__<global::Windows.Devices.Spi.ISpiConnectionSettings>(
__this,
value,
global::Windows.Devices.Spi.ISpiConnectionSettings__Impl.Vtbl.idx_put_ClockFrequency
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// DispatchClass for 'Windows.Devices.Spi.ISpiConnectionSettings'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Devices.Spi.ISpiConnectionSettings))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Devices.Spi.ISpiConnectionSettings
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertySet, "Windows.Devices.Spi.ISpiConnectionSettings.Mode")]
void global::Windows.Devices.Spi.ISpiConnectionSettings.put_Mode(global::Windows.Devices.Spi.SpiMode value)
{
global::Windows.Devices.Spi.ISpiConnectionSettings__Impl.StubClass.put_Mode(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertySet, "Windows.Devices.Spi.ISpiConnectionSettings.ClockFrequency")]
void global::Windows.Devices.Spi.ISpiConnectionSettings.put_ClockFrequency(int value)
{
global::Windows.Devices.Spi.ISpiConnectionSettings__Impl.StubClass.put_ClockFrequency(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// v-table for 'Windows.Devices.Spi.ISpiConnectionSettings'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Devices.Spi.ISpiConnectionSettings))]
public unsafe partial struct Vtbl
{
internal const int idx_put_Mode = 9;
internal const int idx_put_ClockFrequency = 13;
}
}
// Windows.Devices.Spi.ISpiDeviceStatics
public unsafe static class ISpiDeviceStatics__Impl
{
// StubClass for 'Windows.Devices.Spi.ISpiDeviceStatics'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static string GetDeviceSelector(
global::System.__ComObject __this,
string friendlyName)
{
string __ret = global::McgInterop.ForwardComSharedStubs.Func_string__string__<global::Windows.Devices.Spi.ISpiDeviceStatics>(
__this,
friendlyName,
global::Windows.Devices.Spi.ISpiDeviceStatics__Impl.Vtbl.idx_GetDeviceSelectorFromFriendlyName
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.Foundation.IAsyncOperation<global::Windows.Devices.Spi.SpiDevice> FromIdAsync(
global::System.__ComObject __this,
string busId,
global::Windows.Devices.Spi.SpiConnectionSettings settings)
{
global::Windows.Foundation.IAsyncOperation<global::Windows.Devices.Spi.SpiDevice> __ret = global::McgInterop.ForwardComSharedStubs.Func_string__TArg0__TResult__<global::Windows.Devices.Spi.ISpiDeviceStatics, global::Windows.Devices.Spi.SpiConnectionSettings, global::Windows.Foundation.IAsyncOperation<global::Windows.Devices.Spi.SpiDevice>>(
__this,
busId,
settings,
global::Windows.Devices.Spi.ISpiDeviceStatics__Impl.Vtbl.idx_FromIdAsync
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
}
// DispatchClass for 'Windows.Devices.Spi.ISpiDeviceStatics'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Devices.Spi.ISpiDeviceStatics))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Devices.Spi.ISpiDeviceStatics
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
string global::Windows.Devices.Spi.ISpiDeviceStatics.GetDeviceSelector(string friendlyName)
{
string __retVal = global::Windows.Devices.Spi.ISpiDeviceStatics__Impl.StubClass.GetDeviceSelector(
this,
friendlyName
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
global::Windows.Foundation.IAsyncOperation<global::Windows.Devices.Spi.SpiDevice> global::Windows.Devices.Spi.ISpiDeviceStatics.FromIdAsync(
string busId,
global::Windows.Devices.Spi.SpiConnectionSettings settings)
{
global::Windows.Foundation.IAsyncOperation<global::Windows.Devices.Spi.SpiDevice> __retVal = global::Windows.Devices.Spi.ISpiDeviceStatics__Impl.StubClass.FromIdAsync(
this,
busId,
settings
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.Devices.Spi.ISpiDeviceStatics'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Devices.Spi.ISpiDeviceStatics))]
public unsafe partial struct Vtbl
{
internal const int idx_GetDeviceSelectorFromFriendlyName = 7;
internal const int idx_FromIdAsync = 9;
}
}
// Windows.Devices.Spi.ISpiDevice
public unsafe static class ISpiDevice__Impl
{
// StubClass for 'Windows.Devices.Spi.ISpiDevice'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void Write(
global::System.__ComObject __this,
byte[] buffer)
{
global::McgInterop.ForwardComSharedStubs.Proc_rg_byte__<global::Windows.Devices.Spi.ISpiDevice>(
__this,
buffer,
global::Windows.Devices.Spi.ISpiDevice__Impl.Vtbl.idx_Write
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void TransferFullDuplex(
global::System.__ComObject __this,
byte[] writeBuffer,
byte[] readBuffer)
{
global::McgInterop.ForwardComSharedStubs.Proc_rg_byte__out_rg_byte__<global::Windows.Devices.Spi.ISpiDevice>(
__this,
writeBuffer,
readBuffer,
global::Windows.Devices.Spi.ISpiDevice__Impl.Vtbl.idx_TransferFullDuplex
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// DispatchClass for 'Windows.Devices.Spi.ISpiDevice'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Devices.Spi.ISpiDevice))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Devices.Spi.ISpiDevice
{
public virtual void Dispose()
{
global::System.IDisposable__Impl.StubClass.Close(this);
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.Devices.Spi.ISpiDevice.Write(byte[] buffer)
{
global::Windows.Devices.Spi.ISpiDevice__Impl.StubClass.Write(
this,
buffer
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.Devices.Spi.ISpiDevice.TransferFullDuplex(
byte[] writeBuffer,
byte[] readBuffer)
{
global::Windows.Devices.Spi.ISpiDevice__Impl.StubClass.TransferFullDuplex(
this,
writeBuffer,
readBuffer
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// v-table for 'Windows.Devices.Spi.ISpiDevice'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Devices.Spi.ISpiDevice))]
public unsafe partial struct Vtbl
{
internal const int idx_Write = 8;
internal const int idx_TransferFullDuplex = 11;
}
}
}
namespace Windows.Foundation
{
// Windows.Foundation.IStringable
public unsafe static class IStringable__Impl
{
// StubClass for 'Windows.Foundation.IStringable'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static string ToString(global::System.__ComObject __this)
{
string __ret = global::McgInterop.ForwardComSharedStubs.Func_string__<global::Windows.Foundation.IStringable>(
__this,
global::Windows.Foundation.IStringable__Impl.Vtbl.idx_ToString
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
}
// DispatchClass for 'Windows.Foundation.IStringable'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.IStringable))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Foundation.IStringable
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
string global::Windows.Foundation.IStringable.ToString()
{
string __retVal = global::Windows.Foundation.IStringable__Impl.StubClass.ToString(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.Foundation.IStringable'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.IStringable))]
[global::System.Runtime.InteropServices.McgRootsType(typeof(global::Windows.Foundation.IStringable))]
public unsafe partial struct Vtbl
{
global::System.IntPtr pfnQueryInterface;
global::System.IntPtr pfnAddRef;
global::System.IntPtr pfnRelease;
global::System.IntPtr pfnGetIids;
global::System.IntPtr pfnGetRuntimeClassName;
global::System.IntPtr pfnGetTrustLevel;
// Windows_Foundation__IStringable
global::System.IntPtr pfnToString_Windows_Foundation__IStringable;
internal const int idx_ToString = 6;
[global::System.Runtime.CompilerServices.InitDataBlob(typeof(global::Windows.Foundation.IStringable__Impl.Vtbl.Windows_Foundation_IStringable__Impl_Vtbl_McgRvaContainer), "RVA_Windows_Foundation_IStringable__Impl_Vtbl_s_theCcwVtable")]
public static global::Windows.Foundation.IStringable__Impl.Vtbl s_theCcwVtable
#if false
= new global::Windows.Foundation.IStringable__Impl.Vtbl() {
pfnQueryInterface = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfQueryInterface>(System.Runtime.InteropServices.__vtable_IUnknown.QueryInterface),
pfnAddRef = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfAddRef>(System.Runtime.InteropServices.__vtable_IUnknown.AddRef),
pfnRelease = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfRelease>(System.Runtime.InteropServices.__vtable_IUnknown.Release),
pfnGetIids = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget0>(System.Runtime.InteropServices.__vtable_IInspectable.GetIIDs),
pfnGetRuntimeClassName = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget1>(System.Runtime.InteropServices.__vtable_IInspectable.GetRuntimeClassName),
pfnGetTrustLevel = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget1>(System.Runtime.InteropServices.__vtable_IInspectable.GetTrustLevel),
pfnToString_Windows_Foundation__IStringable = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget2>(global::Windows.Foundation.IStringable__Impl.Vtbl.ToString__STUB),
}
#endif
;
public static global::System.IntPtr pNativeVtable;
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int ToString__STUB(
global::System.IntPtr pComThis,
global::System.Runtime.InteropServices.HSTRING* unsafe_value__retval)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.Foundation.IStringable>(
__this,
0
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Func_string__(
__this,
unsafe_value__retval,
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
private static class Windows_Foundation_IStringable__Impl_Vtbl_McgRvaContainer
{
[global::System.Runtime.CompilerServices.MethodAddrFixup(0, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "QueryInterface")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(4, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "AddRef")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(8, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "Release")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(12, typeof(global::System.Runtime.InteropServices.__vtable_IInspectable), "GetIIDs")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(16, typeof(global::System.Runtime.InteropServices.__vtable_IInspectable), "GetRuntimeClassName")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(20, typeof(global::System.Runtime.InteropServices.__vtable_IInspectable), "GetTrustLevel")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(24, typeof(global::Windows.Foundation.IStringable__Impl.Vtbl), "ToString__STUB")]
[global::System.Runtime.CompilerServices.NonArray]
static readonly byte[] RVA_Windows_Foundation_IStringable__Impl_Vtbl_s_theCcwVtable = new byte[] {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
}
}
}
// Windows.Foundation.TypedEventHandler<Windows.UI.Xaml.UIElement,Windows.UI.Xaml.DragStartingEventArgs>
public unsafe static class TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_DragStartingEventArgs_V___Impl
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void Invoke(
this global::System.__ComObject __this,
global::Windows.UI.Xaml.UIElement sender,
global::Windows.UI.Xaml.DragStartingEventArgs args)
{
global::McgInterop.ForwardComSharedStubs.Proc_TArg0__TArg1__<global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.UIElement, global::Windows.UI.Xaml.DragStartingEventArgs>, global::Windows.UI.Xaml.UIElement, global::Windows.UI.Xaml.DragStartingEventArgs>(
__this,
sender,
args,
global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_DragStartingEventArgs_V___Impl.Vtbl.idx_Invoke
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// v-table for 'Windows.Foundation.TypedEventHandler<Windows.UI.Xaml.UIElement,Windows.UI.Xaml.DragStartingEventArgs>'
[global::System.Runtime.InteropServices.McgRootsType(typeof(global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.UIElement, global::Windows.UI.Xaml.DragStartingEventArgs>))]
public unsafe partial struct Vtbl
{
global::System.IntPtr pfnQueryInterface;
global::System.IntPtr pfnAddRef;
global::System.IntPtr pfnRelease;
// Windows_Foundation__TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_DragStartingEventArgs_V_
global::System.IntPtr pfnInvoke_Windows_Foundation__TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_DragStartingEventArgs_V_;
internal const int idx_Invoke = 3;
[global::System.Runtime.CompilerServices.InitDataBlob(typeof(global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_DragStartingEventArgs_V___Impl.Vtbl.Windows_Foundation_TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_DragStartingEventArgs_V___Impl_Vtbl_McgRvaContainer), "RVA_Windows_Foundation_TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_DragStartingEventArgs_V__" +
"_Impl_Vtbl_s_theCcwVtable")]
public static global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_DragStartingEventArgs_V___Impl.Vtbl s_theCcwVtable
#if false
= new global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_DragStartingEventArgs_V___Impl.Vtbl() {
pfnQueryInterface = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfQueryInterface>(System.Runtime.InteropServices.__vtable_IUnknown.QueryInterface),
pfnAddRef = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfAddRef>(System.Runtime.InteropServices.__vtable_IUnknown.AddRef),
pfnRelease = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfRelease>(System.Runtime.InteropServices.__vtable_IUnknown.Release),
pfnInvoke_Windows_Foundation__TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_DragStartingEventArgs_V_ = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget52>(global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_DragStartingEventArgs_V___Impl.Vtbl.Invoke__STUB),
}
#endif
;
public static global::System.IntPtr pNativeVtable;
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int Invoke__STUB(
global::System.IntPtr pComThis,
global::Windows.UI.Xaml.IUIElement__Impl.Vtbl** unsafe_sender,
global::Windows.UI.Xaml.IDragStartingEventArgs__Impl.Vtbl** unsafe_args)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.UIElement, global::Windows.UI.Xaml.DragStartingEventArgs>>(
__this,
0
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Proc_TArg0__TArg1__<global::Windows.UI.Xaml.UIElement, global::Windows.UI.Xaml.DragStartingEventArgs>(
__this,
unsafe_sender,
unsafe_args,
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
private static class Windows_Foundation_TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_DragStartingEventArgs_V___Impl_Vtbl_McgRvaContainer
{
[global::System.Runtime.CompilerServices.MethodAddrFixup(0, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "QueryInterface")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(4, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "AddRef")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(8, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "Release")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(12, typeof(global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_DragStartingEventArgs_V___Impl.Vtbl), "Invoke__STUB")]
[global::System.Runtime.CompilerServices.NonArray]
static readonly byte[] RVA_Windows_Foundation_TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_DragStartingEventArgs_V___Impl_Vtbl_s_theCcwVtable = new byte[] {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
}
}
}
// Windows.Foundation.TypedEventHandler<Windows.UI.Xaml.UIElement,Windows.UI.Xaml.DropCompletedEventArgs>
public unsafe static class TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_DropCompletedEventArgs_V___Impl
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void Invoke(
this global::System.__ComObject __this,
global::Windows.UI.Xaml.UIElement sender,
global::Windows.UI.Xaml.DropCompletedEventArgs args)
{
global::McgInterop.ForwardComSharedStubs.Proc_TArg0__TArg1__<global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.UIElement, global::Windows.UI.Xaml.DropCompletedEventArgs>, global::Windows.UI.Xaml.UIElement, global::Windows.UI.Xaml.DropCompletedEventArgs>(
__this,
sender,
args,
global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_DropCompletedEventArgs_V___Impl.Vtbl.idx_Invoke
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// v-table for 'Windows.Foundation.TypedEventHandler<Windows.UI.Xaml.UIElement,Windows.UI.Xaml.DropCompletedEventArgs>'
[global::System.Runtime.InteropServices.McgRootsType(typeof(global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.UIElement, global::Windows.UI.Xaml.DropCompletedEventArgs>))]
public unsafe partial struct Vtbl
{
global::System.IntPtr pfnQueryInterface;
global::System.IntPtr pfnAddRef;
global::System.IntPtr pfnRelease;
// Windows_Foundation__TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_DropCompletedEventArgs_V_
global::System.IntPtr pfnInvoke_Windows_Foundation__TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_DropCompletedEventArgs_V_;
internal const int idx_Invoke = 3;
[global::System.Runtime.CompilerServices.InitDataBlob(typeof(global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_DropCompletedEventArgs_V___Impl.Vtbl.Windows_Foundation_TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_DropCompletedEventArgs_V___Impl_Vtbl_McgRvaContainer), "RVA_Windows_Foundation_TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_DropCompletedEventArgs_V_" +
"__Impl_Vtbl_s_theCcwVtable")]
public static global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_DropCompletedEventArgs_V___Impl.Vtbl s_theCcwVtable
#if false
= new global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_DropCompletedEventArgs_V___Impl.Vtbl() {
pfnQueryInterface = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfQueryInterface>(System.Runtime.InteropServices.__vtable_IUnknown.QueryInterface),
pfnAddRef = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfAddRef>(System.Runtime.InteropServices.__vtable_IUnknown.AddRef),
pfnRelease = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfRelease>(System.Runtime.InteropServices.__vtable_IUnknown.Release),
pfnInvoke_Windows_Foundation__TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_DropCompletedEventArgs_V_ = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget53>(global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_DropCompletedEventArgs_V___Impl.Vtbl.Invoke__STUB),
}
#endif
;
public static global::System.IntPtr pNativeVtable;
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int Invoke__STUB(
global::System.IntPtr pComThis,
global::Windows.UI.Xaml.IUIElement__Impl.Vtbl** unsafe_sender,
global::Windows.UI.Xaml.IDropCompletedEventArgs__Impl.Vtbl** unsafe_args)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.UIElement, global::Windows.UI.Xaml.DropCompletedEventArgs>>(
__this,
0
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Proc_TArg0__TArg1__<global::Windows.UI.Xaml.UIElement, global::Windows.UI.Xaml.DropCompletedEventArgs>(
__this,
unsafe_sender,
unsafe_args,
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
private static class Windows_Foundation_TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_DropCompletedEventArgs_V___Impl_Vtbl_McgRvaContainer
{
[global::System.Runtime.CompilerServices.MethodAddrFixup(0, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "QueryInterface")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(4, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "AddRef")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(8, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "Release")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(12, typeof(global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_DropCompletedEventArgs_V___Impl.Vtbl), "Invoke__STUB")]
[global::System.Runtime.CompilerServices.NonArray]
static readonly byte[] RVA_Windows_Foundation_TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_DropCompletedEventArgs_V___Impl_Vtbl_s_theCcwVtable = new byte[] {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
}
}
}
// Windows.Foundation.TypedEventHandler<Windows.UI.Xaml.UIElement,Windows.UI.Xaml.Input.ContextRequestedEventArgs>
public unsafe static class TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_Input_ContextRequestedEventArgs_V___Impl
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void Invoke(
this global::System.__ComObject __this,
global::Windows.UI.Xaml.UIElement sender,
global::Windows.UI.Xaml.Input.ContextRequestedEventArgs args)
{
global::McgInterop.ForwardComSharedStubs.Proc_TArg0__TArg1__<global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.UIElement, global::Windows.UI.Xaml.Input.ContextRequestedEventArgs>, global::Windows.UI.Xaml.UIElement, global::Windows.UI.Xaml.Input.ContextRequestedEventArgs>(
__this,
sender,
args,
global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_Input_ContextRequestedEventArgs_V___Impl.Vtbl.idx_Invoke
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// v-table for 'Windows.Foundation.TypedEventHandler<Windows.UI.Xaml.UIElement,Windows.UI.Xaml.Input.ContextRequestedEventArgs>'
[global::System.Runtime.InteropServices.McgRootsType(typeof(global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.UIElement, global::Windows.UI.Xaml.Input.ContextRequestedEventArgs>))]
public unsafe partial struct Vtbl
{
global::System.IntPtr pfnQueryInterface;
global::System.IntPtr pfnAddRef;
global::System.IntPtr pfnRelease;
// Windows_Foundation__TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_Input_ContextRequestedEventArgs_V_
global::System.IntPtr pfnInvoke_Windows_Foundation__TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_Input_ContextRequestedEventArgs_V_;
internal const int idx_Invoke = 3;
[global::System.Runtime.CompilerServices.InitDataBlob(typeof(global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_Input_ContextRequestedEventArgs_V___Impl.Vtbl.Windows_Foundation_TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_Input_ContextRequestedEventArgs_V___Impl_Vtbl_McgRvaContainer), "RVA_Windows_Foundation_TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_Input_ContextRequestedEve" +
"ntArgs_V___Impl_Vtbl_s_theCcwVtable")]
public static global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_Input_ContextRequestedEventArgs_V___Impl.Vtbl s_theCcwVtable
#if false
= new global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_Input_ContextRequestedEventArgs_V___Impl.Vtbl() {
pfnQueryInterface = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfQueryInterface>(System.Runtime.InteropServices.__vtable_IUnknown.QueryInterface),
pfnAddRef = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfAddRef>(System.Runtime.InteropServices.__vtable_IUnknown.AddRef),
pfnRelease = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfRelease>(System.Runtime.InteropServices.__vtable_IUnknown.Release),
pfnInvoke_Windows_Foundation__TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_Input_ContextRequestedEventArgs_V_ = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget59>(global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_Input_ContextRequestedEventArgs_V___Impl.Vtbl.Invoke__STUB),
}
#endif
;
public static global::System.IntPtr pNativeVtable;
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int Invoke__STUB(
global::System.IntPtr pComThis,
global::Windows.UI.Xaml.IUIElement__Impl.Vtbl** unsafe_sender,
global::Windows.UI.Xaml.Input.IContextRequestedEventArgs__Impl.Vtbl** unsafe_args)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.UIElement, global::Windows.UI.Xaml.Input.ContextRequestedEventArgs>>(
__this,
0
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Proc_TArg0__TArg1__<global::Windows.UI.Xaml.UIElement, global::Windows.UI.Xaml.Input.ContextRequestedEventArgs>(
__this,
unsafe_sender,
unsafe_args,
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
private static class Windows_Foundation_TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_Input_ContextRequestedEventArgs_V___Impl_Vtbl_McgRvaContainer
{
[global::System.Runtime.CompilerServices.MethodAddrFixup(0, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "QueryInterface")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(4, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "AddRef")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(8, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "Release")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(12, typeof(global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_Input_ContextRequestedEventArgs_V___Impl.Vtbl), "Invoke__STUB")]
[global::System.Runtime.CompilerServices.NonArray]
static readonly byte[] RVA_Windows_Foundation_TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_Input_ContextRequestedEventArgs_V___Impl_Vtbl_s_theCcwVtable = new byte[] {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
}
}
}
// Windows.Foundation.TypedEventHandler<Windows.UI.Xaml.UIElement,Windows.UI.Xaml.RoutedEventArgs>
public unsafe static class TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_RoutedEventArgs_V___Impl
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void Invoke(
this global::System.__ComObject __this,
global::Windows.UI.Xaml.UIElement sender,
global::Windows.UI.Xaml.RoutedEventArgs args)
{
global::McgInterop.ForwardComSharedStubs.Proc_TArg0__TArg1__<global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.UIElement, global::Windows.UI.Xaml.RoutedEventArgs>, global::Windows.UI.Xaml.UIElement, global::Windows.UI.Xaml.RoutedEventArgs>(
__this,
sender,
args,
global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_RoutedEventArgs_V___Impl.Vtbl.idx_Invoke
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// v-table for 'Windows.Foundation.TypedEventHandler<Windows.UI.Xaml.UIElement,Windows.UI.Xaml.RoutedEventArgs>'
[global::System.Runtime.InteropServices.McgRootsType(typeof(global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.UIElement, global::Windows.UI.Xaml.RoutedEventArgs>))]
public unsafe partial struct Vtbl
{
global::System.IntPtr pfnQueryInterface;
global::System.IntPtr pfnAddRef;
global::System.IntPtr pfnRelease;
// Windows_Foundation__TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_RoutedEventArgs_V_
global::System.IntPtr pfnInvoke_Windows_Foundation__TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_RoutedEventArgs_V_;
internal const int idx_Invoke = 3;
[global::System.Runtime.CompilerServices.InitDataBlob(typeof(global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_RoutedEventArgs_V___Impl.Vtbl.Windows_Foundation_TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_RoutedEventArgs_V___Impl_Vtbl_McgRvaContainer), "RVA_Windows_Foundation_TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_RoutedEventArgs_V___Impl_" +
"Vtbl_s_theCcwVtable")]
public static global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_RoutedEventArgs_V___Impl.Vtbl s_theCcwVtable
#if false
= new global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_RoutedEventArgs_V___Impl.Vtbl() {
pfnQueryInterface = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfQueryInterface>(System.Runtime.InteropServices.__vtable_IUnknown.QueryInterface),
pfnAddRef = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfAddRef>(System.Runtime.InteropServices.__vtable_IUnknown.AddRef),
pfnRelease = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfRelease>(System.Runtime.InteropServices.__vtable_IUnknown.Release),
pfnInvoke_Windows_Foundation__TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_RoutedEventArgs_V_ = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget60>(global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_RoutedEventArgs_V___Impl.Vtbl.Invoke__STUB),
}
#endif
;
public static global::System.IntPtr pNativeVtable;
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int Invoke__STUB(
global::System.IntPtr pComThis,
global::Windows.UI.Xaml.IUIElement__Impl.Vtbl** unsafe_sender,
global::Windows.UI.Xaml.IRoutedEventArgs__Impl.Vtbl** unsafe_args)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.UIElement, global::Windows.UI.Xaml.RoutedEventArgs>>(
__this,
0
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Proc_TArg0__TArg1__<global::Windows.UI.Xaml.UIElement, global::Windows.UI.Xaml.RoutedEventArgs>(
__this,
unsafe_sender,
unsafe_args,
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
private static class Windows_Foundation_TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_RoutedEventArgs_V___Impl_Vtbl_McgRvaContainer
{
[global::System.Runtime.CompilerServices.MethodAddrFixup(0, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "QueryInterface")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(4, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "AddRef")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(8, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "Release")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(12, typeof(global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_RoutedEventArgs_V___Impl.Vtbl), "Invoke__STUB")]
[global::System.Runtime.CompilerServices.NonArray]
static readonly byte[] RVA_Windows_Foundation_TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_RoutedEventArgs_V___Impl_Vtbl_s_theCcwVtable = new byte[] {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
}
}
}
// Windows.Foundation.TypedEventHandler<Windows.UI.Xaml.UIElement,Windows.UI.Xaml.Input.AccessKeyDisplayRequestedEventArgs>
public unsafe static class TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_Input_AccessKeyDisplayRequestedEventArgs_V___Impl
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void Invoke(
this global::System.__ComObject __this,
global::Windows.UI.Xaml.UIElement sender,
global::Windows.UI.Xaml.Input.AccessKeyDisplayRequestedEventArgs args)
{
global::McgInterop.ForwardComSharedStubs.Proc_TArg0__TArg1__<global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.UIElement, global::Windows.UI.Xaml.Input.AccessKeyDisplayRequestedEventArgs>, global::Windows.UI.Xaml.UIElement, global::Windows.UI.Xaml.Input.AccessKeyDisplayRequestedEventArgs>(
__this,
sender,
args,
global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_Input_AccessKeyDisplayRequestedEventArgs_V___Impl.Vtbl.idx_Invoke
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// v-table for 'Windows.Foundation.TypedEventHandler<Windows.UI.Xaml.UIElement,Windows.UI.Xaml.Input.AccessKeyDisplayRequestedEventArgs>'
[global::System.Runtime.InteropServices.McgRootsType(typeof(global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.UIElement, global::Windows.UI.Xaml.Input.AccessKeyDisplayRequestedEventArgs>))]
public unsafe partial struct Vtbl
{
global::System.IntPtr pfnQueryInterface;
global::System.IntPtr pfnAddRef;
global::System.IntPtr pfnRelease;
// Windows_Foundation__TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_Input_AccessKeyDisplayRequestedEventArgs_V_
global::System.IntPtr pfnInvoke_Windows_Foundation__TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_Input_AccessKeyDisplayRequestedEventArgs_V_;
internal const int idx_Invoke = 3;
[global::System.Runtime.CompilerServices.InitDataBlob(typeof(global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_Input_AccessKeyDisplayRequestedEventArgs_V___Impl.Vtbl.Windows_Foundation_TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_Input_AccessKeyDisplayRequestedEventArgs_V___Impl_Vtbl_McgRvaContainer), "RVA_Windows_Foundation_TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_Input_AccessKeyDisplayReq" +
"uestedEventArgs_V___Impl_Vtbl_s_theCcwVtable")]
public static global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_Input_AccessKeyDisplayRequestedEventArgs_V___Impl.Vtbl s_theCcwVtable
#if false
= new global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_Input_AccessKeyDisplayRequestedEventArgs_V___Impl.Vtbl() {
pfnQueryInterface = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfQueryInterface>(System.Runtime.InteropServices.__vtable_IUnknown.QueryInterface),
pfnAddRef = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfAddRef>(System.Runtime.InteropServices.__vtable_IUnknown.AddRef),
pfnRelease = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfRelease>(System.Runtime.InteropServices.__vtable_IUnknown.Release),
pfnInvoke_Windows_Foundation__TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_Input_AccessKeyDisplayRequestedEventArgs_V_ = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget61>(global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_Input_AccessKeyDisplayRequestedEventArgs_V___Impl.Vtbl.Invoke__STUB),
}
#endif
;
public static global::System.IntPtr pNativeVtable;
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int Invoke__STUB(
global::System.IntPtr pComThis,
global::Windows.UI.Xaml.IUIElement__Impl.Vtbl** unsafe_sender,
global::Windows.UI.Xaml.Input.IAccessKeyDisplayRequestedEventArgs__Impl.Vtbl** unsafe_args)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.UIElement, global::Windows.UI.Xaml.Input.AccessKeyDisplayRequestedEventArgs>>(
__this,
0
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Proc_TArg0__TArg1__<global::Windows.UI.Xaml.UIElement, global::Windows.UI.Xaml.Input.AccessKeyDisplayRequestedEventArgs>(
__this,
unsafe_sender,
unsafe_args,
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
private static class Windows_Foundation_TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_Input_AccessKeyDisplayRequestedEventArgs_V___Impl_Vtbl_McgRvaContainer
{
[global::System.Runtime.CompilerServices.MethodAddrFixup(0, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "QueryInterface")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(4, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "AddRef")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(8, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "Release")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(12, typeof(global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_Input_AccessKeyDisplayRequestedEventArgs_V___Impl.Vtbl), "Invoke__STUB")]
[global::System.Runtime.CompilerServices.NonArray]
static readonly byte[] RVA_Windows_Foundation_TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_Input_AccessKeyDisplayRequestedEventArgs_V___Impl_Vtbl_s_theCcwVtable = new byte[] {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
}
}
}
// Windows.Foundation.TypedEventHandler<Windows.UI.Xaml.UIElement,Windows.UI.Xaml.Input.AccessKeyDisplayDismissedEventArgs>
public unsafe static class TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_Input_AccessKeyDisplayDismissedEventArgs_V___Impl
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void Invoke(
this global::System.__ComObject __this,
global::Windows.UI.Xaml.UIElement sender,
global::Windows.UI.Xaml.Input.AccessKeyDisplayDismissedEventArgs args)
{
global::McgInterop.ForwardComSharedStubs.Proc_TArg0__TArg1__<global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.UIElement, global::Windows.UI.Xaml.Input.AccessKeyDisplayDismissedEventArgs>, global::Windows.UI.Xaml.UIElement, global::Windows.UI.Xaml.Input.AccessKeyDisplayDismissedEventArgs>(
__this,
sender,
args,
global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_Input_AccessKeyDisplayDismissedEventArgs_V___Impl.Vtbl.idx_Invoke
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// v-table for 'Windows.Foundation.TypedEventHandler<Windows.UI.Xaml.UIElement,Windows.UI.Xaml.Input.AccessKeyDisplayDismissedEventArgs>'
[global::System.Runtime.InteropServices.McgRootsType(typeof(global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.UIElement, global::Windows.UI.Xaml.Input.AccessKeyDisplayDismissedEventArgs>))]
public unsafe partial struct Vtbl
{
global::System.IntPtr pfnQueryInterface;
global::System.IntPtr pfnAddRef;
global::System.IntPtr pfnRelease;
// Windows_Foundation__TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_Input_AccessKeyDisplayDismissedEventArgs_V_
global::System.IntPtr pfnInvoke_Windows_Foundation__TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_Input_AccessKeyDisplayDismissedEventArgs_V_;
internal const int idx_Invoke = 3;
[global::System.Runtime.CompilerServices.InitDataBlob(typeof(global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_Input_AccessKeyDisplayDismissedEventArgs_V___Impl.Vtbl.Windows_Foundation_TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_Input_AccessKeyDisplayDismissedEventArgs_V___Impl_Vtbl_McgRvaContainer), "RVA_Windows_Foundation_TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_Input_AccessKeyDisplayDis" +
"missedEventArgs_V___Impl_Vtbl_s_theCcwVtable")]
public static global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_Input_AccessKeyDisplayDismissedEventArgs_V___Impl.Vtbl s_theCcwVtable
#if false
= new global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_Input_AccessKeyDisplayDismissedEventArgs_V___Impl.Vtbl() {
pfnQueryInterface = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfQueryInterface>(System.Runtime.InteropServices.__vtable_IUnknown.QueryInterface),
pfnAddRef = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfAddRef>(System.Runtime.InteropServices.__vtable_IUnknown.AddRef),
pfnRelease = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfRelease>(System.Runtime.InteropServices.__vtable_IUnknown.Release),
pfnInvoke_Windows_Foundation__TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_Input_AccessKeyDisplayDismissedEventArgs_V_ = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget62>(global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_Input_AccessKeyDisplayDismissedEventArgs_V___Impl.Vtbl.Invoke__STUB),
}
#endif
;
public static global::System.IntPtr pNativeVtable;
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int Invoke__STUB(
global::System.IntPtr pComThis,
global::Windows.UI.Xaml.IUIElement__Impl.Vtbl** unsafe_sender,
global::Windows.UI.Xaml.Input.IAccessKeyDisplayDismissedEventArgs__Impl.Vtbl** unsafe_args)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.UIElement, global::Windows.UI.Xaml.Input.AccessKeyDisplayDismissedEventArgs>>(
__this,
0
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Proc_TArg0__TArg1__<global::Windows.UI.Xaml.UIElement, global::Windows.UI.Xaml.Input.AccessKeyDisplayDismissedEventArgs>(
__this,
unsafe_sender,
unsafe_args,
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
private static class Windows_Foundation_TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_Input_AccessKeyDisplayDismissedEventArgs_V___Impl_Vtbl_McgRvaContainer
{
[global::System.Runtime.CompilerServices.MethodAddrFixup(0, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "QueryInterface")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(4, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "AddRef")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(8, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "Release")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(12, typeof(global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_Input_AccessKeyDisplayDismissedEventArgs_V___Impl.Vtbl), "Invoke__STUB")]
[global::System.Runtime.CompilerServices.NonArray]
static readonly byte[] RVA_Windows_Foundation_TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_Input_AccessKeyDisplayDismissedEventArgs_V___Impl_Vtbl_s_theCcwVtable = new byte[] {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
}
}
}
// Windows.Foundation.TypedEventHandler<Windows.UI.Xaml.UIElement,Windows.UI.Xaml.Input.AccessKeyInvokedEventArgs>
public unsafe static class TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_Input_AccessKeyInvokedEventArgs_V___Impl
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void Invoke(
this global::System.__ComObject __this,
global::Windows.UI.Xaml.UIElement sender,
global::Windows.UI.Xaml.Input.AccessKeyInvokedEventArgs args)
{
global::McgInterop.ForwardComSharedStubs.Proc_TArg0__TArg1__<global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.UIElement, global::Windows.UI.Xaml.Input.AccessKeyInvokedEventArgs>, global::Windows.UI.Xaml.UIElement, global::Windows.UI.Xaml.Input.AccessKeyInvokedEventArgs>(
__this,
sender,
args,
global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_Input_AccessKeyInvokedEventArgs_V___Impl.Vtbl.idx_Invoke
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// v-table for 'Windows.Foundation.TypedEventHandler<Windows.UI.Xaml.UIElement,Windows.UI.Xaml.Input.AccessKeyInvokedEventArgs>'
[global::System.Runtime.InteropServices.McgRootsType(typeof(global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.UIElement, global::Windows.UI.Xaml.Input.AccessKeyInvokedEventArgs>))]
public unsafe partial struct Vtbl
{
global::System.IntPtr pfnQueryInterface;
global::System.IntPtr pfnAddRef;
global::System.IntPtr pfnRelease;
// Windows_Foundation__TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_Input_AccessKeyInvokedEventArgs_V_
global::System.IntPtr pfnInvoke_Windows_Foundation__TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_Input_AccessKeyInvokedEventArgs_V_;
internal const int idx_Invoke = 3;
[global::System.Runtime.CompilerServices.InitDataBlob(typeof(global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_Input_AccessKeyInvokedEventArgs_V___Impl.Vtbl.Windows_Foundation_TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_Input_AccessKeyInvokedEventArgs_V___Impl_Vtbl_McgRvaContainer), "RVA_Windows_Foundation_TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_Input_AccessKeyInvokedEve" +
"ntArgs_V___Impl_Vtbl_s_theCcwVtable")]
public static global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_Input_AccessKeyInvokedEventArgs_V___Impl.Vtbl s_theCcwVtable
#if false
= new global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_Input_AccessKeyInvokedEventArgs_V___Impl.Vtbl() {
pfnQueryInterface = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfQueryInterface>(System.Runtime.InteropServices.__vtable_IUnknown.QueryInterface),
pfnAddRef = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfAddRef>(System.Runtime.InteropServices.__vtable_IUnknown.AddRef),
pfnRelease = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfRelease>(System.Runtime.InteropServices.__vtable_IUnknown.Release),
pfnInvoke_Windows_Foundation__TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_Input_AccessKeyInvokedEventArgs_V_ = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget63>(global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_Input_AccessKeyInvokedEventArgs_V___Impl.Vtbl.Invoke__STUB),
}
#endif
;
public static global::System.IntPtr pNativeVtable;
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int Invoke__STUB(
global::System.IntPtr pComThis,
global::Windows.UI.Xaml.IUIElement__Impl.Vtbl** unsafe_sender,
global::Windows.UI.Xaml.Input.IAccessKeyInvokedEventArgs__Impl.Vtbl** unsafe_args)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.UIElement, global::Windows.UI.Xaml.Input.AccessKeyInvokedEventArgs>>(
__this,
0
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Proc_TArg0__TArg1__<global::Windows.UI.Xaml.UIElement, global::Windows.UI.Xaml.Input.AccessKeyInvokedEventArgs>(
__this,
unsafe_sender,
unsafe_args,
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
private static class Windows_Foundation_TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_Input_AccessKeyInvokedEventArgs_V___Impl_Vtbl_McgRvaContainer
{
[global::System.Runtime.CompilerServices.MethodAddrFixup(0, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "QueryInterface")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(4, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "AddRef")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(8, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "Release")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(12, typeof(global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_Input_AccessKeyInvokedEventArgs_V___Impl.Vtbl), "Invoke__STUB")]
[global::System.Runtime.CompilerServices.NonArray]
static readonly byte[] RVA_Windows_Foundation_TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_Input_AccessKeyInvokedEventArgs_V___Impl_Vtbl_s_theCcwVtable = new byte[] {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
}
}
}
// Windows.Foundation.TypedEventHandler<Windows.UI.Xaml.FrameworkElement,Windows.UI.Xaml.DataContextChangedEventArgs>
public unsafe static class TypedEventHandler_A_Windows_UI_Xaml_FrameworkElement_j_Windows_UI_Xaml_DataContextChangedEventArgs_V___Impl
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void Invoke(
this global::System.__ComObject __this,
global::Windows.UI.Xaml.FrameworkElement sender,
global::Windows.UI.Xaml.DataContextChangedEventArgs args)
{
global::McgInterop.ForwardComSharedStubs.Proc_TArg0__TArg1__<global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.FrameworkElement, global::Windows.UI.Xaml.DataContextChangedEventArgs>, global::Windows.UI.Xaml.FrameworkElement, global::Windows.UI.Xaml.DataContextChangedEventArgs>(
__this,
sender,
args,
global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_FrameworkElement_j_Windows_UI_Xaml_DataContextChangedEventArgs_V___Impl.Vtbl.idx_Invoke
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// v-table for 'Windows.Foundation.TypedEventHandler<Windows.UI.Xaml.FrameworkElement,Windows.UI.Xaml.DataContextChangedEventArgs>'
[global::System.Runtime.InteropServices.McgRootsType(typeof(global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.FrameworkElement, global::Windows.UI.Xaml.DataContextChangedEventArgs>))]
public unsafe partial struct Vtbl
{
global::System.IntPtr pfnQueryInterface;
global::System.IntPtr pfnAddRef;
global::System.IntPtr pfnRelease;
// Windows_Foundation__TypedEventHandler_A_Windows_UI_Xaml_FrameworkElement_j_Windows_UI_Xaml_DataContextChangedEventArgs_V_
global::System.IntPtr pfnInvoke_Windows_Foundation__TypedEventHandler_A_Windows_UI_Xaml_FrameworkElement_j_Windows_UI_Xaml_DataContextChangedEventArgs_V_;
internal const int idx_Invoke = 3;
[global::System.Runtime.CompilerServices.InitDataBlob(typeof(global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_FrameworkElement_j_Windows_UI_Xaml_DataContextChangedEventArgs_V___Impl.Vtbl.Windows_Foundation_TypedEventHandler_A_Windows_UI_Xaml_FrameworkElement_j_Windows_UI_Xaml_DataContextChangedEventArgs_V___Impl_Vtbl_McgRvaContainer), "RVA_Windows_Foundation_TypedEventHandler_A_Windows_UI_Xaml_FrameworkElement_j_Windows_UI_Xaml_DataContextChanged" +
"EventArgs_V___Impl_Vtbl_s_theCcwVtable")]
public static global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_FrameworkElement_j_Windows_UI_Xaml_DataContextChangedEventArgs_V___Impl.Vtbl s_theCcwVtable
#if false
= new global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_FrameworkElement_j_Windows_UI_Xaml_DataContextChangedEventArgs_V___Impl.Vtbl() {
pfnQueryInterface = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfQueryInterface>(System.Runtime.InteropServices.__vtable_IUnknown.QueryInterface),
pfnAddRef = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfAddRef>(System.Runtime.InteropServices.__vtable_IUnknown.AddRef),
pfnRelease = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfRelease>(System.Runtime.InteropServices.__vtable_IUnknown.Release),
pfnInvoke_Windows_Foundation__TypedEventHandler_A_Windows_UI_Xaml_FrameworkElement_j_Windows_UI_Xaml_DataContextChangedEventArgs_V_ = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget67>(global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_FrameworkElement_j_Windows_UI_Xaml_DataContextChangedEventArgs_V___Impl.Vtbl.Invoke__STUB),
}
#endif
;
public static global::System.IntPtr pNativeVtable;
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int Invoke__STUB(
global::System.IntPtr pComThis,
global::Windows.UI.Xaml.IFrameworkElement__Impl.Vtbl** unsafe_sender,
global::Windows.UI.Xaml.IDataContextChangedEventArgs__Impl.Vtbl** unsafe_args)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.FrameworkElement, global::Windows.UI.Xaml.DataContextChangedEventArgs>>(
__this,
0
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Proc_TArg0__TArg1__<global::Windows.UI.Xaml.FrameworkElement, global::Windows.UI.Xaml.DataContextChangedEventArgs>(
__this,
unsafe_sender,
unsafe_args,
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
private static class Windows_Foundation_TypedEventHandler_A_Windows_UI_Xaml_FrameworkElement_j_Windows_UI_Xaml_DataContextChangedEventArgs_V___Impl_Vtbl_McgRvaContainer
{
[global::System.Runtime.CompilerServices.MethodAddrFixup(0, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "QueryInterface")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(4, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "AddRef")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(8, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "Release")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(12, typeof(global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_FrameworkElement_j_Windows_UI_Xaml_DataContextChangedEventArgs_V___Impl.Vtbl), "Invoke__STUB")]
[global::System.Runtime.CompilerServices.NonArray]
static readonly byte[] RVA_Windows_Foundation_TypedEventHandler_A_Windows_UI_Xaml_FrameworkElement_j_Windows_UI_Xaml_DataContextChangedEventArgs_V___Impl_Vtbl_s_theCcwVtable = new byte[] {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
}
}
}
// Windows.Foundation.TypedEventHandler<Windows.UI.Xaml.FrameworkElement,System.Object>
public unsafe static class TypedEventHandler_A_Windows_UI_Xaml_FrameworkElement_j_System_Object_V___Impl
{
// Signature, Windows.Foundation.TypedEventHandler<Windows.UI.Xaml.FrameworkElement,System.Object>.Invoke, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.WinRTClassMarshaller] Windows_UI_Xaml_FrameworkElement__Windows_UI_Xaml__FrameworkElement *, [fwd] [in] [Mcg.CodeGen.WinRTInspectableMarshaller] object____mcg_IInspectable,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void Invoke(
this global::System.__ComObject __this,
global::Windows.UI.Xaml.FrameworkElement sender,
object args)
{
// Setup
global::Windows.UI.Xaml.IFrameworkElement__Impl.Vtbl** unsafe_sender = default(global::Windows.UI.Xaml.IFrameworkElement__Impl.Vtbl**);
global::System.Runtime.InteropServices.__vtable_IInspectable* unsafe_args = default(global::System.Runtime.InteropServices.__vtable_IInspectable*);
int unsafe___return__;
try
{
// Marshalling
unsafe_sender = (global::Windows.UI.Xaml.IFrameworkElement__Impl.Vtbl**)global::System.Runtime.InteropServices.McgModuleManager.ObjectToComInterface(
sender,
typeof(global::Windows.UI.Xaml.FrameworkElement).TypeHandle
);
unsafe_args = (global::System.Runtime.InteropServices.__vtable_IInspectable*)global::System.Runtime.InteropServices.McgMarshal.ObjectToIInspectable(args);
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.FrameworkElement, object>).TypeHandle,
global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_FrameworkElement_j_System_Object_V___Impl.Vtbl.idx_Invoke,
unsafe_sender,
unsafe_args
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
// Return
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_sender)));
global::System.GC.KeepAlive(sender);
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_args)));
}
}
// v-table for 'Windows.Foundation.TypedEventHandler<Windows.UI.Xaml.FrameworkElement,System.Object>'
[global::System.Runtime.InteropServices.McgRootsType(typeof(global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.FrameworkElement, object>))]
public unsafe partial struct Vtbl
{
global::System.IntPtr pfnQueryInterface;
global::System.IntPtr pfnAddRef;
global::System.IntPtr pfnRelease;
// Windows_Foundation__TypedEventHandler_A_Windows_UI_Xaml_FrameworkElement_j_object_V_
global::System.IntPtr pfnInvoke_Windows_Foundation__TypedEventHandler_A_Windows_UI_Xaml_FrameworkElement_j_object_V_;
internal const int idx_Invoke = 3;
[global::System.Runtime.CompilerServices.InitDataBlob(typeof(global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_FrameworkElement_j_System_Object_V___Impl.Vtbl.Windows_Foundation_TypedEventHandler_A_Windows_UI_Xaml_FrameworkElement_j_System_Object_V___Impl_Vtbl_McgRvaContainer), "RVA_Windows_Foundation_TypedEventHandler_A_Windows_UI_Xaml_FrameworkElement_j_System_Object_V___Impl_Vtbl_s_theC" +
"cwVtable")]
public static global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_FrameworkElement_j_System_Object_V___Impl.Vtbl s_theCcwVtable
#if false
= new global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_FrameworkElement_j_System_Object_V___Impl.Vtbl() {
pfnQueryInterface = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfQueryInterface>(System.Runtime.InteropServices.__vtable_IUnknown.QueryInterface),
pfnAddRef = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfAddRef>(System.Runtime.InteropServices.__vtable_IUnknown.AddRef),
pfnRelease = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfRelease>(System.Runtime.InteropServices.__vtable_IUnknown.Release),
pfnInvoke_Windows_Foundation__TypedEventHandler_A_Windows_UI_Xaml_FrameworkElement_j_object_V_ = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget69>(global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_FrameworkElement_j_System_Object_V___Impl.Vtbl.Invoke__STUB),
}
#endif
;
public static global::System.IntPtr pNativeVtable;
// Signature, Windows.Foundation.TypedEventHandler<Windows.UI.Xaml.FrameworkElement,System.Object>.Invoke, [rev] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [rev] [in] [Mcg.CodeGen.WinRTClassMarshaller] Windows_UI_Xaml_FrameworkElement__Windows_UI_Xaml__FrameworkElement *, [rev] [in] [Mcg.CodeGen.WinRTInspectableMarshaller] object____mcg_IInspectable,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int Invoke__STUB(
global::System.IntPtr pComThis,
global::Windows.UI.Xaml.IFrameworkElement__Impl.Vtbl** unsafe_sender,
global::System.Runtime.InteropServices.__vtable_IInspectable* unsafe_args)
{
// Setup
global::Windows.UI.Xaml.FrameworkElement sender = default(global::Windows.UI.Xaml.FrameworkElement);
object args = default(object);
try
{
// Marshalling
sender = (global::Windows.UI.Xaml.FrameworkElement)global::System.Runtime.InteropServices.McgModuleManager.ComInterfaceToObject(
((global::System.IntPtr)unsafe_sender),
typeof(global::Windows.UI.Xaml.FrameworkElement).TypeHandle
);
args = global::System.Runtime.InteropServices.McgMarshal.IInspectableToObject(((global::System.IntPtr)unsafe_args));
// Call to managed method
global::System.Runtime.InteropServices.McgMarshal.FastCast<global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.FrameworkElement, object>>(global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis)).Invoke(
sender,
args
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
// Return
return global::McgInterop.Helpers.S_OK;
}
catch (global::System.Exception hrExcep)
{
// ExceptionReturn
return global::System.Runtime.InteropServices.McgMarshal.GetHRForExceptionWinRT(hrExcep);
}
}
private static class Windows_Foundation_TypedEventHandler_A_Windows_UI_Xaml_FrameworkElement_j_System_Object_V___Impl_Vtbl_McgRvaContainer
{
[global::System.Runtime.CompilerServices.MethodAddrFixup(0, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "QueryInterface")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(4, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "AddRef")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(8, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "Release")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(12, typeof(global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_FrameworkElement_j_System_Object_V___Impl.Vtbl), "Invoke__STUB")]
[global::System.Runtime.CompilerServices.NonArray]
static readonly byte[] RVA_Windows_Foundation_TypedEventHandler_A_Windows_UI_Xaml_FrameworkElement_j_System_Object_V___Impl_Vtbl_s_theCcwVtable = new byte[] {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
}
}
}
// Windows.Foundation.TypedEventHandler<Windows.UI.Xaml.Controls.Control,Windows.UI.Xaml.Controls.FocusEngagedEventArgs>
public unsafe static class TypedEventHandler_A_Windows_UI_Xaml_Controls_Control_j_Windows_UI_Xaml_Controls_FocusEngagedEventArgs_V___Impl
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void Invoke(
this global::System.__ComObject __this,
global::Windows.UI.Xaml.Controls.Control sender,
global::Windows.UI.Xaml.Controls.FocusEngagedEventArgs args)
{
global::McgInterop.ForwardComSharedStubs.Proc_TArg0__TArg1__<global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.Controls.Control, global::Windows.UI.Xaml.Controls.FocusEngagedEventArgs>, global::Windows.UI.Xaml.Controls.Control, global::Windows.UI.Xaml.Controls.FocusEngagedEventArgs>(
__this,
sender,
args,
global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_Controls_Control_j_Windows_UI_Xaml_Controls_FocusEngagedEventArgs_V___Impl.Vtbl.idx_Invoke
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// v-table for 'Windows.Foundation.TypedEventHandler<Windows.UI.Xaml.Controls.Control,Windows.UI.Xaml.Controls.FocusEngagedEventArgs>'
[global::System.Runtime.InteropServices.McgRootsType(typeof(global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.Controls.Control, global::Windows.UI.Xaml.Controls.FocusEngagedEventArgs>))]
public unsafe partial struct Vtbl
{
global::System.IntPtr pfnQueryInterface;
global::System.IntPtr pfnAddRef;
global::System.IntPtr pfnRelease;
// Windows_Foundation__TypedEventHandler_A_Windows_UI_Xaml_Controls_Control_j_Windows_UI_Xaml_Controls_FocusEngagedEventArgs_V_
global::System.IntPtr pfnInvoke_Windows_Foundation__TypedEventHandler_A_Windows_UI_Xaml_Controls_Control_j_Windows_UI_Xaml_Controls_FocusEngagedEventArgs_V_;
internal const int idx_Invoke = 3;
[global::System.Runtime.CompilerServices.InitDataBlob(typeof(global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_Controls_Control_j_Windows_UI_Xaml_Controls_FocusEngagedEventArgs_V___Impl.Vtbl.Windows_Foundation_TypedEventHandler_A_Windows_UI_Xaml_Controls_Control_j_Windows_UI_Xaml_Controls_FocusEngagedEventArgs_V___Impl_Vtbl_McgRvaContainer), "RVA_Windows_Foundation_TypedEventHandler_A_Windows_UI_Xaml_Controls_Control_j_Windows_UI_Xaml_Controls_FocusEnga" +
"gedEventArgs_V___Impl_Vtbl_s_theCcwVtable")]
public static global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_Controls_Control_j_Windows_UI_Xaml_Controls_FocusEngagedEventArgs_V___Impl.Vtbl s_theCcwVtable
#if false
= new global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_Controls_Control_j_Windows_UI_Xaml_Controls_FocusEngagedEventArgs_V___Impl.Vtbl() {
pfnQueryInterface = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfQueryInterface>(System.Runtime.InteropServices.__vtable_IUnknown.QueryInterface),
pfnAddRef = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfAddRef>(System.Runtime.InteropServices.__vtable_IUnknown.AddRef),
pfnRelease = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfRelease>(System.Runtime.InteropServices.__vtable_IUnknown.Release),
pfnInvoke_Windows_Foundation__TypedEventHandler_A_Windows_UI_Xaml_Controls_Control_j_Windows_UI_Xaml_Controls_FocusEngagedEventArgs_V_ = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget74>(global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_Controls_Control_j_Windows_UI_Xaml_Controls_FocusEngagedEventArgs_V___Impl.Vtbl.Invoke__STUB),
}
#endif
;
public static global::System.IntPtr pNativeVtable;
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int Invoke__STUB(
global::System.IntPtr pComThis,
global::Windows.UI.Xaml.Controls.IControl__Impl.Vtbl** unsafe_sender,
global::Windows.UI.Xaml.Controls.IFocusEngagedEventArgs__Impl.Vtbl** unsafe_args)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.Controls.Control, global::Windows.UI.Xaml.Controls.FocusEngagedEventArgs>>(
__this,
0
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Proc_TArg0__TArg1__<global::Windows.UI.Xaml.Controls.Control, global::Windows.UI.Xaml.Controls.FocusEngagedEventArgs>(
__this,
unsafe_sender,
unsafe_args,
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
private static class Windows_Foundation_TypedEventHandler_A_Windows_UI_Xaml_Controls_Control_j_Windows_UI_Xaml_Controls_FocusEngagedEventArgs_V___Impl_Vtbl_McgRvaContainer
{
[global::System.Runtime.CompilerServices.MethodAddrFixup(0, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "QueryInterface")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(4, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "AddRef")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(8, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "Release")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(12, typeof(global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_Controls_Control_j_Windows_UI_Xaml_Controls_FocusEngagedEventArgs_V___Impl.Vtbl), "Invoke__STUB")]
[global::System.Runtime.CompilerServices.NonArray]
static readonly byte[] RVA_Windows_Foundation_TypedEventHandler_A_Windows_UI_Xaml_Controls_Control_j_Windows_UI_Xaml_Controls_FocusEngagedEventArgs_V___Impl_Vtbl_s_theCcwVtable = new byte[] {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
}
}
}
// Windows.Foundation.TypedEventHandler<Windows.UI.Xaml.Controls.Control,Windows.UI.Xaml.Controls.FocusDisengagedEventArgs>
public unsafe static class TypedEventHandler_A_Windows_UI_Xaml_Controls_Control_j_Windows_UI_Xaml_Controls_FocusDisengagedEventArgs_V___Impl
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void Invoke(
this global::System.__ComObject __this,
global::Windows.UI.Xaml.Controls.Control sender,
global::Windows.UI.Xaml.Controls.FocusDisengagedEventArgs args)
{
global::McgInterop.ForwardComSharedStubs.Proc_TArg0__TArg1__<global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.Controls.Control, global::Windows.UI.Xaml.Controls.FocusDisengagedEventArgs>, global::Windows.UI.Xaml.Controls.Control, global::Windows.UI.Xaml.Controls.FocusDisengagedEventArgs>(
__this,
sender,
args,
global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_Controls_Control_j_Windows_UI_Xaml_Controls_FocusDisengagedEventArgs_V___Impl.Vtbl.idx_Invoke
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// v-table for 'Windows.Foundation.TypedEventHandler<Windows.UI.Xaml.Controls.Control,Windows.UI.Xaml.Controls.FocusDisengagedEventArgs>'
[global::System.Runtime.InteropServices.McgRootsType(typeof(global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.Controls.Control, global::Windows.UI.Xaml.Controls.FocusDisengagedEventArgs>))]
public unsafe partial struct Vtbl
{
global::System.IntPtr pfnQueryInterface;
global::System.IntPtr pfnAddRef;
global::System.IntPtr pfnRelease;
// Windows_Foundation__TypedEventHandler_A_Windows_UI_Xaml_Controls_Control_j_Windows_UI_Xaml_Controls_FocusDisengagedEventArgs_V_
global::System.IntPtr pfnInvoke_Windows_Foundation__TypedEventHandler_A_Windows_UI_Xaml_Controls_Control_j_Windows_UI_Xaml_Controls_FocusDisengagedEventArgs_V_;
internal const int idx_Invoke = 3;
[global::System.Runtime.CompilerServices.InitDataBlob(typeof(global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_Controls_Control_j_Windows_UI_Xaml_Controls_FocusDisengagedEventArgs_V___Impl.Vtbl.Windows_Foundation_TypedEventHandler_A_Windows_UI_Xaml_Controls_Control_j_Windows_UI_Xaml_Controls_FocusDisengagedEventArgs_V___Impl_Vtbl_McgRvaContainer), "RVA_Windows_Foundation_TypedEventHandler_A_Windows_UI_Xaml_Controls_Control_j_Windows_UI_Xaml_Controls_FocusDise" +
"ngagedEventArgs_V___Impl_Vtbl_s_theCcwVtable")]
public static global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_Controls_Control_j_Windows_UI_Xaml_Controls_FocusDisengagedEventArgs_V___Impl.Vtbl s_theCcwVtable
#if false
= new global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_Controls_Control_j_Windows_UI_Xaml_Controls_FocusDisengagedEventArgs_V___Impl.Vtbl() {
pfnQueryInterface = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfQueryInterface>(System.Runtime.InteropServices.__vtable_IUnknown.QueryInterface),
pfnAddRef = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfAddRef>(System.Runtime.InteropServices.__vtable_IUnknown.AddRef),
pfnRelease = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfRelease>(System.Runtime.InteropServices.__vtable_IUnknown.Release),
pfnInvoke_Windows_Foundation__TypedEventHandler_A_Windows_UI_Xaml_Controls_Control_j_Windows_UI_Xaml_Controls_FocusDisengagedEventArgs_V_ = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget75>(global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_Controls_Control_j_Windows_UI_Xaml_Controls_FocusDisengagedEventArgs_V___Impl.Vtbl.Invoke__STUB),
}
#endif
;
public static global::System.IntPtr pNativeVtable;
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int Invoke__STUB(
global::System.IntPtr pComThis,
global::Windows.UI.Xaml.Controls.IControl__Impl.Vtbl** unsafe_sender,
global::Windows.UI.Xaml.Controls.IFocusDisengagedEventArgs__Impl.Vtbl** unsafe_args)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.Controls.Control, global::Windows.UI.Xaml.Controls.FocusDisengagedEventArgs>>(
__this,
0
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Proc_TArg0__TArg1__<global::Windows.UI.Xaml.Controls.Control, global::Windows.UI.Xaml.Controls.FocusDisengagedEventArgs>(
__this,
unsafe_sender,
unsafe_args,
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
private static class Windows_Foundation_TypedEventHandler_A_Windows_UI_Xaml_Controls_Control_j_Windows_UI_Xaml_Controls_FocusDisengagedEventArgs_V___Impl_Vtbl_McgRvaContainer
{
[global::System.Runtime.CompilerServices.MethodAddrFixup(0, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "QueryInterface")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(4, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "AddRef")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(8, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "Release")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(12, typeof(global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_Controls_Control_j_Windows_UI_Xaml_Controls_FocusDisengagedEventArgs_V___Impl.Vtbl), "Invoke__STUB")]
[global::System.Runtime.CompilerServices.NonArray]
static readonly byte[] RVA_Windows_Foundation_TypedEventHandler_A_Windows_UI_Xaml_Controls_Control_j_Windows_UI_Xaml_Controls_FocusDisengagedEventArgs_V___Impl_Vtbl_s_theCcwVtable = new byte[] {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
}
}
}
// Windows.Foundation.TypedEventHandler<Windows.UI.Xaml.Controls.TextBox,Windows.UI.Xaml.Controls.TextCompositionStartedEventArgs>
public unsafe static class TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_TextCompositionStartedEventArgs_V___Impl
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void Invoke(
this global::System.__ComObject __this,
global::Windows.UI.Xaml.Controls.TextBox sender,
global::Windows.UI.Xaml.Controls.TextCompositionStartedEventArgs args)
{
global::McgInterop.ForwardComSharedStubs.Proc_TArg0__TArg1__<global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.Controls.TextBox, global::Windows.UI.Xaml.Controls.TextCompositionStartedEventArgs>, global::Windows.UI.Xaml.Controls.TextBox, global::Windows.UI.Xaml.Controls.TextCompositionStartedEventArgs>(
__this,
sender,
args,
global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_TextCompositionStartedEventArgs_V___Impl.Vtbl.idx_Invoke
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// v-table for 'Windows.Foundation.TypedEventHandler<Windows.UI.Xaml.Controls.TextBox,Windows.UI.Xaml.Controls.TextCompositionStartedEventArgs>'
[global::System.Runtime.InteropServices.McgRootsType(typeof(global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.Controls.TextBox, global::Windows.UI.Xaml.Controls.TextCompositionStartedEventArgs>))]
public unsafe partial struct Vtbl
{
global::System.IntPtr pfnQueryInterface;
global::System.IntPtr pfnAddRef;
global::System.IntPtr pfnRelease;
// Windows_Foundation__TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_TextCompositionStartedEventArgs_V_
global::System.IntPtr pfnInvoke_Windows_Foundation__TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_TextCompositionStartedEventArgs_V_;
internal const int idx_Invoke = 3;
[global::System.Runtime.CompilerServices.InitDataBlob(typeof(global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_TextCompositionStartedEventArgs_V___Impl.Vtbl.Windows_Foundation_TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_TextCompositionStartedEventArgs_V___Impl_Vtbl_McgRvaContainer), "RVA_Windows_Foundation_TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_TextCompo" +
"sitionStartedEventArgs_V___Impl_Vtbl_s_theCcwVtable")]
public static global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_TextCompositionStartedEventArgs_V___Impl.Vtbl s_theCcwVtable
#if false
= new global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_TextCompositionStartedEventArgs_V___Impl.Vtbl() {
pfnQueryInterface = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfQueryInterface>(System.Runtime.InteropServices.__vtable_IUnknown.QueryInterface),
pfnAddRef = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfAddRef>(System.Runtime.InteropServices.__vtable_IUnknown.AddRef),
pfnRelease = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfRelease>(System.Runtime.InteropServices.__vtable_IUnknown.Release),
pfnInvoke_Windows_Foundation__TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_TextCompositionStartedEventArgs_V_ = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget89>(global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_TextCompositionStartedEventArgs_V___Impl.Vtbl.Invoke__STUB),
}
#endif
;
public static global::System.IntPtr pNativeVtable;
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int Invoke__STUB(
global::System.IntPtr pComThis,
global::Windows.UI.Xaml.Controls.ITextBox__Impl.Vtbl** unsafe_sender,
global::Windows.UI.Xaml.Controls.ITextCompositionStartedEventArgs__Impl.Vtbl** unsafe_args)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.Controls.TextBox, global::Windows.UI.Xaml.Controls.TextCompositionStartedEventArgs>>(
__this,
0
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Proc_TArg0__TArg1__<global::Windows.UI.Xaml.Controls.TextBox, global::Windows.UI.Xaml.Controls.TextCompositionStartedEventArgs>(
__this,
unsafe_sender,
unsafe_args,
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
private static class Windows_Foundation_TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_TextCompositionStartedEventArgs_V___Impl_Vtbl_McgRvaContainer
{
[global::System.Runtime.CompilerServices.MethodAddrFixup(0, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "QueryInterface")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(4, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "AddRef")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(8, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "Release")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(12, typeof(global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_TextCompositionStartedEventArgs_V___Impl.Vtbl), "Invoke__STUB")]
[global::System.Runtime.CompilerServices.NonArray]
static readonly byte[] RVA_Windows_Foundation_TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_TextCompositionStartedEventArgs_V___Impl_Vtbl_s_theCcwVtable = new byte[] {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
}
}
}
// Windows.Foundation.TypedEventHandler<Windows.UI.Xaml.Controls.TextBox,Windows.UI.Xaml.Controls.TextCompositionChangedEventArgs>
public unsafe static class TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_TextCompositionChangedEventArgs_V___Impl
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void Invoke(
this global::System.__ComObject __this,
global::Windows.UI.Xaml.Controls.TextBox sender,
global::Windows.UI.Xaml.Controls.TextCompositionChangedEventArgs args)
{
global::McgInterop.ForwardComSharedStubs.Proc_TArg0__TArg1__<global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.Controls.TextBox, global::Windows.UI.Xaml.Controls.TextCompositionChangedEventArgs>, global::Windows.UI.Xaml.Controls.TextBox, global::Windows.UI.Xaml.Controls.TextCompositionChangedEventArgs>(
__this,
sender,
args,
global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_TextCompositionChangedEventArgs_V___Impl.Vtbl.idx_Invoke
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// v-table for 'Windows.Foundation.TypedEventHandler<Windows.UI.Xaml.Controls.TextBox,Windows.UI.Xaml.Controls.TextCompositionChangedEventArgs>'
[global::System.Runtime.InteropServices.McgRootsType(typeof(global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.Controls.TextBox, global::Windows.UI.Xaml.Controls.TextCompositionChangedEventArgs>))]
public unsafe partial struct Vtbl
{
global::System.IntPtr pfnQueryInterface;
global::System.IntPtr pfnAddRef;
global::System.IntPtr pfnRelease;
// Windows_Foundation__TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_TextCompositionChangedEventArgs_V_
global::System.IntPtr pfnInvoke_Windows_Foundation__TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_TextCompositionChangedEventArgs_V_;
internal const int idx_Invoke = 3;
[global::System.Runtime.CompilerServices.InitDataBlob(typeof(global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_TextCompositionChangedEventArgs_V___Impl.Vtbl.Windows_Foundation_TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_TextCompositionChangedEventArgs_V___Impl_Vtbl_McgRvaContainer), "RVA_Windows_Foundation_TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_TextCompo" +
"sitionChangedEventArgs_V___Impl_Vtbl_s_theCcwVtable")]
public static global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_TextCompositionChangedEventArgs_V___Impl.Vtbl s_theCcwVtable
#if false
= new global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_TextCompositionChangedEventArgs_V___Impl.Vtbl() {
pfnQueryInterface = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfQueryInterface>(System.Runtime.InteropServices.__vtable_IUnknown.QueryInterface),
pfnAddRef = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfAddRef>(System.Runtime.InteropServices.__vtable_IUnknown.AddRef),
pfnRelease = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfRelease>(System.Runtime.InteropServices.__vtable_IUnknown.Release),
pfnInvoke_Windows_Foundation__TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_TextCompositionChangedEventArgs_V_ = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget90>(global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_TextCompositionChangedEventArgs_V___Impl.Vtbl.Invoke__STUB),
}
#endif
;
public static global::System.IntPtr pNativeVtable;
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int Invoke__STUB(
global::System.IntPtr pComThis,
global::Windows.UI.Xaml.Controls.ITextBox__Impl.Vtbl** unsafe_sender,
global::Windows.UI.Xaml.Controls.ITextCompositionChangedEventArgs__Impl.Vtbl** unsafe_args)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.Controls.TextBox, global::Windows.UI.Xaml.Controls.TextCompositionChangedEventArgs>>(
__this,
0
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Proc_TArg0__TArg1__<global::Windows.UI.Xaml.Controls.TextBox, global::Windows.UI.Xaml.Controls.TextCompositionChangedEventArgs>(
__this,
unsafe_sender,
unsafe_args,
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
private static class Windows_Foundation_TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_TextCompositionChangedEventArgs_V___Impl_Vtbl_McgRvaContainer
{
[global::System.Runtime.CompilerServices.MethodAddrFixup(0, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "QueryInterface")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(4, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "AddRef")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(8, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "Release")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(12, typeof(global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_TextCompositionChangedEventArgs_V___Impl.Vtbl), "Invoke__STUB")]
[global::System.Runtime.CompilerServices.NonArray]
static readonly byte[] RVA_Windows_Foundation_TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_TextCompositionChangedEventArgs_V___Impl_Vtbl_s_theCcwVtable = new byte[] {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
}
}
}
// Windows.Foundation.TypedEventHandler<Windows.UI.Xaml.Controls.TextBox,Windows.UI.Xaml.Controls.TextCompositionEndedEventArgs>
public unsafe static class TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_TextCompositionEndedEventArgs_V___Impl
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void Invoke(
this global::System.__ComObject __this,
global::Windows.UI.Xaml.Controls.TextBox sender,
global::Windows.UI.Xaml.Controls.TextCompositionEndedEventArgs args)
{
global::McgInterop.ForwardComSharedStubs.Proc_TArg0__TArg1__<global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.Controls.TextBox, global::Windows.UI.Xaml.Controls.TextCompositionEndedEventArgs>, global::Windows.UI.Xaml.Controls.TextBox, global::Windows.UI.Xaml.Controls.TextCompositionEndedEventArgs>(
__this,
sender,
args,
global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_TextCompositionEndedEventArgs_V___Impl.Vtbl.idx_Invoke
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// v-table for 'Windows.Foundation.TypedEventHandler<Windows.UI.Xaml.Controls.TextBox,Windows.UI.Xaml.Controls.TextCompositionEndedEventArgs>'
[global::System.Runtime.InteropServices.McgRootsType(typeof(global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.Controls.TextBox, global::Windows.UI.Xaml.Controls.TextCompositionEndedEventArgs>))]
public unsafe partial struct Vtbl
{
global::System.IntPtr pfnQueryInterface;
global::System.IntPtr pfnAddRef;
global::System.IntPtr pfnRelease;
// Windows_Foundation__TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_TextCompositionEndedEventArgs_V_
global::System.IntPtr pfnInvoke_Windows_Foundation__TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_TextCompositionEndedEventArgs_V_;
internal const int idx_Invoke = 3;
[global::System.Runtime.CompilerServices.InitDataBlob(typeof(global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_TextCompositionEndedEventArgs_V___Impl.Vtbl.Windows_Foundation_TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_TextCompositionEndedEventArgs_V___Impl_Vtbl_McgRvaContainer), "RVA_Windows_Foundation_TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_TextCompo" +
"sitionEndedEventArgs_V___Impl_Vtbl_s_theCcwVtable")]
public static global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_TextCompositionEndedEventArgs_V___Impl.Vtbl s_theCcwVtable
#if false
= new global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_TextCompositionEndedEventArgs_V___Impl.Vtbl() {
pfnQueryInterface = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfQueryInterface>(System.Runtime.InteropServices.__vtable_IUnknown.QueryInterface),
pfnAddRef = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfAddRef>(System.Runtime.InteropServices.__vtable_IUnknown.AddRef),
pfnRelease = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfRelease>(System.Runtime.InteropServices.__vtable_IUnknown.Release),
pfnInvoke_Windows_Foundation__TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_TextCompositionEndedEventArgs_V_ = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget91>(global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_TextCompositionEndedEventArgs_V___Impl.Vtbl.Invoke__STUB),
}
#endif
;
public static global::System.IntPtr pNativeVtable;
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int Invoke__STUB(
global::System.IntPtr pComThis,
global::Windows.UI.Xaml.Controls.ITextBox__Impl.Vtbl** unsafe_sender,
global::Windows.UI.Xaml.Controls.ITextCompositionEndedEventArgs__Impl.Vtbl** unsafe_args)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.Controls.TextBox, global::Windows.UI.Xaml.Controls.TextCompositionEndedEventArgs>>(
__this,
0
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Proc_TArg0__TArg1__<global::Windows.UI.Xaml.Controls.TextBox, global::Windows.UI.Xaml.Controls.TextCompositionEndedEventArgs>(
__this,
unsafe_sender,
unsafe_args,
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
private static class Windows_Foundation_TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_TextCompositionEndedEventArgs_V___Impl_Vtbl_McgRvaContainer
{
[global::System.Runtime.CompilerServices.MethodAddrFixup(0, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "QueryInterface")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(4, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "AddRef")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(8, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "Release")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(12, typeof(global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_TextCompositionEndedEventArgs_V___Impl.Vtbl), "Invoke__STUB")]
[global::System.Runtime.CompilerServices.NonArray]
static readonly byte[] RVA_Windows_Foundation_TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_TextCompositionEndedEventArgs_V___Impl_Vtbl_s_theCcwVtable = new byte[] {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
}
}
}
// Windows.Foundation.TypedEventHandler<Windows.UI.Xaml.Controls.TextBox,Windows.UI.Xaml.Controls.CandidateWindowBoundsChangedEventArgs>
public unsafe static class TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_CandidateWindowBoundsChangedEventArgs_V___Impl
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void Invoke(
this global::System.__ComObject __this,
global::Windows.UI.Xaml.Controls.TextBox sender,
global::Windows.UI.Xaml.Controls.CandidateWindowBoundsChangedEventArgs args)
{
global::McgInterop.ForwardComSharedStubs.Proc_TArg0__TArg1__<global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.Controls.TextBox, global::Windows.UI.Xaml.Controls.CandidateWindowBoundsChangedEventArgs>, global::Windows.UI.Xaml.Controls.TextBox, global::Windows.UI.Xaml.Controls.CandidateWindowBoundsChangedEventArgs>(
__this,
sender,
args,
global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_CandidateWindowBoundsChangedEventArgs_V___Impl.Vtbl.idx_Invoke
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// v-table for 'Windows.Foundation.TypedEventHandler<Windows.UI.Xaml.Controls.TextBox,Windows.UI.Xaml.Controls.CandidateWindowBoundsChangedEventArgs>'
[global::System.Runtime.InteropServices.McgRootsType(typeof(global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.Controls.TextBox, global::Windows.UI.Xaml.Controls.CandidateWindowBoundsChangedEventArgs>))]
public unsafe partial struct Vtbl
{
global::System.IntPtr pfnQueryInterface;
global::System.IntPtr pfnAddRef;
global::System.IntPtr pfnRelease;
// Windows_Foundation__TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_CandidateWindowBoundsChangedEventArgs_V_
global::System.IntPtr pfnInvoke_Windows_Foundation__TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_CandidateWindowBoundsChangedEventArgs_V_;
internal const int idx_Invoke = 3;
[global::System.Runtime.CompilerServices.InitDataBlob(typeof(global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_CandidateWindowBoundsChangedEventArgs_V___Impl.Vtbl.Windows_Foundation_TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_CandidateWindowBoundsChangedEventArgs_V___Impl_Vtbl_McgRvaContainer), "RVA_Windows_Foundation_TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_Candidate" +
"WindowBoundsChangedEventArgs_V___Impl_Vtbl_s_theCcwVtable")]
public static global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_CandidateWindowBoundsChangedEventArgs_V___Impl.Vtbl s_theCcwVtable
#if false
= new global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_CandidateWindowBoundsChangedEventArgs_V___Impl.Vtbl() {
pfnQueryInterface = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfQueryInterface>(System.Runtime.InteropServices.__vtable_IUnknown.QueryInterface),
pfnAddRef = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfAddRef>(System.Runtime.InteropServices.__vtable_IUnknown.AddRef),
pfnRelease = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfRelease>(System.Runtime.InteropServices.__vtable_IUnknown.Release),
pfnInvoke_Windows_Foundation__TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_CandidateWindowBoundsChangedEventArgs_V_ = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget92>(global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_CandidateWindowBoundsChangedEventArgs_V___Impl.Vtbl.Invoke__STUB),
}
#endif
;
public static global::System.IntPtr pNativeVtable;
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int Invoke__STUB(
global::System.IntPtr pComThis,
global::Windows.UI.Xaml.Controls.ITextBox__Impl.Vtbl** unsafe_sender,
global::Windows.UI.Xaml.Controls.ICandidateWindowBoundsChangedEventArgs__Impl.Vtbl** unsafe_args)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.Controls.TextBox, global::Windows.UI.Xaml.Controls.CandidateWindowBoundsChangedEventArgs>>(
__this,
0
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Proc_TArg0__TArg1__<global::Windows.UI.Xaml.Controls.TextBox, global::Windows.UI.Xaml.Controls.CandidateWindowBoundsChangedEventArgs>(
__this,
unsafe_sender,
unsafe_args,
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
private static class Windows_Foundation_TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_CandidateWindowBoundsChangedEventArgs_V___Impl_Vtbl_McgRvaContainer
{
[global::System.Runtime.CompilerServices.MethodAddrFixup(0, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "QueryInterface")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(4, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "AddRef")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(8, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "Release")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(12, typeof(global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_CandidateWindowBoundsChangedEventArgs_V___Impl.Vtbl), "Invoke__STUB")]
[global::System.Runtime.CompilerServices.NonArray]
static readonly byte[] RVA_Windows_Foundation_TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_CandidateWindowBoundsChangedEventArgs_V___Impl_Vtbl_s_theCcwVtable = new byte[] {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
}
}
}
// Windows.Foundation.TypedEventHandler<Windows.UI.Xaml.Controls.TextBox,Windows.UI.Xaml.Controls.TextBoxTextChangingEventArgs>
public unsafe static class TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_TextBoxTextChangingEventArgs_V___Impl
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void Invoke(
this global::System.__ComObject __this,
global::Windows.UI.Xaml.Controls.TextBox sender,
global::Windows.UI.Xaml.Controls.TextBoxTextChangingEventArgs args)
{
global::McgInterop.ForwardComSharedStubs.Proc_TArg0__TArg1__<global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.Controls.TextBox, global::Windows.UI.Xaml.Controls.TextBoxTextChangingEventArgs>, global::Windows.UI.Xaml.Controls.TextBox, global::Windows.UI.Xaml.Controls.TextBoxTextChangingEventArgs>(
__this,
sender,
args,
global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_TextBoxTextChangingEventArgs_V___Impl.Vtbl.idx_Invoke
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// v-table for 'Windows.Foundation.TypedEventHandler<Windows.UI.Xaml.Controls.TextBox,Windows.UI.Xaml.Controls.TextBoxTextChangingEventArgs>'
[global::System.Runtime.InteropServices.McgRootsType(typeof(global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.Controls.TextBox, global::Windows.UI.Xaml.Controls.TextBoxTextChangingEventArgs>))]
public unsafe partial struct Vtbl
{
global::System.IntPtr pfnQueryInterface;
global::System.IntPtr pfnAddRef;
global::System.IntPtr pfnRelease;
// Windows_Foundation__TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_TextBoxTextChangingEventArgs_V_
global::System.IntPtr pfnInvoke_Windows_Foundation__TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_TextBoxTextChangingEventArgs_V_;
internal const int idx_Invoke = 3;
[global::System.Runtime.CompilerServices.InitDataBlob(typeof(global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_TextBoxTextChangingEventArgs_V___Impl.Vtbl.Windows_Foundation_TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_TextBoxTextChangingEventArgs_V___Impl_Vtbl_McgRvaContainer), "RVA_Windows_Foundation_TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_TextBoxTe" +
"xtChangingEventArgs_V___Impl_Vtbl_s_theCcwVtable")]
public static global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_TextBoxTextChangingEventArgs_V___Impl.Vtbl s_theCcwVtable
#if false
= new global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_TextBoxTextChangingEventArgs_V___Impl.Vtbl() {
pfnQueryInterface = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfQueryInterface>(System.Runtime.InteropServices.__vtable_IUnknown.QueryInterface),
pfnAddRef = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfAddRef>(System.Runtime.InteropServices.__vtable_IUnknown.AddRef),
pfnRelease = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfRelease>(System.Runtime.InteropServices.__vtable_IUnknown.Release),
pfnInvoke_Windows_Foundation__TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_TextBoxTextChangingEventArgs_V_ = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget93>(global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_TextBoxTextChangingEventArgs_V___Impl.Vtbl.Invoke__STUB),
}
#endif
;
public static global::System.IntPtr pNativeVtable;
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int Invoke__STUB(
global::System.IntPtr pComThis,
global::Windows.UI.Xaml.Controls.ITextBox__Impl.Vtbl** unsafe_sender,
global::Windows.UI.Xaml.Controls.ITextBoxTextChangingEventArgs__Impl.Vtbl** unsafe_args)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.Controls.TextBox, global::Windows.UI.Xaml.Controls.TextBoxTextChangingEventArgs>>(
__this,
0
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Proc_TArg0__TArg1__<global::Windows.UI.Xaml.Controls.TextBox, global::Windows.UI.Xaml.Controls.TextBoxTextChangingEventArgs>(
__this,
unsafe_sender,
unsafe_args,
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
private static class Windows_Foundation_TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_TextBoxTextChangingEventArgs_V___Impl_Vtbl_McgRvaContainer
{
[global::System.Runtime.CompilerServices.MethodAddrFixup(0, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "QueryInterface")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(4, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "AddRef")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(8, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "Release")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(12, typeof(global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_TextBoxTextChangingEventArgs_V___Impl.Vtbl), "Invoke__STUB")]
[global::System.Runtime.CompilerServices.NonArray]
static readonly byte[] RVA_Windows_Foundation_TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_TextBoxTextChangingEventArgs_V___Impl_Vtbl_s_theCcwVtable = new byte[] {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
}
}
}
// Windows.Foundation.IAsyncOperation<Windows.Devices.I2c.I2cDevice>
public unsafe static class IAsyncOperation_A_Windows_Devices_I2c_I2cDevice_V___Impl
{
// StubClass for 'Windows.Foundation.IAsyncOperation<Windows.Devices.I2c.I2cDevice>'
public static partial class StubClass
{
// Signature, Windows.Foundation.IAsyncOperation<Windows.Devices.I2c.I2cDevice>.put_Completed, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.WinRTDelegateMarshaller] Windows_Foundation_AsyncOperationCompletedHandler_1_Windows_Devices_I2c_I2cDevice___Windows_Foundation__AsyncOperationCompletedHandler_A_Windows_Devices_I2c_I2cDevice_V_ *,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void put_Completed(
global::System.__ComObject __this,
global::Windows.Foundation.AsyncOperationCompletedHandler<global::Windows.Devices.I2c.I2cDevice> handler)
{
// Setup
global::Windows.Foundation.AsyncOperationCompletedHandler_A_Windows_Devices_I2c_I2cDevice_V___Impl.Vtbl** unsafe_handler = default(global::Windows.Foundation.AsyncOperationCompletedHandler_A_Windows_Devices_I2c_I2cDevice_V___Impl.Vtbl**);
int unsafe___return__;
try
{
// Marshalling
unsafe_handler = (global::Windows.Foundation.AsyncOperationCompletedHandler_A_Windows_Devices_I2c_I2cDevice_V___Impl.Vtbl**)global::System.Runtime.InteropServices.McgModuleManager.DelegateToComInterface(
handler,
typeof(global::Windows.Foundation.AsyncOperationCompletedHandler<global::Windows.Devices.I2c.I2cDevice>).TypeHandle,
global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget116>(global::Windows.Foundation.AsyncOperationCompletedHandler_A_Windows_Devices_I2c_I2cDevice_V___Impl.Invoke)
);
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.Foundation.IAsyncOperation<global::Windows.Devices.I2c.I2cDevice>).TypeHandle,
global::Windows.Foundation.IAsyncOperation_A_Windows_Devices_I2c_I2cDevice_V___Impl.Vtbl.idx_put_Completed,
unsafe_handler
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
// Return
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_handler)));
}
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.Foundation.AsyncOperationCompletedHandler<global::Windows.Devices.I2c.I2cDevice> get_Completed(global::System.__ComObject __this)
{
global::McgInterop.McgHelpers.FailFastForReducedMethod();
return default(global::Windows.Foundation.AsyncOperationCompletedHandler<global::Windows.Devices.I2c.I2cDevice>);
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.Devices.I2c.I2cDevice GetResults(global::System.__ComObject __this)
{
global::Windows.Devices.I2c.I2cDevice __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.Foundation.IAsyncOperation<global::Windows.Devices.I2c.I2cDevice>, global::Windows.Devices.I2c.I2cDevice>(
__this,
global::Windows.Foundation.IAsyncOperation_A_Windows_Devices_I2c_I2cDevice_V___Impl.Vtbl.idx_GetResults
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
}
// DispatchClass for 'Windows.Foundation.IAsyncOperation<Windows.Devices.I2c.I2cDevice>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.IAsyncOperation<global::Windows.Devices.I2c.I2cDevice>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Foundation.IAsyncOperation<global::Windows.Devices.I2c.I2cDevice>
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.IAsyncInfo.Id")]
uint global::Windows.Foundation.IAsyncInfo.get_Id()
{
global::McgInterop.McgHelpers.FailFastForReducedMethod();
return 0;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.IAsyncInfo.Status")]
global::Windows.Foundation.AsyncStatus global::Windows.Foundation.IAsyncInfo.get_Status()
{
global::McgInterop.McgHelpers.FailFastForReducedMethod();
return default(global::Windows.Foundation.AsyncStatus);
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.IAsyncInfo.ErrorCode")]
global::System.Exception global::Windows.Foundation.IAsyncInfo.get_ErrorCode()
{
global::McgInterop.McgHelpers.FailFastForReducedMethod();
return default(global::System.Exception);
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.Foundation.IAsyncInfo.Cancel()
{
global::McgInterop.McgHelpers.FailFastForReducedMethod();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.Foundation.IAsyncInfo.Close()
{
global::McgInterop.McgHelpers.FailFastForReducedMethod();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertySet, "Windows.Foundation.IAsyncOperation`1.Completed")]
void global::Windows.Foundation.IAsyncOperation<global::Windows.Devices.I2c.I2cDevice>.put_Completed(global::Windows.Foundation.AsyncOperationCompletedHandler<global::Windows.Devices.I2c.I2cDevice> handler)
{
global::Windows.Foundation.IAsyncOperation_A_Windows_Devices_I2c_I2cDevice_V___Impl.StubClass.put_Completed(
this,
handler
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
global::Windows.Foundation.AsyncOperationCompletedHandler<global::Windows.Devices.I2c.I2cDevice> global::Windows.Foundation.IAsyncOperation<global::Windows.Devices.I2c.I2cDevice>.get_Completed()
{
global::McgInterop.McgHelpers.FailFastForReducedMethod();
return default(global::Windows.Foundation.AsyncOperationCompletedHandler<global::Windows.Devices.I2c.I2cDevice>);
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
global::Windows.Devices.I2c.I2cDevice global::Windows.Foundation.IAsyncOperation<global::Windows.Devices.I2c.I2cDevice>.GetResults()
{
global::Windows.Devices.I2c.I2cDevice __retVal = global::Windows.Foundation.IAsyncOperation_A_Windows_Devices_I2c_I2cDevice_V___Impl.StubClass.GetResults(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.Foundation.IAsyncOperation<Windows.Devices.I2c.I2cDevice>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.IAsyncOperation<global::Windows.Devices.I2c.I2cDevice>))]
public unsafe partial struct Vtbl
{
internal const int idx_put_Completed = 6;
internal const int idx_get_Completed = 7;
internal const int idx_GetResults = 8;
}
}
// Windows.Foundation.AsyncOperationCompletedHandler<Windows.Devices.I2c.I2cDevice>
public unsafe static class AsyncOperationCompletedHandler_A_Windows_Devices_I2c_I2cDevice_V___Impl
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void Invoke(
this global::System.__ComObject __this,
global::Windows.Foundation.IAsyncOperation<global::Windows.Devices.I2c.I2cDevice> asyncInfo,
global::Windows.Foundation.AsyncStatus asyncStatus)
{
global::McgInterop.ForwardComSharedStubs.Proc_TArg0__int<global::Windows.Foundation.AsyncOperationCompletedHandler<global::Windows.Devices.I2c.I2cDevice>, global::Windows.Foundation.IAsyncOperation<global::Windows.Devices.I2c.I2cDevice>>(
__this,
asyncInfo,
((int)asyncStatus),
global::Windows.Foundation.AsyncOperationCompletedHandler_A_Windows_Devices_I2c_I2cDevice_V___Impl.Vtbl.idx_Invoke
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// v-table for 'Windows.Foundation.AsyncOperationCompletedHandler<Windows.Devices.I2c.I2cDevice>'
public unsafe partial struct Vtbl
{
internal const int idx_Invoke = 3;
}
}
// Windows.Foundation.AsyncOperationCompletedHandler<Windows.Storage.IStorageItem>
public unsafe static class AsyncOperationCompletedHandler_A_Windows_Storage_IStorageItem_V___Impl
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void Invoke(
this global::System.__ComObject __this,
global::Windows.Foundation.IAsyncOperation<global::Windows.Storage.IStorageItem> asyncInfo,
global::Windows.Foundation.AsyncStatus asyncStatus)
{
global::McgInterop.ForwardComSharedStubs.Proc_TArg0__int<global::Windows.Foundation.AsyncOperationCompletedHandler<global::Windows.Storage.IStorageItem>, global::Windows.Foundation.IAsyncOperation<global::Windows.Storage.IStorageItem>>(
__this,
asyncInfo,
((int)asyncStatus),
global::Windows.Foundation.AsyncOperationCompletedHandler_A_Windows_Storage_IStorageItem_V___Impl.Vtbl.idx_Invoke
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// v-table for 'Windows.Foundation.AsyncOperationCompletedHandler<Windows.Storage.IStorageItem>'
public unsafe partial struct Vtbl
{
internal const int idx_Invoke = 3;
}
}
// Windows.Foundation.IAsyncOperation<Windows.Storage.IStorageItem>
public unsafe static class IAsyncOperation_A_Windows_Storage_IStorageItem_V___Impl
{
// StubClass for 'Windows.Foundation.IAsyncOperation<Windows.Storage.IStorageItem>'
public static partial class StubClass
{
// Signature, Windows.Foundation.IAsyncOperation<Windows.Storage.IStorageItem>.put_Completed, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.WinRTDelegateMarshaller] Windows_Foundation_AsyncOperationCompletedHandler_1_Windows_Storage_IStorageItem___Windows_Foundation__AsyncOperationCompletedHandler_A_Windows_Storage_IStorageItem_V_ *,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void put_Completed(
global::System.__ComObject __this,
global::Windows.Foundation.AsyncOperationCompletedHandler<global::Windows.Storage.IStorageItem> handler)
{
// Setup
global::Windows.Foundation.AsyncOperationCompletedHandler_A_Windows_Storage_IStorageItem_V___Impl.Vtbl** unsafe_handler = default(global::Windows.Foundation.AsyncOperationCompletedHandler_A_Windows_Storage_IStorageItem_V___Impl.Vtbl**);
int unsafe___return__;
try
{
// Marshalling
unsafe_handler = (global::Windows.Foundation.AsyncOperationCompletedHandler_A_Windows_Storage_IStorageItem_V___Impl.Vtbl**)global::System.Runtime.InteropServices.McgModuleManager.DelegateToComInterface(
handler,
typeof(global::Windows.Foundation.AsyncOperationCompletedHandler<global::Windows.Storage.IStorageItem>).TypeHandle,
global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget123>(global::Windows.Foundation.AsyncOperationCompletedHandler_A_Windows_Storage_IStorageItem_V___Impl.Invoke)
);
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.Foundation.IAsyncOperation<global::Windows.Storage.IStorageItem>).TypeHandle,
global::Windows.Foundation.IAsyncOperation_A_Windows_Storage_IStorageItem_V___Impl.Vtbl.idx_put_Completed,
unsafe_handler
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
// Return
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_handler)));
}
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.Foundation.AsyncOperationCompletedHandler<global::Windows.Storage.IStorageItem> get_Completed(global::System.__ComObject __this)
{
global::McgInterop.McgHelpers.FailFastForReducedMethod();
return default(global::Windows.Foundation.AsyncOperationCompletedHandler<global::Windows.Storage.IStorageItem>);
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.Storage.IStorageItem GetResults(global::System.__ComObject __this)
{
global::Windows.Storage.IStorageItem __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.Foundation.IAsyncOperation<global::Windows.Storage.IStorageItem>, global::Windows.Storage.IStorageItem>(
__this,
global::Windows.Foundation.IAsyncOperation_A_Windows_Storage_IStorageItem_V___Impl.Vtbl.idx_GetResults
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
}
// DispatchClass for 'Windows.Foundation.IAsyncOperation<Windows.Storage.IStorageItem>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.IAsyncOperation<global::Windows.Storage.IStorageItem>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Foundation.IAsyncOperation<global::Windows.Storage.IStorageItem>
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.IAsyncInfo.Id")]
uint global::Windows.Foundation.IAsyncInfo.get_Id()
{
global::McgInterop.McgHelpers.FailFastForReducedMethod();
return 0;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.IAsyncInfo.Status")]
global::Windows.Foundation.AsyncStatus global::Windows.Foundation.IAsyncInfo.get_Status()
{
global::McgInterop.McgHelpers.FailFastForReducedMethod();
return default(global::Windows.Foundation.AsyncStatus);
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.IAsyncInfo.ErrorCode")]
global::System.Exception global::Windows.Foundation.IAsyncInfo.get_ErrorCode()
{
global::McgInterop.McgHelpers.FailFastForReducedMethod();
return default(global::System.Exception);
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.Foundation.IAsyncInfo.Cancel()
{
global::McgInterop.McgHelpers.FailFastForReducedMethod();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.Foundation.IAsyncInfo.Close()
{
global::McgInterop.McgHelpers.FailFastForReducedMethod();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertySet, "Windows.Foundation.IAsyncOperation`1.Completed")]
void global::Windows.Foundation.IAsyncOperation<global::Windows.Storage.IStorageItem>.put_Completed(global::Windows.Foundation.AsyncOperationCompletedHandler<global::Windows.Storage.IStorageItem> handler)
{
global::Windows.Foundation.IAsyncOperation_A_Windows_Storage_IStorageItem_V___Impl.StubClass.put_Completed(
this,
handler
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
global::Windows.Foundation.AsyncOperationCompletedHandler<global::Windows.Storage.IStorageItem> global::Windows.Foundation.IAsyncOperation<global::Windows.Storage.IStorageItem>.get_Completed()
{
global::McgInterop.McgHelpers.FailFastForReducedMethod();
return default(global::Windows.Foundation.AsyncOperationCompletedHandler<global::Windows.Storage.IStorageItem>);
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
global::Windows.Storage.IStorageItem global::Windows.Foundation.IAsyncOperation<global::Windows.Storage.IStorageItem>.GetResults()
{
global::Windows.Storage.IStorageItem __retVal = global::Windows.Foundation.IAsyncOperation_A_Windows_Storage_IStorageItem_V___Impl.StubClass.GetResults(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.Foundation.IAsyncOperation<Windows.Storage.IStorageItem>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.IAsyncOperation<global::Windows.Storage.IStorageItem>))]
public unsafe partial struct Vtbl
{
internal const int idx_put_Completed = 6;
internal const int idx_get_Completed = 7;
internal const int idx_GetResults = 8;
}
}
// Windows.Foundation.IAsyncOperation<Windows.Devices.Enumeration.DeviceInformationCollection>
public unsafe static class IAsyncOperation_A_Windows_Devices_Enumeration_DeviceInformationCollection_V___Impl
{
// StubClass for 'Windows.Foundation.IAsyncOperation<Windows.Devices.Enumeration.DeviceInformationCollection>'
public static partial class StubClass
{
// Signature, Windows.Foundation.IAsyncOperation<Windows.Devices.Enumeration.DeviceInformationCollection>.put_Completed, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.WinRTDelegateMarshaller] Windows_Foundation_AsyncOperationCompletedHandler_1_Windows_Devices_Enumeration_DeviceInformationCollection___Windows_Foundation__AsyncOperationCompletedHandler_A_Windows_Devices_Enumeration_DeviceInformationCollection_V_ *,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void put_Completed(
global::System.__ComObject __this,
global::Windows.Foundation.AsyncOperationCompletedHandler<global::Windows.Devices.Enumeration.DeviceInformationCollection> handler)
{
// Setup
global::Windows.Foundation.AsyncOperationCompletedHandler_A_Windows_Devices_Enumeration_DeviceInformationCollection_V___Impl.Vtbl** unsafe_handler = default(global::Windows.Foundation.AsyncOperationCompletedHandler_A_Windows_Devices_Enumeration_DeviceInformationCollection_V___Impl.Vtbl**);
int unsafe___return__;
try
{
// Marshalling
unsafe_handler = (global::Windows.Foundation.AsyncOperationCompletedHandler_A_Windows_Devices_Enumeration_DeviceInformationCollection_V___Impl.Vtbl**)global::System.Runtime.InteropServices.McgModuleManager.DelegateToComInterface(
handler,
typeof(global::Windows.Foundation.AsyncOperationCompletedHandler<global::Windows.Devices.Enumeration.DeviceInformationCollection>).TypeHandle,
global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget131>(global::Windows.Foundation.AsyncOperationCompletedHandler_A_Windows_Devices_Enumeration_DeviceInformationCollection_V___Impl.Invoke)
);
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.Foundation.IAsyncOperation<global::Windows.Devices.Enumeration.DeviceInformationCollection>).TypeHandle,
global::Windows.Foundation.IAsyncOperation_A_Windows_Devices_Enumeration_DeviceInformationCollection_V___Impl.Vtbl.idx_put_Completed,
unsafe_handler
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
// Return
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_handler)));
}
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.Foundation.AsyncOperationCompletedHandler<global::Windows.Devices.Enumeration.DeviceInformationCollection> get_Completed(global::System.__ComObject __this)
{
global::McgInterop.McgHelpers.FailFastForReducedMethod();
return default(global::Windows.Foundation.AsyncOperationCompletedHandler<global::Windows.Devices.Enumeration.DeviceInformationCollection>);
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.Devices.Enumeration.DeviceInformationCollection GetResults(global::System.__ComObject __this)
{
global::Windows.Devices.Enumeration.DeviceInformationCollection __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.Foundation.IAsyncOperation<global::Windows.Devices.Enumeration.DeviceInformationCollection>, global::Windows.Devices.Enumeration.DeviceInformationCollection>(
__this,
global::Windows.Foundation.IAsyncOperation_A_Windows_Devices_Enumeration_DeviceInformationCollection_V___Impl.Vtbl.idx_GetResults
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
}
// DispatchClass for 'Windows.Foundation.IAsyncOperation<Windows.Devices.Enumeration.DeviceInformationCollection>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.IAsyncOperation<global::Windows.Devices.Enumeration.DeviceInformationCollection>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Foundation.IAsyncOperation<global::Windows.Devices.Enumeration.DeviceInformationCollection>
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.IAsyncInfo.Id")]
uint global::Windows.Foundation.IAsyncInfo.get_Id()
{
global::McgInterop.McgHelpers.FailFastForReducedMethod();
return 0;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.IAsyncInfo.Status")]
global::Windows.Foundation.AsyncStatus global::Windows.Foundation.IAsyncInfo.get_Status()
{
global::McgInterop.McgHelpers.FailFastForReducedMethod();
return default(global::Windows.Foundation.AsyncStatus);
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.IAsyncInfo.ErrorCode")]
global::System.Exception global::Windows.Foundation.IAsyncInfo.get_ErrorCode()
{
global::McgInterop.McgHelpers.FailFastForReducedMethod();
return default(global::System.Exception);
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.Foundation.IAsyncInfo.Cancel()
{
global::McgInterop.McgHelpers.FailFastForReducedMethod();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.Foundation.IAsyncInfo.Close()
{
global::McgInterop.McgHelpers.FailFastForReducedMethod();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertySet, "Windows.Foundation.IAsyncOperation`1.Completed")]
void global::Windows.Foundation.IAsyncOperation<global::Windows.Devices.Enumeration.DeviceInformationCollection>.put_Completed(global::Windows.Foundation.AsyncOperationCompletedHandler<global::Windows.Devices.Enumeration.DeviceInformationCollection> handler)
{
global::Windows.Foundation.IAsyncOperation_A_Windows_Devices_Enumeration_DeviceInformationCollection_V___Impl.StubClass.put_Completed(
this,
handler
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
global::Windows.Foundation.AsyncOperationCompletedHandler<global::Windows.Devices.Enumeration.DeviceInformationCollection> global::Windows.Foundation.IAsyncOperation<global::Windows.Devices.Enumeration.DeviceInformationCollection>.get_Completed()
{
global::McgInterop.McgHelpers.FailFastForReducedMethod();
return default(global::Windows.Foundation.AsyncOperationCompletedHandler<global::Windows.Devices.Enumeration.DeviceInformationCollection>);
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
global::Windows.Devices.Enumeration.DeviceInformationCollection global::Windows.Foundation.IAsyncOperation<global::Windows.Devices.Enumeration.DeviceInformationCollection>.GetResults()
{
global::Windows.Devices.Enumeration.DeviceInformationCollection __retVal = global::Windows.Foundation.IAsyncOperation_A_Windows_Devices_Enumeration_DeviceInformationCollection_V___Impl.StubClass.GetResults(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.Foundation.IAsyncOperation<Windows.Devices.Enumeration.DeviceInformationCollection>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.IAsyncOperation<global::Windows.Devices.Enumeration.DeviceInformationCollection>))]
public unsafe partial struct Vtbl
{
internal const int idx_put_Completed = 6;
internal const int idx_get_Completed = 7;
internal const int idx_GetResults = 8;
}
}
// Windows.Foundation.AsyncOperationCompletedHandler<Windows.Devices.Enumeration.DeviceInformationCollection>
public unsafe static class AsyncOperationCompletedHandler_A_Windows_Devices_Enumeration_DeviceInformationCollection_V___Impl
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void Invoke(
this global::System.__ComObject __this,
global::Windows.Foundation.IAsyncOperation<global::Windows.Devices.Enumeration.DeviceInformationCollection> asyncInfo,
global::Windows.Foundation.AsyncStatus asyncStatus)
{
global::McgInterop.ForwardComSharedStubs.Proc_TArg0__int<global::Windows.Foundation.AsyncOperationCompletedHandler<global::Windows.Devices.Enumeration.DeviceInformationCollection>, global::Windows.Foundation.IAsyncOperation<global::Windows.Devices.Enumeration.DeviceInformationCollection>>(
__this,
asyncInfo,
((int)asyncStatus),
global::Windows.Foundation.AsyncOperationCompletedHandler_A_Windows_Devices_Enumeration_DeviceInformationCollection_V___Impl.Vtbl.idx_Invoke
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// v-table for 'Windows.Foundation.AsyncOperationCompletedHandler<Windows.Devices.Enumeration.DeviceInformationCollection>'
public unsafe partial struct Vtbl
{
internal const int idx_Invoke = 3;
}
}
// Windows.Foundation.IAsyncOperation<Windows.Devices.Spi.SpiDevice>
public unsafe static class IAsyncOperation_A_Windows_Devices_Spi_SpiDevice_V___Impl
{
// StubClass for 'Windows.Foundation.IAsyncOperation<Windows.Devices.Spi.SpiDevice>'
public static partial class StubClass
{
// Signature, Windows.Foundation.IAsyncOperation<Windows.Devices.Spi.SpiDevice>.put_Completed, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.WinRTDelegateMarshaller] Windows_Foundation_AsyncOperationCompletedHandler_1_Windows_Devices_Spi_SpiDevice___Windows_Foundation__AsyncOperationCompletedHandler_A_Windows_Devices_Spi_SpiDevice_V_ *,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void put_Completed(
global::System.__ComObject __this,
global::Windows.Foundation.AsyncOperationCompletedHandler<global::Windows.Devices.Spi.SpiDevice> handler)
{
// Setup
global::Windows.Foundation.AsyncOperationCompletedHandler_A_Windows_Devices_Spi_SpiDevice_V___Impl.Vtbl** unsafe_handler = default(global::Windows.Foundation.AsyncOperationCompletedHandler_A_Windows_Devices_Spi_SpiDevice_V___Impl.Vtbl**);
int unsafe___return__;
try
{
// Marshalling
unsafe_handler = (global::Windows.Foundation.AsyncOperationCompletedHandler_A_Windows_Devices_Spi_SpiDevice_V___Impl.Vtbl**)global::System.Runtime.InteropServices.McgModuleManager.DelegateToComInterface(
handler,
typeof(global::Windows.Foundation.AsyncOperationCompletedHandler<global::Windows.Devices.Spi.SpiDevice>).TypeHandle,
global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget132>(global::Windows.Foundation.AsyncOperationCompletedHandler_A_Windows_Devices_Spi_SpiDevice_V___Impl.Invoke)
);
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.Foundation.IAsyncOperation<global::Windows.Devices.Spi.SpiDevice>).TypeHandle,
global::Windows.Foundation.IAsyncOperation_A_Windows_Devices_Spi_SpiDevice_V___Impl.Vtbl.idx_put_Completed,
unsafe_handler
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
// Return
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_handler)));
}
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.Foundation.AsyncOperationCompletedHandler<global::Windows.Devices.Spi.SpiDevice> get_Completed(global::System.__ComObject __this)
{
global::McgInterop.McgHelpers.FailFastForReducedMethod();
return default(global::Windows.Foundation.AsyncOperationCompletedHandler<global::Windows.Devices.Spi.SpiDevice>);
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.Devices.Spi.SpiDevice GetResults(global::System.__ComObject __this)
{
global::Windows.Devices.Spi.SpiDevice __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.Foundation.IAsyncOperation<global::Windows.Devices.Spi.SpiDevice>, global::Windows.Devices.Spi.SpiDevice>(
__this,
global::Windows.Foundation.IAsyncOperation_A_Windows_Devices_Spi_SpiDevice_V___Impl.Vtbl.idx_GetResults
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
}
// DispatchClass for 'Windows.Foundation.IAsyncOperation<Windows.Devices.Spi.SpiDevice>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.IAsyncOperation<global::Windows.Devices.Spi.SpiDevice>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Foundation.IAsyncOperation<global::Windows.Devices.Spi.SpiDevice>
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.IAsyncInfo.Id")]
uint global::Windows.Foundation.IAsyncInfo.get_Id()
{
global::McgInterop.McgHelpers.FailFastForReducedMethod();
return 0;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.IAsyncInfo.Status")]
global::Windows.Foundation.AsyncStatus global::Windows.Foundation.IAsyncInfo.get_Status()
{
global::McgInterop.McgHelpers.FailFastForReducedMethod();
return default(global::Windows.Foundation.AsyncStatus);
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.IAsyncInfo.ErrorCode")]
global::System.Exception global::Windows.Foundation.IAsyncInfo.get_ErrorCode()
{
global::McgInterop.McgHelpers.FailFastForReducedMethod();
return default(global::System.Exception);
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.Foundation.IAsyncInfo.Cancel()
{
global::McgInterop.McgHelpers.FailFastForReducedMethod();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.Foundation.IAsyncInfo.Close()
{
global::McgInterop.McgHelpers.FailFastForReducedMethod();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertySet, "Windows.Foundation.IAsyncOperation`1.Completed")]
void global::Windows.Foundation.IAsyncOperation<global::Windows.Devices.Spi.SpiDevice>.put_Completed(global::Windows.Foundation.AsyncOperationCompletedHandler<global::Windows.Devices.Spi.SpiDevice> handler)
{
global::Windows.Foundation.IAsyncOperation_A_Windows_Devices_Spi_SpiDevice_V___Impl.StubClass.put_Completed(
this,
handler
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
global::Windows.Foundation.AsyncOperationCompletedHandler<global::Windows.Devices.Spi.SpiDevice> global::Windows.Foundation.IAsyncOperation<global::Windows.Devices.Spi.SpiDevice>.get_Completed()
{
global::McgInterop.McgHelpers.FailFastForReducedMethod();
return default(global::Windows.Foundation.AsyncOperationCompletedHandler<global::Windows.Devices.Spi.SpiDevice>);
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
global::Windows.Devices.Spi.SpiDevice global::Windows.Foundation.IAsyncOperation<global::Windows.Devices.Spi.SpiDevice>.GetResults()
{
global::Windows.Devices.Spi.SpiDevice __retVal = global::Windows.Foundation.IAsyncOperation_A_Windows_Devices_Spi_SpiDevice_V___Impl.StubClass.GetResults(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.Foundation.IAsyncOperation<Windows.Devices.Spi.SpiDevice>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.IAsyncOperation<global::Windows.Devices.Spi.SpiDevice>))]
public unsafe partial struct Vtbl
{
internal const int idx_put_Completed = 6;
internal const int idx_get_Completed = 7;
internal const int idx_GetResults = 8;
}
}
// Windows.Foundation.AsyncOperationCompletedHandler<Windows.Devices.Spi.SpiDevice>
public unsafe static class AsyncOperationCompletedHandler_A_Windows_Devices_Spi_SpiDevice_V___Impl
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void Invoke(
this global::System.__ComObject __this,
global::Windows.Foundation.IAsyncOperation<global::Windows.Devices.Spi.SpiDevice> asyncInfo,
global::Windows.Foundation.AsyncStatus asyncStatus)
{
global::McgInterop.ForwardComSharedStubs.Proc_TArg0__int<global::Windows.Foundation.AsyncOperationCompletedHandler<global::Windows.Devices.Spi.SpiDevice>, global::Windows.Foundation.IAsyncOperation<global::Windows.Devices.Spi.SpiDevice>>(
__this,
asyncInfo,
((int)asyncStatus),
global::Windows.Foundation.AsyncOperationCompletedHandler_A_Windows_Devices_Spi_SpiDevice_V___Impl.Vtbl.idx_Invoke
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// v-table for 'Windows.Foundation.AsyncOperationCompletedHandler<Windows.Devices.Spi.SpiDevice>'
public unsafe partial struct Vtbl
{
internal const int idx_Invoke = 3;
}
}
// Windows.Foundation.IAsyncOperationWithProgress<Windows.Storage.Streams.IBuffer,uint>
public unsafe static class IAsyncOperationWithProgress_A_Windows_Storage_Streams_IBuffer_j_uint_V___Impl
{
// StubClass for 'Windows.Foundation.IAsyncOperationWithProgress<Windows.Storage.Streams.IBuffer,uint>'
public static partial class StubClass
{
// Signature, Windows.Foundation.IAsyncOperationWithProgress<Windows.Storage.Streams.IBuffer,uint>.put_Progress, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.WinRTDelegateMarshaller] Windows_Foundation_AsyncOperationProgressHandler_2_Windows_Storage_Streams_IBuffer__uint___Windows_Foundation__AsyncOperationProgressHandler_A_Windows_Storage_Streams_IBuffer_j_uint_V_ *,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void put_Progress(
global::System.__ComObject __this,
global::Windows.Foundation.AsyncOperationProgressHandler<global::Windows.Storage.Streams.IBuffer, uint> handler)
{
// Setup
global::Windows.Foundation.AsyncOperationProgressHandler_A_Windows_Storage_Streams_IBuffer_j_uint_V___Impl.Vtbl** unsafe_handler = default(global::Windows.Foundation.AsyncOperationProgressHandler_A_Windows_Storage_Streams_IBuffer_j_uint_V___Impl.Vtbl**);
int unsafe___return__;
try
{
// Marshalling
unsafe_handler = (global::Windows.Foundation.AsyncOperationProgressHandler_A_Windows_Storage_Streams_IBuffer_j_uint_V___Impl.Vtbl**)global::System.Runtime.InteropServices.McgModuleManager.DelegateToComInterface(
handler,
typeof(global::Windows.Foundation.AsyncOperationProgressHandler<global::Windows.Storage.Streams.IBuffer, uint>).TypeHandle,
global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget136>(global::Windows.Foundation.AsyncOperationProgressHandler_A_Windows_Storage_Streams_IBuffer_j_uint_V___Impl.Invoke)
);
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.Foundation.IAsyncOperationWithProgress<global::Windows.Storage.Streams.IBuffer, uint>).TypeHandle,
global::Windows.Foundation.IAsyncOperationWithProgress_A_Windows_Storage_Streams_IBuffer_j_uint_V___Impl.Vtbl.idx_put_Progress,
unsafe_handler
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
// Return
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_handler)));
}
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.Foundation.AsyncOperationProgressHandler<global::Windows.Storage.Streams.IBuffer, uint> get_Progress(global::System.__ComObject __this)
{
global::Windows.Foundation.AsyncOperationProgressHandler<global::Windows.Storage.Streams.IBuffer, uint> __ret = global::McgInterop.ForwardComSharedStubs.Func__AsyncOperationProgressHandler_2_Storage_Streams_IBuffer__uint___<global::Windows.Foundation.IAsyncOperationWithProgress<global::Windows.Storage.Streams.IBuffer, uint>>(
__this,
global::Windows.Foundation.IAsyncOperationWithProgress_A_Windows_Storage_Streams_IBuffer_j_uint_V___Impl.Vtbl.idx_get_Progress
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
// Signature, Windows.Foundation.IAsyncOperationWithProgress<Windows.Storage.Streams.IBuffer,uint>.put_Completed, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.WinRTDelegateMarshaller] Windows_Foundation_AsyncOperationWithProgressCompletedHandler_2_Windows_Storage_Streams_IBuffer__uint___Windows_Foundation__AsyncOperationWithProgressCompletedHandler_A_Windows_Storage_Streams_IBuffer_j_uint_V_ *,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void put_Completed(
global::System.__ComObject __this,
global::Windows.Foundation.AsyncOperationWithProgressCompletedHandler<global::Windows.Storage.Streams.IBuffer, uint> handler)
{
// Setup
global::Windows.Foundation.AsyncOperationWithProgressCompletedHandler_A_Windows_Storage_Streams_IBuffer_j_uint_V___Impl.Vtbl** unsafe_handler = default(global::Windows.Foundation.AsyncOperationWithProgressCompletedHandler_A_Windows_Storage_Streams_IBuffer_j_uint_V___Impl.Vtbl**);
int unsafe___return__;
try
{
// Marshalling
unsafe_handler = (global::Windows.Foundation.AsyncOperationWithProgressCompletedHandler_A_Windows_Storage_Streams_IBuffer_j_uint_V___Impl.Vtbl**)global::System.Runtime.InteropServices.McgModuleManager.DelegateToComInterface(
handler,
typeof(global::Windows.Foundation.AsyncOperationWithProgressCompletedHandler<global::Windows.Storage.Streams.IBuffer, uint>).TypeHandle,
global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget137>(global::Windows.Foundation.AsyncOperationWithProgressCompletedHandler_A_Windows_Storage_Streams_IBuffer_j_uint_V___Impl.Invoke)
);
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.Foundation.IAsyncOperationWithProgress<global::Windows.Storage.Streams.IBuffer, uint>).TypeHandle,
global::Windows.Foundation.IAsyncOperationWithProgress_A_Windows_Storage_Streams_IBuffer_j_uint_V___Impl.Vtbl.idx_put_Completed,
unsafe_handler
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
// Return
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_handler)));
}
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.Foundation.AsyncOperationWithProgressCompletedHandler<global::Windows.Storage.Streams.IBuffer, uint> get_Completed(global::System.__ComObject __this)
{
global::McgInterop.McgHelpers.FailFastForReducedMethod();
return default(global::Windows.Foundation.AsyncOperationWithProgressCompletedHandler<global::Windows.Storage.Streams.IBuffer, uint>);
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.Storage.Streams.IBuffer GetResults(global::System.__ComObject __this)
{
global::Windows.Storage.Streams.IBuffer __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.Foundation.IAsyncOperationWithProgress<global::Windows.Storage.Streams.IBuffer, uint>, global::Windows.Storage.Streams.IBuffer>(
__this,
global::Windows.Foundation.IAsyncOperationWithProgress_A_Windows_Storage_Streams_IBuffer_j_uint_V___Impl.Vtbl.idx_GetResults
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
}
// DispatchClass for 'Windows.Foundation.IAsyncOperationWithProgress<Windows.Storage.Streams.IBuffer,uint>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.IAsyncOperationWithProgress<global::Windows.Storage.Streams.IBuffer, uint>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Foundation.IAsyncOperationWithProgress<global::Windows.Storage.Streams.IBuffer, uint>
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.IAsyncInfo.Id")]
uint global::Windows.Foundation.IAsyncInfo.get_Id()
{
global::McgInterop.McgHelpers.FailFastForReducedMethod();
return 0;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.IAsyncInfo.Status")]
global::Windows.Foundation.AsyncStatus global::Windows.Foundation.IAsyncInfo.get_Status()
{
global::McgInterop.McgHelpers.FailFastForReducedMethod();
return default(global::Windows.Foundation.AsyncStatus);
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.IAsyncInfo.ErrorCode")]
global::System.Exception global::Windows.Foundation.IAsyncInfo.get_ErrorCode()
{
global::McgInterop.McgHelpers.FailFastForReducedMethod();
return default(global::System.Exception);
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.Foundation.IAsyncInfo.Cancel()
{
global::McgInterop.McgHelpers.FailFastForReducedMethod();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.Foundation.IAsyncInfo.Close()
{
global::McgInterop.McgHelpers.FailFastForReducedMethod();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertySet, "Windows.Foundation.IAsyncOperationWithProgress`2.Progress")]
void global::Windows.Foundation.IAsyncOperationWithProgress<global::Windows.Storage.Streams.IBuffer, uint>.put_Progress(global::Windows.Foundation.AsyncOperationProgressHandler<global::Windows.Storage.Streams.IBuffer, uint> handler)
{
global::Windows.Foundation.IAsyncOperationWithProgress_A_Windows_Storage_Streams_IBuffer_j_uint_V___Impl.StubClass.put_Progress(
this,
handler
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.IAsyncOperationWithProgress`2.Progress")]
global::Windows.Foundation.AsyncOperationProgressHandler<global::Windows.Storage.Streams.IBuffer, uint> global::Windows.Foundation.IAsyncOperationWithProgress<global::Windows.Storage.Streams.IBuffer, uint>.get_Progress()
{
global::Windows.Foundation.AsyncOperationProgressHandler<global::Windows.Storage.Streams.IBuffer, uint> __retVal = global::Windows.Foundation.IAsyncOperationWithProgress_A_Windows_Storage_Streams_IBuffer_j_uint_V___Impl.StubClass.get_Progress(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertySet, "Windows.Foundation.IAsyncOperationWithProgress`2.Completed")]
void global::Windows.Foundation.IAsyncOperationWithProgress<global::Windows.Storage.Streams.IBuffer, uint>.put_Completed(global::Windows.Foundation.AsyncOperationWithProgressCompletedHandler<global::Windows.Storage.Streams.IBuffer, uint> handler)
{
global::Windows.Foundation.IAsyncOperationWithProgress_A_Windows_Storage_Streams_IBuffer_j_uint_V___Impl.StubClass.put_Completed(
this,
handler
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
global::Windows.Foundation.AsyncOperationWithProgressCompletedHandler<global::Windows.Storage.Streams.IBuffer, uint> global::Windows.Foundation.IAsyncOperationWithProgress<global::Windows.Storage.Streams.IBuffer, uint>.get_Completed()
{
global::McgInterop.McgHelpers.FailFastForReducedMethod();
return default(global::Windows.Foundation.AsyncOperationWithProgressCompletedHandler<global::Windows.Storage.Streams.IBuffer, uint>);
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
global::Windows.Storage.Streams.IBuffer global::Windows.Foundation.IAsyncOperationWithProgress<global::Windows.Storage.Streams.IBuffer, uint>.GetResults()
{
global::Windows.Storage.Streams.IBuffer __retVal = global::Windows.Foundation.IAsyncOperationWithProgress_A_Windows_Storage_Streams_IBuffer_j_uint_V___Impl.StubClass.GetResults(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.Foundation.IAsyncOperationWithProgress<Windows.Storage.Streams.IBuffer,uint>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.IAsyncOperationWithProgress<global::Windows.Storage.Streams.IBuffer, uint>))]
public unsafe partial struct Vtbl
{
internal const int idx_put_Progress = 6;
internal const int idx_get_Progress = 7;
internal const int idx_put_Completed = 8;
internal const int idx_get_Completed = 9;
internal const int idx_GetResults = 10;
}
}
// Windows.Foundation.AsyncOperationProgressHandler<Windows.Storage.Streams.IBuffer,uint>
public unsafe static class AsyncOperationProgressHandler_A_Windows_Storage_Streams_IBuffer_j_uint_V___Impl
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void Invoke(
this global::System.__ComObject __this,
global::Windows.Foundation.IAsyncOperationWithProgress<global::Windows.Storage.Streams.IBuffer, uint> asyncInfo,
uint progressInfo)
{
global::McgInterop.ForwardComSharedStubs.Proc_TArg0__uint__<global::Windows.Foundation.AsyncOperationProgressHandler<global::Windows.Storage.Streams.IBuffer, uint>, global::Windows.Foundation.IAsyncOperationWithProgress<global::Windows.Storage.Streams.IBuffer, uint>>(
__this,
asyncInfo,
progressInfo,
global::Windows.Foundation.AsyncOperationProgressHandler_A_Windows_Storage_Streams_IBuffer_j_uint_V___Impl.Vtbl.idx_Invoke
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// v-table for 'Windows.Foundation.AsyncOperationProgressHandler<Windows.Storage.Streams.IBuffer,uint>'
[global::System.Runtime.InteropServices.McgRootsType(typeof(global::Windows.Foundation.AsyncOperationProgressHandler<global::Windows.Storage.Streams.IBuffer, uint>))]
public unsafe partial struct Vtbl
{
global::System.IntPtr pfnQueryInterface;
global::System.IntPtr pfnAddRef;
global::System.IntPtr pfnRelease;
// Windows_Foundation__AsyncOperationProgressHandler_A_Windows_Storage_Streams_IBuffer_j_uint_V_
global::System.IntPtr pfnInvoke_Windows_Foundation__AsyncOperationProgressHandler_A_Windows_Storage_Streams_IBuffer_j_uint_V_;
internal const int idx_Invoke = 3;
[global::System.Runtime.CompilerServices.InitDataBlob(typeof(global::Windows.Foundation.AsyncOperationProgressHandler_A_Windows_Storage_Streams_IBuffer_j_uint_V___Impl.Vtbl.Windows_Foundation_AsyncOperationProgressHandler_A_Windows_Storage_Streams_IBuffer_j_uint_V___Impl_Vtbl_McgRvaContainer), "RVA_Windows_Foundation_AsyncOperationProgressHandler_A_Windows_Storage_Streams_IBuffer_j_uint_V___Impl_Vtbl_s_th" +
"eCcwVtable")]
public static global::Windows.Foundation.AsyncOperationProgressHandler_A_Windows_Storage_Streams_IBuffer_j_uint_V___Impl.Vtbl s_theCcwVtable
#if false
= new global::Windows.Foundation.AsyncOperationProgressHandler_A_Windows_Storage_Streams_IBuffer_j_uint_V___Impl.Vtbl() {
pfnQueryInterface = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfQueryInterface>(System.Runtime.InteropServices.__vtable_IUnknown.QueryInterface),
pfnAddRef = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfAddRef>(System.Runtime.InteropServices.__vtable_IUnknown.AddRef),
pfnRelease = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfRelease>(System.Runtime.InteropServices.__vtable_IUnknown.Release),
pfnInvoke_Windows_Foundation__AsyncOperationProgressHandler_A_Windows_Storage_Streams_IBuffer_j_uint_V_ = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget138>(global::Windows.Foundation.AsyncOperationProgressHandler_A_Windows_Storage_Streams_IBuffer_j_uint_V___Impl.Vtbl.Invoke__STUB),
}
#endif
;
public static global::System.IntPtr pNativeVtable;
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int Invoke__STUB(
global::System.IntPtr pComThis,
global::Windows.Foundation.IAsyncOperationWithProgress_A_Windows_Storage_Streams_IBuffer_j_uint_V___Impl.Vtbl** unsafe_asyncInfo,
uint unsafe_progressInfo)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.Foundation.AsyncOperationProgressHandler<global::Windows.Storage.Streams.IBuffer, uint>>(
__this,
0
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Proc_TArg0__uint__<global::Windows.Foundation.IAsyncOperationWithProgress<global::Windows.Storage.Streams.IBuffer, uint>>(
__this,
unsafe_asyncInfo,
unsafe_progressInfo,
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
private static class Windows_Foundation_AsyncOperationProgressHandler_A_Windows_Storage_Streams_IBuffer_j_uint_V___Impl_Vtbl_McgRvaContainer
{
[global::System.Runtime.CompilerServices.MethodAddrFixup(0, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "QueryInterface")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(4, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "AddRef")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(8, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "Release")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(12, typeof(global::Windows.Foundation.AsyncOperationProgressHandler_A_Windows_Storage_Streams_IBuffer_j_uint_V___Impl.Vtbl), "Invoke__STUB")]
[global::System.Runtime.CompilerServices.NonArray]
static readonly byte[] RVA_Windows_Foundation_AsyncOperationProgressHandler_A_Windows_Storage_Streams_IBuffer_j_uint_V___Impl_Vtbl_s_theCcwVtable = new byte[] {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
}
}
}
// Windows.Foundation.AsyncOperationWithProgressCompletedHandler<Windows.Storage.Streams.IBuffer,uint>
public unsafe static class AsyncOperationWithProgressCompletedHandler_A_Windows_Storage_Streams_IBuffer_j_uint_V___Impl
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void Invoke(
this global::System.__ComObject __this,
global::Windows.Foundation.IAsyncOperationWithProgress<global::Windows.Storage.Streams.IBuffer, uint> asyncInfo,
global::Windows.Foundation.AsyncStatus asyncStatus)
{
global::McgInterop.ForwardComSharedStubs.Proc_TArg0__int<global::Windows.Foundation.AsyncOperationWithProgressCompletedHandler<global::Windows.Storage.Streams.IBuffer, uint>, global::Windows.Foundation.IAsyncOperationWithProgress<global::Windows.Storage.Streams.IBuffer, uint>>(
__this,
asyncInfo,
((int)asyncStatus),
global::Windows.Foundation.AsyncOperationWithProgressCompletedHandler_A_Windows_Storage_Streams_IBuffer_j_uint_V___Impl.Vtbl.idx_Invoke
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// v-table for 'Windows.Foundation.AsyncOperationWithProgressCompletedHandler<Windows.Storage.Streams.IBuffer,uint>'
[global::System.Runtime.InteropServices.McgRootsType(typeof(global::Windows.Foundation.AsyncOperationWithProgressCompletedHandler<global::Windows.Storage.Streams.IBuffer, uint>))]
public unsafe partial struct Vtbl
{
global::System.IntPtr pfnQueryInterface;
global::System.IntPtr pfnAddRef;
global::System.IntPtr pfnRelease;
// Windows_Foundation__AsyncOperationWithProgressCompletedHandler_A_Windows_Storage_Streams_IBuffer_j_uint_V_
global::System.IntPtr pfnInvoke_Windows_Foundation__AsyncOperationWithProgressCompletedHandler_A_Windows_Storage_Streams_IBuffer_j_uint_V_;
internal const int idx_Invoke = 3;
[global::System.Runtime.CompilerServices.InitDataBlob(typeof(global::Windows.Foundation.AsyncOperationWithProgressCompletedHandler_A_Windows_Storage_Streams_IBuffer_j_uint_V___Impl.Vtbl.Windows_Foundation_AsyncOperationWithProgressCompletedHandler_A_Windows_Storage_Streams_IBuffer_j_uint_V___Impl_Vtbl_McgRvaContainer), "RVA_Windows_Foundation_AsyncOperationWithProgressCompletedHandler_A_Windows_Storage_Streams_IBuffer_j_uint_V___I" +
"mpl_Vtbl_s_theCcwVtable")]
public static global::Windows.Foundation.AsyncOperationWithProgressCompletedHandler_A_Windows_Storage_Streams_IBuffer_j_uint_V___Impl.Vtbl s_theCcwVtable
#if false
= new global::Windows.Foundation.AsyncOperationWithProgressCompletedHandler_A_Windows_Storage_Streams_IBuffer_j_uint_V___Impl.Vtbl() {
pfnQueryInterface = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfQueryInterface>(System.Runtime.InteropServices.__vtable_IUnknown.QueryInterface),
pfnAddRef = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfAddRef>(System.Runtime.InteropServices.__vtable_IUnknown.AddRef),
pfnRelease = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfRelease>(System.Runtime.InteropServices.__vtable_IUnknown.Release),
pfnInvoke_Windows_Foundation__AsyncOperationWithProgressCompletedHandler_A_Windows_Storage_Streams_IBuffer_j_uint_V_ = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget139>(global::Windows.Foundation.AsyncOperationWithProgressCompletedHandler_A_Windows_Storage_Streams_IBuffer_j_uint_V___Impl.Vtbl.Invoke__STUB),
}
#endif
;
public static global::System.IntPtr pNativeVtable;
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int Invoke__STUB(
global::System.IntPtr pComThis,
global::Windows.Foundation.IAsyncOperationWithProgress_A_Windows_Storage_Streams_IBuffer_j_uint_V___Impl.Vtbl** unsafe_asyncInfo,
global::Windows.Foundation.AsyncStatus unsafe_asyncStatus)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.Foundation.AsyncOperationWithProgressCompletedHandler<global::Windows.Storage.Streams.IBuffer, uint>>(
__this,
0
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Proc_TArg0___AsyncStatus__<global::Windows.Foundation.IAsyncOperationWithProgress<global::Windows.Storage.Streams.IBuffer, uint>>(
__this,
unsafe_asyncInfo,
unsafe_asyncStatus,
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
private static class Windows_Foundation_AsyncOperationWithProgressCompletedHandler_A_Windows_Storage_Streams_IBuffer_j_uint_V___Impl_Vtbl_McgRvaContainer
{
[global::System.Runtime.CompilerServices.MethodAddrFixup(0, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "QueryInterface")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(4, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "AddRef")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(8, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "Release")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(12, typeof(global::Windows.Foundation.AsyncOperationWithProgressCompletedHandler_A_Windows_Storage_Streams_IBuffer_j_uint_V___Impl.Vtbl), "Invoke__STUB")]
[global::System.Runtime.CompilerServices.NonArray]
static readonly byte[] RVA_Windows_Foundation_AsyncOperationWithProgressCompletedHandler_A_Windows_Storage_Streams_IBuffer_j_uint_V___Impl_Vtbl_s_theCcwVtable = new byte[] {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
}
}
}
// Windows.Foundation.IAsyncOperationWithProgress<uint,uint>
public unsafe static class IAsyncOperationWithProgress_A_uint_j_uint_V___Impl
{
// StubClass for 'Windows.Foundation.IAsyncOperationWithProgress<uint,uint>'
public static partial class StubClass
{
// Signature, Windows.Foundation.IAsyncOperationWithProgress<uint,uint>.put_Progress, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.WinRTDelegateMarshaller] Windows_Foundation_AsyncOperationProgressHandler_2_uint__uint___Windows_Foundation__AsyncOperationProgressHandler_A_uint_j_uint_V_ *,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void put_Progress(
global::System.__ComObject __this,
global::Windows.Foundation.AsyncOperationProgressHandler<uint, uint> handler)
{
// Setup
global::Windows.Foundation.AsyncOperationProgressHandler_A_uint_j_uint_V___Impl.Vtbl** unsafe_handler = default(global::Windows.Foundation.AsyncOperationProgressHandler_A_uint_j_uint_V___Impl.Vtbl**);
int unsafe___return__;
try
{
// Marshalling
unsafe_handler = (global::Windows.Foundation.AsyncOperationProgressHandler_A_uint_j_uint_V___Impl.Vtbl**)global::System.Runtime.InteropServices.McgModuleManager.DelegateToComInterface(
handler,
typeof(global::Windows.Foundation.AsyncOperationProgressHandler<uint, uint>).TypeHandle,
global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget140>(global::Windows.Foundation.AsyncOperationProgressHandler_A_uint_j_uint_V___Impl.Invoke)
);
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.Foundation.IAsyncOperationWithProgress<uint, uint>).TypeHandle,
global::Windows.Foundation.IAsyncOperationWithProgress_A_uint_j_uint_V___Impl.Vtbl.idx_put_Progress,
unsafe_handler
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
// Return
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_handler)));
}
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.Foundation.AsyncOperationProgressHandler<uint, uint> get_Progress(global::System.__ComObject __this)
{
global::Windows.Foundation.AsyncOperationProgressHandler<uint, uint> __ret = global::McgInterop.ForwardComSharedStubs.Func__AsyncOperationProgressHandler_2_uint__uint___<global::Windows.Foundation.IAsyncOperationWithProgress<uint, uint>>(
__this,
global::Windows.Foundation.IAsyncOperationWithProgress_A_uint_j_uint_V___Impl.Vtbl.idx_get_Progress
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
// Signature, Windows.Foundation.IAsyncOperationWithProgress<uint,uint>.put_Completed, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.WinRTDelegateMarshaller] Windows_Foundation_AsyncOperationWithProgressCompletedHandler_2_uint__uint___Windows_Foundation__AsyncOperationWithProgressCompletedHandler_A_uint_j_uint_V_ *,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void put_Completed(
global::System.__ComObject __this,
global::Windows.Foundation.AsyncOperationWithProgressCompletedHandler<uint, uint> handler)
{
// Setup
global::Windows.Foundation.AsyncOperationWithProgressCompletedHandler_A_uint_j_uint_V___Impl.Vtbl** unsafe_handler = default(global::Windows.Foundation.AsyncOperationWithProgressCompletedHandler_A_uint_j_uint_V___Impl.Vtbl**);
int unsafe___return__;
try
{
// Marshalling
unsafe_handler = (global::Windows.Foundation.AsyncOperationWithProgressCompletedHandler_A_uint_j_uint_V___Impl.Vtbl**)global::System.Runtime.InteropServices.McgModuleManager.DelegateToComInterface(
handler,
typeof(global::Windows.Foundation.AsyncOperationWithProgressCompletedHandler<uint, uint>).TypeHandle,
global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget141>(global::Windows.Foundation.AsyncOperationWithProgressCompletedHandler_A_uint_j_uint_V___Impl.Invoke)
);
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.Foundation.IAsyncOperationWithProgress<uint, uint>).TypeHandle,
global::Windows.Foundation.IAsyncOperationWithProgress_A_uint_j_uint_V___Impl.Vtbl.idx_put_Completed,
unsafe_handler
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
// Return
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_handler)));
}
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.Foundation.AsyncOperationWithProgressCompletedHandler<uint, uint> get_Completed(global::System.__ComObject __this)
{
global::McgInterop.McgHelpers.FailFastForReducedMethod();
return default(global::Windows.Foundation.AsyncOperationWithProgressCompletedHandler<uint, uint>);
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static uint GetResults(global::System.__ComObject __this)
{
uint __ret = global::McgInterop.ForwardComSharedStubs.Func_uint__<global::Windows.Foundation.IAsyncOperationWithProgress<uint, uint>>(
__this,
global::Windows.Foundation.IAsyncOperationWithProgress_A_uint_j_uint_V___Impl.Vtbl.idx_GetResults
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
}
// DispatchClass for 'Windows.Foundation.IAsyncOperationWithProgress<uint,uint>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.IAsyncOperationWithProgress<uint, uint>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Foundation.IAsyncOperationWithProgress<uint, uint>
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.IAsyncInfo.Id")]
uint global::Windows.Foundation.IAsyncInfo.get_Id()
{
global::McgInterop.McgHelpers.FailFastForReducedMethod();
return 0;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.IAsyncInfo.Status")]
global::Windows.Foundation.AsyncStatus global::Windows.Foundation.IAsyncInfo.get_Status()
{
global::McgInterop.McgHelpers.FailFastForReducedMethod();
return default(global::Windows.Foundation.AsyncStatus);
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.IAsyncInfo.ErrorCode")]
global::System.Exception global::Windows.Foundation.IAsyncInfo.get_ErrorCode()
{
global::McgInterop.McgHelpers.FailFastForReducedMethod();
return default(global::System.Exception);
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.Foundation.IAsyncInfo.Cancel()
{
global::McgInterop.McgHelpers.FailFastForReducedMethod();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.Foundation.IAsyncInfo.Close()
{
global::McgInterop.McgHelpers.FailFastForReducedMethod();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertySet, "Windows.Foundation.IAsyncOperationWithProgress`2.Progress")]
void global::Windows.Foundation.IAsyncOperationWithProgress<uint, uint>.put_Progress(global::Windows.Foundation.AsyncOperationProgressHandler<uint, uint> handler)
{
global::Windows.Foundation.IAsyncOperationWithProgress_A_uint_j_uint_V___Impl.StubClass.put_Progress(
this,
handler
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.IAsyncOperationWithProgress`2.Progress")]
global::Windows.Foundation.AsyncOperationProgressHandler<uint, uint> global::Windows.Foundation.IAsyncOperationWithProgress<uint, uint>.get_Progress()
{
global::Windows.Foundation.AsyncOperationProgressHandler<uint, uint> __retVal = global::Windows.Foundation.IAsyncOperationWithProgress_A_uint_j_uint_V___Impl.StubClass.get_Progress(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertySet, "Windows.Foundation.IAsyncOperationWithProgress`2.Completed")]
void global::Windows.Foundation.IAsyncOperationWithProgress<uint, uint>.put_Completed(global::Windows.Foundation.AsyncOperationWithProgressCompletedHandler<uint, uint> handler)
{
global::Windows.Foundation.IAsyncOperationWithProgress_A_uint_j_uint_V___Impl.StubClass.put_Completed(
this,
handler
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
global::Windows.Foundation.AsyncOperationWithProgressCompletedHandler<uint, uint> global::Windows.Foundation.IAsyncOperationWithProgress<uint, uint>.get_Completed()
{
global::McgInterop.McgHelpers.FailFastForReducedMethod();
return default(global::Windows.Foundation.AsyncOperationWithProgressCompletedHandler<uint, uint>);
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
uint global::Windows.Foundation.IAsyncOperationWithProgress<uint, uint>.GetResults()
{
uint __retVal = global::Windows.Foundation.IAsyncOperationWithProgress_A_uint_j_uint_V___Impl.StubClass.GetResults(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.Foundation.IAsyncOperationWithProgress<uint,uint>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.IAsyncOperationWithProgress<uint, uint>))]
public unsafe partial struct Vtbl
{
internal const int idx_put_Progress = 6;
internal const int idx_get_Progress = 7;
internal const int idx_put_Completed = 8;
internal const int idx_get_Completed = 9;
internal const int idx_GetResults = 10;
}
}
// Windows.Foundation.AsyncOperationProgressHandler<uint,uint>
public unsafe static class AsyncOperationProgressHandler_A_uint_j_uint_V___Impl
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void Invoke(
this global::System.__ComObject __this,
global::Windows.Foundation.IAsyncOperationWithProgress<uint, uint> asyncInfo,
uint progressInfo)
{
global::McgInterop.ForwardComSharedStubs.Proc_TArg0__uint__<global::Windows.Foundation.AsyncOperationProgressHandler<uint, uint>, global::Windows.Foundation.IAsyncOperationWithProgress<uint, uint>>(
__this,
asyncInfo,
progressInfo,
global::Windows.Foundation.AsyncOperationProgressHandler_A_uint_j_uint_V___Impl.Vtbl.idx_Invoke
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// v-table for 'Windows.Foundation.AsyncOperationProgressHandler<uint,uint>'
[global::System.Runtime.InteropServices.McgRootsType(typeof(global::Windows.Foundation.AsyncOperationProgressHandler<uint, uint>))]
public unsafe partial struct Vtbl
{
global::System.IntPtr pfnQueryInterface;
global::System.IntPtr pfnAddRef;
global::System.IntPtr pfnRelease;
// Windows_Foundation__AsyncOperationProgressHandler_A_uint_j_uint_V_
global::System.IntPtr pfnInvoke_Windows_Foundation__AsyncOperationProgressHandler_A_uint_j_uint_V_;
internal const int idx_Invoke = 3;
[global::System.Runtime.CompilerServices.InitDataBlob(typeof(global::Windows.Foundation.AsyncOperationProgressHandler_A_uint_j_uint_V___Impl.Vtbl.Windows_Foundation_AsyncOperationProgressHandler_A_uint_j_uint_V___Impl_Vtbl_McgRvaContainer), "RVA_Windows_Foundation_AsyncOperationProgressHandler_A_uint_j_uint_V___Impl_Vtbl_s_theCcwVtable")]
public static global::Windows.Foundation.AsyncOperationProgressHandler_A_uint_j_uint_V___Impl.Vtbl s_theCcwVtable
#if false
= new global::Windows.Foundation.AsyncOperationProgressHandler_A_uint_j_uint_V___Impl.Vtbl() {
pfnQueryInterface = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfQueryInterface>(System.Runtime.InteropServices.__vtable_IUnknown.QueryInterface),
pfnAddRef = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfAddRef>(System.Runtime.InteropServices.__vtable_IUnknown.AddRef),
pfnRelease = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfRelease>(System.Runtime.InteropServices.__vtable_IUnknown.Release),
pfnInvoke_Windows_Foundation__AsyncOperationProgressHandler_A_uint_j_uint_V_ = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget142>(global::Windows.Foundation.AsyncOperationProgressHandler_A_uint_j_uint_V___Impl.Vtbl.Invoke__STUB),
}
#endif
;
public static global::System.IntPtr pNativeVtable;
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int Invoke__STUB(
global::System.IntPtr pComThis,
global::Windows.Foundation.IAsyncOperationWithProgress_A_uint_j_uint_V___Impl.Vtbl** unsafe_asyncInfo,
uint unsafe_progressInfo)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.Foundation.AsyncOperationProgressHandler<uint, uint>>(
__this,
0
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Proc_TArg0__uint__<global::Windows.Foundation.IAsyncOperationWithProgress<uint, uint>>(
__this,
unsafe_asyncInfo,
unsafe_progressInfo,
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
private static class Windows_Foundation_AsyncOperationProgressHandler_A_uint_j_uint_V___Impl_Vtbl_McgRvaContainer
{
[global::System.Runtime.CompilerServices.MethodAddrFixup(0, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "QueryInterface")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(4, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "AddRef")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(8, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "Release")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(12, typeof(global::Windows.Foundation.AsyncOperationProgressHandler_A_uint_j_uint_V___Impl.Vtbl), "Invoke__STUB")]
[global::System.Runtime.CompilerServices.NonArray]
static readonly byte[] RVA_Windows_Foundation_AsyncOperationProgressHandler_A_uint_j_uint_V___Impl_Vtbl_s_theCcwVtable = new byte[] {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
}
}
}
// Windows.Foundation.AsyncOperationWithProgressCompletedHandler<uint,uint>
public unsafe static class AsyncOperationWithProgressCompletedHandler_A_uint_j_uint_V___Impl
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void Invoke(
this global::System.__ComObject __this,
global::Windows.Foundation.IAsyncOperationWithProgress<uint, uint> asyncInfo,
global::Windows.Foundation.AsyncStatus asyncStatus)
{
global::McgInterop.ForwardComSharedStubs.Proc_TArg0__int<global::Windows.Foundation.AsyncOperationWithProgressCompletedHandler<uint, uint>, global::Windows.Foundation.IAsyncOperationWithProgress<uint, uint>>(
__this,
asyncInfo,
((int)asyncStatus),
global::Windows.Foundation.AsyncOperationWithProgressCompletedHandler_A_uint_j_uint_V___Impl.Vtbl.idx_Invoke
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// v-table for 'Windows.Foundation.AsyncOperationWithProgressCompletedHandler<uint,uint>'
[global::System.Runtime.InteropServices.McgRootsType(typeof(global::Windows.Foundation.AsyncOperationWithProgressCompletedHandler<uint, uint>))]
public unsafe partial struct Vtbl
{
global::System.IntPtr pfnQueryInterface;
global::System.IntPtr pfnAddRef;
global::System.IntPtr pfnRelease;
// Windows_Foundation__AsyncOperationWithProgressCompletedHandler_A_uint_j_uint_V_
global::System.IntPtr pfnInvoke_Windows_Foundation__AsyncOperationWithProgressCompletedHandler_A_uint_j_uint_V_;
internal const int idx_Invoke = 3;
[global::System.Runtime.CompilerServices.InitDataBlob(typeof(global::Windows.Foundation.AsyncOperationWithProgressCompletedHandler_A_uint_j_uint_V___Impl.Vtbl.Windows_Foundation_AsyncOperationWithProgressCompletedHandler_A_uint_j_uint_V___Impl_Vtbl_McgRvaContainer), "RVA_Windows_Foundation_AsyncOperationWithProgressCompletedHandler_A_uint_j_uint_V___Impl_Vtbl_s_theCcwVtable")]
public static global::Windows.Foundation.AsyncOperationWithProgressCompletedHandler_A_uint_j_uint_V___Impl.Vtbl s_theCcwVtable
#if false
= new global::Windows.Foundation.AsyncOperationWithProgressCompletedHandler_A_uint_j_uint_V___Impl.Vtbl() {
pfnQueryInterface = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfQueryInterface>(System.Runtime.InteropServices.__vtable_IUnknown.QueryInterface),
pfnAddRef = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfAddRef>(System.Runtime.InteropServices.__vtable_IUnknown.AddRef),
pfnRelease = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfRelease>(System.Runtime.InteropServices.__vtable_IUnknown.Release),
pfnInvoke_Windows_Foundation__AsyncOperationWithProgressCompletedHandler_A_uint_j_uint_V_ = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget143>(global::Windows.Foundation.AsyncOperationWithProgressCompletedHandler_A_uint_j_uint_V___Impl.Vtbl.Invoke__STUB),
}
#endif
;
public static global::System.IntPtr pNativeVtable;
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int Invoke__STUB(
global::System.IntPtr pComThis,
global::Windows.Foundation.IAsyncOperationWithProgress_A_uint_j_uint_V___Impl.Vtbl** unsafe_asyncInfo,
global::Windows.Foundation.AsyncStatus unsafe_asyncStatus)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.Foundation.AsyncOperationWithProgressCompletedHandler<uint, uint>>(
__this,
0
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Proc_TArg0___AsyncStatus__<global::Windows.Foundation.IAsyncOperationWithProgress<uint, uint>>(
__this,
unsafe_asyncInfo,
unsafe_asyncStatus,
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
private static class Windows_Foundation_AsyncOperationWithProgressCompletedHandler_A_uint_j_uint_V___Impl_Vtbl_McgRvaContainer
{
[global::System.Runtime.CompilerServices.MethodAddrFixup(0, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "QueryInterface")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(4, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "AddRef")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(8, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "Release")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(12, typeof(global::Windows.Foundation.AsyncOperationWithProgressCompletedHandler_A_uint_j_uint_V___Impl.Vtbl), "Invoke__STUB")]
[global::System.Runtime.CompilerServices.NonArray]
static readonly byte[] RVA_Windows_Foundation_AsyncOperationWithProgressCompletedHandler_A_uint_j_uint_V___Impl_Vtbl_s_theCcwVtable = new byte[] {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
}
}
}
// Windows.Foundation.IAsyncOperation<bool>
public unsafe static class IAsyncOperation_A_bool_V___Impl
{
// StubClass for 'Windows.Foundation.IAsyncOperation<bool>'
public static partial class StubClass
{
// Signature, Windows.Foundation.IAsyncOperation<bool>.put_Completed, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.WinRTDelegateMarshaller] Windows_Foundation_AsyncOperationCompletedHandler_1_bool___Windows_Foundation__AsyncOperationCompletedHandler_A_bool_V_ *,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void put_Completed(
global::System.__ComObject __this,
global::Windows.Foundation.AsyncOperationCompletedHandler<bool> handler)
{
// Setup
global::Windows.Foundation.AsyncOperationCompletedHandler_A_bool_V___Impl.Vtbl** unsafe_handler = default(global::Windows.Foundation.AsyncOperationCompletedHandler_A_bool_V___Impl.Vtbl**);
int unsafe___return__;
try
{
// Marshalling
unsafe_handler = (global::Windows.Foundation.AsyncOperationCompletedHandler_A_bool_V___Impl.Vtbl**)global::System.Runtime.InteropServices.McgModuleManager.DelegateToComInterface(
handler,
typeof(global::Windows.Foundation.AsyncOperationCompletedHandler<bool>).TypeHandle,
global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget144>(global::Windows.Foundation.AsyncOperationCompletedHandler_A_bool_V___Impl.Invoke)
);
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.Foundation.IAsyncOperation<bool>).TypeHandle,
global::Windows.Foundation.IAsyncOperation_A_bool_V___Impl.Vtbl.idx_put_Completed,
unsafe_handler
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
// Return
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_handler)));
}
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.Foundation.AsyncOperationCompletedHandler<bool> get_Completed(global::System.__ComObject __this)
{
global::McgInterop.McgHelpers.FailFastForReducedMethod();
return default(global::Windows.Foundation.AsyncOperationCompletedHandler<bool>);
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool GetResults(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.Foundation.IAsyncOperation<bool>>(
__this,
global::Windows.Foundation.IAsyncOperation_A_bool_V___Impl.Vtbl.idx_GetResults
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
}
// DispatchClass for 'Windows.Foundation.IAsyncOperation<bool>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.IAsyncOperation<bool>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Foundation.IAsyncOperation<bool>
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.IAsyncInfo.Id")]
uint global::Windows.Foundation.IAsyncInfo.get_Id()
{
global::McgInterop.McgHelpers.FailFastForReducedMethod();
return 0;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.IAsyncInfo.Status")]
global::Windows.Foundation.AsyncStatus global::Windows.Foundation.IAsyncInfo.get_Status()
{
global::McgInterop.McgHelpers.FailFastForReducedMethod();
return default(global::Windows.Foundation.AsyncStatus);
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.IAsyncInfo.ErrorCode")]
global::System.Exception global::Windows.Foundation.IAsyncInfo.get_ErrorCode()
{
global::McgInterop.McgHelpers.FailFastForReducedMethod();
return default(global::System.Exception);
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.Foundation.IAsyncInfo.Cancel()
{
global::McgInterop.McgHelpers.FailFastForReducedMethod();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.Foundation.IAsyncInfo.Close()
{
global::McgInterop.McgHelpers.FailFastForReducedMethod();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertySet, "Windows.Foundation.IAsyncOperation`1.Completed")]
void global::Windows.Foundation.IAsyncOperation<bool>.put_Completed(global::Windows.Foundation.AsyncOperationCompletedHandler<bool> handler)
{
global::Windows.Foundation.IAsyncOperation_A_bool_V___Impl.StubClass.put_Completed(
this,
handler
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
global::Windows.Foundation.AsyncOperationCompletedHandler<bool> global::Windows.Foundation.IAsyncOperation<bool>.get_Completed()
{
global::McgInterop.McgHelpers.FailFastForReducedMethod();
return default(global::Windows.Foundation.AsyncOperationCompletedHandler<bool>);
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
bool global::Windows.Foundation.IAsyncOperation<bool>.GetResults()
{
bool __retVal = global::Windows.Foundation.IAsyncOperation_A_bool_V___Impl.StubClass.GetResults(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.Foundation.IAsyncOperation<bool>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.IAsyncOperation<bool>))]
public unsafe partial struct Vtbl
{
internal const int idx_put_Completed = 6;
internal const int idx_get_Completed = 7;
internal const int idx_GetResults = 8;
}
}
// Windows.Foundation.AsyncOperationCompletedHandler<bool>
public unsafe static class AsyncOperationCompletedHandler_A_bool_V___Impl
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void Invoke(
this global::System.__ComObject __this,
global::Windows.Foundation.IAsyncOperation<bool> asyncInfo,
global::Windows.Foundation.AsyncStatus asyncStatus)
{
global::McgInterop.ForwardComSharedStubs.Proc_TArg0__int<global::Windows.Foundation.AsyncOperationCompletedHandler<bool>, global::Windows.Foundation.IAsyncOperation<bool>>(
__this,
asyncInfo,
((int)asyncStatus),
global::Windows.Foundation.AsyncOperationCompletedHandler_A_bool_V___Impl.Vtbl.idx_Invoke
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// v-table for 'Windows.Foundation.AsyncOperationCompletedHandler<bool>'
public unsafe partial struct Vtbl
{
internal const int idx_Invoke = 3;
}
}
// Windows.Foundation.IAsyncOperation<Windows.Storage.Streams.IRandomAccessStream>
public unsafe static class IAsyncOperation_A_Windows_Storage_Streams_IRandomAccessStream_V___Impl
{
// StubClass for 'Windows.Foundation.IAsyncOperation<Windows.Storage.Streams.IRandomAccessStream>'
public static partial class StubClass
{
// Signature, Windows.Foundation.IAsyncOperation<Windows.Storage.Streams.IRandomAccessStream>.put_Completed, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.WinRTDelegateMarshaller] Windows_Foundation_AsyncOperationCompletedHandler_1_Windows_Storage_Streams_IRandomAccessStream___Windows_Foundation__AsyncOperationCompletedHandler_A_Windows_Storage_Streams_IRandomAccessStream_V_ *,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void put_Completed(
global::System.__ComObject __this,
global::Windows.Foundation.AsyncOperationCompletedHandler<global::Windows.Storage.Streams.IRandomAccessStream> handler)
{
// Setup
global::Windows.Foundation.AsyncOperationCompletedHandler_A_Windows_Storage_Streams_IRandomAccessStream_V___Impl.Vtbl** unsafe_handler = default(global::Windows.Foundation.AsyncOperationCompletedHandler_A_Windows_Storage_Streams_IRandomAccessStream_V___Impl.Vtbl**);
int unsafe___return__;
try
{
// Marshalling
unsafe_handler = (global::Windows.Foundation.AsyncOperationCompletedHandler_A_Windows_Storage_Streams_IRandomAccessStream_V___Impl.Vtbl**)global::System.Runtime.InteropServices.McgModuleManager.DelegateToComInterface(
handler,
typeof(global::Windows.Foundation.AsyncOperationCompletedHandler<global::Windows.Storage.Streams.IRandomAccessStream>).TypeHandle,
global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget145>(global::Windows.Foundation.AsyncOperationCompletedHandler_A_Windows_Storage_Streams_IRandomAccessStream_V___Impl.Invoke)
);
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.Foundation.IAsyncOperation<global::Windows.Storage.Streams.IRandomAccessStream>).TypeHandle,
global::Windows.Foundation.IAsyncOperation_A_Windows_Storage_Streams_IRandomAccessStream_V___Impl.Vtbl.idx_put_Completed,
unsafe_handler
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
// Return
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_handler)));
}
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.Foundation.AsyncOperationCompletedHandler<global::Windows.Storage.Streams.IRandomAccessStream> get_Completed(global::System.__ComObject __this)
{
global::McgInterop.McgHelpers.FailFastForReducedMethod();
return default(global::Windows.Foundation.AsyncOperationCompletedHandler<global::Windows.Storage.Streams.IRandomAccessStream>);
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.Storage.Streams.IRandomAccessStream GetResults(global::System.__ComObject __this)
{
global::Windows.Storage.Streams.IRandomAccessStream __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.Foundation.IAsyncOperation<global::Windows.Storage.Streams.IRandomAccessStream>, global::Windows.Storage.Streams.IRandomAccessStream>(
__this,
global::Windows.Foundation.IAsyncOperation_A_Windows_Storage_Streams_IRandomAccessStream_V___Impl.Vtbl.idx_GetResults
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
}
// DispatchClass for 'Windows.Foundation.IAsyncOperation<Windows.Storage.Streams.IRandomAccessStream>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.IAsyncOperation<global::Windows.Storage.Streams.IRandomAccessStream>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Foundation.IAsyncOperation<global::Windows.Storage.Streams.IRandomAccessStream>
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.IAsyncInfo.Id")]
uint global::Windows.Foundation.IAsyncInfo.get_Id()
{
global::McgInterop.McgHelpers.FailFastForReducedMethod();
return 0;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.IAsyncInfo.Status")]
global::Windows.Foundation.AsyncStatus global::Windows.Foundation.IAsyncInfo.get_Status()
{
global::McgInterop.McgHelpers.FailFastForReducedMethod();
return default(global::Windows.Foundation.AsyncStatus);
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.IAsyncInfo.ErrorCode")]
global::System.Exception global::Windows.Foundation.IAsyncInfo.get_ErrorCode()
{
global::McgInterop.McgHelpers.FailFastForReducedMethod();
return default(global::System.Exception);
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.Foundation.IAsyncInfo.Cancel()
{
global::McgInterop.McgHelpers.FailFastForReducedMethod();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.Foundation.IAsyncInfo.Close()
{
global::McgInterop.McgHelpers.FailFastForReducedMethod();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertySet, "Windows.Foundation.IAsyncOperation`1.Completed")]
void global::Windows.Foundation.IAsyncOperation<global::Windows.Storage.Streams.IRandomAccessStream>.put_Completed(global::Windows.Foundation.AsyncOperationCompletedHandler<global::Windows.Storage.Streams.IRandomAccessStream> handler)
{
global::Windows.Foundation.IAsyncOperation_A_Windows_Storage_Streams_IRandomAccessStream_V___Impl.StubClass.put_Completed(
this,
handler
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
global::Windows.Foundation.AsyncOperationCompletedHandler<global::Windows.Storage.Streams.IRandomAccessStream> global::Windows.Foundation.IAsyncOperation<global::Windows.Storage.Streams.IRandomAccessStream>.get_Completed()
{
global::McgInterop.McgHelpers.FailFastForReducedMethod();
return default(global::Windows.Foundation.AsyncOperationCompletedHandler<global::Windows.Storage.Streams.IRandomAccessStream>);
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
global::Windows.Storage.Streams.IRandomAccessStream global::Windows.Foundation.IAsyncOperation<global::Windows.Storage.Streams.IRandomAccessStream>.GetResults()
{
global::Windows.Storage.Streams.IRandomAccessStream __retVal = global::Windows.Foundation.IAsyncOperation_A_Windows_Storage_Streams_IRandomAccessStream_V___Impl.StubClass.GetResults(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.Foundation.IAsyncOperation<Windows.Storage.Streams.IRandomAccessStream>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.IAsyncOperation<global::Windows.Storage.Streams.IRandomAccessStream>))]
public unsafe partial struct Vtbl
{
internal const int idx_put_Completed = 6;
internal const int idx_get_Completed = 7;
internal const int idx_GetResults = 8;
}
}
// Windows.Foundation.AsyncOperationCompletedHandler<Windows.Storage.Streams.IRandomAccessStream>
public unsafe static class AsyncOperationCompletedHandler_A_Windows_Storage_Streams_IRandomAccessStream_V___Impl
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void Invoke(
this global::System.__ComObject __this,
global::Windows.Foundation.IAsyncOperation<global::Windows.Storage.Streams.IRandomAccessStream> asyncInfo,
global::Windows.Foundation.AsyncStatus asyncStatus)
{
global::McgInterop.ForwardComSharedStubs.Proc_TArg0__int<global::Windows.Foundation.AsyncOperationCompletedHandler<global::Windows.Storage.Streams.IRandomAccessStream>, global::Windows.Foundation.IAsyncOperation<global::Windows.Storage.Streams.IRandomAccessStream>>(
__this,
asyncInfo,
((int)asyncStatus),
global::Windows.Foundation.AsyncOperationCompletedHandler_A_Windows_Storage_Streams_IRandomAccessStream_V___Impl.Vtbl.idx_Invoke
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// v-table for 'Windows.Foundation.AsyncOperationCompletedHandler<Windows.Storage.Streams.IRandomAccessStream>'
public unsafe partial struct Vtbl
{
internal const int idx_Invoke = 3;
}
}
// Windows.Foundation.IAsyncOperation<Windows.Storage.StorageFile>
public unsafe static class IAsyncOperation_A_Windows_Storage_StorageFile_V___Impl
{
// StubClass for 'Windows.Foundation.IAsyncOperation<Windows.Storage.StorageFile>'
public static partial class StubClass
{
// Signature, Windows.Foundation.IAsyncOperation<Windows.Storage.StorageFile>.put_Completed, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.WinRTDelegateMarshaller] Windows_Foundation_AsyncOperationCompletedHandler_1_Windows_Storage_StorageFile___Windows_Foundation__AsyncOperationCompletedHandler_A_Windows_Storage_StorageFile_V_ *,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void put_Completed(
global::System.__ComObject __this,
global::Windows.Foundation.AsyncOperationCompletedHandler<global::Windows.Storage.StorageFile> handler)
{
// Setup
global::Windows.Foundation.AsyncOperationCompletedHandler_A_Windows_Storage_StorageFile_V___Impl.Vtbl** unsafe_handler = default(global::Windows.Foundation.AsyncOperationCompletedHandler_A_Windows_Storage_StorageFile_V___Impl.Vtbl**);
int unsafe___return__;
try
{
// Marshalling
unsafe_handler = (global::Windows.Foundation.AsyncOperationCompletedHandler_A_Windows_Storage_StorageFile_V___Impl.Vtbl**)global::System.Runtime.InteropServices.McgModuleManager.DelegateToComInterface(
handler,
typeof(global::Windows.Foundation.AsyncOperationCompletedHandler<global::Windows.Storage.StorageFile>).TypeHandle,
global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget146>(global::Windows.Foundation.AsyncOperationCompletedHandler_A_Windows_Storage_StorageFile_V___Impl.Invoke)
);
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.Foundation.IAsyncOperation<global::Windows.Storage.StorageFile>).TypeHandle,
global::Windows.Foundation.IAsyncOperation_A_Windows_Storage_StorageFile_V___Impl.Vtbl.idx_put_Completed,
unsafe_handler
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
// Return
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_handler)));
}
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.Foundation.AsyncOperationCompletedHandler<global::Windows.Storage.StorageFile> get_Completed(global::System.__ComObject __this)
{
global::McgInterop.McgHelpers.FailFastForReducedMethod();
return default(global::Windows.Foundation.AsyncOperationCompletedHandler<global::Windows.Storage.StorageFile>);
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.Storage.StorageFile GetResults(global::System.__ComObject __this)
{
global::Windows.Storage.StorageFile __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.Foundation.IAsyncOperation<global::Windows.Storage.StorageFile>, global::Windows.Storage.StorageFile>(
__this,
global::Windows.Foundation.IAsyncOperation_A_Windows_Storage_StorageFile_V___Impl.Vtbl.idx_GetResults
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
}
// DispatchClass for 'Windows.Foundation.IAsyncOperation<Windows.Storage.StorageFile>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.IAsyncOperation<global::Windows.Storage.StorageFile>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Foundation.IAsyncOperation<global::Windows.Storage.StorageFile>
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.IAsyncInfo.Id")]
uint global::Windows.Foundation.IAsyncInfo.get_Id()
{
global::McgInterop.McgHelpers.FailFastForReducedMethod();
return 0;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.IAsyncInfo.Status")]
global::Windows.Foundation.AsyncStatus global::Windows.Foundation.IAsyncInfo.get_Status()
{
global::McgInterop.McgHelpers.FailFastForReducedMethod();
return default(global::Windows.Foundation.AsyncStatus);
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.IAsyncInfo.ErrorCode")]
global::System.Exception global::Windows.Foundation.IAsyncInfo.get_ErrorCode()
{
global::McgInterop.McgHelpers.FailFastForReducedMethod();
return default(global::System.Exception);
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.Foundation.IAsyncInfo.Cancel()
{
global::McgInterop.McgHelpers.FailFastForReducedMethod();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.Foundation.IAsyncInfo.Close()
{
global::McgInterop.McgHelpers.FailFastForReducedMethod();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertySet, "Windows.Foundation.IAsyncOperation`1.Completed")]
void global::Windows.Foundation.IAsyncOperation<global::Windows.Storage.StorageFile>.put_Completed(global::Windows.Foundation.AsyncOperationCompletedHandler<global::Windows.Storage.StorageFile> handler)
{
global::Windows.Foundation.IAsyncOperation_A_Windows_Storage_StorageFile_V___Impl.StubClass.put_Completed(
this,
handler
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
global::Windows.Foundation.AsyncOperationCompletedHandler<global::Windows.Storage.StorageFile> global::Windows.Foundation.IAsyncOperation<global::Windows.Storage.StorageFile>.get_Completed()
{
global::McgInterop.McgHelpers.FailFastForReducedMethod();
return default(global::Windows.Foundation.AsyncOperationCompletedHandler<global::Windows.Storage.StorageFile>);
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
global::Windows.Storage.StorageFile global::Windows.Foundation.IAsyncOperation<global::Windows.Storage.StorageFile>.GetResults()
{
global::Windows.Storage.StorageFile __retVal = global::Windows.Foundation.IAsyncOperation_A_Windows_Storage_StorageFile_V___Impl.StubClass.GetResults(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.Foundation.IAsyncOperation<Windows.Storage.StorageFile>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.IAsyncOperation<global::Windows.Storage.StorageFile>))]
public unsafe partial struct Vtbl
{
internal const int idx_put_Completed = 6;
internal const int idx_get_Completed = 7;
internal const int idx_GetResults = 8;
}
}
// Windows.Foundation.AsyncOperationCompletedHandler<Windows.Storage.StorageFile>
public unsafe static class AsyncOperationCompletedHandler_A_Windows_Storage_StorageFile_V___Impl
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void Invoke(
this global::System.__ComObject __this,
global::Windows.Foundation.IAsyncOperation<global::Windows.Storage.StorageFile> asyncInfo,
global::Windows.Foundation.AsyncStatus asyncStatus)
{
global::McgInterop.ForwardComSharedStubs.Proc_TArg0__int<global::Windows.Foundation.AsyncOperationCompletedHandler<global::Windows.Storage.StorageFile>, global::Windows.Foundation.IAsyncOperation<global::Windows.Storage.StorageFile>>(
__this,
asyncInfo,
((int)asyncStatus),
global::Windows.Foundation.AsyncOperationCompletedHandler_A_Windows_Storage_StorageFile_V___Impl.Vtbl.idx_Invoke
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// v-table for 'Windows.Foundation.AsyncOperationCompletedHandler<Windows.Storage.StorageFile>'
public unsafe partial struct Vtbl
{
internal const int idx_Invoke = 3;
}
}
// Windows.Foundation.IReferenceArray<System.Collections.Generic.KeyValuePair<string,Windows.UI.Xaml.Markup.IXamlType>>
public unsafe static class IReferenceArray_A_System_Collections_Generic_KeyValuePair_A_string_j_Windows_UI_Xaml_Markup_IXamlType_V__V___Impl
{
// StubClass for 'Windows.Foundation.IReferenceArray<System.Collections.Generic.KeyValuePair<string,Windows.UI.Xaml.Markup.IXamlType>>'
public static partial class StubClass
{
// Signature, Windows.Foundation.IReferenceArray<System.Collections.Generic.KeyValuePair<string,Windows.UI.Xaml.Markup.IXamlType>>.get_Value, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.ArrayMarshaller] rg_System_Collections_Generic_KeyValuePair_2_string__Windows_UI_Xaml_Markup_IXamlType___Windows_Foundation_Collections__IKeyValuePair_A_string_j_Windows_UI_Xaml_Markup_IXamlType_V_ * *,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Collections.Generic.KeyValuePair<string, global::Windows.UI.Xaml.Markup.IXamlType>[] get_Value(global::System.__ComObject __this)
{
// Setup
global::System.Collections.Generic.KeyValuePair_A_string_j_Windows_UI_Xaml_Markup_IXamlType_V___Impl.Vtbl*** unsafe___value__retval = default(global::System.Collections.Generic.KeyValuePair_A_string_j_Windows_UI_Xaml_Markup_IXamlType_V___Impl.Vtbl***);
global::System.Collections.Generic.KeyValuePair<string, global::Windows.UI.Xaml.Markup.IXamlType>[] __value__retval = default(global::System.Collections.Generic.KeyValuePair<string, global::Windows.UI.Xaml.Markup.IXamlType>[]);
uint unsafe___value__retval_mcgLength = 0;
int unsafe___return__;
try
{
// Marshalling
unsafe___value__retval = null;
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.Foundation.IReferenceArray<global::System.Collections.Generic.KeyValuePair<string, global::Windows.UI.Xaml.Markup.IXamlType>>).TypeHandle,
global::Windows.Foundation.IReferenceArray_A_System_Collections_Generic_KeyValuePair_A_string_j_Windows_UI_Xaml_Markup_IXamlType_V__V___Impl.Vtbl.idx_get_Value,
&(unsafe___value__retval_mcgLength),
&(unsafe___value__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
if (unsafe___value__retval == null)
__value__retval = null;
else
{
__value__retval = new global::System.Collections.Generic.KeyValuePair<string, global::Windows.UI.Xaml.Markup.IXamlType>[unsafe___value__retval_mcgLength];
if (__value__retval != null)
for (uint mcgIdx = 0; (mcgIdx < unsafe___value__retval_mcgLength); mcgIdx++)
{
// [fwd] [out] [retval] [nativebyref] [optional] [Mcg.CodeGen.WinRTKeyValuePairMarshaller] System_Collections_Generic_KeyValuePair_2_string__Windows_UI_Xaml_Markup_IXamlType___Windows_Foundation_Collections__IKeyValuePair_A_string_j_Windows_UI_Xaml_Markup_IXamlType_V_ * __value__retval
global::Windows.Foundation.Collections.IKeyValuePair<string, global::Windows.UI.Xaml.Markup.IXamlType> pair___value__retval = ((global::Windows.Foundation.Collections.IKeyValuePair<string, global::Windows.UI.Xaml.Markup.IXamlType>)global::System.Runtime.InteropServices.McgModuleManager.ComInterfaceToObject_NoUnboxing(
((global::System.IntPtr)unsafe___value__retval[mcgIdx]),
typeof(global::Windows.Foundation.Collections.IKeyValuePair<string, global::Windows.UI.Xaml.Markup.IXamlType>).TypeHandle
));
__value__retval[mcgIdx] = new global::System.Collections.Generic.KeyValuePair<string, global::Windows.UI.Xaml.Markup.IXamlType>(pair___value__retval.get_Key(), pair___value__retval.get_Value());
}
}
// Return
return __value__retval;
}
finally
{
// Cleanup
if (unsafe___value__retval != null)
for (uint mcgIdx_1 = 0; (mcgIdx_1 < unsafe___value__retval_mcgLength); mcgIdx_1++)
{
// [fwd] [in] [out] [retval] [nativebyref] [optional] [Mcg.CodeGen.WinRTKeyValuePairMarshaller] System_Collections_Generic_KeyValuePair_2_string__Windows_UI_Xaml_Markup_IXamlType___Windows_Foundation_Collections__IKeyValuePair_A_string_j_Windows_UI_Xaml_Markup_IXamlType_V_ * __value__retval
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe___value__retval[mcgIdx_1])));
}
global::System.Runtime.InteropServices.ExternalInterop.SafeCoTaskMemFree(unsafe___value__retval);
}
}
}
// v-table for 'Windows.Foundation.IReferenceArray<System.Collections.Generic.KeyValuePair<string,Windows.UI.Xaml.Markup.IXamlType>>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.IReferenceArray<global::System.Collections.Generic.KeyValuePair<string, global::Windows.UI.Xaml.Markup.IXamlType>>))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Value = 6;
}
}
// Windows.Foundation.IReferenceArray<System.Collections.Generic.KeyValuePair<System.Type,Windows.UI.Xaml.Markup.IXamlType>>
public unsafe static class IReferenceArray_A_System_Collections_Generic_KeyValuePair_A_System_Type_j_Windows_UI_Xaml_Markup_IXamlType_V__V___Impl
{
// StubClass for 'Windows.Foundation.IReferenceArray<System.Collections.Generic.KeyValuePair<System.Type,Windows.UI.Xaml.Markup.IXamlType>>'
public static partial class StubClass
{
// Signature, Windows.Foundation.IReferenceArray<System.Collections.Generic.KeyValuePair<System.Type,Windows.UI.Xaml.Markup.IXamlType>>.get_Value, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.ArrayMarshaller] rg_System_Collections_Generic_KeyValuePair_2_System_Type__Windows_UI_Xaml_Markup_IXamlType___Windows_Foundation_Collections__IKeyValuePair_A_Windows_UI_Xaml_Interop_TypeName_j_Windows_UI_Xaml_Markup_IXamlType_V_ * *,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Collections.Generic.KeyValuePair<global::System.Type, global::Windows.UI.Xaml.Markup.IXamlType>[] get_Value(global::System.__ComObject __this)
{
// Setup
global::System.Collections.Generic.KeyValuePair_A_System_Type_j_Windows_UI_Xaml_Markup_IXamlType_V___Impl.Vtbl*** unsafe___value__retval = default(global::System.Collections.Generic.KeyValuePair_A_System_Type_j_Windows_UI_Xaml_Markup_IXamlType_V___Impl.Vtbl***);
global::System.Collections.Generic.KeyValuePair<global::System.Type, global::Windows.UI.Xaml.Markup.IXamlType>[] __value__retval = default(global::System.Collections.Generic.KeyValuePair<global::System.Type, global::Windows.UI.Xaml.Markup.IXamlType>[]);
uint unsafe___value__retval_mcgLength = 0;
int unsafe___return__;
try
{
// Marshalling
unsafe___value__retval = null;
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.Foundation.IReferenceArray<global::System.Collections.Generic.KeyValuePair<global::System.Type, global::Windows.UI.Xaml.Markup.IXamlType>>).TypeHandle,
global::Windows.Foundation.IReferenceArray_A_System_Collections_Generic_KeyValuePair_A_System_Type_j_Windows_UI_Xaml_Markup_IXamlType_V__V___Impl.Vtbl.idx_get_Value,
&(unsafe___value__retval_mcgLength),
&(unsafe___value__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
if (unsafe___value__retval == null)
__value__retval = null;
else
{
__value__retval = new global::System.Collections.Generic.KeyValuePair<global::System.Type, global::Windows.UI.Xaml.Markup.IXamlType>[unsafe___value__retval_mcgLength];
if (__value__retval != null)
for (uint mcgIdx = 0; (mcgIdx < unsafe___value__retval_mcgLength); mcgIdx++)
{
// [fwd] [out] [retval] [nativebyref] [optional] [Mcg.CodeGen.WinRTKeyValuePairMarshaller] System_Collections_Generic_KeyValuePair_2_System_Type__Windows_UI_Xaml_Markup_IXamlType___Windows_Foundation_Collections__IKeyValuePair_A_Windows_UI_Xaml_Interop_TypeName_j_Windows_UI_Xaml_Markup_IXamlType_V_ * __value__retval
global::Windows.Foundation.Collections.IKeyValuePair<global::System.Type, global::Windows.UI.Xaml.Markup.IXamlType> pair___value__retval = ((global::Windows.Foundation.Collections.IKeyValuePair<global::System.Type, global::Windows.UI.Xaml.Markup.IXamlType>)global::System.Runtime.InteropServices.McgModuleManager.ComInterfaceToObject_NoUnboxing(
((global::System.IntPtr)unsafe___value__retval[mcgIdx]),
typeof(global::Windows.Foundation.Collections.IKeyValuePair<global::System.Type, global::Windows.UI.Xaml.Markup.IXamlType>).TypeHandle
));
__value__retval[mcgIdx] = new global::System.Collections.Generic.KeyValuePair<global::System.Type, global::Windows.UI.Xaml.Markup.IXamlType>(pair___value__retval.get_Key(), pair___value__retval.get_Value());
}
}
// Return
return __value__retval;
}
finally
{
// Cleanup
if (unsafe___value__retval != null)
for (uint mcgIdx_1 = 0; (mcgIdx_1 < unsafe___value__retval_mcgLength); mcgIdx_1++)
{
// [fwd] [in] [out] [retval] [nativebyref] [optional] [Mcg.CodeGen.WinRTKeyValuePairMarshaller] System_Collections_Generic_KeyValuePair_2_System_Type__Windows_UI_Xaml_Markup_IXamlType___Windows_Foundation_Collections__IKeyValuePair_A_Windows_UI_Xaml_Interop_TypeName_j_Windows_UI_Xaml_Markup_IXamlType_V_ * __value__retval
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe___value__retval[mcgIdx_1])));
}
global::System.Runtime.InteropServices.ExternalInterop.SafeCoTaskMemFree(unsafe___value__retval);
}
}
}
// v-table for 'Windows.Foundation.IReferenceArray<System.Collections.Generic.KeyValuePair<System.Type,Windows.UI.Xaml.Markup.IXamlType>>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.IReferenceArray<global::System.Collections.Generic.KeyValuePair<global::System.Type, global::Windows.UI.Xaml.Markup.IXamlType>>))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Value = 6;
}
}
// Windows.Foundation.IReferenceArray<System.Collections.Generic.KeyValuePair<string,Windows.UI.Xaml.Markup.IXamlMember>>
public unsafe static class IReferenceArray_A_System_Collections_Generic_KeyValuePair_A_string_j_Windows_UI_Xaml_Markup_IXamlMember_V__V___Impl
{
// StubClass for 'Windows.Foundation.IReferenceArray<System.Collections.Generic.KeyValuePair<string,Windows.UI.Xaml.Markup.IXamlMember>>'
public static partial class StubClass
{
// Signature, Windows.Foundation.IReferenceArray<System.Collections.Generic.KeyValuePair<string,Windows.UI.Xaml.Markup.IXamlMember>>.get_Value, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.ArrayMarshaller] rg_System_Collections_Generic_KeyValuePair_2_string__Windows_UI_Xaml_Markup_IXamlMember___Windows_Foundation_Collections__IKeyValuePair_A_string_j_Windows_UI_Xaml_Markup_IXamlMember_V_ * *,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Collections.Generic.KeyValuePair<string, global::Windows.UI.Xaml.Markup.IXamlMember>[] get_Value(global::System.__ComObject __this)
{
// Setup
global::System.Collections.Generic.KeyValuePair_A_string_j_Windows_UI_Xaml_Markup_IXamlMember_V___Impl.Vtbl*** unsafe___value__retval = default(global::System.Collections.Generic.KeyValuePair_A_string_j_Windows_UI_Xaml_Markup_IXamlMember_V___Impl.Vtbl***);
global::System.Collections.Generic.KeyValuePair<string, global::Windows.UI.Xaml.Markup.IXamlMember>[] __value__retval = default(global::System.Collections.Generic.KeyValuePair<string, global::Windows.UI.Xaml.Markup.IXamlMember>[]);
uint unsafe___value__retval_mcgLength = 0;
int unsafe___return__;
try
{
// Marshalling
unsafe___value__retval = null;
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.Foundation.IReferenceArray<global::System.Collections.Generic.KeyValuePair<string, global::Windows.UI.Xaml.Markup.IXamlMember>>).TypeHandle,
global::Windows.Foundation.IReferenceArray_A_System_Collections_Generic_KeyValuePair_A_string_j_Windows_UI_Xaml_Markup_IXamlMember_V__V___Impl.Vtbl.idx_get_Value,
&(unsafe___value__retval_mcgLength),
&(unsafe___value__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
if (unsafe___value__retval == null)
__value__retval = null;
else
{
__value__retval = new global::System.Collections.Generic.KeyValuePair<string, global::Windows.UI.Xaml.Markup.IXamlMember>[unsafe___value__retval_mcgLength];
if (__value__retval != null)
for (uint mcgIdx = 0; (mcgIdx < unsafe___value__retval_mcgLength); mcgIdx++)
{
// [fwd] [out] [retval] [nativebyref] [optional] [Mcg.CodeGen.WinRTKeyValuePairMarshaller] System_Collections_Generic_KeyValuePair_2_string__Windows_UI_Xaml_Markup_IXamlMember___Windows_Foundation_Collections__IKeyValuePair_A_string_j_Windows_UI_Xaml_Markup_IXamlMember_V_ * __value__retval
global::Windows.Foundation.Collections.IKeyValuePair<string, global::Windows.UI.Xaml.Markup.IXamlMember> pair___value__retval = ((global::Windows.Foundation.Collections.IKeyValuePair<string, global::Windows.UI.Xaml.Markup.IXamlMember>)global::System.Runtime.InteropServices.McgModuleManager.ComInterfaceToObject_NoUnboxing(
((global::System.IntPtr)unsafe___value__retval[mcgIdx]),
typeof(global::Windows.Foundation.Collections.IKeyValuePair<string, global::Windows.UI.Xaml.Markup.IXamlMember>).TypeHandle
));
__value__retval[mcgIdx] = new global::System.Collections.Generic.KeyValuePair<string, global::Windows.UI.Xaml.Markup.IXamlMember>(pair___value__retval.get_Key(), pair___value__retval.get_Value());
}
}
// Return
return __value__retval;
}
finally
{
// Cleanup
if (unsafe___value__retval != null)
for (uint mcgIdx_1 = 0; (mcgIdx_1 < unsafe___value__retval_mcgLength); mcgIdx_1++)
{
// [fwd] [in] [out] [retval] [nativebyref] [optional] [Mcg.CodeGen.WinRTKeyValuePairMarshaller] System_Collections_Generic_KeyValuePair_2_string__Windows_UI_Xaml_Markup_IXamlMember___Windows_Foundation_Collections__IKeyValuePair_A_string_j_Windows_UI_Xaml_Markup_IXamlMember_V_ * __value__retval
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe___value__retval[mcgIdx_1])));
}
global::System.Runtime.InteropServices.ExternalInterop.SafeCoTaskMemFree(unsafe___value__retval);
}
}
}
// v-table for 'Windows.Foundation.IReferenceArray<System.Collections.Generic.KeyValuePair<string,Windows.UI.Xaml.Markup.IXamlMember>>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.IReferenceArray<global::System.Collections.Generic.KeyValuePair<string, global::Windows.UI.Xaml.Markup.IXamlMember>>))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Value = 6;
}
}
// Windows.Foundation.IReferenceArray<System.Collections.Generic.KeyValuePair<string,System.Object>>
public unsafe static class IReferenceArray_A_System_Collections_Generic_KeyValuePair_A_string_j_System_Object_V__V___Impl
{
// StubClass for 'Windows.Foundation.IReferenceArray<System.Collections.Generic.KeyValuePair<string,System.Object>>'
public static partial class StubClass
{
// Signature, Windows.Foundation.IReferenceArray<System.Collections.Generic.KeyValuePair<string,System.Object>>.get_Value, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.ArrayMarshaller] rg_System_Collections_Generic_KeyValuePair_2_string__object___Windows_Foundation_Collections__IKeyValuePair_A_string_j_object_V_ * *,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Collections.Generic.KeyValuePair<string, object>[] get_Value(global::System.__ComObject __this)
{
// Setup
global::System.Collections.Generic.KeyValuePair_A_string_j_System_Object_V___Impl.Vtbl*** unsafe___value__retval = default(global::System.Collections.Generic.KeyValuePair_A_string_j_System_Object_V___Impl.Vtbl***);
global::System.Collections.Generic.KeyValuePair<string, object>[] __value__retval = default(global::System.Collections.Generic.KeyValuePair<string, object>[]);
uint unsafe___value__retval_mcgLength = 0;
int unsafe___return__;
try
{
// Marshalling
unsafe___value__retval = null;
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.Foundation.IReferenceArray<global::System.Collections.Generic.KeyValuePair<string, object>>).TypeHandle,
global::Windows.Foundation.IReferenceArray_A_System_Collections_Generic_KeyValuePair_A_string_j_System_Object_V__V___Impl.Vtbl.idx_get_Value,
&(unsafe___value__retval_mcgLength),
&(unsafe___value__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
if (unsafe___value__retval == null)
__value__retval = null;
else
{
__value__retval = new global::System.Collections.Generic.KeyValuePair<string, object>[unsafe___value__retval_mcgLength];
if (__value__retval != null)
for (uint mcgIdx = 0; (mcgIdx < unsafe___value__retval_mcgLength); mcgIdx++)
{
// [fwd] [out] [retval] [nativebyref] [optional] [Mcg.CodeGen.WinRTKeyValuePairMarshaller] System_Collections_Generic_KeyValuePair_2_string__object___Windows_Foundation_Collections__IKeyValuePair_A_string_j_object_V_ * __value__retval
global::Windows.Foundation.Collections.IKeyValuePair<string, object> pair___value__retval = ((global::Windows.Foundation.Collections.IKeyValuePair<string, object>)global::System.Runtime.InteropServices.McgModuleManager.ComInterfaceToObject_NoUnboxing(
((global::System.IntPtr)unsafe___value__retval[mcgIdx]),
typeof(global::Windows.Foundation.Collections.IKeyValuePair<string, object>).TypeHandle
));
__value__retval[mcgIdx] = new global::System.Collections.Generic.KeyValuePair<string, object>(pair___value__retval.get_Key(), pair___value__retval.get_Value());
}
}
// Return
return __value__retval;
}
finally
{
// Cleanup
if (unsafe___value__retval != null)
for (uint mcgIdx_1 = 0; (mcgIdx_1 < unsafe___value__retval_mcgLength); mcgIdx_1++)
{
// [fwd] [in] [out] [retval] [nativebyref] [optional] [Mcg.CodeGen.WinRTKeyValuePairMarshaller] System_Collections_Generic_KeyValuePair_2_string__object___Windows_Foundation_Collections__IKeyValuePair_A_string_j_object_V_ * __value__retval
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe___value__retval[mcgIdx_1])));
}
global::System.Runtime.InteropServices.ExternalInterop.SafeCoTaskMemFree(unsafe___value__retval);
}
}
}
// v-table for 'Windows.Foundation.IReferenceArray<System.Collections.Generic.KeyValuePair<string,System.Object>>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.IReferenceArray<global::System.Collections.Generic.KeyValuePair<string, object>>))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Value = 6;
}
}
// Windows.Foundation.UniversalApiContract
public unsafe static class UniversalApiContract__Impl
{
}
// Windows.Foundation.FoundationContract
public unsafe static class FoundationContract__Impl
{
}
}
namespace Windows.Foundation.Collections
{
// Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Automation.Peers.AutomationPeer>
public unsafe static class IIterator_A_Windows_UI_Xaml_Automation_Peers_AutomationPeer_V___Impl
{
// StubClass for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Automation.Peers.AutomationPeer>'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.Automation.Peers.AutomationPeer get_Current(global::System.__ComObject __this)
{
global::Windows.UI.Xaml.Automation.Peers.AutomationPeer __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.AutomationPeer>, global::Windows.UI.Xaml.Automation.Peers.AutomationPeer>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_AutomationPeer_V___Impl.Vtbl.idx_get_Current
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool get_HasCurrent(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.AutomationPeer>>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_AutomationPeer_V___Impl.Vtbl.idx_get_HasCurrent
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool MoveNext(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.AutomationPeer>>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_AutomationPeer_V___Impl.Vtbl.idx_MoveNext
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
// Signature, Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Automation.Peers.AutomationPeer>.GetMany, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [out] [Mcg.CodeGen.ArrayMarshaller] rg_Windows_UI_Xaml_Automation_Peers_AutomationPeer__Windows_UI_Xaml_Automation_Peers__AutomationPeer * *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] uint__unsigned int,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static uint GetMany(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Automation.Peers.AutomationPeer[] items)
{
// Setup
uint unsafe_items_mcgLength = 0;
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer__Impl.Vtbl*** unsafe_items = default(global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer__Impl.Vtbl***);
uint unsafe___value__retval;
uint __value__retval;
int unsafe___return__;
try
{
// Marshalling
if (items != null)
unsafe_items_mcgLength = (uint)items.Length;
if (items != null)
unsafe_items = (global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer__Impl.Vtbl***)global::McgInterop.McgHelpers.CoTaskMemAllocAndZeroMemory(((global::System.IntPtr)checked(unsafe_items_mcgLength * sizeof(global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer__Impl.Vtbl**))));
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.AutomationPeer>).TypeHandle,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_AutomationPeer_V___Impl.Vtbl.idx_GetMany,
unsafe_items_mcgLength,
unsafe_items,
&(unsafe___value__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
__value__retval = unsafe___value__retval;
if (items != null)
for (uint mcgIdx = 0; (mcgIdx < unsafe_items_mcgLength); mcgIdx++)
{
// [fwd] [out] [optional] [Mcg.CodeGen.WinRTClassMarshaller] Windows_UI_Xaml_Automation_Peers_AutomationPeer__Windows_UI_Xaml_Automation_Peers__AutomationPeer * items
items[mcgIdx] = (global::Windows.UI.Xaml.Automation.Peers.AutomationPeer)global::System.Runtime.InteropServices.McgModuleManager.ComInterfaceToObject(
((global::System.IntPtr)unsafe_items[mcgIdx]),
typeof(global::Windows.UI.Xaml.Automation.Peers.AutomationPeer).TypeHandle
);
}
// Return
return __value__retval;
}
finally
{
// Cleanup
if (unsafe_items != null)
for (uint mcgIdx_1 = 0; (mcgIdx_1 < unsafe_items_mcgLength); mcgIdx_1++)
{
// [fwd] [in] [out] [optional] [Mcg.CodeGen.WinRTClassMarshaller] Windows_UI_Xaml_Automation_Peers_AutomationPeer__Windows_UI_Xaml_Automation_Peers__AutomationPeer * items
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_items[mcgIdx_1])));
}
global::System.Runtime.InteropServices.ExternalInterop.SafeCoTaskMemFree(unsafe_items);
}
}
}
// DispatchClass for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Automation.Peers.AutomationPeer>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.AutomationPeer>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.AutomationPeer>
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IIterator`1.Current")]
global::Windows.UI.Xaml.Automation.Peers.AutomationPeer global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.AutomationPeer>.get_Current()
{
global::Windows.UI.Xaml.Automation.Peers.AutomationPeer __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_AutomationPeer_V___Impl.StubClass.get_Current(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IIterator`1.HasCurrent")]
bool global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.AutomationPeer>.get_HasCurrent()
{
bool __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_AutomationPeer_V___Impl.StubClass.get_HasCurrent(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
bool global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.AutomationPeer>.MoveNext()
{
bool __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_AutomationPeer_V___Impl.StubClass.MoveNext(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
uint global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.AutomationPeer>.GetMany(global::Windows.UI.Xaml.Automation.Peers.AutomationPeer[] items)
{
uint __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_AutomationPeer_V___Impl.StubClass.GetMany(
this,
items
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Automation.Peers.AutomationPeer>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.AutomationPeer>))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Current = 6;
internal const int idx_get_HasCurrent = 7;
internal const int idx_MoveNext = 8;
internal const int idx_GetMany = 9;
}
}
// Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Automation.Peers.AutomationPeerAnnotation>
public unsafe static class IIterator_A_Windows_UI_Xaml_Automation_Peers_AutomationPeerAnnotation_V___Impl
{
// StubClass for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Automation.Peers.AutomationPeerAnnotation>'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.Automation.Peers.AutomationPeerAnnotation get_Current(global::System.__ComObject __this)
{
global::Windows.UI.Xaml.Automation.Peers.AutomationPeerAnnotation __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.AutomationPeerAnnotation>, global::Windows.UI.Xaml.Automation.Peers.AutomationPeerAnnotation>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_AutomationPeerAnnotation_V___Impl.Vtbl.idx_get_Current
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool get_HasCurrent(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.AutomationPeerAnnotation>>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_AutomationPeerAnnotation_V___Impl.Vtbl.idx_get_HasCurrent
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool MoveNext(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.AutomationPeerAnnotation>>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_AutomationPeerAnnotation_V___Impl.Vtbl.idx_MoveNext
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
// Signature, Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Automation.Peers.AutomationPeerAnnotation>.GetMany, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [out] [Mcg.CodeGen.ArrayMarshaller] rg_Windows_UI_Xaml_Automation_Peers_AutomationPeerAnnotation__Windows_UI_Xaml_Automation_Peers__AutomationPeerAnnotation * *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] uint__unsigned int,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static uint GetMany(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Automation.Peers.AutomationPeerAnnotation[] items)
{
// Setup
uint unsafe_items_mcgLength = 0;
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerAnnotation__Impl.Vtbl*** unsafe_items = default(global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerAnnotation__Impl.Vtbl***);
uint unsafe___value__retval;
uint __value__retval;
int unsafe___return__;
try
{
// Marshalling
if (items != null)
unsafe_items_mcgLength = (uint)items.Length;
if (items != null)
unsafe_items = (global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerAnnotation__Impl.Vtbl***)global::McgInterop.McgHelpers.CoTaskMemAllocAndZeroMemory(((global::System.IntPtr)checked(unsafe_items_mcgLength * sizeof(global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerAnnotation__Impl.Vtbl**))));
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.AutomationPeerAnnotation>).TypeHandle,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_AutomationPeerAnnotation_V___Impl.Vtbl.idx_GetMany,
unsafe_items_mcgLength,
unsafe_items,
&(unsafe___value__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
__value__retval = unsafe___value__retval;
if (items != null)
for (uint mcgIdx = 0; (mcgIdx < unsafe_items_mcgLength); mcgIdx++)
{
// [fwd] [out] [optional] [Mcg.CodeGen.WinRTClassMarshaller] Windows_UI_Xaml_Automation_Peers_AutomationPeerAnnotation__Windows_UI_Xaml_Automation_Peers__AutomationPeerAnnotation * items
items[mcgIdx] = (global::Windows.UI.Xaml.Automation.Peers.AutomationPeerAnnotation)global::System.Runtime.InteropServices.McgModuleManager.ComInterfaceToObject(
((global::System.IntPtr)unsafe_items[mcgIdx]),
typeof(global::Windows.UI.Xaml.Automation.Peers.AutomationPeerAnnotation).TypeHandle
);
}
// Return
return __value__retval;
}
finally
{
// Cleanup
if (unsafe_items != null)
for (uint mcgIdx_1 = 0; (mcgIdx_1 < unsafe_items_mcgLength); mcgIdx_1++)
{
// [fwd] [in] [out] [optional] [Mcg.CodeGen.WinRTClassMarshaller] Windows_UI_Xaml_Automation_Peers_AutomationPeerAnnotation__Windows_UI_Xaml_Automation_Peers__AutomationPeerAnnotation * items
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_items[mcgIdx_1])));
}
global::System.Runtime.InteropServices.ExternalInterop.SafeCoTaskMemFree(unsafe_items);
}
}
}
// DispatchClass for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Automation.Peers.AutomationPeerAnnotation>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.AutomationPeerAnnotation>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.AutomationPeerAnnotation>
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IIterator`1.Current")]
global::Windows.UI.Xaml.Automation.Peers.AutomationPeerAnnotation global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.AutomationPeerAnnotation>.get_Current()
{
global::Windows.UI.Xaml.Automation.Peers.AutomationPeerAnnotation __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_AutomationPeerAnnotation_V___Impl.StubClass.get_Current(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IIterator`1.HasCurrent")]
bool global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.AutomationPeerAnnotation>.get_HasCurrent()
{
bool __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_AutomationPeerAnnotation_V___Impl.StubClass.get_HasCurrent(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
bool global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.AutomationPeerAnnotation>.MoveNext()
{
bool __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_AutomationPeerAnnotation_V___Impl.StubClass.MoveNext(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
uint global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.AutomationPeerAnnotation>.GetMany(global::Windows.UI.Xaml.Automation.Peers.AutomationPeerAnnotation[] items)
{
uint __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_AutomationPeerAnnotation_V___Impl.StubClass.GetMany(
this,
items
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Automation.Peers.AutomationPeerAnnotation>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.AutomationPeerAnnotation>))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Current = 6;
internal const int idx_get_HasCurrent = 7;
internal const int idx_MoveNext = 8;
internal const int idx_GetMany = 9;
}
}
// Windows.Foundation.Collections.IIterator<Windows.Foundation.Point>
public unsafe static class IIterator_A_Windows_Foundation_Point_V___Impl
{
// StubClass for 'Windows.Foundation.Collections.IIterator<Windows.Foundation.Point>'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.Foundation.Point get_Current(global::System.__ComObject __this)
{
global::Windows.Foundation.Point __ret = global::McgInterop.ForwardComSharedStubs.Func__Point__<global::Windows.Foundation.Collections.IIterator<global::Windows.Foundation.Point>>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_Foundation_Point_V___Impl.Vtbl.idx_get_Current
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool get_HasCurrent(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.Foundation.Collections.IIterator<global::Windows.Foundation.Point>>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_Foundation_Point_V___Impl.Vtbl.idx_get_HasCurrent
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool MoveNext(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.Foundation.Collections.IIterator<global::Windows.Foundation.Point>>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_Foundation_Point_V___Impl.Vtbl.idx_MoveNext
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
// Signature, Windows.Foundation.Collections.IIterator<Windows.Foundation.Point>.GetMany, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [out] [Mcg.CodeGen.BlittableArrayMarshaller] rg_Windows_Foundation_Point__Windows_Foundation__Point *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] uint__unsigned int,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static uint GetMany(
global::System.__ComObject __this,
global::Windows.Foundation.Point[] items)
{
// Setup
uint unsafe_items_mcgLength = 0;
global::Windows.Foundation.Point* unsafe_items;
uint unsafe___value__retval;
uint __value__retval;
int unsafe___return__;
// Marshalling
if (items != null)
unsafe_items_mcgLength = (uint)items.Length;
fixed (global::Windows.Foundation.Point* pinned_items = global::McgInterop.McgCoreHelpers.GetArrayForCompat(items))
{
unsafe_items = (global::Windows.Foundation.Point*)pinned_items;
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.Foundation.Point>).TypeHandle,
global::Windows.Foundation.Collections.IIterator_A_Windows_Foundation_Point_V___Impl.Vtbl.idx_GetMany,
unsafe_items_mcgLength,
unsafe_items,
&(unsafe___value__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
__value__retval = unsafe___value__retval;
}
// Return
return __value__retval;
}
}
// DispatchClass for 'Windows.Foundation.Collections.IIterator<Windows.Foundation.Point>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.Foundation.Point>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Foundation.Collections.IIterator<global::Windows.Foundation.Point>
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IIterator`1.Current")]
global::Windows.Foundation.Point global::Windows.Foundation.Collections.IIterator<global::Windows.Foundation.Point>.get_Current()
{
global::Windows.Foundation.Point __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_Foundation_Point_V___Impl.StubClass.get_Current(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IIterator`1.HasCurrent")]
bool global::Windows.Foundation.Collections.IIterator<global::Windows.Foundation.Point>.get_HasCurrent()
{
bool __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_Foundation_Point_V___Impl.StubClass.get_HasCurrent(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
bool global::Windows.Foundation.Collections.IIterator<global::Windows.Foundation.Point>.MoveNext()
{
bool __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_Foundation_Point_V___Impl.StubClass.MoveNext(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
uint global::Windows.Foundation.Collections.IIterator<global::Windows.Foundation.Point>.GetMany(global::Windows.Foundation.Point[] items)
{
uint __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_Foundation_Point_V___Impl.StubClass.GetMany(
this,
items
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.Foundation.Collections.IIterator<Windows.Foundation.Point>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.Foundation.Point>))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Current = 6;
internal const int idx_get_HasCurrent = 7;
internal const int idx_MoveNext = 8;
internal const int idx_GetMany = 9;
}
}
// Windows.Foundation.Collections.IIterator<System.Collections.Generic.IEnumerable<Windows.Foundation.Point>>
public unsafe static class IIterator_A_System_Collections_Generic_IEnumerable_A_Windows_Foundation_Point_V__V___Impl
{
// StubClass for 'Windows.Foundation.Collections.IIterator<System.Collections.Generic.IEnumerable<Windows.Foundation.Point>>'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Collections.Generic.IEnumerable<global::Windows.Foundation.Point> get_Current(global::System.__ComObject __this)
{
global::System.Collections.Generic.IEnumerable<global::Windows.Foundation.Point> __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.Foundation.Collections.IIterator<global::System.Collections.Generic.IEnumerable<global::Windows.Foundation.Point>>, global::System.Collections.Generic.IEnumerable<global::Windows.Foundation.Point>>(
__this,
global::Windows.Foundation.Collections.IIterator_A_System_Collections_Generic_IEnumerable_A_Windows_Foundation_Point_V__V___Impl.Vtbl.idx_get_Current
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool get_HasCurrent(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.Foundation.Collections.IIterator<global::System.Collections.Generic.IEnumerable<global::Windows.Foundation.Point>>>(
__this,
global::Windows.Foundation.Collections.IIterator_A_System_Collections_Generic_IEnumerable_A_Windows_Foundation_Point_V__V___Impl.Vtbl.idx_get_HasCurrent
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool MoveNext(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.Foundation.Collections.IIterator<global::System.Collections.Generic.IEnumerable<global::Windows.Foundation.Point>>>(
__this,
global::Windows.Foundation.Collections.IIterator_A_System_Collections_Generic_IEnumerable_A_Windows_Foundation_Point_V__V___Impl.Vtbl.idx_MoveNext
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
// Signature, Windows.Foundation.Collections.IIterator<System.Collections.Generic.IEnumerable<Windows.Foundation.Point>>.GetMany, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [out] [Mcg.CodeGen.ArrayMarshaller] rg_System_Collections_Generic_IEnumerable_1_Windows_Foundation_Point___Windows_Foundation_Collections__IIterable_A_Windows_Foundation_Point_V_ * *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] uint__unsigned int,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static uint GetMany(
global::System.__ComObject __this,
global::System.Collections.Generic.IEnumerable<global::Windows.Foundation.Point>[] items)
{
// Setup
uint unsafe_items_mcgLength = 0;
global::System.Collections.Generic.IEnumerable_A_Windows_Foundation_Point_V___Impl.Vtbl*** unsafe_items = default(global::System.Collections.Generic.IEnumerable_A_Windows_Foundation_Point_V___Impl.Vtbl***);
uint unsafe___value__retval;
uint __value__retval;
int unsafe___return__;
try
{
// Marshalling
if (items != null)
unsafe_items_mcgLength = (uint)items.Length;
if (items != null)
unsafe_items = (global::System.Collections.Generic.IEnumerable_A_Windows_Foundation_Point_V___Impl.Vtbl***)global::McgInterop.McgHelpers.CoTaskMemAllocAndZeroMemory(((global::System.IntPtr)checked(unsafe_items_mcgLength * sizeof(global::System.Collections.Generic.IEnumerable_A_Windows_Foundation_Point_V___Impl.Vtbl**))));
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.Foundation.Collections.IIterator<global::System.Collections.Generic.IEnumerable<global::Windows.Foundation.Point>>).TypeHandle,
global::Windows.Foundation.Collections.IIterator_A_System_Collections_Generic_IEnumerable_A_Windows_Foundation_Point_V__V___Impl.Vtbl.idx_GetMany,
unsafe_items_mcgLength,
unsafe_items,
&(unsafe___value__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
__value__retval = unsafe___value__retval;
if (items != null)
for (uint mcgIdx = 0; (mcgIdx < unsafe_items_mcgLength); mcgIdx++)
{
// [fwd] [out] [optional] [Mcg.CodeGen.ComInterfaceMarshaller] System_Collections_Generic_IEnumerable_1_Windows_Foundation_Point___Windows_Foundation_Collections__IIterable_A_Windows_Foundation_Point_V_ * items
items[mcgIdx] = (global::System.Collections.Generic.IEnumerable<global::Windows.Foundation.Point>)global::System.Runtime.InteropServices.McgModuleManager.ComInterfaceToObject(
((global::System.IntPtr)unsafe_items[mcgIdx]),
typeof(global::System.Collections.Generic.IEnumerable<global::Windows.Foundation.Point>).TypeHandle
);
}
// Return
return __value__retval;
}
finally
{
// Cleanup
if (unsafe_items != null)
for (uint mcgIdx_1 = 0; (mcgIdx_1 < unsafe_items_mcgLength); mcgIdx_1++)
{
// [fwd] [in] [out] [optional] [Mcg.CodeGen.ComInterfaceMarshaller] System_Collections_Generic_IEnumerable_1_Windows_Foundation_Point___Windows_Foundation_Collections__IIterable_A_Windows_Foundation_Point_V_ * items
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_items[mcgIdx_1])));
}
global::System.Runtime.InteropServices.ExternalInterop.SafeCoTaskMemFree(unsafe_items);
}
}
}
// DispatchClass for 'Windows.Foundation.Collections.IIterator<System.Collections.Generic.IEnumerable<Windows.Foundation.Point>>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IIterator<global::System.Collections.Generic.IEnumerable<global::Windows.Foundation.Point>>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Foundation.Collections.IIterator<global::System.Collections.Generic.IEnumerable<global::Windows.Foundation.Point>>
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IIterator`1.Current")]
global::System.Collections.Generic.IEnumerable<global::Windows.Foundation.Point> global::Windows.Foundation.Collections.IIterator<global::System.Collections.Generic.IEnumerable<global::Windows.Foundation.Point>>.get_Current()
{
global::System.Collections.Generic.IEnumerable<global::Windows.Foundation.Point> __retVal = global::Windows.Foundation.Collections.IIterator_A_System_Collections_Generic_IEnumerable_A_Windows_Foundation_Point_V__V___Impl.StubClass.get_Current(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IIterator`1.HasCurrent")]
bool global::Windows.Foundation.Collections.IIterator<global::System.Collections.Generic.IEnumerable<global::Windows.Foundation.Point>>.get_HasCurrent()
{
bool __retVal = global::Windows.Foundation.Collections.IIterator_A_System_Collections_Generic_IEnumerable_A_Windows_Foundation_Point_V__V___Impl.StubClass.get_HasCurrent(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
bool global::Windows.Foundation.Collections.IIterator<global::System.Collections.Generic.IEnumerable<global::Windows.Foundation.Point>>.MoveNext()
{
bool __retVal = global::Windows.Foundation.Collections.IIterator_A_System_Collections_Generic_IEnumerable_A_Windows_Foundation_Point_V__V___Impl.StubClass.MoveNext(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
uint global::Windows.Foundation.Collections.IIterator<global::System.Collections.Generic.IEnumerable<global::Windows.Foundation.Point>>.GetMany(global::System.Collections.Generic.IEnumerable<global::Windows.Foundation.Point>[] items)
{
uint __retVal = global::Windows.Foundation.Collections.IIterator_A_System_Collections_Generic_IEnumerable_A_Windows_Foundation_Point_V__V___Impl.StubClass.GetMany(
this,
items
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.Foundation.Collections.IIterator<System.Collections.Generic.IEnumerable<Windows.Foundation.Point>>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IIterator<global::System.Collections.Generic.IEnumerable<global::Windows.Foundation.Point>>))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Current = 6;
internal const int idx_get_HasCurrent = 7;
internal const int idx_MoveNext = 8;
internal const int idx_GetMany = 9;
}
}
// Windows.Foundation.Collections.IIterator<System.Collections.Generic.KeyValuePair<System.Object,System.Object>>
public unsafe static class IIterator_A_System_Collections_Generic_KeyValuePair_A_System_Object_j_System_Object_V__V___Impl
{
// StubClass for 'Windows.Foundation.Collections.IIterator<System.Collections.Generic.KeyValuePair<System.Object,System.Object>>'
public static partial class StubClass
{
// Signature, Windows.Foundation.Collections.IIterator<System.Collections.Generic.KeyValuePair<System.Object,System.Object>>.get_Current, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.WinRTKeyValuePairMarshaller] System_Collections_Generic_KeyValuePair_2_object__object___Windows_Foundation_Collections__IKeyValuePair_A_object_j_object_V_ *,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Collections.Generic.KeyValuePair<object, object> get_Current(global::System.__ComObject __this)
{
// Setup
global::System.Collections.Generic.KeyValuePair_A_System_Object_j_System_Object_V___Impl.Vtbl** unsafe___value__retval = default(global::System.Collections.Generic.KeyValuePair_A_System_Object_j_System_Object_V___Impl.Vtbl**);
global::System.Collections.Generic.KeyValuePair<object, object> __value__retval = default(global::System.Collections.Generic.KeyValuePair<object, object>);
int unsafe___return__;
try
{
// Marshalling
unsafe___value__retval = null;
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.Foundation.Collections.IIterator<global::System.Collections.Generic.KeyValuePair<object, object>>).TypeHandle,
global::Windows.Foundation.Collections.IIterator_A_System_Collections_Generic_KeyValuePair_A_System_Object_j_System_Object_V__V___Impl.Vtbl.idx_get_Current,
&(unsafe___value__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
global::Windows.Foundation.Collections.IKeyValuePair<object, object> pair___value__retval = ((global::Windows.Foundation.Collections.IKeyValuePair<object, object>)global::System.Runtime.InteropServices.McgModuleManager.ComInterfaceToObject_NoUnboxing(
((global::System.IntPtr)unsafe___value__retval),
typeof(global::Windows.Foundation.Collections.IKeyValuePair<object, object>).TypeHandle
));
__value__retval = new global::System.Collections.Generic.KeyValuePair<object, object>(pair___value__retval.get_Key(), pair___value__retval.get_Value());
// Return
return __value__retval;
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe___value__retval)));
}
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool get_HasCurrent(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.Foundation.Collections.IIterator<global::System.Collections.Generic.KeyValuePair<object, object>>>(
__this,
global::Windows.Foundation.Collections.IIterator_A_System_Collections_Generic_KeyValuePair_A_System_Object_j_System_Object_V__V___Impl.Vtbl.idx_get_HasCurrent
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool MoveNext(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.Foundation.Collections.IIterator<global::System.Collections.Generic.KeyValuePair<object, object>>>(
__this,
global::Windows.Foundation.Collections.IIterator_A_System_Collections_Generic_KeyValuePair_A_System_Object_j_System_Object_V__V___Impl.Vtbl.idx_MoveNext
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
// Signature, Windows.Foundation.Collections.IIterator<System.Collections.Generic.KeyValuePair<System.Object,System.Object>>.GetMany, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [out] [Mcg.CodeGen.ArrayMarshaller] rg_System_Collections_Generic_KeyValuePair_2_object__object___Windows_Foundation_Collections__IKeyValuePair_A_object_j_object_V_ * *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] uint__unsigned int,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static uint GetMany(
global::System.__ComObject __this,
global::System.Collections.Generic.KeyValuePair<object, object>[] items)
{
// Setup
uint unsafe_items_mcgLength = 0;
global::System.Collections.Generic.KeyValuePair_A_System_Object_j_System_Object_V___Impl.Vtbl*** unsafe_items = default(global::System.Collections.Generic.KeyValuePair_A_System_Object_j_System_Object_V___Impl.Vtbl***);
uint unsafe___value__retval;
uint __value__retval;
int unsafe___return__;
try
{
// Marshalling
if (items != null)
unsafe_items_mcgLength = (uint)items.Length;
if (items != null)
unsafe_items = (global::System.Collections.Generic.KeyValuePair_A_System_Object_j_System_Object_V___Impl.Vtbl***)global::McgInterop.McgHelpers.CoTaskMemAllocAndZeroMemory(((global::System.IntPtr)checked(unsafe_items_mcgLength * sizeof(global::System.Collections.Generic.KeyValuePair_A_System_Object_j_System_Object_V___Impl.Vtbl**))));
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.Foundation.Collections.IIterator<global::System.Collections.Generic.KeyValuePair<object, object>>).TypeHandle,
global::Windows.Foundation.Collections.IIterator_A_System_Collections_Generic_KeyValuePair_A_System_Object_j_System_Object_V__V___Impl.Vtbl.idx_GetMany,
unsafe_items_mcgLength,
unsafe_items,
&(unsafe___value__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
__value__retval = unsafe___value__retval;
if (items != null)
for (uint mcgIdx = 0; (mcgIdx < unsafe_items_mcgLength); mcgIdx++)
{
// [fwd] [out] [optional] [Mcg.CodeGen.WinRTKeyValuePairMarshaller] System_Collections_Generic_KeyValuePair_2_object__object___Windows_Foundation_Collections__IKeyValuePair_A_object_j_object_V_ * items
global::Windows.Foundation.Collections.IKeyValuePair<object, object> pair_items = ((global::Windows.Foundation.Collections.IKeyValuePair<object, object>)global::System.Runtime.InteropServices.McgModuleManager.ComInterfaceToObject_NoUnboxing(
((global::System.IntPtr)unsafe_items[mcgIdx]),
typeof(global::Windows.Foundation.Collections.IKeyValuePair<object, object>).TypeHandle
));
items[mcgIdx] = new global::System.Collections.Generic.KeyValuePair<object, object>(pair_items.get_Key(), pair_items.get_Value());
}
// Return
return __value__retval;
}
finally
{
// Cleanup
if (unsafe_items != null)
for (uint mcgIdx_1 = 0; (mcgIdx_1 < unsafe_items_mcgLength); mcgIdx_1++)
{
// [fwd] [in] [out] [optional] [Mcg.CodeGen.WinRTKeyValuePairMarshaller] System_Collections_Generic_KeyValuePair_2_object__object___Windows_Foundation_Collections__IKeyValuePair_A_object_j_object_V_ * items
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_items[mcgIdx_1])));
}
global::System.Runtime.InteropServices.ExternalInterop.SafeCoTaskMemFree(unsafe_items);
}
}
}
// DispatchClass for 'Windows.Foundation.Collections.IIterator<System.Collections.Generic.KeyValuePair<System.Object,System.Object>>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IIterator<global::System.Collections.Generic.KeyValuePair<object, object>>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Foundation.Collections.IIterator<global::System.Collections.Generic.KeyValuePair<object, object>>
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IIterator`1.Current")]
global::System.Collections.Generic.KeyValuePair<object, object> global::Windows.Foundation.Collections.IIterator<global::System.Collections.Generic.KeyValuePair<object, object>>.get_Current()
{
global::System.Collections.Generic.KeyValuePair<object, object> __retVal = global::Windows.Foundation.Collections.IIterator_A_System_Collections_Generic_KeyValuePair_A_System_Object_j_System_Object_V__V___Impl.StubClass.get_Current(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IIterator`1.HasCurrent")]
bool global::Windows.Foundation.Collections.IIterator<global::System.Collections.Generic.KeyValuePair<object, object>>.get_HasCurrent()
{
bool __retVal = global::Windows.Foundation.Collections.IIterator_A_System_Collections_Generic_KeyValuePair_A_System_Object_j_System_Object_V__V___Impl.StubClass.get_HasCurrent(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
bool global::Windows.Foundation.Collections.IIterator<global::System.Collections.Generic.KeyValuePair<object, object>>.MoveNext()
{
bool __retVal = global::Windows.Foundation.Collections.IIterator_A_System_Collections_Generic_KeyValuePair_A_System_Object_j_System_Object_V__V___Impl.StubClass.MoveNext(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
uint global::Windows.Foundation.Collections.IIterator<global::System.Collections.Generic.KeyValuePair<object, object>>.GetMany(global::System.Collections.Generic.KeyValuePair<object, object>[] items)
{
uint __retVal = global::Windows.Foundation.Collections.IIterator_A_System_Collections_Generic_KeyValuePair_A_System_Object_j_System_Object_V__V___Impl.StubClass.GetMany(
this,
items
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.Foundation.Collections.IIterator<System.Collections.Generic.KeyValuePair<System.Object,System.Object>>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IIterator<global::System.Collections.Generic.KeyValuePair<object, object>>))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Current = 6;
internal const int idx_get_HasCurrent = 7;
internal const int idx_MoveNext = 8;
internal const int idx_GetMany = 9;
}
}
// Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.UIElement>
public unsafe static class IIterator_A_Windows_UI_Xaml_UIElement_V___Impl
{
// StubClass for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.UIElement>'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.UIElement get_Current(global::System.__ComObject __this)
{
global::Windows.UI.Xaml.UIElement __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.UIElement>, global::Windows.UI.Xaml.UIElement>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_UIElement_V___Impl.Vtbl.idx_get_Current
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool get_HasCurrent(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.UIElement>>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_UIElement_V___Impl.Vtbl.idx_get_HasCurrent
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool MoveNext(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.UIElement>>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_UIElement_V___Impl.Vtbl.idx_MoveNext
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
// Signature, Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.UIElement>.GetMany, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [out] [Mcg.CodeGen.ArrayMarshaller] rg_Windows_UI_Xaml_UIElement__Windows_UI_Xaml__UIElement * *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] uint__unsigned int,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static uint GetMany(
global::System.__ComObject __this,
global::Windows.UI.Xaml.UIElement[] items)
{
// Setup
uint unsafe_items_mcgLength = 0;
global::Windows.UI.Xaml.IUIElement__Impl.Vtbl*** unsafe_items = default(global::Windows.UI.Xaml.IUIElement__Impl.Vtbl***);
uint unsafe___value__retval;
uint __value__retval;
int unsafe___return__;
try
{
// Marshalling
if (items != null)
unsafe_items_mcgLength = (uint)items.Length;
if (items != null)
unsafe_items = (global::Windows.UI.Xaml.IUIElement__Impl.Vtbl***)global::McgInterop.McgHelpers.CoTaskMemAllocAndZeroMemory(((global::System.IntPtr)checked(unsafe_items_mcgLength * sizeof(global::Windows.UI.Xaml.IUIElement__Impl.Vtbl**))));
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.UIElement>).TypeHandle,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_UIElement_V___Impl.Vtbl.idx_GetMany,
unsafe_items_mcgLength,
unsafe_items,
&(unsafe___value__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
__value__retval = unsafe___value__retval;
if (items != null)
for (uint mcgIdx = 0; (mcgIdx < unsafe_items_mcgLength); mcgIdx++)
{
// [fwd] [out] [optional] [Mcg.CodeGen.WinRTClassMarshaller] Windows_UI_Xaml_UIElement__Windows_UI_Xaml__UIElement * items
items[mcgIdx] = (global::Windows.UI.Xaml.UIElement)global::System.Runtime.InteropServices.McgModuleManager.ComInterfaceToObject(
((global::System.IntPtr)unsafe_items[mcgIdx]),
typeof(global::Windows.UI.Xaml.UIElement).TypeHandle
);
}
// Return
return __value__retval;
}
finally
{
// Cleanup
if (unsafe_items != null)
for (uint mcgIdx_1 = 0; (mcgIdx_1 < unsafe_items_mcgLength); mcgIdx_1++)
{
// [fwd] [in] [out] [optional] [Mcg.CodeGen.WinRTClassMarshaller] Windows_UI_Xaml_UIElement__Windows_UI_Xaml__UIElement * items
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_items[mcgIdx_1])));
}
global::System.Runtime.InteropServices.ExternalInterop.SafeCoTaskMemFree(unsafe_items);
}
}
}
// DispatchClass for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.UIElement>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.UIElement>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.UIElement>
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IIterator`1.Current")]
global::Windows.UI.Xaml.UIElement global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.UIElement>.get_Current()
{
global::Windows.UI.Xaml.UIElement __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_UIElement_V___Impl.StubClass.get_Current(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IIterator`1.HasCurrent")]
bool global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.UIElement>.get_HasCurrent()
{
bool __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_UIElement_V___Impl.StubClass.get_HasCurrent(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
bool global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.UIElement>.MoveNext()
{
bool __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_UIElement_V___Impl.StubClass.MoveNext(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
uint global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.UIElement>.GetMany(global::Windows.UI.Xaml.UIElement[] items)
{
uint __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_UIElement_V___Impl.StubClass.GetMany(
this,
items
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.UIElement>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.UIElement>))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Current = 6;
internal const int idx_get_HasCurrent = 7;
internal const int idx_MoveNext = 8;
internal const int idx_GetMany = 9;
}
}
// Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Controls.RowDefinition>
public unsafe static class IIterator_A_Windows_UI_Xaml_Controls_RowDefinition_V___Impl
{
// StubClass for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Controls.RowDefinition>'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.Controls.RowDefinition get_Current(global::System.__ComObject __this)
{
global::Windows.UI.Xaml.Controls.RowDefinition __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Controls.RowDefinition>, global::Windows.UI.Xaml.Controls.RowDefinition>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Controls_RowDefinition_V___Impl.Vtbl.idx_get_Current
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool get_HasCurrent(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Controls.RowDefinition>>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Controls_RowDefinition_V___Impl.Vtbl.idx_get_HasCurrent
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool MoveNext(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Controls.RowDefinition>>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Controls_RowDefinition_V___Impl.Vtbl.idx_MoveNext
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
// Signature, Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Controls.RowDefinition>.GetMany, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [out] [Mcg.CodeGen.ArrayMarshaller] rg_Windows_UI_Xaml_Controls_RowDefinition__Windows_UI_Xaml_Controls__RowDefinition * *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] uint__unsigned int,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static uint GetMany(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Controls.RowDefinition[] items)
{
// Setup
uint unsafe_items_mcgLength = 0;
global::Windows.UI.Xaml.Controls.IRowDefinition__Impl.Vtbl*** unsafe_items = default(global::Windows.UI.Xaml.Controls.IRowDefinition__Impl.Vtbl***);
uint unsafe___value__retval;
uint __value__retval;
int unsafe___return__;
try
{
// Marshalling
if (items != null)
unsafe_items_mcgLength = (uint)items.Length;
if (items != null)
unsafe_items = (global::Windows.UI.Xaml.Controls.IRowDefinition__Impl.Vtbl***)global::McgInterop.McgHelpers.CoTaskMemAllocAndZeroMemory(((global::System.IntPtr)checked(unsafe_items_mcgLength * sizeof(global::Windows.UI.Xaml.Controls.IRowDefinition__Impl.Vtbl**))));
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Controls.RowDefinition>).TypeHandle,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Controls_RowDefinition_V___Impl.Vtbl.idx_GetMany,
unsafe_items_mcgLength,
unsafe_items,
&(unsafe___value__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
__value__retval = unsafe___value__retval;
if (items != null)
for (uint mcgIdx = 0; (mcgIdx < unsafe_items_mcgLength); mcgIdx++)
{
// [fwd] [out] [optional] [Mcg.CodeGen.WinRTClassMarshaller] Windows_UI_Xaml_Controls_RowDefinition__Windows_UI_Xaml_Controls__RowDefinition * items
items[mcgIdx] = (global::Windows.UI.Xaml.Controls.RowDefinition)global::System.Runtime.InteropServices.McgModuleManager.ComInterfaceToObject(
((global::System.IntPtr)unsafe_items[mcgIdx]),
typeof(global::Windows.UI.Xaml.Controls.RowDefinition).TypeHandle
);
}
// Return
return __value__retval;
}
finally
{
// Cleanup
if (unsafe_items != null)
for (uint mcgIdx_1 = 0; (mcgIdx_1 < unsafe_items_mcgLength); mcgIdx_1++)
{
// [fwd] [in] [out] [optional] [Mcg.CodeGen.WinRTClassMarshaller] Windows_UI_Xaml_Controls_RowDefinition__Windows_UI_Xaml_Controls__RowDefinition * items
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_items[mcgIdx_1])));
}
global::System.Runtime.InteropServices.ExternalInterop.SafeCoTaskMemFree(unsafe_items);
}
}
}
// DispatchClass for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Controls.RowDefinition>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Controls.RowDefinition>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Controls.RowDefinition>
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IIterator`1.Current")]
global::Windows.UI.Xaml.Controls.RowDefinition global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Controls.RowDefinition>.get_Current()
{
global::Windows.UI.Xaml.Controls.RowDefinition __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Controls_RowDefinition_V___Impl.StubClass.get_Current(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IIterator`1.HasCurrent")]
bool global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Controls.RowDefinition>.get_HasCurrent()
{
bool __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Controls_RowDefinition_V___Impl.StubClass.get_HasCurrent(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
bool global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Controls.RowDefinition>.MoveNext()
{
bool __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Controls_RowDefinition_V___Impl.StubClass.MoveNext(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
uint global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Controls.RowDefinition>.GetMany(global::Windows.UI.Xaml.Controls.RowDefinition[] items)
{
uint __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Controls_RowDefinition_V___Impl.StubClass.GetMany(
this,
items
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Controls.RowDefinition>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Controls.RowDefinition>))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Current = 6;
internal const int idx_get_HasCurrent = 7;
internal const int idx_MoveNext = 8;
internal const int idx_GetMany = 9;
}
}
// Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.DependencyObject>
public unsafe static class IIterator_A_Windows_UI_Xaml_DependencyObject_V___Impl
{
// StubClass for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.DependencyObject>'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.DependencyObject get_Current(global::System.__ComObject __this)
{
global::Windows.UI.Xaml.DependencyObject __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.DependencyObject>, global::Windows.UI.Xaml.DependencyObject>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_DependencyObject_V___Impl.Vtbl.idx_get_Current
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool get_HasCurrent(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.DependencyObject>>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_DependencyObject_V___Impl.Vtbl.idx_get_HasCurrent
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool MoveNext(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.DependencyObject>>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_DependencyObject_V___Impl.Vtbl.idx_MoveNext
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
// Signature, Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.DependencyObject>.GetMany, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [out] [Mcg.CodeGen.ArrayMarshaller] rg_Windows_UI_Xaml_DependencyObject__Windows_UI_Xaml__DependencyObject * *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] uint__unsigned int,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static uint GetMany(
global::System.__ComObject __this,
global::Windows.UI.Xaml.DependencyObject[] items)
{
// Setup
uint unsafe_items_mcgLength = 0;
global::Windows.UI.Xaml.IDependencyObject__Impl.Vtbl*** unsafe_items = default(global::Windows.UI.Xaml.IDependencyObject__Impl.Vtbl***);
uint unsafe___value__retval;
uint __value__retval;
int unsafe___return__;
try
{
// Marshalling
if (items != null)
unsafe_items_mcgLength = (uint)items.Length;
if (items != null)
unsafe_items = (global::Windows.UI.Xaml.IDependencyObject__Impl.Vtbl***)global::McgInterop.McgHelpers.CoTaskMemAllocAndZeroMemory(((global::System.IntPtr)checked(unsafe_items_mcgLength * sizeof(global::Windows.UI.Xaml.IDependencyObject__Impl.Vtbl**))));
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.DependencyObject>).TypeHandle,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_DependencyObject_V___Impl.Vtbl.idx_GetMany,
unsafe_items_mcgLength,
unsafe_items,
&(unsafe___value__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
__value__retval = unsafe___value__retval;
if (items != null)
for (uint mcgIdx = 0; (mcgIdx < unsafe_items_mcgLength); mcgIdx++)
{
// [fwd] [out] [optional] [Mcg.CodeGen.WinRTClassMarshaller] Windows_UI_Xaml_DependencyObject__Windows_UI_Xaml__DependencyObject * items
items[mcgIdx] = (global::Windows.UI.Xaml.DependencyObject)global::System.Runtime.InteropServices.McgModuleManager.ComInterfaceToObject(
((global::System.IntPtr)unsafe_items[mcgIdx]),
typeof(global::Windows.UI.Xaml.DependencyObject).TypeHandle
);
}
// Return
return __value__retval;
}
finally
{
// Cleanup
if (unsafe_items != null)
for (uint mcgIdx_1 = 0; (mcgIdx_1 < unsafe_items_mcgLength); mcgIdx_1++)
{
// [fwd] [in] [out] [optional] [Mcg.CodeGen.WinRTClassMarshaller] Windows_UI_Xaml_DependencyObject__Windows_UI_Xaml__DependencyObject * items
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_items[mcgIdx_1])));
}
global::System.Runtime.InteropServices.ExternalInterop.SafeCoTaskMemFree(unsafe_items);
}
}
}
// DispatchClass for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.DependencyObject>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.DependencyObject>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.DependencyObject>
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IIterator`1.Current")]
global::Windows.UI.Xaml.DependencyObject global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.DependencyObject>.get_Current()
{
global::Windows.UI.Xaml.DependencyObject __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_DependencyObject_V___Impl.StubClass.get_Current(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IIterator`1.HasCurrent")]
bool global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.DependencyObject>.get_HasCurrent()
{
bool __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_DependencyObject_V___Impl.StubClass.get_HasCurrent(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
bool global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.DependencyObject>.MoveNext()
{
bool __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_DependencyObject_V___Impl.StubClass.MoveNext(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
uint global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.DependencyObject>.GetMany(global::Windows.UI.Xaml.DependencyObject[] items)
{
uint __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_DependencyObject_V___Impl.StubClass.GetMany(
this,
items
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.DependencyObject>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.DependencyObject>))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Current = 6;
internal const int idx_get_HasCurrent = 7;
internal const int idx_MoveNext = 8;
internal const int idx_GetMany = 9;
}
}
// Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.IDependencyObject>
public unsafe static class IIterator_A_Windows_UI_Xaml_IDependencyObject_V___Impl
{
// StubClass for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.IDependencyObject>'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.IDependencyObject get_Current(global::System.__ComObject __this)
{
global::Windows.UI.Xaml.IDependencyObject __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.IDependencyObject>, global::Windows.UI.Xaml.IDependencyObject>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_IDependencyObject_V___Impl.Vtbl.idx_get_Current
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool get_HasCurrent(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.IDependencyObject>>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_IDependencyObject_V___Impl.Vtbl.idx_get_HasCurrent
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool MoveNext(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.IDependencyObject>>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_IDependencyObject_V___Impl.Vtbl.idx_MoveNext
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
// Signature, Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.IDependencyObject>.GetMany, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [out] [Mcg.CodeGen.ArrayMarshaller] rg_Windows_UI_Xaml_IDependencyObject__Windows_UI_Xaml__IDependencyObject * *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] uint__unsigned int,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static uint GetMany(
global::System.__ComObject __this,
global::Windows.UI.Xaml.IDependencyObject[] items)
{
// Setup
uint unsafe_items_mcgLength = 0;
global::Windows.UI.Xaml.IDependencyObject__Impl.Vtbl*** unsafe_items = default(global::Windows.UI.Xaml.IDependencyObject__Impl.Vtbl***);
uint unsafe___value__retval;
uint __value__retval;
int unsafe___return__;
try
{
// Marshalling
if (items != null)
unsafe_items_mcgLength = (uint)items.Length;
if (items != null)
unsafe_items = (global::Windows.UI.Xaml.IDependencyObject__Impl.Vtbl***)global::McgInterop.McgHelpers.CoTaskMemAllocAndZeroMemory(((global::System.IntPtr)checked(unsafe_items_mcgLength * sizeof(global::Windows.UI.Xaml.IDependencyObject__Impl.Vtbl**))));
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.IDependencyObject>).TypeHandle,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_IDependencyObject_V___Impl.Vtbl.idx_GetMany,
unsafe_items_mcgLength,
unsafe_items,
&(unsafe___value__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
__value__retval = unsafe___value__retval;
if (items != null)
for (uint mcgIdx = 0; (mcgIdx < unsafe_items_mcgLength); mcgIdx++)
{
// [fwd] [out] [optional] [Mcg.CodeGen.ComInterfaceMarshaller] Windows_UI_Xaml_IDependencyObject__Windows_UI_Xaml__IDependencyObject * items
items[mcgIdx] = (global::Windows.UI.Xaml.IDependencyObject)global::System.Runtime.InteropServices.McgModuleManager.ComInterfaceToObject(
((global::System.IntPtr)unsafe_items[mcgIdx]),
typeof(global::Windows.UI.Xaml.IDependencyObject).TypeHandle
);
}
// Return
return __value__retval;
}
finally
{
// Cleanup
if (unsafe_items != null)
for (uint mcgIdx_1 = 0; (mcgIdx_1 < unsafe_items_mcgLength); mcgIdx_1++)
{
// [fwd] [in] [out] [optional] [Mcg.CodeGen.ComInterfaceMarshaller] Windows_UI_Xaml_IDependencyObject__Windows_UI_Xaml__IDependencyObject * items
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_items[mcgIdx_1])));
}
global::System.Runtime.InteropServices.ExternalInterop.SafeCoTaskMemFree(unsafe_items);
}
}
}
// DispatchClass for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.IDependencyObject>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.IDependencyObject>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.IDependencyObject>
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IIterator`1.Current")]
global::Windows.UI.Xaml.IDependencyObject global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.IDependencyObject>.get_Current()
{
global::Windows.UI.Xaml.IDependencyObject __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_IDependencyObject_V___Impl.StubClass.get_Current(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IIterator`1.HasCurrent")]
bool global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.IDependencyObject>.get_HasCurrent()
{
bool __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_IDependencyObject_V___Impl.StubClass.get_HasCurrent(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
bool global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.IDependencyObject>.MoveNext()
{
bool __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_IDependencyObject_V___Impl.StubClass.MoveNext(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
uint global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.IDependencyObject>.GetMany(global::Windows.UI.Xaml.IDependencyObject[] items)
{
uint __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_IDependencyObject_V___Impl.StubClass.GetMany(
this,
items
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.IDependencyObject>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.IDependencyObject>))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Current = 6;
internal const int idx_get_HasCurrent = 7;
internal const int idx_MoveNext = 8;
internal const int idx_GetMany = 9;
}
}
// Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.IDependencyObject2>
public unsafe static class IIterator_A_Windows_UI_Xaml_IDependencyObject2_V___Impl
{
// StubClass for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.IDependencyObject2>'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.IDependencyObject2 get_Current(global::System.__ComObject __this)
{
global::Windows.UI.Xaml.IDependencyObject2 __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.IDependencyObject2>, global::Windows.UI.Xaml.IDependencyObject2>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_IDependencyObject2_V___Impl.Vtbl.idx_get_Current
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool get_HasCurrent(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.IDependencyObject2>>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_IDependencyObject2_V___Impl.Vtbl.idx_get_HasCurrent
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool MoveNext(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.IDependencyObject2>>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_IDependencyObject2_V___Impl.Vtbl.idx_MoveNext
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
// Signature, Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.IDependencyObject2>.GetMany, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [out] [Mcg.CodeGen.ArrayMarshaller] rg_Windows_UI_Xaml_IDependencyObject2__Windows_UI_Xaml__IDependencyObject2 * *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] uint__unsigned int,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static uint GetMany(
global::System.__ComObject __this,
global::Windows.UI.Xaml.IDependencyObject2[] items)
{
// Setup
uint unsafe_items_mcgLength = 0;
global::Windows.UI.Xaml.IDependencyObject2__Impl.Vtbl*** unsafe_items = default(global::Windows.UI.Xaml.IDependencyObject2__Impl.Vtbl***);
uint unsafe___value__retval;
uint __value__retval;
int unsafe___return__;
try
{
// Marshalling
if (items != null)
unsafe_items_mcgLength = (uint)items.Length;
if (items != null)
unsafe_items = (global::Windows.UI.Xaml.IDependencyObject2__Impl.Vtbl***)global::McgInterop.McgHelpers.CoTaskMemAllocAndZeroMemory(((global::System.IntPtr)checked(unsafe_items_mcgLength * sizeof(global::Windows.UI.Xaml.IDependencyObject2__Impl.Vtbl**))));
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.IDependencyObject2>).TypeHandle,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_IDependencyObject2_V___Impl.Vtbl.idx_GetMany,
unsafe_items_mcgLength,
unsafe_items,
&(unsafe___value__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
__value__retval = unsafe___value__retval;
if (items != null)
for (uint mcgIdx = 0; (mcgIdx < unsafe_items_mcgLength); mcgIdx++)
{
// [fwd] [out] [optional] [Mcg.CodeGen.ComInterfaceMarshaller] Windows_UI_Xaml_IDependencyObject2__Windows_UI_Xaml__IDependencyObject2 * items
items[mcgIdx] = (global::Windows.UI.Xaml.IDependencyObject2)global::System.Runtime.InteropServices.McgModuleManager.ComInterfaceToObject(
((global::System.IntPtr)unsafe_items[mcgIdx]),
typeof(global::Windows.UI.Xaml.IDependencyObject2).TypeHandle
);
}
// Return
return __value__retval;
}
finally
{
// Cleanup
if (unsafe_items != null)
for (uint mcgIdx_1 = 0; (mcgIdx_1 < unsafe_items_mcgLength); mcgIdx_1++)
{
// [fwd] [in] [out] [optional] [Mcg.CodeGen.ComInterfaceMarshaller] Windows_UI_Xaml_IDependencyObject2__Windows_UI_Xaml__IDependencyObject2 * items
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_items[mcgIdx_1])));
}
global::System.Runtime.InteropServices.ExternalInterop.SafeCoTaskMemFree(unsafe_items);
}
}
}
// DispatchClass for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.IDependencyObject2>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.IDependencyObject2>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.IDependencyObject2>
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IIterator`1.Current")]
global::Windows.UI.Xaml.IDependencyObject2 global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.IDependencyObject2>.get_Current()
{
global::Windows.UI.Xaml.IDependencyObject2 __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_IDependencyObject2_V___Impl.StubClass.get_Current(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IIterator`1.HasCurrent")]
bool global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.IDependencyObject2>.get_HasCurrent()
{
bool __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_IDependencyObject2_V___Impl.StubClass.get_HasCurrent(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
bool global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.IDependencyObject2>.MoveNext()
{
bool __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_IDependencyObject2_V___Impl.StubClass.MoveNext(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
uint global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.IDependencyObject2>.GetMany(global::Windows.UI.Xaml.IDependencyObject2[] items)
{
uint __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_IDependencyObject2_V___Impl.StubClass.GetMany(
this,
items
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.IDependencyObject2>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.IDependencyObject2>))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Current = 6;
internal const int idx_get_HasCurrent = 7;
internal const int idx_MoveNext = 8;
internal const int idx_GetMany = 9;
}
}
// Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.IUIElement>
public unsafe static class IIterator_A_Windows_UI_Xaml_IUIElement_V___Impl
{
// StubClass for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.IUIElement>'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.IUIElement get_Current(global::System.__ComObject __this)
{
global::Windows.UI.Xaml.IUIElement __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.IUIElement>, global::Windows.UI.Xaml.IUIElement>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_IUIElement_V___Impl.Vtbl.idx_get_Current
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool get_HasCurrent(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.IUIElement>>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_IUIElement_V___Impl.Vtbl.idx_get_HasCurrent
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool MoveNext(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.IUIElement>>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_IUIElement_V___Impl.Vtbl.idx_MoveNext
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
// Signature, Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.IUIElement>.GetMany, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [out] [Mcg.CodeGen.ArrayMarshaller] rg_Windows_UI_Xaml_IUIElement__Windows_UI_Xaml__IUIElement * *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] uint__unsigned int,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static uint GetMany(
global::System.__ComObject __this,
global::Windows.UI.Xaml.IUIElement[] items)
{
// Setup
uint unsafe_items_mcgLength = 0;
global::Windows.UI.Xaml.IUIElement__Impl.Vtbl*** unsafe_items = default(global::Windows.UI.Xaml.IUIElement__Impl.Vtbl***);
uint unsafe___value__retval;
uint __value__retval;
int unsafe___return__;
try
{
// Marshalling
if (items != null)
unsafe_items_mcgLength = (uint)items.Length;
if (items != null)
unsafe_items = (global::Windows.UI.Xaml.IUIElement__Impl.Vtbl***)global::McgInterop.McgHelpers.CoTaskMemAllocAndZeroMemory(((global::System.IntPtr)checked(unsafe_items_mcgLength * sizeof(global::Windows.UI.Xaml.IUIElement__Impl.Vtbl**))));
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.IUIElement>).TypeHandle,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_IUIElement_V___Impl.Vtbl.idx_GetMany,
unsafe_items_mcgLength,
unsafe_items,
&(unsafe___value__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
__value__retval = unsafe___value__retval;
if (items != null)
for (uint mcgIdx = 0; (mcgIdx < unsafe_items_mcgLength); mcgIdx++)
{
// [fwd] [out] [optional] [Mcg.CodeGen.ComInterfaceMarshaller] Windows_UI_Xaml_IUIElement__Windows_UI_Xaml__IUIElement * items
items[mcgIdx] = (global::Windows.UI.Xaml.IUIElement)global::System.Runtime.InteropServices.McgModuleManager.ComInterfaceToObject(
((global::System.IntPtr)unsafe_items[mcgIdx]),
typeof(global::Windows.UI.Xaml.IUIElement).TypeHandle
);
}
// Return
return __value__retval;
}
finally
{
// Cleanup
if (unsafe_items != null)
for (uint mcgIdx_1 = 0; (mcgIdx_1 < unsafe_items_mcgLength); mcgIdx_1++)
{
// [fwd] [in] [out] [optional] [Mcg.CodeGen.ComInterfaceMarshaller] Windows_UI_Xaml_IUIElement__Windows_UI_Xaml__IUIElement * items
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_items[mcgIdx_1])));
}
global::System.Runtime.InteropServices.ExternalInterop.SafeCoTaskMemFree(unsafe_items);
}
}
}
// DispatchClass for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.IUIElement>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.IUIElement>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.IUIElement>
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IIterator`1.Current")]
global::Windows.UI.Xaml.IUIElement global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.IUIElement>.get_Current()
{
global::Windows.UI.Xaml.IUIElement __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_IUIElement_V___Impl.StubClass.get_Current(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IIterator`1.HasCurrent")]
bool global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.IUIElement>.get_HasCurrent()
{
bool __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_IUIElement_V___Impl.StubClass.get_HasCurrent(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
bool global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.IUIElement>.MoveNext()
{
bool __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_IUIElement_V___Impl.StubClass.MoveNext(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
uint global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.IUIElement>.GetMany(global::Windows.UI.Xaml.IUIElement[] items)
{
uint __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_IUIElement_V___Impl.StubClass.GetMany(
this,
items
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.IUIElement>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.IUIElement>))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Current = 6;
internal const int idx_get_HasCurrent = 7;
internal const int idx_MoveNext = 8;
internal const int idx_GetMany = 9;
}
}
// Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.IUIElementOverrides>
public unsafe static class IIterator_A_Windows_UI_Xaml_IUIElementOverrides_V___Impl
{
// StubClass for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.IUIElementOverrides>'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.IUIElementOverrides get_Current(global::System.__ComObject __this)
{
global::Windows.UI.Xaml.IUIElementOverrides __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.IUIElementOverrides>, global::Windows.UI.Xaml.IUIElementOverrides>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_IUIElementOverrides_V___Impl.Vtbl.idx_get_Current
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool get_HasCurrent(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.IUIElementOverrides>>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_IUIElementOverrides_V___Impl.Vtbl.idx_get_HasCurrent
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool MoveNext(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.IUIElementOverrides>>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_IUIElementOverrides_V___Impl.Vtbl.idx_MoveNext
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
// Signature, Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.IUIElementOverrides>.GetMany, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [out] [Mcg.CodeGen.ArrayMarshaller] rg_Windows_UI_Xaml_IUIElementOverrides__Windows_UI_Xaml__IUIElementOverrides * *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] uint__unsigned int,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static uint GetMany(
global::System.__ComObject __this,
global::Windows.UI.Xaml.IUIElementOverrides[] items)
{
// Setup
uint unsafe_items_mcgLength = 0;
global::Windows.UI.Xaml.IUIElementOverrides__Impl.Vtbl*** unsafe_items = default(global::Windows.UI.Xaml.IUIElementOverrides__Impl.Vtbl***);
uint unsafe___value__retval;
uint __value__retval;
int unsafe___return__;
try
{
// Marshalling
if (items != null)
unsafe_items_mcgLength = (uint)items.Length;
if (items != null)
unsafe_items = (global::Windows.UI.Xaml.IUIElementOverrides__Impl.Vtbl***)global::McgInterop.McgHelpers.CoTaskMemAllocAndZeroMemory(((global::System.IntPtr)checked(unsafe_items_mcgLength * sizeof(global::Windows.UI.Xaml.IUIElementOverrides__Impl.Vtbl**))));
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.IUIElementOverrides>).TypeHandle,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_IUIElementOverrides_V___Impl.Vtbl.idx_GetMany,
unsafe_items_mcgLength,
unsafe_items,
&(unsafe___value__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
__value__retval = unsafe___value__retval;
if (items != null)
for (uint mcgIdx = 0; (mcgIdx < unsafe_items_mcgLength); mcgIdx++)
{
// [fwd] [out] [optional] [Mcg.CodeGen.ComInterfaceMarshaller] Windows_UI_Xaml_IUIElementOverrides__Windows_UI_Xaml__IUIElementOverrides * items
items[mcgIdx] = (global::Windows.UI.Xaml.IUIElementOverrides)global::System.Runtime.InteropServices.McgModuleManager.ComInterfaceToObject(
((global::System.IntPtr)unsafe_items[mcgIdx]),
typeof(global::Windows.UI.Xaml.IUIElementOverrides).TypeHandle
);
}
// Return
return __value__retval;
}
finally
{
// Cleanup
if (unsafe_items != null)
for (uint mcgIdx_1 = 0; (mcgIdx_1 < unsafe_items_mcgLength); mcgIdx_1++)
{
// [fwd] [in] [out] [optional] [Mcg.CodeGen.ComInterfaceMarshaller] Windows_UI_Xaml_IUIElementOverrides__Windows_UI_Xaml__IUIElementOverrides * items
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_items[mcgIdx_1])));
}
global::System.Runtime.InteropServices.ExternalInterop.SafeCoTaskMemFree(unsafe_items);
}
}
}
// DispatchClass for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.IUIElementOverrides>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.IUIElementOverrides>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.IUIElementOverrides>
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IIterator`1.Current")]
global::Windows.UI.Xaml.IUIElementOverrides global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.IUIElementOverrides>.get_Current()
{
global::Windows.UI.Xaml.IUIElementOverrides __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_IUIElementOverrides_V___Impl.StubClass.get_Current(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IIterator`1.HasCurrent")]
bool global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.IUIElementOverrides>.get_HasCurrent()
{
bool __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_IUIElementOverrides_V___Impl.StubClass.get_HasCurrent(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
bool global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.IUIElementOverrides>.MoveNext()
{
bool __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_IUIElementOverrides_V___Impl.StubClass.MoveNext(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
uint global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.IUIElementOverrides>.GetMany(global::Windows.UI.Xaml.IUIElementOverrides[] items)
{
uint __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_IUIElementOverrides_V___Impl.StubClass.GetMany(
this,
items
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.IUIElementOverrides>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.IUIElementOverrides>))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Current = 6;
internal const int idx_get_HasCurrent = 7;
internal const int idx_MoveNext = 8;
internal const int idx_GetMany = 9;
}
}
// Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.IUIElement2>
public unsafe static class IIterator_A_Windows_UI_Xaml_IUIElement2_V___Impl
{
// StubClass for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.IUIElement2>'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.IUIElement2 get_Current(global::System.__ComObject __this)
{
global::Windows.UI.Xaml.IUIElement2 __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.IUIElement2>, global::Windows.UI.Xaml.IUIElement2>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_IUIElement2_V___Impl.Vtbl.idx_get_Current
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool get_HasCurrent(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.IUIElement2>>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_IUIElement2_V___Impl.Vtbl.idx_get_HasCurrent
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool MoveNext(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.IUIElement2>>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_IUIElement2_V___Impl.Vtbl.idx_MoveNext
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
// Signature, Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.IUIElement2>.GetMany, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [out] [Mcg.CodeGen.ArrayMarshaller] rg_Windows_UI_Xaml_IUIElement2__Windows_UI_Xaml__IUIElement2 * *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] uint__unsigned int,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static uint GetMany(
global::System.__ComObject __this,
global::Windows.UI.Xaml.IUIElement2[] items)
{
// Setup
uint unsafe_items_mcgLength = 0;
global::Windows.UI.Xaml.IUIElement2__Impl.Vtbl*** unsafe_items = default(global::Windows.UI.Xaml.IUIElement2__Impl.Vtbl***);
uint unsafe___value__retval;
uint __value__retval;
int unsafe___return__;
try
{
// Marshalling
if (items != null)
unsafe_items_mcgLength = (uint)items.Length;
if (items != null)
unsafe_items = (global::Windows.UI.Xaml.IUIElement2__Impl.Vtbl***)global::McgInterop.McgHelpers.CoTaskMemAllocAndZeroMemory(((global::System.IntPtr)checked(unsafe_items_mcgLength * sizeof(global::Windows.UI.Xaml.IUIElement2__Impl.Vtbl**))));
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.IUIElement2>).TypeHandle,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_IUIElement2_V___Impl.Vtbl.idx_GetMany,
unsafe_items_mcgLength,
unsafe_items,
&(unsafe___value__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
__value__retval = unsafe___value__retval;
if (items != null)
for (uint mcgIdx = 0; (mcgIdx < unsafe_items_mcgLength); mcgIdx++)
{
// [fwd] [out] [optional] [Mcg.CodeGen.ComInterfaceMarshaller] Windows_UI_Xaml_IUIElement2__Windows_UI_Xaml__IUIElement2 * items
items[mcgIdx] = (global::Windows.UI.Xaml.IUIElement2)global::System.Runtime.InteropServices.McgModuleManager.ComInterfaceToObject(
((global::System.IntPtr)unsafe_items[mcgIdx]),
typeof(global::Windows.UI.Xaml.IUIElement2).TypeHandle
);
}
// Return
return __value__retval;
}
finally
{
// Cleanup
if (unsafe_items != null)
for (uint mcgIdx_1 = 0; (mcgIdx_1 < unsafe_items_mcgLength); mcgIdx_1++)
{
// [fwd] [in] [out] [optional] [Mcg.CodeGen.ComInterfaceMarshaller] Windows_UI_Xaml_IUIElement2__Windows_UI_Xaml__IUIElement2 * items
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_items[mcgIdx_1])));
}
global::System.Runtime.InteropServices.ExternalInterop.SafeCoTaskMemFree(unsafe_items);
}
}
}
// DispatchClass for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.IUIElement2>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.IUIElement2>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.IUIElement2>
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IIterator`1.Current")]
global::Windows.UI.Xaml.IUIElement2 global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.IUIElement2>.get_Current()
{
global::Windows.UI.Xaml.IUIElement2 __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_IUIElement2_V___Impl.StubClass.get_Current(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IIterator`1.HasCurrent")]
bool global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.IUIElement2>.get_HasCurrent()
{
bool __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_IUIElement2_V___Impl.StubClass.get_HasCurrent(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
bool global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.IUIElement2>.MoveNext()
{
bool __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_IUIElement2_V___Impl.StubClass.MoveNext(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
uint global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.IUIElement2>.GetMany(global::Windows.UI.Xaml.IUIElement2[] items)
{
uint __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_IUIElement2_V___Impl.StubClass.GetMany(
this,
items
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.IUIElement2>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.IUIElement2>))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Current = 6;
internal const int idx_get_HasCurrent = 7;
internal const int idx_MoveNext = 8;
internal const int idx_GetMany = 9;
}
}
// Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.IUIElement3>
public unsafe static class IIterator_A_Windows_UI_Xaml_IUIElement3_V___Impl
{
// StubClass for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.IUIElement3>'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.IUIElement3 get_Current(global::System.__ComObject __this)
{
global::Windows.UI.Xaml.IUIElement3 __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.IUIElement3>, global::Windows.UI.Xaml.IUIElement3>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_IUIElement3_V___Impl.Vtbl.idx_get_Current
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool get_HasCurrent(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.IUIElement3>>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_IUIElement3_V___Impl.Vtbl.idx_get_HasCurrent
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool MoveNext(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.IUIElement3>>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_IUIElement3_V___Impl.Vtbl.idx_MoveNext
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
// Signature, Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.IUIElement3>.GetMany, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [out] [Mcg.CodeGen.ArrayMarshaller] rg_Windows_UI_Xaml_IUIElement3__Windows_UI_Xaml__IUIElement3 * *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] uint__unsigned int,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static uint GetMany(
global::System.__ComObject __this,
global::Windows.UI.Xaml.IUIElement3[] items)
{
// Setup
uint unsafe_items_mcgLength = 0;
global::Windows.UI.Xaml.IUIElement3__Impl.Vtbl*** unsafe_items = default(global::Windows.UI.Xaml.IUIElement3__Impl.Vtbl***);
uint unsafe___value__retval;
uint __value__retval;
int unsafe___return__;
try
{
// Marshalling
if (items != null)
unsafe_items_mcgLength = (uint)items.Length;
if (items != null)
unsafe_items = (global::Windows.UI.Xaml.IUIElement3__Impl.Vtbl***)global::McgInterop.McgHelpers.CoTaskMemAllocAndZeroMemory(((global::System.IntPtr)checked(unsafe_items_mcgLength * sizeof(global::Windows.UI.Xaml.IUIElement3__Impl.Vtbl**))));
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.IUIElement3>).TypeHandle,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_IUIElement3_V___Impl.Vtbl.idx_GetMany,
unsafe_items_mcgLength,
unsafe_items,
&(unsafe___value__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
__value__retval = unsafe___value__retval;
if (items != null)
for (uint mcgIdx = 0; (mcgIdx < unsafe_items_mcgLength); mcgIdx++)
{
// [fwd] [out] [optional] [Mcg.CodeGen.ComInterfaceMarshaller] Windows_UI_Xaml_IUIElement3__Windows_UI_Xaml__IUIElement3 * items
items[mcgIdx] = (global::Windows.UI.Xaml.IUIElement3)global::System.Runtime.InteropServices.McgModuleManager.ComInterfaceToObject(
((global::System.IntPtr)unsafe_items[mcgIdx]),
typeof(global::Windows.UI.Xaml.IUIElement3).TypeHandle
);
}
// Return
return __value__retval;
}
finally
{
// Cleanup
if (unsafe_items != null)
for (uint mcgIdx_1 = 0; (mcgIdx_1 < unsafe_items_mcgLength); mcgIdx_1++)
{
// [fwd] [in] [out] [optional] [Mcg.CodeGen.ComInterfaceMarshaller] Windows_UI_Xaml_IUIElement3__Windows_UI_Xaml__IUIElement3 * items
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_items[mcgIdx_1])));
}
global::System.Runtime.InteropServices.ExternalInterop.SafeCoTaskMemFree(unsafe_items);
}
}
}
// DispatchClass for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.IUIElement3>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.IUIElement3>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.IUIElement3>
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IIterator`1.Current")]
global::Windows.UI.Xaml.IUIElement3 global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.IUIElement3>.get_Current()
{
global::Windows.UI.Xaml.IUIElement3 __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_IUIElement3_V___Impl.StubClass.get_Current(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IIterator`1.HasCurrent")]
bool global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.IUIElement3>.get_HasCurrent()
{
bool __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_IUIElement3_V___Impl.StubClass.get_HasCurrent(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
bool global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.IUIElement3>.MoveNext()
{
bool __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_IUIElement3_V___Impl.StubClass.MoveNext(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
uint global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.IUIElement3>.GetMany(global::Windows.UI.Xaml.IUIElement3[] items)
{
uint __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_IUIElement3_V___Impl.StubClass.GetMany(
this,
items
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.IUIElement3>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.IUIElement3>))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Current = 6;
internal const int idx_get_HasCurrent = 7;
internal const int idx_MoveNext = 8;
internal const int idx_GetMany = 9;
}
}
// Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.IUIElement4>
public unsafe static class IIterator_A_Windows_UI_Xaml_IUIElement4_V___Impl
{
// StubClass for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.IUIElement4>'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.IUIElement4 get_Current(global::System.__ComObject __this)
{
global::Windows.UI.Xaml.IUIElement4 __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.IUIElement4>, global::Windows.UI.Xaml.IUIElement4>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_IUIElement4_V___Impl.Vtbl.idx_get_Current
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool get_HasCurrent(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.IUIElement4>>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_IUIElement4_V___Impl.Vtbl.idx_get_HasCurrent
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool MoveNext(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.IUIElement4>>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_IUIElement4_V___Impl.Vtbl.idx_MoveNext
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
// Signature, Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.IUIElement4>.GetMany, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [out] [Mcg.CodeGen.ArrayMarshaller] rg_Windows_UI_Xaml_IUIElement4__Windows_UI_Xaml__IUIElement4 * *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] uint__unsigned int,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static uint GetMany(
global::System.__ComObject __this,
global::Windows.UI.Xaml.IUIElement4[] items)
{
// Setup
uint unsafe_items_mcgLength = 0;
global::Windows.UI.Xaml.IUIElement4__Impl.Vtbl*** unsafe_items = default(global::Windows.UI.Xaml.IUIElement4__Impl.Vtbl***);
uint unsafe___value__retval;
uint __value__retval;
int unsafe___return__;
try
{
// Marshalling
if (items != null)
unsafe_items_mcgLength = (uint)items.Length;
if (items != null)
unsafe_items = (global::Windows.UI.Xaml.IUIElement4__Impl.Vtbl***)global::McgInterop.McgHelpers.CoTaskMemAllocAndZeroMemory(((global::System.IntPtr)checked(unsafe_items_mcgLength * sizeof(global::Windows.UI.Xaml.IUIElement4__Impl.Vtbl**))));
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.IUIElement4>).TypeHandle,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_IUIElement4_V___Impl.Vtbl.idx_GetMany,
unsafe_items_mcgLength,
unsafe_items,
&(unsafe___value__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
__value__retval = unsafe___value__retval;
if (items != null)
for (uint mcgIdx = 0; (mcgIdx < unsafe_items_mcgLength); mcgIdx++)
{
// [fwd] [out] [optional] [Mcg.CodeGen.ComInterfaceMarshaller] Windows_UI_Xaml_IUIElement4__Windows_UI_Xaml__IUIElement4 * items
items[mcgIdx] = (global::Windows.UI.Xaml.IUIElement4)global::System.Runtime.InteropServices.McgModuleManager.ComInterfaceToObject(
((global::System.IntPtr)unsafe_items[mcgIdx]),
typeof(global::Windows.UI.Xaml.IUIElement4).TypeHandle
);
}
// Return
return __value__retval;
}
finally
{
// Cleanup
if (unsafe_items != null)
for (uint mcgIdx_1 = 0; (mcgIdx_1 < unsafe_items_mcgLength); mcgIdx_1++)
{
// [fwd] [in] [out] [optional] [Mcg.CodeGen.ComInterfaceMarshaller] Windows_UI_Xaml_IUIElement4__Windows_UI_Xaml__IUIElement4 * items
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_items[mcgIdx_1])));
}
global::System.Runtime.InteropServices.ExternalInterop.SafeCoTaskMemFree(unsafe_items);
}
}
}
// DispatchClass for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.IUIElement4>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.IUIElement4>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.IUIElement4>
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IIterator`1.Current")]
global::Windows.UI.Xaml.IUIElement4 global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.IUIElement4>.get_Current()
{
global::Windows.UI.Xaml.IUIElement4 __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_IUIElement4_V___Impl.StubClass.get_Current(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IIterator`1.HasCurrent")]
bool global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.IUIElement4>.get_HasCurrent()
{
bool __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_IUIElement4_V___Impl.StubClass.get_HasCurrent(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
bool global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.IUIElement4>.MoveNext()
{
bool __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_IUIElement4_V___Impl.StubClass.MoveNext(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
uint global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.IUIElement4>.GetMany(global::Windows.UI.Xaml.IUIElement4[] items)
{
uint __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_IUIElement4_V___Impl.StubClass.GetMany(
this,
items
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.IUIElement4>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.IUIElement4>))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Current = 6;
internal const int idx_get_HasCurrent = 7;
internal const int idx_MoveNext = 8;
internal const int idx_GetMany = 9;
}
}
// Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Controls.IRowDefinition>
public unsafe static class IIterator_A_Windows_UI_Xaml_Controls_IRowDefinition_V___Impl
{
// StubClass for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Controls.IRowDefinition>'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.Controls.IRowDefinition get_Current(global::System.__ComObject __this)
{
global::Windows.UI.Xaml.Controls.IRowDefinition __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Controls.IRowDefinition>, global::Windows.UI.Xaml.Controls.IRowDefinition>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Controls_IRowDefinition_V___Impl.Vtbl.idx_get_Current
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool get_HasCurrent(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Controls.IRowDefinition>>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Controls_IRowDefinition_V___Impl.Vtbl.idx_get_HasCurrent
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool MoveNext(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Controls.IRowDefinition>>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Controls_IRowDefinition_V___Impl.Vtbl.idx_MoveNext
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
// Signature, Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Controls.IRowDefinition>.GetMany, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [out] [Mcg.CodeGen.ArrayMarshaller] rg_Windows_UI_Xaml_Controls_IRowDefinition__Windows_UI_Xaml_Controls__IRowDefinition * *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] uint__unsigned int,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static uint GetMany(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Controls.IRowDefinition[] items)
{
// Setup
uint unsafe_items_mcgLength = 0;
global::Windows.UI.Xaml.Controls.IRowDefinition__Impl.Vtbl*** unsafe_items = default(global::Windows.UI.Xaml.Controls.IRowDefinition__Impl.Vtbl***);
uint unsafe___value__retval;
uint __value__retval;
int unsafe___return__;
try
{
// Marshalling
if (items != null)
unsafe_items_mcgLength = (uint)items.Length;
if (items != null)
unsafe_items = (global::Windows.UI.Xaml.Controls.IRowDefinition__Impl.Vtbl***)global::McgInterop.McgHelpers.CoTaskMemAllocAndZeroMemory(((global::System.IntPtr)checked(unsafe_items_mcgLength * sizeof(global::Windows.UI.Xaml.Controls.IRowDefinition__Impl.Vtbl**))));
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Controls.IRowDefinition>).TypeHandle,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Controls_IRowDefinition_V___Impl.Vtbl.idx_GetMany,
unsafe_items_mcgLength,
unsafe_items,
&(unsafe___value__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
__value__retval = unsafe___value__retval;
if (items != null)
for (uint mcgIdx = 0; (mcgIdx < unsafe_items_mcgLength); mcgIdx++)
{
// [fwd] [out] [optional] [Mcg.CodeGen.ComInterfaceMarshaller] Windows_UI_Xaml_Controls_IRowDefinition__Windows_UI_Xaml_Controls__IRowDefinition * items
items[mcgIdx] = (global::Windows.UI.Xaml.Controls.IRowDefinition)global::System.Runtime.InteropServices.McgModuleManager.ComInterfaceToObject(
((global::System.IntPtr)unsafe_items[mcgIdx]),
typeof(global::Windows.UI.Xaml.Controls.IRowDefinition).TypeHandle
);
}
// Return
return __value__retval;
}
finally
{
// Cleanup
if (unsafe_items != null)
for (uint mcgIdx_1 = 0; (mcgIdx_1 < unsafe_items_mcgLength); mcgIdx_1++)
{
// [fwd] [in] [out] [optional] [Mcg.CodeGen.ComInterfaceMarshaller] Windows_UI_Xaml_Controls_IRowDefinition__Windows_UI_Xaml_Controls__IRowDefinition * items
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_items[mcgIdx_1])));
}
global::System.Runtime.InteropServices.ExternalInterop.SafeCoTaskMemFree(unsafe_items);
}
}
}
// DispatchClass for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Controls.IRowDefinition>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Controls.IRowDefinition>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Controls.IRowDefinition>
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IIterator`1.Current")]
global::Windows.UI.Xaml.Controls.IRowDefinition global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Controls.IRowDefinition>.get_Current()
{
global::Windows.UI.Xaml.Controls.IRowDefinition __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Controls_IRowDefinition_V___Impl.StubClass.get_Current(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IIterator`1.HasCurrent")]
bool global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Controls.IRowDefinition>.get_HasCurrent()
{
bool __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Controls_IRowDefinition_V___Impl.StubClass.get_HasCurrent(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
bool global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Controls.IRowDefinition>.MoveNext()
{
bool __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Controls_IRowDefinition_V___Impl.StubClass.MoveNext(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
uint global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Controls.IRowDefinition>.GetMany(global::Windows.UI.Xaml.Controls.IRowDefinition[] items)
{
uint __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Controls_IRowDefinition_V___Impl.StubClass.GetMany(
this,
items
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Controls.IRowDefinition>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Controls.IRowDefinition>))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Current = 6;
internal const int idx_get_HasCurrent = 7;
internal const int idx_MoveNext = 8;
internal const int idx_GetMany = 9;
}
}
// Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Documents.Inline>
public unsafe static class IIterator_A_Windows_UI_Xaml_Documents_Inline_V___Impl
{
// StubClass for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Documents.Inline>'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.Documents.Inline get_Current(global::System.__ComObject __this)
{
global::Windows.UI.Xaml.Documents.Inline __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Documents.Inline>, global::Windows.UI.Xaml.Documents.Inline>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Documents_Inline_V___Impl.Vtbl.idx_get_Current
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool get_HasCurrent(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Documents.Inline>>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Documents_Inline_V___Impl.Vtbl.idx_get_HasCurrent
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool MoveNext(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Documents.Inline>>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Documents_Inline_V___Impl.Vtbl.idx_MoveNext
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
// Signature, Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Documents.Inline>.GetMany, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [out] [Mcg.CodeGen.ArrayMarshaller] rg_Windows_UI_Xaml_Documents_Inline__Windows_UI_Xaml_Documents__Inline * *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] uint__unsigned int,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static uint GetMany(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Documents.Inline[] items)
{
// Setup
uint unsafe_items_mcgLength = 0;
global::Windows.UI.Xaml.Documents.IInline__Impl.Vtbl*** unsafe_items = default(global::Windows.UI.Xaml.Documents.IInline__Impl.Vtbl***);
uint unsafe___value__retval;
uint __value__retval;
int unsafe___return__;
try
{
// Marshalling
if (items != null)
unsafe_items_mcgLength = (uint)items.Length;
if (items != null)
unsafe_items = (global::Windows.UI.Xaml.Documents.IInline__Impl.Vtbl***)global::McgInterop.McgHelpers.CoTaskMemAllocAndZeroMemory(((global::System.IntPtr)checked(unsafe_items_mcgLength * sizeof(global::Windows.UI.Xaml.Documents.IInline__Impl.Vtbl**))));
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Documents.Inline>).TypeHandle,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Documents_Inline_V___Impl.Vtbl.idx_GetMany,
unsafe_items_mcgLength,
unsafe_items,
&(unsafe___value__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
__value__retval = unsafe___value__retval;
if (items != null)
for (uint mcgIdx = 0; (mcgIdx < unsafe_items_mcgLength); mcgIdx++)
{
// [fwd] [out] [optional] [Mcg.CodeGen.WinRTClassMarshaller] Windows_UI_Xaml_Documents_Inline__Windows_UI_Xaml_Documents__Inline * items
items[mcgIdx] = (global::Windows.UI.Xaml.Documents.Inline)global::System.Runtime.InteropServices.McgModuleManager.ComInterfaceToObject(
((global::System.IntPtr)unsafe_items[mcgIdx]),
typeof(global::Windows.UI.Xaml.Documents.Inline).TypeHandle
);
}
// Return
return __value__retval;
}
finally
{
// Cleanup
if (unsafe_items != null)
for (uint mcgIdx_1 = 0; (mcgIdx_1 < unsafe_items_mcgLength); mcgIdx_1++)
{
// [fwd] [in] [out] [optional] [Mcg.CodeGen.WinRTClassMarshaller] Windows_UI_Xaml_Documents_Inline__Windows_UI_Xaml_Documents__Inline * items
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_items[mcgIdx_1])));
}
global::System.Runtime.InteropServices.ExternalInterop.SafeCoTaskMemFree(unsafe_items);
}
}
}
// DispatchClass for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Documents.Inline>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Documents.Inline>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Documents.Inline>
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IIterator`1.Current")]
global::Windows.UI.Xaml.Documents.Inline global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Documents.Inline>.get_Current()
{
global::Windows.UI.Xaml.Documents.Inline __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Documents_Inline_V___Impl.StubClass.get_Current(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IIterator`1.HasCurrent")]
bool global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Documents.Inline>.get_HasCurrent()
{
bool __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Documents_Inline_V___Impl.StubClass.get_HasCurrent(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
bool global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Documents.Inline>.MoveNext()
{
bool __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Documents_Inline_V___Impl.StubClass.MoveNext(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
uint global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Documents.Inline>.GetMany(global::Windows.UI.Xaml.Documents.Inline[] items)
{
uint __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Documents_Inline_V___Impl.StubClass.GetMany(
this,
items
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Documents.Inline>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Documents.Inline>))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Current = 6;
internal const int idx_get_HasCurrent = 7;
internal const int idx_MoveNext = 8;
internal const int idx_GetMany = 9;
}
}
// Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Documents.TextElement>
public unsafe static class IIterator_A_Windows_UI_Xaml_Documents_TextElement_V___Impl
{
// StubClass for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Documents.TextElement>'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.Documents.TextElement get_Current(global::System.__ComObject __this)
{
global::Windows.UI.Xaml.Documents.TextElement __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Documents.TextElement>, global::Windows.UI.Xaml.Documents.TextElement>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Documents_TextElement_V___Impl.Vtbl.idx_get_Current
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool get_HasCurrent(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Documents.TextElement>>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Documents_TextElement_V___Impl.Vtbl.idx_get_HasCurrent
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool MoveNext(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Documents.TextElement>>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Documents_TextElement_V___Impl.Vtbl.idx_MoveNext
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
// Signature, Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Documents.TextElement>.GetMany, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [out] [Mcg.CodeGen.ArrayMarshaller] rg_Windows_UI_Xaml_Documents_TextElement__Windows_UI_Xaml_Documents__TextElement * *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] uint__unsigned int,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static uint GetMany(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Documents.TextElement[] items)
{
// Setup
uint unsafe_items_mcgLength = 0;
global::Windows.UI.Xaml.Documents.ITextElement__Impl.Vtbl*** unsafe_items = default(global::Windows.UI.Xaml.Documents.ITextElement__Impl.Vtbl***);
uint unsafe___value__retval;
uint __value__retval;
int unsafe___return__;
try
{
// Marshalling
if (items != null)
unsafe_items_mcgLength = (uint)items.Length;
if (items != null)
unsafe_items = (global::Windows.UI.Xaml.Documents.ITextElement__Impl.Vtbl***)global::McgInterop.McgHelpers.CoTaskMemAllocAndZeroMemory(((global::System.IntPtr)checked(unsafe_items_mcgLength * sizeof(global::Windows.UI.Xaml.Documents.ITextElement__Impl.Vtbl**))));
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Documents.TextElement>).TypeHandle,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Documents_TextElement_V___Impl.Vtbl.idx_GetMany,
unsafe_items_mcgLength,
unsafe_items,
&(unsafe___value__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
__value__retval = unsafe___value__retval;
if (items != null)
for (uint mcgIdx = 0; (mcgIdx < unsafe_items_mcgLength); mcgIdx++)
{
// [fwd] [out] [optional] [Mcg.CodeGen.WinRTClassMarshaller] Windows_UI_Xaml_Documents_TextElement__Windows_UI_Xaml_Documents__TextElement * items
items[mcgIdx] = (global::Windows.UI.Xaml.Documents.TextElement)global::System.Runtime.InteropServices.McgModuleManager.ComInterfaceToObject(
((global::System.IntPtr)unsafe_items[mcgIdx]),
typeof(global::Windows.UI.Xaml.Documents.TextElement).TypeHandle
);
}
// Return
return __value__retval;
}
finally
{
// Cleanup
if (unsafe_items != null)
for (uint mcgIdx_1 = 0; (mcgIdx_1 < unsafe_items_mcgLength); mcgIdx_1++)
{
// [fwd] [in] [out] [optional] [Mcg.CodeGen.WinRTClassMarshaller] Windows_UI_Xaml_Documents_TextElement__Windows_UI_Xaml_Documents__TextElement * items
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_items[mcgIdx_1])));
}
global::System.Runtime.InteropServices.ExternalInterop.SafeCoTaskMemFree(unsafe_items);
}
}
}
// DispatchClass for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Documents.TextElement>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Documents.TextElement>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Documents.TextElement>
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IIterator`1.Current")]
global::Windows.UI.Xaml.Documents.TextElement global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Documents.TextElement>.get_Current()
{
global::Windows.UI.Xaml.Documents.TextElement __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Documents_TextElement_V___Impl.StubClass.get_Current(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IIterator`1.HasCurrent")]
bool global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Documents.TextElement>.get_HasCurrent()
{
bool __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Documents_TextElement_V___Impl.StubClass.get_HasCurrent(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
bool global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Documents.TextElement>.MoveNext()
{
bool __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Documents_TextElement_V___Impl.StubClass.MoveNext(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
uint global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Documents.TextElement>.GetMany(global::Windows.UI.Xaml.Documents.TextElement[] items)
{
uint __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Documents_TextElement_V___Impl.StubClass.GetMany(
this,
items
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Documents.TextElement>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Documents.TextElement>))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Current = 6;
internal const int idx_get_HasCurrent = 7;
internal const int idx_MoveNext = 8;
internal const int idx_GetMany = 9;
}
}
// Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Documents.ITextElement>
public unsafe static class IIterator_A_Windows_UI_Xaml_Documents_ITextElement_V___Impl
{
// StubClass for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Documents.ITextElement>'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.Documents.ITextElement get_Current(global::System.__ComObject __this)
{
global::Windows.UI.Xaml.Documents.ITextElement __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Documents.ITextElement>, global::Windows.UI.Xaml.Documents.ITextElement>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Documents_ITextElement_V___Impl.Vtbl.idx_get_Current
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool get_HasCurrent(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Documents.ITextElement>>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Documents_ITextElement_V___Impl.Vtbl.idx_get_HasCurrent
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool MoveNext(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Documents.ITextElement>>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Documents_ITextElement_V___Impl.Vtbl.idx_MoveNext
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
// Signature, Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Documents.ITextElement>.GetMany, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [out] [Mcg.CodeGen.ArrayMarshaller] rg_Windows_UI_Xaml_Documents_ITextElement__Windows_UI_Xaml_Documents__ITextElement * *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] uint__unsigned int,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static uint GetMany(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Documents.ITextElement[] items)
{
// Setup
uint unsafe_items_mcgLength = 0;
global::Windows.UI.Xaml.Documents.ITextElement__Impl.Vtbl*** unsafe_items = default(global::Windows.UI.Xaml.Documents.ITextElement__Impl.Vtbl***);
uint unsafe___value__retval;
uint __value__retval;
int unsafe___return__;
try
{
// Marshalling
if (items != null)
unsafe_items_mcgLength = (uint)items.Length;
if (items != null)
unsafe_items = (global::Windows.UI.Xaml.Documents.ITextElement__Impl.Vtbl***)global::McgInterop.McgHelpers.CoTaskMemAllocAndZeroMemory(((global::System.IntPtr)checked(unsafe_items_mcgLength * sizeof(global::Windows.UI.Xaml.Documents.ITextElement__Impl.Vtbl**))));
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Documents.ITextElement>).TypeHandle,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Documents_ITextElement_V___Impl.Vtbl.idx_GetMany,
unsafe_items_mcgLength,
unsafe_items,
&(unsafe___value__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
__value__retval = unsafe___value__retval;
if (items != null)
for (uint mcgIdx = 0; (mcgIdx < unsafe_items_mcgLength); mcgIdx++)
{
// [fwd] [out] [optional] [Mcg.CodeGen.ComInterfaceMarshaller] Windows_UI_Xaml_Documents_ITextElement__Windows_UI_Xaml_Documents__ITextElement * items
items[mcgIdx] = (global::Windows.UI.Xaml.Documents.ITextElement)global::System.Runtime.InteropServices.McgModuleManager.ComInterfaceToObject(
((global::System.IntPtr)unsafe_items[mcgIdx]),
typeof(global::Windows.UI.Xaml.Documents.ITextElement).TypeHandle
);
}
// Return
return __value__retval;
}
finally
{
// Cleanup
if (unsafe_items != null)
for (uint mcgIdx_1 = 0; (mcgIdx_1 < unsafe_items_mcgLength); mcgIdx_1++)
{
// [fwd] [in] [out] [optional] [Mcg.CodeGen.ComInterfaceMarshaller] Windows_UI_Xaml_Documents_ITextElement__Windows_UI_Xaml_Documents__ITextElement * items
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_items[mcgIdx_1])));
}
global::System.Runtime.InteropServices.ExternalInterop.SafeCoTaskMemFree(unsafe_items);
}
}
}
// DispatchClass for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Documents.ITextElement>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Documents.ITextElement>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Documents.ITextElement>
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IIterator`1.Current")]
global::Windows.UI.Xaml.Documents.ITextElement global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Documents.ITextElement>.get_Current()
{
global::Windows.UI.Xaml.Documents.ITextElement __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Documents_ITextElement_V___Impl.StubClass.get_Current(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IIterator`1.HasCurrent")]
bool global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Documents.ITextElement>.get_HasCurrent()
{
bool __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Documents_ITextElement_V___Impl.StubClass.get_HasCurrent(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
bool global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Documents.ITextElement>.MoveNext()
{
bool __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Documents_ITextElement_V___Impl.StubClass.MoveNext(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
uint global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Documents.ITextElement>.GetMany(global::Windows.UI.Xaml.Documents.ITextElement[] items)
{
uint __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Documents_ITextElement_V___Impl.StubClass.GetMany(
this,
items
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Documents.ITextElement>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Documents.ITextElement>))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Current = 6;
internal const int idx_get_HasCurrent = 7;
internal const int idx_MoveNext = 8;
internal const int idx_GetMany = 9;
}
}
// Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Documents.ITextElementOverrides>
public unsafe static class IIterator_A_Windows_UI_Xaml_Documents_ITextElementOverrides_V___Impl
{
// StubClass for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Documents.ITextElementOverrides>'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.Documents.ITextElementOverrides get_Current(global::System.__ComObject __this)
{
global::Windows.UI.Xaml.Documents.ITextElementOverrides __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Documents.ITextElementOverrides>, global::Windows.UI.Xaml.Documents.ITextElementOverrides>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Documents_ITextElementOverrides_V___Impl.Vtbl.idx_get_Current
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool get_HasCurrent(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Documents.ITextElementOverrides>>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Documents_ITextElementOverrides_V___Impl.Vtbl.idx_get_HasCurrent
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool MoveNext(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Documents.ITextElementOverrides>>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Documents_ITextElementOverrides_V___Impl.Vtbl.idx_MoveNext
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
// Signature, Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Documents.ITextElementOverrides>.GetMany, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [out] [Mcg.CodeGen.ArrayMarshaller] rg_Windows_UI_Xaml_Documents_ITextElementOverrides__Windows_UI_Xaml_Documents__ITextElementOverrides * *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] uint__unsigned int,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static uint GetMany(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Documents.ITextElementOverrides[] items)
{
// Setup
uint unsafe_items_mcgLength = 0;
global::Windows.UI.Xaml.Documents.ITextElementOverrides__Impl.Vtbl*** unsafe_items = default(global::Windows.UI.Xaml.Documents.ITextElementOverrides__Impl.Vtbl***);
uint unsafe___value__retval;
uint __value__retval;
int unsafe___return__;
try
{
// Marshalling
if (items != null)
unsafe_items_mcgLength = (uint)items.Length;
if (items != null)
unsafe_items = (global::Windows.UI.Xaml.Documents.ITextElementOverrides__Impl.Vtbl***)global::McgInterop.McgHelpers.CoTaskMemAllocAndZeroMemory(((global::System.IntPtr)checked(unsafe_items_mcgLength * sizeof(global::Windows.UI.Xaml.Documents.ITextElementOverrides__Impl.Vtbl**))));
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Documents.ITextElementOverrides>).TypeHandle,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Documents_ITextElementOverrides_V___Impl.Vtbl.idx_GetMany,
unsafe_items_mcgLength,
unsafe_items,
&(unsafe___value__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
__value__retval = unsafe___value__retval;
if (items != null)
for (uint mcgIdx = 0; (mcgIdx < unsafe_items_mcgLength); mcgIdx++)
{
// [fwd] [out] [optional] [Mcg.CodeGen.ComInterfaceMarshaller] Windows_UI_Xaml_Documents_ITextElementOverrides__Windows_UI_Xaml_Documents__ITextElementOverrides * items
items[mcgIdx] = (global::Windows.UI.Xaml.Documents.ITextElementOverrides)global::System.Runtime.InteropServices.McgModuleManager.ComInterfaceToObject(
((global::System.IntPtr)unsafe_items[mcgIdx]),
typeof(global::Windows.UI.Xaml.Documents.ITextElementOverrides).TypeHandle
);
}
// Return
return __value__retval;
}
finally
{
// Cleanup
if (unsafe_items != null)
for (uint mcgIdx_1 = 0; (mcgIdx_1 < unsafe_items_mcgLength); mcgIdx_1++)
{
// [fwd] [in] [out] [optional] [Mcg.CodeGen.ComInterfaceMarshaller] Windows_UI_Xaml_Documents_ITextElementOverrides__Windows_UI_Xaml_Documents__ITextElementOverrides * items
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_items[mcgIdx_1])));
}
global::System.Runtime.InteropServices.ExternalInterop.SafeCoTaskMemFree(unsafe_items);
}
}
}
// DispatchClass for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Documents.ITextElementOverrides>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Documents.ITextElementOverrides>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Documents.ITextElementOverrides>
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IIterator`1.Current")]
global::Windows.UI.Xaml.Documents.ITextElementOverrides global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Documents.ITextElementOverrides>.get_Current()
{
global::Windows.UI.Xaml.Documents.ITextElementOverrides __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Documents_ITextElementOverrides_V___Impl.StubClass.get_Current(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IIterator`1.HasCurrent")]
bool global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Documents.ITextElementOverrides>.get_HasCurrent()
{
bool __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Documents_ITextElementOverrides_V___Impl.StubClass.get_HasCurrent(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
bool global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Documents.ITextElementOverrides>.MoveNext()
{
bool __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Documents_ITextElementOverrides_V___Impl.StubClass.MoveNext(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
uint global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Documents.ITextElementOverrides>.GetMany(global::Windows.UI.Xaml.Documents.ITextElementOverrides[] items)
{
uint __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Documents_ITextElementOverrides_V___Impl.StubClass.GetMany(
this,
items
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Documents.ITextElementOverrides>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Documents.ITextElementOverrides>))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Current = 6;
internal const int idx_get_HasCurrent = 7;
internal const int idx_MoveNext = 8;
internal const int idx_GetMany = 9;
}
}
// Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Documents.ITextElement2>
public unsafe static class IIterator_A_Windows_UI_Xaml_Documents_ITextElement2_V___Impl
{
// StubClass for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Documents.ITextElement2>'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.Documents.ITextElement2 get_Current(global::System.__ComObject __this)
{
global::Windows.UI.Xaml.Documents.ITextElement2 __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Documents.ITextElement2>, global::Windows.UI.Xaml.Documents.ITextElement2>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Documents_ITextElement2_V___Impl.Vtbl.idx_get_Current
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool get_HasCurrent(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Documents.ITextElement2>>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Documents_ITextElement2_V___Impl.Vtbl.idx_get_HasCurrent
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool MoveNext(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Documents.ITextElement2>>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Documents_ITextElement2_V___Impl.Vtbl.idx_MoveNext
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
// Signature, Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Documents.ITextElement2>.GetMany, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [out] [Mcg.CodeGen.ArrayMarshaller] rg_Windows_UI_Xaml_Documents_ITextElement2__Windows_UI_Xaml_Documents__ITextElement2 * *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] uint__unsigned int,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static uint GetMany(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Documents.ITextElement2[] items)
{
// Setup
uint unsafe_items_mcgLength = 0;
global::Windows.UI.Xaml.Documents.ITextElement2__Impl.Vtbl*** unsafe_items = default(global::Windows.UI.Xaml.Documents.ITextElement2__Impl.Vtbl***);
uint unsafe___value__retval;
uint __value__retval;
int unsafe___return__;
try
{
// Marshalling
if (items != null)
unsafe_items_mcgLength = (uint)items.Length;
if (items != null)
unsafe_items = (global::Windows.UI.Xaml.Documents.ITextElement2__Impl.Vtbl***)global::McgInterop.McgHelpers.CoTaskMemAllocAndZeroMemory(((global::System.IntPtr)checked(unsafe_items_mcgLength * sizeof(global::Windows.UI.Xaml.Documents.ITextElement2__Impl.Vtbl**))));
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Documents.ITextElement2>).TypeHandle,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Documents_ITextElement2_V___Impl.Vtbl.idx_GetMany,
unsafe_items_mcgLength,
unsafe_items,
&(unsafe___value__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
__value__retval = unsafe___value__retval;
if (items != null)
for (uint mcgIdx = 0; (mcgIdx < unsafe_items_mcgLength); mcgIdx++)
{
// [fwd] [out] [optional] [Mcg.CodeGen.ComInterfaceMarshaller] Windows_UI_Xaml_Documents_ITextElement2__Windows_UI_Xaml_Documents__ITextElement2 * items
items[mcgIdx] = (global::Windows.UI.Xaml.Documents.ITextElement2)global::System.Runtime.InteropServices.McgModuleManager.ComInterfaceToObject(
((global::System.IntPtr)unsafe_items[mcgIdx]),
typeof(global::Windows.UI.Xaml.Documents.ITextElement2).TypeHandle
);
}
// Return
return __value__retval;
}
finally
{
// Cleanup
if (unsafe_items != null)
for (uint mcgIdx_1 = 0; (mcgIdx_1 < unsafe_items_mcgLength); mcgIdx_1++)
{
// [fwd] [in] [out] [optional] [Mcg.CodeGen.ComInterfaceMarshaller] Windows_UI_Xaml_Documents_ITextElement2__Windows_UI_Xaml_Documents__ITextElement2 * items
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_items[mcgIdx_1])));
}
global::System.Runtime.InteropServices.ExternalInterop.SafeCoTaskMemFree(unsafe_items);
}
}
}
// DispatchClass for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Documents.ITextElement2>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Documents.ITextElement2>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Documents.ITextElement2>
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IIterator`1.Current")]
global::Windows.UI.Xaml.Documents.ITextElement2 global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Documents.ITextElement2>.get_Current()
{
global::Windows.UI.Xaml.Documents.ITextElement2 __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Documents_ITextElement2_V___Impl.StubClass.get_Current(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IIterator`1.HasCurrent")]
bool global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Documents.ITextElement2>.get_HasCurrent()
{
bool __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Documents_ITextElement2_V___Impl.StubClass.get_HasCurrent(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
bool global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Documents.ITextElement2>.MoveNext()
{
bool __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Documents_ITextElement2_V___Impl.StubClass.MoveNext(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
uint global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Documents.ITextElement2>.GetMany(global::Windows.UI.Xaml.Documents.ITextElement2[] items)
{
uint __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Documents_ITextElement2_V___Impl.StubClass.GetMany(
this,
items
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Documents.ITextElement2>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Documents.ITextElement2>))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Current = 6;
internal const int idx_get_HasCurrent = 7;
internal const int idx_MoveNext = 8;
internal const int idx_GetMany = 9;
}
}
// Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Documents.ITextElement3>
public unsafe static class IIterator_A_Windows_UI_Xaml_Documents_ITextElement3_V___Impl
{
// StubClass for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Documents.ITextElement3>'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.Documents.ITextElement3 get_Current(global::System.__ComObject __this)
{
global::Windows.UI.Xaml.Documents.ITextElement3 __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Documents.ITextElement3>, global::Windows.UI.Xaml.Documents.ITextElement3>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Documents_ITextElement3_V___Impl.Vtbl.idx_get_Current
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool get_HasCurrent(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Documents.ITextElement3>>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Documents_ITextElement3_V___Impl.Vtbl.idx_get_HasCurrent
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool MoveNext(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Documents.ITextElement3>>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Documents_ITextElement3_V___Impl.Vtbl.idx_MoveNext
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
// Signature, Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Documents.ITextElement3>.GetMany, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [out] [Mcg.CodeGen.ArrayMarshaller] rg_Windows_UI_Xaml_Documents_ITextElement3__Windows_UI_Xaml_Documents__ITextElement3 * *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] uint__unsigned int,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static uint GetMany(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Documents.ITextElement3[] items)
{
// Setup
uint unsafe_items_mcgLength = 0;
global::Windows.UI.Xaml.Documents.ITextElement3__Impl.Vtbl*** unsafe_items = default(global::Windows.UI.Xaml.Documents.ITextElement3__Impl.Vtbl***);
uint unsafe___value__retval;
uint __value__retval;
int unsafe___return__;
try
{
// Marshalling
if (items != null)
unsafe_items_mcgLength = (uint)items.Length;
if (items != null)
unsafe_items = (global::Windows.UI.Xaml.Documents.ITextElement3__Impl.Vtbl***)global::McgInterop.McgHelpers.CoTaskMemAllocAndZeroMemory(((global::System.IntPtr)checked(unsafe_items_mcgLength * sizeof(global::Windows.UI.Xaml.Documents.ITextElement3__Impl.Vtbl**))));
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Documents.ITextElement3>).TypeHandle,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Documents_ITextElement3_V___Impl.Vtbl.idx_GetMany,
unsafe_items_mcgLength,
unsafe_items,
&(unsafe___value__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
__value__retval = unsafe___value__retval;
if (items != null)
for (uint mcgIdx = 0; (mcgIdx < unsafe_items_mcgLength); mcgIdx++)
{
// [fwd] [out] [optional] [Mcg.CodeGen.ComInterfaceMarshaller] Windows_UI_Xaml_Documents_ITextElement3__Windows_UI_Xaml_Documents__ITextElement3 * items
items[mcgIdx] = (global::Windows.UI.Xaml.Documents.ITextElement3)global::System.Runtime.InteropServices.McgModuleManager.ComInterfaceToObject(
((global::System.IntPtr)unsafe_items[mcgIdx]),
typeof(global::Windows.UI.Xaml.Documents.ITextElement3).TypeHandle
);
}
// Return
return __value__retval;
}
finally
{
// Cleanup
if (unsafe_items != null)
for (uint mcgIdx_1 = 0; (mcgIdx_1 < unsafe_items_mcgLength); mcgIdx_1++)
{
// [fwd] [in] [out] [optional] [Mcg.CodeGen.ComInterfaceMarshaller] Windows_UI_Xaml_Documents_ITextElement3__Windows_UI_Xaml_Documents__ITextElement3 * items
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_items[mcgIdx_1])));
}
global::System.Runtime.InteropServices.ExternalInterop.SafeCoTaskMemFree(unsafe_items);
}
}
}
// DispatchClass for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Documents.ITextElement3>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Documents.ITextElement3>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Documents.ITextElement3>
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IIterator`1.Current")]
global::Windows.UI.Xaml.Documents.ITextElement3 global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Documents.ITextElement3>.get_Current()
{
global::Windows.UI.Xaml.Documents.ITextElement3 __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Documents_ITextElement3_V___Impl.StubClass.get_Current(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IIterator`1.HasCurrent")]
bool global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Documents.ITextElement3>.get_HasCurrent()
{
bool __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Documents_ITextElement3_V___Impl.StubClass.get_HasCurrent(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
bool global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Documents.ITextElement3>.MoveNext()
{
bool __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Documents_ITextElement3_V___Impl.StubClass.MoveNext(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
uint global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Documents.ITextElement3>.GetMany(global::Windows.UI.Xaml.Documents.ITextElement3[] items)
{
uint __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Documents_ITextElement3_V___Impl.StubClass.GetMany(
this,
items
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Documents.ITextElement3>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Documents.ITextElement3>))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Current = 6;
internal const int idx_get_HasCurrent = 7;
internal const int idx_MoveNext = 8;
internal const int idx_GetMany = 9;
}
}
// Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Documents.IInline>
public unsafe static class IIterator_A_Windows_UI_Xaml_Documents_IInline_V___Impl
{
// StubClass for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Documents.IInline>'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.Documents.IInline get_Current(global::System.__ComObject __this)
{
global::Windows.UI.Xaml.Documents.IInline __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Documents.IInline>, global::Windows.UI.Xaml.Documents.IInline>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Documents_IInline_V___Impl.Vtbl.idx_get_Current
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool get_HasCurrent(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Documents.IInline>>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Documents_IInline_V___Impl.Vtbl.idx_get_HasCurrent
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool MoveNext(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Documents.IInline>>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Documents_IInline_V___Impl.Vtbl.idx_MoveNext
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
// Signature, Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Documents.IInline>.GetMany, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [out] [Mcg.CodeGen.ArrayMarshaller] rg_Windows_UI_Xaml_Documents_IInline__Windows_UI_Xaml_Documents__IInline * *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] uint__unsigned int,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static uint GetMany(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Documents.IInline[] items)
{
// Setup
uint unsafe_items_mcgLength = 0;
global::Windows.UI.Xaml.Documents.IInline__Impl.Vtbl*** unsafe_items = default(global::Windows.UI.Xaml.Documents.IInline__Impl.Vtbl***);
uint unsafe___value__retval;
uint __value__retval;
int unsafe___return__;
try
{
// Marshalling
if (items != null)
unsafe_items_mcgLength = (uint)items.Length;
if (items != null)
unsafe_items = (global::Windows.UI.Xaml.Documents.IInline__Impl.Vtbl***)global::McgInterop.McgHelpers.CoTaskMemAllocAndZeroMemory(((global::System.IntPtr)checked(unsafe_items_mcgLength * sizeof(global::Windows.UI.Xaml.Documents.IInline__Impl.Vtbl**))));
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Documents.IInline>).TypeHandle,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Documents_IInline_V___Impl.Vtbl.idx_GetMany,
unsafe_items_mcgLength,
unsafe_items,
&(unsafe___value__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
__value__retval = unsafe___value__retval;
if (items != null)
for (uint mcgIdx = 0; (mcgIdx < unsafe_items_mcgLength); mcgIdx++)
{
// [fwd] [out] [optional] [Mcg.CodeGen.ComInterfaceMarshaller] Windows_UI_Xaml_Documents_IInline__Windows_UI_Xaml_Documents__IInline * items
items[mcgIdx] = (global::Windows.UI.Xaml.Documents.IInline)global::System.Runtime.InteropServices.McgModuleManager.ComInterfaceToObject(
((global::System.IntPtr)unsafe_items[mcgIdx]),
typeof(global::Windows.UI.Xaml.Documents.IInline).TypeHandle
);
}
// Return
return __value__retval;
}
finally
{
// Cleanup
if (unsafe_items != null)
for (uint mcgIdx_1 = 0; (mcgIdx_1 < unsafe_items_mcgLength); mcgIdx_1++)
{
// [fwd] [in] [out] [optional] [Mcg.CodeGen.ComInterfaceMarshaller] Windows_UI_Xaml_Documents_IInline__Windows_UI_Xaml_Documents__IInline * items
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_items[mcgIdx_1])));
}
global::System.Runtime.InteropServices.ExternalInterop.SafeCoTaskMemFree(unsafe_items);
}
}
}
// DispatchClass for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Documents.IInline>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Documents.IInline>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Documents.IInline>
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IIterator`1.Current")]
global::Windows.UI.Xaml.Documents.IInline global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Documents.IInline>.get_Current()
{
global::Windows.UI.Xaml.Documents.IInline __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Documents_IInline_V___Impl.StubClass.get_Current(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IIterator`1.HasCurrent")]
bool global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Documents.IInline>.get_HasCurrent()
{
bool __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Documents_IInline_V___Impl.StubClass.get_HasCurrent(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
bool global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Documents.IInline>.MoveNext()
{
bool __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Documents_IInline_V___Impl.StubClass.MoveNext(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
uint global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Documents.IInline>.GetMany(global::Windows.UI.Xaml.Documents.IInline[] items)
{
uint __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Documents_IInline_V___Impl.StubClass.GetMany(
this,
items
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Documents.IInline>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Documents.IInline>))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Current = 6;
internal const int idx_get_HasCurrent = 7;
internal const int idx_MoveNext = 8;
internal const int idx_GetMany = 9;
}
}
// Windows.Foundation.Collections.IIterator<System.Collections.Generic.KeyValuePair<string,string>>
public unsafe static class IIterator_A_System_Collections_Generic_KeyValuePair_A_string_j_string_V__V___Impl
{
// StubClass for 'Windows.Foundation.Collections.IIterator<System.Collections.Generic.KeyValuePair<string,string>>'
public static partial class StubClass
{
// Signature, Windows.Foundation.Collections.IIterator<System.Collections.Generic.KeyValuePair<string,string>>.get_Current, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.WinRTKeyValuePairMarshaller] System_Collections_Generic_KeyValuePair_2_string__string___Windows_Foundation_Collections__IKeyValuePair_A_string_j_string_V_ *,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Collections.Generic.KeyValuePair<string, string> get_Current(global::System.__ComObject __this)
{
// Setup
global::System.Collections.Generic.KeyValuePair_A_string_j_string_V___Impl.Vtbl** unsafe___value__retval = default(global::System.Collections.Generic.KeyValuePair_A_string_j_string_V___Impl.Vtbl**);
global::System.Collections.Generic.KeyValuePair<string, string> __value__retval = default(global::System.Collections.Generic.KeyValuePair<string, string>);
int unsafe___return__;
try
{
// Marshalling
unsafe___value__retval = null;
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.Foundation.Collections.IIterator<global::System.Collections.Generic.KeyValuePair<string, string>>).TypeHandle,
global::Windows.Foundation.Collections.IIterator_A_System_Collections_Generic_KeyValuePair_A_string_j_string_V__V___Impl.Vtbl.idx_get_Current,
&(unsafe___value__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
global::Windows.Foundation.Collections.IKeyValuePair<string, string> pair___value__retval = ((global::Windows.Foundation.Collections.IKeyValuePair<string, string>)global::System.Runtime.InteropServices.McgModuleManager.ComInterfaceToObject_NoUnboxing(
((global::System.IntPtr)unsafe___value__retval),
typeof(global::Windows.Foundation.Collections.IKeyValuePair<string, string>).TypeHandle
));
__value__retval = new global::System.Collections.Generic.KeyValuePair<string, string>(pair___value__retval.get_Key(), pair___value__retval.get_Value());
// Return
return __value__retval;
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe___value__retval)));
}
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool get_HasCurrent(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.Foundation.Collections.IIterator<global::System.Collections.Generic.KeyValuePair<string, string>>>(
__this,
global::Windows.Foundation.Collections.IIterator_A_System_Collections_Generic_KeyValuePair_A_string_j_string_V__V___Impl.Vtbl.idx_get_HasCurrent
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool MoveNext(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.Foundation.Collections.IIterator<global::System.Collections.Generic.KeyValuePair<string, string>>>(
__this,
global::Windows.Foundation.Collections.IIterator_A_System_Collections_Generic_KeyValuePair_A_string_j_string_V__V___Impl.Vtbl.idx_MoveNext
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
// Signature, Windows.Foundation.Collections.IIterator<System.Collections.Generic.KeyValuePair<string,string>>.GetMany, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [out] [Mcg.CodeGen.ArrayMarshaller] rg_System_Collections_Generic_KeyValuePair_2_string__string___Windows_Foundation_Collections__IKeyValuePair_A_string_j_string_V_ * *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] uint__unsigned int,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static uint GetMany(
global::System.__ComObject __this,
global::System.Collections.Generic.KeyValuePair<string, string>[] items)
{
// Setup
uint unsafe_items_mcgLength = 0;
global::System.Collections.Generic.KeyValuePair_A_string_j_string_V___Impl.Vtbl*** unsafe_items = default(global::System.Collections.Generic.KeyValuePair_A_string_j_string_V___Impl.Vtbl***);
uint unsafe___value__retval;
uint __value__retval;
int unsafe___return__;
try
{
// Marshalling
if (items != null)
unsafe_items_mcgLength = (uint)items.Length;
if (items != null)
unsafe_items = (global::System.Collections.Generic.KeyValuePair_A_string_j_string_V___Impl.Vtbl***)global::McgInterop.McgHelpers.CoTaskMemAllocAndZeroMemory(((global::System.IntPtr)checked(unsafe_items_mcgLength * sizeof(global::System.Collections.Generic.KeyValuePair_A_string_j_string_V___Impl.Vtbl**))));
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.Foundation.Collections.IIterator<global::System.Collections.Generic.KeyValuePair<string, string>>).TypeHandle,
global::Windows.Foundation.Collections.IIterator_A_System_Collections_Generic_KeyValuePair_A_string_j_string_V__V___Impl.Vtbl.idx_GetMany,
unsafe_items_mcgLength,
unsafe_items,
&(unsafe___value__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
__value__retval = unsafe___value__retval;
if (items != null)
for (uint mcgIdx = 0; (mcgIdx < unsafe_items_mcgLength); mcgIdx++)
{
// [fwd] [out] [optional] [Mcg.CodeGen.WinRTKeyValuePairMarshaller] System_Collections_Generic_KeyValuePair_2_string__string___Windows_Foundation_Collections__IKeyValuePair_A_string_j_string_V_ * items
global::Windows.Foundation.Collections.IKeyValuePair<string, string> pair_items = ((global::Windows.Foundation.Collections.IKeyValuePair<string, string>)global::System.Runtime.InteropServices.McgModuleManager.ComInterfaceToObject_NoUnboxing(
((global::System.IntPtr)unsafe_items[mcgIdx]),
typeof(global::Windows.Foundation.Collections.IKeyValuePair<string, string>).TypeHandle
));
items[mcgIdx] = new global::System.Collections.Generic.KeyValuePair<string, string>(pair_items.get_Key(), pair_items.get_Value());
}
// Return
return __value__retval;
}
finally
{
// Cleanup
if (unsafe_items != null)
for (uint mcgIdx_1 = 0; (mcgIdx_1 < unsafe_items_mcgLength); mcgIdx_1++)
{
// [fwd] [in] [out] [optional] [Mcg.CodeGen.WinRTKeyValuePairMarshaller] System_Collections_Generic_KeyValuePair_2_string__string___Windows_Foundation_Collections__IKeyValuePair_A_string_j_string_V_ * items
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_items[mcgIdx_1])));
}
global::System.Runtime.InteropServices.ExternalInterop.SafeCoTaskMemFree(unsafe_items);
}
}
}
// DispatchClass for 'Windows.Foundation.Collections.IIterator<System.Collections.Generic.KeyValuePair<string,string>>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IIterator<global::System.Collections.Generic.KeyValuePair<string, string>>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Foundation.Collections.IIterator<global::System.Collections.Generic.KeyValuePair<string, string>>
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IIterator`1.Current")]
global::System.Collections.Generic.KeyValuePair<string, string> global::Windows.Foundation.Collections.IIterator<global::System.Collections.Generic.KeyValuePair<string, string>>.get_Current()
{
global::System.Collections.Generic.KeyValuePair<string, string> __retVal = global::Windows.Foundation.Collections.IIterator_A_System_Collections_Generic_KeyValuePair_A_string_j_string_V__V___Impl.StubClass.get_Current(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IIterator`1.HasCurrent")]
bool global::Windows.Foundation.Collections.IIterator<global::System.Collections.Generic.KeyValuePair<string, string>>.get_HasCurrent()
{
bool __retVal = global::Windows.Foundation.Collections.IIterator_A_System_Collections_Generic_KeyValuePair_A_string_j_string_V__V___Impl.StubClass.get_HasCurrent(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
bool global::Windows.Foundation.Collections.IIterator<global::System.Collections.Generic.KeyValuePair<string, string>>.MoveNext()
{
bool __retVal = global::Windows.Foundation.Collections.IIterator_A_System_Collections_Generic_KeyValuePair_A_string_j_string_V__V___Impl.StubClass.MoveNext(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
uint global::Windows.Foundation.Collections.IIterator<global::System.Collections.Generic.KeyValuePair<string, string>>.GetMany(global::System.Collections.Generic.KeyValuePair<string, string>[] items)
{
uint __retVal = global::Windows.Foundation.Collections.IIterator_A_System_Collections_Generic_KeyValuePair_A_string_j_string_V__V___Impl.StubClass.GetMany(
this,
items
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.Foundation.Collections.IIterator<System.Collections.Generic.KeyValuePair<string,string>>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IIterator<global::System.Collections.Generic.KeyValuePair<string, string>>))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Current = 6;
internal const int idx_get_HasCurrent = 7;
internal const int idx_MoveNext = 8;
internal const int idx_GetMany = 9;
}
}
// Windows.Foundation.Collections.IMapChangedEventArgs<string>
public unsafe static class IMapChangedEventArgs_A_string_V___Impl
{
// v-table for 'Windows.Foundation.Collections.IMapChangedEventArgs<string>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IMapChangedEventArgs<string>))]
public unsafe partial struct Vtbl
{
}
}
// Windows.Foundation.Collections.MapChangedEventHandler<string,string>
public unsafe static class MapChangedEventHandler_A_string_j_string_V___Impl
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void Invoke(
this global::System.__ComObject __this,
global::Windows.Foundation.Collections.IObservableMap<string, string> sender,
global::Windows.Foundation.Collections.IMapChangedEventArgs<string> @event)
{
global::McgInterop.ForwardComSharedStubs.Proc_TArg0__TArg1__<global::Windows.Foundation.Collections.MapChangedEventHandler<string, string>, global::Windows.Foundation.Collections.IObservableMap<string, string>, global::Windows.Foundation.Collections.IMapChangedEventArgs<string>>(
__this,
sender,
@event,
global::Windows.Foundation.Collections.MapChangedEventHandler_A_string_j_string_V___Impl.Vtbl.idx_Invoke
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// v-table for 'Windows.Foundation.Collections.MapChangedEventHandler<string,string>'
[global::System.Runtime.InteropServices.McgRootsType(typeof(global::Windows.Foundation.Collections.MapChangedEventHandler<string, string>))]
public unsafe partial struct Vtbl
{
global::System.IntPtr pfnQueryInterface;
global::System.IntPtr pfnAddRef;
global::System.IntPtr pfnRelease;
// Windows_Foundation_Collections__MapChangedEventHandler_A_string_j_string_V_
global::System.IntPtr pfnInvoke_Windows_Foundation_Collections__MapChangedEventHandler_A_string_j_string_V_;
internal const int idx_Invoke = 3;
[global::System.Runtime.CompilerServices.InitDataBlob(typeof(global::Windows.Foundation.Collections.MapChangedEventHandler_A_string_j_string_V___Impl.Vtbl.Windows_Foundation_Collections_MapChangedEventHandler_A_string_j_string_V___Impl_Vtbl_McgRvaContainer), "RVA_Windows_Foundation_Collections_MapChangedEventHandler_A_string_j_string_V___Impl_Vtbl_s_theCcwVtable")]
public static global::Windows.Foundation.Collections.MapChangedEventHandler_A_string_j_string_V___Impl.Vtbl s_theCcwVtable
#if false
= new global::Windows.Foundation.Collections.MapChangedEventHandler_A_string_j_string_V___Impl.Vtbl() {
pfnQueryInterface = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfQueryInterface>(System.Runtime.InteropServices.__vtable_IUnknown.QueryInterface),
pfnAddRef = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfAddRef>(System.Runtime.InteropServices.__vtable_IUnknown.AddRef),
pfnRelease = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfRelease>(System.Runtime.InteropServices.__vtable_IUnknown.Release),
pfnInvoke_Windows_Foundation_Collections__MapChangedEventHandler_A_string_j_string_V_ = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget117>(global::Windows.Foundation.Collections.MapChangedEventHandler_A_string_j_string_V___Impl.Vtbl.Invoke__STUB),
}
#endif
;
public static global::System.IntPtr pNativeVtable;
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int Invoke__STUB(
global::System.IntPtr pComThis,
global::Windows.Foundation.Collections.IObservableMap_A_string_j_string_V___Impl.Vtbl** unsafe_sender,
global::Windows.Foundation.Collections.IMapChangedEventArgs_A_string_V___Impl.Vtbl** unsafe_event)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.Foundation.Collections.MapChangedEventHandler<string, string>>(
__this,
0
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Proc_TArg0__TArg1__<global::Windows.Foundation.Collections.IObservableMap<string, string>, global::Windows.Foundation.Collections.IMapChangedEventArgs<string>>(
__this,
unsafe_sender,
unsafe_event,
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
private static class Windows_Foundation_Collections_MapChangedEventHandler_A_string_j_string_V___Impl_Vtbl_McgRvaContainer
{
[global::System.Runtime.CompilerServices.MethodAddrFixup(0, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "QueryInterface")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(4, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "AddRef")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(8, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "Release")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(12, typeof(global::Windows.Foundation.Collections.MapChangedEventHandler_A_string_j_string_V___Impl.Vtbl), "Invoke__STUB")]
[global::System.Runtime.CompilerServices.NonArray]
static readonly byte[] RVA_Windows_Foundation_Collections_MapChangedEventHandler_A_string_j_string_V___Impl_Vtbl_s_theCcwVtable = new byte[] {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
}
}
}
// Windows.Foundation.Collections.IObservableMap<string,string>
public unsafe static class IObservableMap_A_string_j_string_V___Impl
{
// StubClass for 'Windows.Foundation.Collections.IObservableMap<string,string>'
public static partial class StubClass
{
// Signature, Windows.Foundation.Collections.IObservableMap<string,string>.add_MapChanged, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.WinRTDelegateMarshaller] Windows_Foundation_Collections_MapChangedEventHandler_2_string__string___Windows_Foundation_Collections__MapChangedEventHandler_A_string_j_string_V_ *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] System_Runtime_InteropServices_WindowsRuntime_EventRegistrationToken__Windows_Foundation__EventRegistrationToken,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken add_MapChanged(
global::System.__ComObject __this,
global::Windows.Foundation.Collections.MapChangedEventHandler<string, string> vhnd)
{
// Setup
global::Windows.Foundation.Collections.MapChangedEventHandler_A_string_j_string_V___Impl.Vtbl** unsafe_vhnd = default(global::Windows.Foundation.Collections.MapChangedEventHandler_A_string_j_string_V___Impl.Vtbl**);
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken unsafe___value__retval;
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __value__retval;
int unsafe___return__;
try
{
// Marshalling
unsafe_vhnd = (global::Windows.Foundation.Collections.MapChangedEventHandler_A_string_j_string_V___Impl.Vtbl**)global::System.Runtime.InteropServices.McgModuleManager.DelegateToComInterface(
vhnd,
typeof(global::Windows.Foundation.Collections.MapChangedEventHandler<string, string>).TypeHandle,
global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget118>(global::Windows.Foundation.Collections.MapChangedEventHandler_A_string_j_string_V___Impl.Invoke)
);
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.Foundation.Collections.IObservableMap<string, string>).TypeHandle,
global::Windows.Foundation.Collections.IObservableMap_A_string_j_string_V___Impl.Vtbl.idx_add_MapChanged,
unsafe_vhnd,
&(unsafe___value__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
__value__retval = unsafe___value__retval;
// Return
return __value__retval;
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_vhnd)));
}
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void remove_MapChanged(
global::System.__ComObject __this,
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::McgInterop.ForwardComSharedStubs.Proc__WindowsRuntime_EventRegistrationToken__<global::Windows.Foundation.Collections.IObservableMap<string, string>>(
__this,
token,
global::Windows.Foundation.Collections.IObservableMap_A_string_j_string_V___Impl.Vtbl.idx_remove_MapChanged
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// DispatchClass for 'Windows.Foundation.Collections.IObservableMap<string,string>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IObservableMap<string, string>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Foundation.Collections.IObservableMap<string, string>, global::System.Collections.Generic.ICollection<global::System.Collections.Generic.KeyValuePair<string, string>>
{
int global::System.Collections.Generic.ICollection<global::System.Collections.Generic.KeyValuePair<string, string>>.Count
{
get
{
return global::System.Runtime.InteropServices.WindowsRuntime.IMapSharedReferenceTypesRCWAdapter.Count(this);
}
}
bool global::System.Collections.Generic.ICollection<global::System.Collections.Generic.KeyValuePair<string, string>>.IsReadOnly
{
get
{
return global::System.Runtime.InteropServices.WindowsRuntime.IMapSharedReferenceTypesRCWAdapter.IsReadOnly(this);
}
}
void global::System.Collections.Generic.ICollection<global::System.Collections.Generic.KeyValuePair<string, string>>.Add(global::System.Collections.Generic.KeyValuePair<string, string> item)
{
global::System.Runtime.InteropServices.WindowsRuntime.IMapSharedReferenceTypesRCWAdapter.Add(
this,
item
);
}
void global::System.Collections.Generic.ICollection<global::System.Collections.Generic.KeyValuePair<string, string>>.Clear()
{
global::System.Runtime.InteropServices.WindowsRuntime.IMapSharedReferenceTypesRCWAdapter.Clear(this);
}
bool global::System.Collections.Generic.ICollection<global::System.Collections.Generic.KeyValuePair<string, string>>.Contains(global::System.Collections.Generic.KeyValuePair<string, string> item)
{
return global::System.Runtime.InteropServices.WindowsRuntime.IMapSharedReferenceTypesRCWAdapter.Contains(
this,
item
);
}
void global::System.Collections.Generic.ICollection<global::System.Collections.Generic.KeyValuePair<string, string>>.CopyTo(
global::System.Collections.Generic.KeyValuePair<string, string>[] array,
int arrayindex)
{
global::System.Runtime.InteropServices.WindowsRuntime.IMapSharedReferenceTypesRCWAdapter.CopyTo(
this,
array,
arrayindex
);
}
bool global::System.Collections.Generic.ICollection<global::System.Collections.Generic.KeyValuePair<string, string>>.Remove(global::System.Collections.Generic.KeyValuePair<string, string> item)
{
return global::System.Runtime.InteropServices.WindowsRuntime.IMapSharedReferenceTypesRCWAdapter.Remove(
this,
item
);
}
string global::System.Collections.Generic.IDictionary<string, string>.this[string index]
{
get
{
return global::System.Runtime.InteropServices.WindowsRuntime.IMapSharedReferenceTypesRCWAdapter.Indexer_Get(
this,
index
);
}
set
{
global::System.Runtime.InteropServices.WindowsRuntime.IMapSharedReferenceTypesRCWAdapter.Indexer_Set(
this,
index,
value
);
}
}
global::System.Collections.Generic.ICollection<string> global::System.Collections.Generic.IDictionary<string, string>.Keys
{
get
{
return global::System.Runtime.InteropServices.WindowsRuntime.IMapSharedReferenceTypesRCWAdapter.Keys(this);
}
}
global::System.Collections.Generic.ICollection<string> global::System.Collections.Generic.IDictionary<string, string>.Values
{
get
{
return global::System.Runtime.InteropServices.WindowsRuntime.IMapSharedReferenceTypesRCWAdapter.Values(this);
}
}
void global::System.Collections.Generic.IDictionary<string, string>.Add(
string key,
string value)
{
global::System.Runtime.InteropServices.WindowsRuntime.IMapSharedReferenceTypesRCWAdapter.Add(
this,
key,
value
);
}
bool global::System.Collections.Generic.IDictionary<string, string>.ContainsKey(string key)
{
return global::System.Runtime.InteropServices.WindowsRuntime.IMapSharedReferenceTypesRCWAdapter.ContainsKey(
this,
key
);
}
bool global::System.Collections.Generic.IDictionary<string, string>.Remove(string key)
{
return global::System.Runtime.InteropServices.WindowsRuntime.IMapSharedReferenceTypesRCWAdapter.Remove(
this,
key
);
}
bool global::System.Collections.Generic.IDictionary<string, string>.TryGetValue(
string key,
out string value)
{
return global::System.Runtime.InteropServices.WindowsRuntime.IMapSharedReferenceTypesRCWAdapter.TryGetValue(
this,
key,
out value
);
}
global::System.Collections.Generic.IEnumerator<global::System.Collections.Generic.KeyValuePair<string, string>> global::System.Collections.Generic.IEnumerable<global::System.Collections.Generic.KeyValuePair<string, string>>.GetEnumerator()
{
return (global::System.Collections.Generic.IEnumerator<global::System.Collections.Generic.KeyValuePair<string, string>>)global::McgInterop.McgHelpers.GetGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::System.Collections.Generic.KeyValuePair<string, string>>).TypeHandle
);
}
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
{
return global::McgInterop.McgHelpers.GetNonGenericEnumerator(
this,
typeof(global::System.Collections.Generic.IEnumerable<global::System.Collections.Generic.KeyValuePair<string, string>>).TypeHandle
);
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventAdd, "Windows.Foundation.Collections.IObservableMap`2.MapChanged")]
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken global::Windows.Foundation.Collections.IObservableMap<string, string>.add_MapChanged(global::Windows.Foundation.Collections.MapChangedEventHandler<string, string> vhnd)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __retVal = global::Windows.Foundation.Collections.IObservableMap_A_string_j_string_V___Impl.StubClass.add_MapChanged(
this,
vhnd
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventRemove, "Windows.Foundation.Collections.IObservableMap`2.MapChanged")]
void global::Windows.Foundation.Collections.IObservableMap<string, string>.remove_MapChanged(global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::Windows.Foundation.Collections.IObservableMap_A_string_j_string_V___Impl.StubClass.remove_MapChanged(
this,
token
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// v-table for 'Windows.Foundation.Collections.IObservableMap<string,string>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IObservableMap<string, string>))]
public unsafe partial struct Vtbl
{
internal const int idx_add_MapChanged = 6;
internal const int idx_remove_MapChanged = 7;
}
}
// Windows.Foundation.Collections.IIterator<System.Collections.Generic.KeyValuePair<string,Windows.ApplicationModel.Resources.Core.NamedResource>>
public unsafe static class IIterator_A_System_Collections_Generic_KeyValuePair_A_string_j_Windows_ApplicationModel_Resources_Core_NamedResource_V__V___Impl
{
// StubClass for 'Windows.Foundation.Collections.IIterator<System.Collections.Generic.KeyValuePair<string,Windows.ApplicationModel.Resources.Core.NamedResource>>'
public static partial class StubClass
{
// Signature, Windows.Foundation.Collections.IIterator<System.Collections.Generic.KeyValuePair<string,Windows.ApplicationModel.Resources.Core.NamedResource>>.get_Current, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.WinRTKeyValuePairMarshaller] System_Collections_Generic_KeyValuePair_2_string__Windows_ApplicationModel_Resources_Core_NamedResource___Windows_Foundation_Collections__IKeyValuePair_A_string_j_Windows_ApplicationModel_Resources_Core_NamedResource_V_ *,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Collections.Generic.KeyValuePair<string, global::Windows.ApplicationModel.Resources.Core.NamedResource> get_Current(global::System.__ComObject __this)
{
// Setup
global::System.Collections.Generic.KeyValuePair_A_string_j_Windows_ApplicationModel_Resources_Core_NamedResource_V___Impl.Vtbl** unsafe___value__retval = default(global::System.Collections.Generic.KeyValuePair_A_string_j_Windows_ApplicationModel_Resources_Core_NamedResource_V___Impl.Vtbl**);
global::System.Collections.Generic.KeyValuePair<string, global::Windows.ApplicationModel.Resources.Core.NamedResource> __value__retval = default(global::System.Collections.Generic.KeyValuePair<string, global::Windows.ApplicationModel.Resources.Core.NamedResource>);
int unsafe___return__;
try
{
// Marshalling
unsafe___value__retval = null;
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.Foundation.Collections.IIterator<global::System.Collections.Generic.KeyValuePair<string, global::Windows.ApplicationModel.Resources.Core.NamedResource>>).TypeHandle,
global::Windows.Foundation.Collections.IIterator_A_System_Collections_Generic_KeyValuePair_A_string_j_Windows_ApplicationModel_Resources_Core_NamedResource_V__V___Impl.Vtbl.idx_get_Current,
&(unsafe___value__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
global::Windows.Foundation.Collections.IKeyValuePair<string, global::Windows.ApplicationModel.Resources.Core.NamedResource> pair___value__retval = ((global::Windows.Foundation.Collections.IKeyValuePair<string, global::Windows.ApplicationModel.Resources.Core.NamedResource>)global::System.Runtime.InteropServices.McgModuleManager.ComInterfaceToObject_NoUnboxing(
((global::System.IntPtr)unsafe___value__retval),
typeof(global::Windows.Foundation.Collections.IKeyValuePair<string, global::Windows.ApplicationModel.Resources.Core.NamedResource>).TypeHandle
));
__value__retval = new global::System.Collections.Generic.KeyValuePair<string, global::Windows.ApplicationModel.Resources.Core.NamedResource>(pair___value__retval.get_Key(), pair___value__retval.get_Value());
// Return
return __value__retval;
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe___value__retval)));
}
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool get_HasCurrent(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.Foundation.Collections.IIterator<global::System.Collections.Generic.KeyValuePair<string, global::Windows.ApplicationModel.Resources.Core.NamedResource>>>(
__this,
global::Windows.Foundation.Collections.IIterator_A_System_Collections_Generic_KeyValuePair_A_string_j_Windows_ApplicationModel_Resources_Core_NamedResource_V__V___Impl.Vtbl.idx_get_HasCurrent
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool MoveNext(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.Foundation.Collections.IIterator<global::System.Collections.Generic.KeyValuePair<string, global::Windows.ApplicationModel.Resources.Core.NamedResource>>>(
__this,
global::Windows.Foundation.Collections.IIterator_A_System_Collections_Generic_KeyValuePair_A_string_j_Windows_ApplicationModel_Resources_Core_NamedResource_V__V___Impl.Vtbl.idx_MoveNext
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
// Signature, Windows.Foundation.Collections.IIterator<System.Collections.Generic.KeyValuePair<string,Windows.ApplicationModel.Resources.Core.NamedResource>>.GetMany, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [out] [Mcg.CodeGen.ArrayMarshaller] rg_System_Collections_Generic_KeyValuePair_2_string__Windows_ApplicationModel_Resources_Core_NamedResource___Windows_Foundation_Collections__IKeyValuePair_A_string_j_Windows_ApplicationModel_Resources_Core_NamedResource_V_ * *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] uint__unsigned int,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static uint GetMany(
global::System.__ComObject __this,
global::System.Collections.Generic.KeyValuePair<string, global::Windows.ApplicationModel.Resources.Core.NamedResource>[] items)
{
// Setup
uint unsafe_items_mcgLength = 0;
global::System.Collections.Generic.KeyValuePair_A_string_j_Windows_ApplicationModel_Resources_Core_NamedResource_V___Impl.Vtbl*** unsafe_items = default(global::System.Collections.Generic.KeyValuePair_A_string_j_Windows_ApplicationModel_Resources_Core_NamedResource_V___Impl.Vtbl***);
uint unsafe___value__retval;
uint __value__retval;
int unsafe___return__;
try
{
// Marshalling
if (items != null)
unsafe_items_mcgLength = (uint)items.Length;
if (items != null)
unsafe_items = (global::System.Collections.Generic.KeyValuePair_A_string_j_Windows_ApplicationModel_Resources_Core_NamedResource_V___Impl.Vtbl***)global::McgInterop.McgHelpers.CoTaskMemAllocAndZeroMemory(((global::System.IntPtr)checked(unsafe_items_mcgLength * sizeof(global::System.Collections.Generic.KeyValuePair_A_string_j_Windows_ApplicationModel_Resources_Core_NamedResource_V___Impl.Vtbl**))));
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.Foundation.Collections.IIterator<global::System.Collections.Generic.KeyValuePair<string, global::Windows.ApplicationModel.Resources.Core.NamedResource>>).TypeHandle,
global::Windows.Foundation.Collections.IIterator_A_System_Collections_Generic_KeyValuePair_A_string_j_Windows_ApplicationModel_Resources_Core_NamedResource_V__V___Impl.Vtbl.idx_GetMany,
unsafe_items_mcgLength,
unsafe_items,
&(unsafe___value__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
__value__retval = unsafe___value__retval;
if (items != null)
for (uint mcgIdx = 0; (mcgIdx < unsafe_items_mcgLength); mcgIdx++)
{
// [fwd] [out] [optional] [Mcg.CodeGen.WinRTKeyValuePairMarshaller] System_Collections_Generic_KeyValuePair_2_string__Windows_ApplicationModel_Resources_Core_NamedResource___Windows_Foundation_Collections__IKeyValuePair_A_string_j_Windows_ApplicationModel_Resources_Core_NamedResource_V_ * items
global::Windows.Foundation.Collections.IKeyValuePair<string, global::Windows.ApplicationModel.Resources.Core.NamedResource> pair_items = ((global::Windows.Foundation.Collections.IKeyValuePair<string, global::Windows.ApplicationModel.Resources.Core.NamedResource>)global::System.Runtime.InteropServices.McgModuleManager.ComInterfaceToObject_NoUnboxing(
((global::System.IntPtr)unsafe_items[mcgIdx]),
typeof(global::Windows.Foundation.Collections.IKeyValuePair<string, global::Windows.ApplicationModel.Resources.Core.NamedResource>).TypeHandle
));
items[mcgIdx] = new global::System.Collections.Generic.KeyValuePair<string, global::Windows.ApplicationModel.Resources.Core.NamedResource>(pair_items.get_Key(), pair_items.get_Value());
}
// Return
return __value__retval;
}
finally
{
// Cleanup
if (unsafe_items != null)
for (uint mcgIdx_1 = 0; (mcgIdx_1 < unsafe_items_mcgLength); mcgIdx_1++)
{
// [fwd] [in] [out] [optional] [Mcg.CodeGen.WinRTKeyValuePairMarshaller] System_Collections_Generic_KeyValuePair_2_string__Windows_ApplicationModel_Resources_Core_NamedResource___Windows_Foundation_Collections__IKeyValuePair_A_string_j_Windows_ApplicationModel_Resources_Core_NamedResource_V_ * items
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_items[mcgIdx_1])));
}
global::System.Runtime.InteropServices.ExternalInterop.SafeCoTaskMemFree(unsafe_items);
}
}
}
// DispatchClass for 'Windows.Foundation.Collections.IIterator<System.Collections.Generic.KeyValuePair<string,Windows.ApplicationModel.Resources.Core.NamedResource>>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IIterator<global::System.Collections.Generic.KeyValuePair<string, global::Windows.ApplicationModel.Resources.Core.NamedResource>>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Foundation.Collections.IIterator<global::System.Collections.Generic.KeyValuePair<string, global::Windows.ApplicationModel.Resources.Core.NamedResource>>
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IIterator`1.Current")]
global::System.Collections.Generic.KeyValuePair<string, global::Windows.ApplicationModel.Resources.Core.NamedResource> global::Windows.Foundation.Collections.IIterator<global::System.Collections.Generic.KeyValuePair<string, global::Windows.ApplicationModel.Resources.Core.NamedResource>>.get_Current()
{
global::System.Collections.Generic.KeyValuePair<string, global::Windows.ApplicationModel.Resources.Core.NamedResource> __retVal = global::Windows.Foundation.Collections.IIterator_A_System_Collections_Generic_KeyValuePair_A_string_j_Windows_ApplicationModel_Resources_Core_NamedResource_V__V___Impl.StubClass.get_Current(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IIterator`1.HasCurrent")]
bool global::Windows.Foundation.Collections.IIterator<global::System.Collections.Generic.KeyValuePair<string, global::Windows.ApplicationModel.Resources.Core.NamedResource>>.get_HasCurrent()
{
bool __retVal = global::Windows.Foundation.Collections.IIterator_A_System_Collections_Generic_KeyValuePair_A_string_j_Windows_ApplicationModel_Resources_Core_NamedResource_V__V___Impl.StubClass.get_HasCurrent(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
bool global::Windows.Foundation.Collections.IIterator<global::System.Collections.Generic.KeyValuePair<string, global::Windows.ApplicationModel.Resources.Core.NamedResource>>.MoveNext()
{
bool __retVal = global::Windows.Foundation.Collections.IIterator_A_System_Collections_Generic_KeyValuePair_A_string_j_Windows_ApplicationModel_Resources_Core_NamedResource_V__V___Impl.StubClass.MoveNext(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
uint global::Windows.Foundation.Collections.IIterator<global::System.Collections.Generic.KeyValuePair<string, global::Windows.ApplicationModel.Resources.Core.NamedResource>>.GetMany(global::System.Collections.Generic.KeyValuePair<string, global::Windows.ApplicationModel.Resources.Core.NamedResource>[] items)
{
uint __retVal = global::Windows.Foundation.Collections.IIterator_A_System_Collections_Generic_KeyValuePair_A_string_j_Windows_ApplicationModel_Resources_Core_NamedResource_V__V___Impl.StubClass.GetMany(
this,
items
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.Foundation.Collections.IIterator<System.Collections.Generic.KeyValuePair<string,Windows.ApplicationModel.Resources.Core.NamedResource>>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IIterator<global::System.Collections.Generic.KeyValuePair<string, global::Windows.ApplicationModel.Resources.Core.NamedResource>>))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Current = 6;
internal const int idx_get_HasCurrent = 7;
internal const int idx_MoveNext = 8;
internal const int idx_GetMany = 9;
}
}
// Windows.Foundation.Collections.IIterator<Windows.Devices.Enumeration.DeviceInformation>
public unsafe static class IIterator_A_Windows_Devices_Enumeration_DeviceInformation_V___Impl
{
// StubClass for 'Windows.Foundation.Collections.IIterator<Windows.Devices.Enumeration.DeviceInformation>'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.Devices.Enumeration.DeviceInformation get_Current(global::System.__ComObject __this)
{
global::Windows.Devices.Enumeration.DeviceInformation __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.Foundation.Collections.IIterator<global::Windows.Devices.Enumeration.DeviceInformation>, global::Windows.Devices.Enumeration.DeviceInformation>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_Devices_Enumeration_DeviceInformation_V___Impl.Vtbl.idx_get_Current
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool get_HasCurrent(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.Foundation.Collections.IIterator<global::Windows.Devices.Enumeration.DeviceInformation>>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_Devices_Enumeration_DeviceInformation_V___Impl.Vtbl.idx_get_HasCurrent
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool MoveNext(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.Foundation.Collections.IIterator<global::Windows.Devices.Enumeration.DeviceInformation>>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_Devices_Enumeration_DeviceInformation_V___Impl.Vtbl.idx_MoveNext
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
// Signature, Windows.Foundation.Collections.IIterator<Windows.Devices.Enumeration.DeviceInformation>.GetMany, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [out] [Mcg.CodeGen.ArrayMarshaller] rg_Windows_Devices_Enumeration_DeviceInformation__Windows_Devices_Enumeration__DeviceInformation * *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] uint__unsigned int,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static uint GetMany(
global::System.__ComObject __this,
global::Windows.Devices.Enumeration.DeviceInformation[] items)
{
// Setup
uint unsafe_items_mcgLength = 0;
global::Windows.Devices.Enumeration.IDeviceInformation__Impl.Vtbl*** unsafe_items = default(global::Windows.Devices.Enumeration.IDeviceInformation__Impl.Vtbl***);
uint unsafe___value__retval;
uint __value__retval;
int unsafe___return__;
try
{
// Marshalling
if (items != null)
unsafe_items_mcgLength = (uint)items.Length;
if (items != null)
unsafe_items = (global::Windows.Devices.Enumeration.IDeviceInformation__Impl.Vtbl***)global::McgInterop.McgHelpers.CoTaskMemAllocAndZeroMemory(((global::System.IntPtr)checked(unsafe_items_mcgLength * sizeof(global::Windows.Devices.Enumeration.IDeviceInformation__Impl.Vtbl**))));
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.Devices.Enumeration.DeviceInformation>).TypeHandle,
global::Windows.Foundation.Collections.IIterator_A_Windows_Devices_Enumeration_DeviceInformation_V___Impl.Vtbl.idx_GetMany,
unsafe_items_mcgLength,
unsafe_items,
&(unsafe___value__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
__value__retval = unsafe___value__retval;
if (items != null)
for (uint mcgIdx = 0; (mcgIdx < unsafe_items_mcgLength); mcgIdx++)
{
// [fwd] [out] [optional] [Mcg.CodeGen.WinRTClassMarshaller] Windows_Devices_Enumeration_DeviceInformation__Windows_Devices_Enumeration__DeviceInformation * items
items[mcgIdx] = (global::Windows.Devices.Enumeration.DeviceInformation)global::System.Runtime.InteropServices.McgModuleManager.ComInterfaceToObject(
((global::System.IntPtr)unsafe_items[mcgIdx]),
typeof(global::Windows.Devices.Enumeration.DeviceInformation).TypeHandle
);
}
// Return
return __value__retval;
}
finally
{
// Cleanup
if (unsafe_items != null)
for (uint mcgIdx_1 = 0; (mcgIdx_1 < unsafe_items_mcgLength); mcgIdx_1++)
{
// [fwd] [in] [out] [optional] [Mcg.CodeGen.WinRTClassMarshaller] Windows_Devices_Enumeration_DeviceInformation__Windows_Devices_Enumeration__DeviceInformation * items
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_items[mcgIdx_1])));
}
global::System.Runtime.InteropServices.ExternalInterop.SafeCoTaskMemFree(unsafe_items);
}
}
}
// DispatchClass for 'Windows.Foundation.Collections.IIterator<Windows.Devices.Enumeration.DeviceInformation>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.Devices.Enumeration.DeviceInformation>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Foundation.Collections.IIterator<global::Windows.Devices.Enumeration.DeviceInformation>
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IIterator`1.Current")]
global::Windows.Devices.Enumeration.DeviceInformation global::Windows.Foundation.Collections.IIterator<global::Windows.Devices.Enumeration.DeviceInformation>.get_Current()
{
global::Windows.Devices.Enumeration.DeviceInformation __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_Devices_Enumeration_DeviceInformation_V___Impl.StubClass.get_Current(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IIterator`1.HasCurrent")]
bool global::Windows.Foundation.Collections.IIterator<global::Windows.Devices.Enumeration.DeviceInformation>.get_HasCurrent()
{
bool __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_Devices_Enumeration_DeviceInformation_V___Impl.StubClass.get_HasCurrent(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
bool global::Windows.Foundation.Collections.IIterator<global::Windows.Devices.Enumeration.DeviceInformation>.MoveNext()
{
bool __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_Devices_Enumeration_DeviceInformation_V___Impl.StubClass.MoveNext(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
uint global::Windows.Foundation.Collections.IIterator<global::Windows.Devices.Enumeration.DeviceInformation>.GetMany(global::Windows.Devices.Enumeration.DeviceInformation[] items)
{
uint __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_Devices_Enumeration_DeviceInformation_V___Impl.StubClass.GetMany(
this,
items
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.Foundation.Collections.IIterator<Windows.Devices.Enumeration.DeviceInformation>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.Devices.Enumeration.DeviceInformation>))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Current = 6;
internal const int idx_get_HasCurrent = 7;
internal const int idx_MoveNext = 8;
internal const int idx_GetMany = 9;
}
}
// Windows.Foundation.Collections.IIterator<Windows.ApplicationModel.Resources.Core.NamedResource>
public unsafe static class IIterator_A_Windows_ApplicationModel_Resources_Core_NamedResource_V___Impl
{
// StubClass for 'Windows.Foundation.Collections.IIterator<Windows.ApplicationModel.Resources.Core.NamedResource>'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.ApplicationModel.Resources.Core.NamedResource get_Current(global::System.__ComObject __this)
{
global::Windows.ApplicationModel.Resources.Core.NamedResource __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.Foundation.Collections.IIterator<global::Windows.ApplicationModel.Resources.Core.NamedResource>, global::Windows.ApplicationModel.Resources.Core.NamedResource>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_ApplicationModel_Resources_Core_NamedResource_V___Impl.Vtbl.idx_get_Current
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool get_HasCurrent(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.Foundation.Collections.IIterator<global::Windows.ApplicationModel.Resources.Core.NamedResource>>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_ApplicationModel_Resources_Core_NamedResource_V___Impl.Vtbl.idx_get_HasCurrent
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool MoveNext(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.Foundation.Collections.IIterator<global::Windows.ApplicationModel.Resources.Core.NamedResource>>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_ApplicationModel_Resources_Core_NamedResource_V___Impl.Vtbl.idx_MoveNext
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
// Signature, Windows.Foundation.Collections.IIterator<Windows.ApplicationModel.Resources.Core.NamedResource>.GetMany, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [out] [Mcg.CodeGen.ArrayMarshaller] rg_Windows_ApplicationModel_Resources_Core_NamedResource__Windows_ApplicationModel_Resources_Core__NamedResource * *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] uint__unsigned int,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static uint GetMany(
global::System.__ComObject __this,
global::Windows.ApplicationModel.Resources.Core.NamedResource[] items)
{
// Setup
uint unsafe_items_mcgLength = 0;
global::Windows.ApplicationModel.Resources.Core.INamedResource__Impl.Vtbl*** unsafe_items = default(global::Windows.ApplicationModel.Resources.Core.INamedResource__Impl.Vtbl***);
uint unsafe___value__retval;
uint __value__retval;
int unsafe___return__;
try
{
// Marshalling
if (items != null)
unsafe_items_mcgLength = (uint)items.Length;
if (items != null)
unsafe_items = (global::Windows.ApplicationModel.Resources.Core.INamedResource__Impl.Vtbl***)global::McgInterop.McgHelpers.CoTaskMemAllocAndZeroMemory(((global::System.IntPtr)checked(unsafe_items_mcgLength * sizeof(global::Windows.ApplicationModel.Resources.Core.INamedResource__Impl.Vtbl**))));
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.ApplicationModel.Resources.Core.NamedResource>).TypeHandle,
global::Windows.Foundation.Collections.IIterator_A_Windows_ApplicationModel_Resources_Core_NamedResource_V___Impl.Vtbl.idx_GetMany,
unsafe_items_mcgLength,
unsafe_items,
&(unsafe___value__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
__value__retval = unsafe___value__retval;
if (items != null)
for (uint mcgIdx = 0; (mcgIdx < unsafe_items_mcgLength); mcgIdx++)
{
// [fwd] [out] [optional] [Mcg.CodeGen.WinRTClassMarshaller] Windows_ApplicationModel_Resources_Core_NamedResource__Windows_ApplicationModel_Resources_Core__NamedResource * items
items[mcgIdx] = (global::Windows.ApplicationModel.Resources.Core.NamedResource)global::System.Runtime.InteropServices.McgModuleManager.ComInterfaceToObject(
((global::System.IntPtr)unsafe_items[mcgIdx]),
typeof(global::Windows.ApplicationModel.Resources.Core.NamedResource).TypeHandle
);
}
// Return
return __value__retval;
}
finally
{
// Cleanup
if (unsafe_items != null)
for (uint mcgIdx_1 = 0; (mcgIdx_1 < unsafe_items_mcgLength); mcgIdx_1++)
{
// [fwd] [in] [out] [optional] [Mcg.CodeGen.WinRTClassMarshaller] Windows_ApplicationModel_Resources_Core_NamedResource__Windows_ApplicationModel_Resources_Core__NamedResource * items
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_items[mcgIdx_1])));
}
global::System.Runtime.InteropServices.ExternalInterop.SafeCoTaskMemFree(unsafe_items);
}
}
}
// DispatchClass for 'Windows.Foundation.Collections.IIterator<Windows.ApplicationModel.Resources.Core.NamedResource>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.ApplicationModel.Resources.Core.NamedResource>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Foundation.Collections.IIterator<global::Windows.ApplicationModel.Resources.Core.NamedResource>
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IIterator`1.Current")]
global::Windows.ApplicationModel.Resources.Core.NamedResource global::Windows.Foundation.Collections.IIterator<global::Windows.ApplicationModel.Resources.Core.NamedResource>.get_Current()
{
global::Windows.ApplicationModel.Resources.Core.NamedResource __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_ApplicationModel_Resources_Core_NamedResource_V___Impl.StubClass.get_Current(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IIterator`1.HasCurrent")]
bool global::Windows.Foundation.Collections.IIterator<global::Windows.ApplicationModel.Resources.Core.NamedResource>.get_HasCurrent()
{
bool __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_ApplicationModel_Resources_Core_NamedResource_V___Impl.StubClass.get_HasCurrent(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
bool global::Windows.Foundation.Collections.IIterator<global::Windows.ApplicationModel.Resources.Core.NamedResource>.MoveNext()
{
bool __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_ApplicationModel_Resources_Core_NamedResource_V___Impl.StubClass.MoveNext(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
uint global::Windows.Foundation.Collections.IIterator<global::Windows.ApplicationModel.Resources.Core.NamedResource>.GetMany(global::Windows.ApplicationModel.Resources.Core.NamedResource[] items)
{
uint __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_ApplicationModel_Resources_Core_NamedResource_V___Impl.StubClass.GetMany(
this,
items
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.Foundation.Collections.IIterator<Windows.ApplicationModel.Resources.Core.NamedResource>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.ApplicationModel.Resources.Core.NamedResource>))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Current = 6;
internal const int idx_get_HasCurrent = 7;
internal const int idx_MoveNext = 8;
internal const int idx_GetMany = 9;
}
}
// Windows.Foundation.Collections.IIterator<Windows.ApplicationModel.Resources.Core.INamedResource>
public unsafe static class IIterator_A_Windows_ApplicationModel_Resources_Core_INamedResource_V___Impl
{
// StubClass for 'Windows.Foundation.Collections.IIterator<Windows.ApplicationModel.Resources.Core.INamedResource>'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.ApplicationModel.Resources.Core.INamedResource get_Current(global::System.__ComObject __this)
{
global::Windows.ApplicationModel.Resources.Core.INamedResource __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.Foundation.Collections.IIterator<global::Windows.ApplicationModel.Resources.Core.INamedResource>, global::Windows.ApplicationModel.Resources.Core.INamedResource>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_ApplicationModel_Resources_Core_INamedResource_V___Impl.Vtbl.idx_get_Current
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool get_HasCurrent(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.Foundation.Collections.IIterator<global::Windows.ApplicationModel.Resources.Core.INamedResource>>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_ApplicationModel_Resources_Core_INamedResource_V___Impl.Vtbl.idx_get_HasCurrent
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool MoveNext(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.Foundation.Collections.IIterator<global::Windows.ApplicationModel.Resources.Core.INamedResource>>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_ApplicationModel_Resources_Core_INamedResource_V___Impl.Vtbl.idx_MoveNext
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
// Signature, Windows.Foundation.Collections.IIterator<Windows.ApplicationModel.Resources.Core.INamedResource>.GetMany, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [out] [Mcg.CodeGen.ArrayMarshaller] rg_Windows_ApplicationModel_Resources_Core_INamedResource__Windows_ApplicationModel_Resources_Core__INamedResource * *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] uint__unsigned int,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static uint GetMany(
global::System.__ComObject __this,
global::Windows.ApplicationModel.Resources.Core.INamedResource[] items)
{
// Setup
uint unsafe_items_mcgLength = 0;
global::Windows.ApplicationModel.Resources.Core.INamedResource__Impl.Vtbl*** unsafe_items = default(global::Windows.ApplicationModel.Resources.Core.INamedResource__Impl.Vtbl***);
uint unsafe___value__retval;
uint __value__retval;
int unsafe___return__;
try
{
// Marshalling
if (items != null)
unsafe_items_mcgLength = (uint)items.Length;
if (items != null)
unsafe_items = (global::Windows.ApplicationModel.Resources.Core.INamedResource__Impl.Vtbl***)global::McgInterop.McgHelpers.CoTaskMemAllocAndZeroMemory(((global::System.IntPtr)checked(unsafe_items_mcgLength * sizeof(global::Windows.ApplicationModel.Resources.Core.INamedResource__Impl.Vtbl**))));
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.ApplicationModel.Resources.Core.INamedResource>).TypeHandle,
global::Windows.Foundation.Collections.IIterator_A_Windows_ApplicationModel_Resources_Core_INamedResource_V___Impl.Vtbl.idx_GetMany,
unsafe_items_mcgLength,
unsafe_items,
&(unsafe___value__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
__value__retval = unsafe___value__retval;
if (items != null)
for (uint mcgIdx = 0; (mcgIdx < unsafe_items_mcgLength); mcgIdx++)
{
// [fwd] [out] [optional] [Mcg.CodeGen.ComInterfaceMarshaller] Windows_ApplicationModel_Resources_Core_INamedResource__Windows_ApplicationModel_Resources_Core__INamedResource * items
items[mcgIdx] = (global::Windows.ApplicationModel.Resources.Core.INamedResource)global::System.Runtime.InteropServices.McgModuleManager.ComInterfaceToObject(
((global::System.IntPtr)unsafe_items[mcgIdx]),
typeof(global::Windows.ApplicationModel.Resources.Core.INamedResource).TypeHandle
);
}
// Return
return __value__retval;
}
finally
{
// Cleanup
if (unsafe_items != null)
for (uint mcgIdx_1 = 0; (mcgIdx_1 < unsafe_items_mcgLength); mcgIdx_1++)
{
// [fwd] [in] [out] [optional] [Mcg.CodeGen.ComInterfaceMarshaller] Windows_ApplicationModel_Resources_Core_INamedResource__Windows_ApplicationModel_Resources_Core__INamedResource * items
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_items[mcgIdx_1])));
}
global::System.Runtime.InteropServices.ExternalInterop.SafeCoTaskMemFree(unsafe_items);
}
}
}
// DispatchClass for 'Windows.Foundation.Collections.IIterator<Windows.ApplicationModel.Resources.Core.INamedResource>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.ApplicationModel.Resources.Core.INamedResource>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Foundation.Collections.IIterator<global::Windows.ApplicationModel.Resources.Core.INamedResource>
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IIterator`1.Current")]
global::Windows.ApplicationModel.Resources.Core.INamedResource global::Windows.Foundation.Collections.IIterator<global::Windows.ApplicationModel.Resources.Core.INamedResource>.get_Current()
{
global::Windows.ApplicationModel.Resources.Core.INamedResource __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_ApplicationModel_Resources_Core_INamedResource_V___Impl.StubClass.get_Current(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IIterator`1.HasCurrent")]
bool global::Windows.Foundation.Collections.IIterator<global::Windows.ApplicationModel.Resources.Core.INamedResource>.get_HasCurrent()
{
bool __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_ApplicationModel_Resources_Core_INamedResource_V___Impl.StubClass.get_HasCurrent(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
bool global::Windows.Foundation.Collections.IIterator<global::Windows.ApplicationModel.Resources.Core.INamedResource>.MoveNext()
{
bool __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_ApplicationModel_Resources_Core_INamedResource_V___Impl.StubClass.MoveNext(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
uint global::Windows.Foundation.Collections.IIterator<global::Windows.ApplicationModel.Resources.Core.INamedResource>.GetMany(global::Windows.ApplicationModel.Resources.Core.INamedResource[] items)
{
uint __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_ApplicationModel_Resources_Core_INamedResource_V___Impl.StubClass.GetMany(
this,
items
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.Foundation.Collections.IIterator<Windows.ApplicationModel.Resources.Core.INamedResource>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.ApplicationModel.Resources.Core.INamedResource>))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Current = 6;
internal const int idx_get_HasCurrent = 7;
internal const int idx_MoveNext = 8;
internal const int idx_GetMany = 9;
}
}
// Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Automation.Peers.IAutomationPeer>
public unsafe static class IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeer_V___Impl
{
// StubClass for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Automation.Peers.IAutomationPeer>'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer get_Current(global::System.__ComObject __this)
{
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer>, global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeer_V___Impl.Vtbl.idx_get_Current
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool get_HasCurrent(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer>>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeer_V___Impl.Vtbl.idx_get_HasCurrent
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool MoveNext(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer>>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeer_V___Impl.Vtbl.idx_MoveNext
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
// Signature, Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Automation.Peers.IAutomationPeer>.GetMany, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [out] [Mcg.CodeGen.ArrayMarshaller] rg_Windows_UI_Xaml_Automation_Peers_IAutomationPeer__Windows_UI_Xaml_Automation_Peers__IAutomationPeer * *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] uint__unsigned int,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static uint GetMany(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer[] items)
{
// Setup
uint unsafe_items_mcgLength = 0;
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer__Impl.Vtbl*** unsafe_items = default(global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer__Impl.Vtbl***);
uint unsafe___value__retval;
uint __value__retval;
int unsafe___return__;
try
{
// Marshalling
if (items != null)
unsafe_items_mcgLength = (uint)items.Length;
if (items != null)
unsafe_items = (global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer__Impl.Vtbl***)global::McgInterop.McgHelpers.CoTaskMemAllocAndZeroMemory(((global::System.IntPtr)checked(unsafe_items_mcgLength * sizeof(global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer__Impl.Vtbl**))));
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer>).TypeHandle,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeer_V___Impl.Vtbl.idx_GetMany,
unsafe_items_mcgLength,
unsafe_items,
&(unsafe___value__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
__value__retval = unsafe___value__retval;
if (items != null)
for (uint mcgIdx = 0; (mcgIdx < unsafe_items_mcgLength); mcgIdx++)
{
// [fwd] [out] [optional] [Mcg.CodeGen.ComInterfaceMarshaller] Windows_UI_Xaml_Automation_Peers_IAutomationPeer__Windows_UI_Xaml_Automation_Peers__IAutomationPeer * items
items[mcgIdx] = (global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer)global::System.Runtime.InteropServices.McgModuleManager.ComInterfaceToObject(
((global::System.IntPtr)unsafe_items[mcgIdx]),
typeof(global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer).TypeHandle
);
}
// Return
return __value__retval;
}
finally
{
// Cleanup
if (unsafe_items != null)
for (uint mcgIdx_1 = 0; (mcgIdx_1 < unsafe_items_mcgLength); mcgIdx_1++)
{
// [fwd] [in] [out] [optional] [Mcg.CodeGen.ComInterfaceMarshaller] Windows_UI_Xaml_Automation_Peers_IAutomationPeer__Windows_UI_Xaml_Automation_Peers__IAutomationPeer * items
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_items[mcgIdx_1])));
}
global::System.Runtime.InteropServices.ExternalInterop.SafeCoTaskMemFree(unsafe_items);
}
}
}
// DispatchClass for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Automation.Peers.IAutomationPeer>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer>
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IIterator`1.Current")]
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer>.get_Current()
{
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeer_V___Impl.StubClass.get_Current(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IIterator`1.HasCurrent")]
bool global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer>.get_HasCurrent()
{
bool __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeer_V___Impl.StubClass.get_HasCurrent(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
bool global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer>.MoveNext()
{
bool __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeer_V___Impl.StubClass.MoveNext(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
uint global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer>.GetMany(global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer[] items)
{
uint __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeer_V___Impl.StubClass.GetMany(
this,
items
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Automation.Peers.IAutomationPeer>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer>))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Current = 6;
internal const int idx_get_HasCurrent = 7;
internal const int idx_MoveNext = 8;
internal const int idx_GetMany = 9;
}
}
// Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides>
public unsafe static class IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeerOverrides_V___Impl
{
// StubClass for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides>'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides get_Current(global::System.__ComObject __this)
{
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides>, global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeerOverrides_V___Impl.Vtbl.idx_get_Current
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool get_HasCurrent(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides>>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeerOverrides_V___Impl.Vtbl.idx_get_HasCurrent
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool MoveNext(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides>>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeerOverrides_V___Impl.Vtbl.idx_MoveNext
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
// Signature, Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides>.GetMany, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [out] [Mcg.CodeGen.ArrayMarshaller] rg_Windows_UI_Xaml_Automation_Peers_IAutomationPeerOverrides__Windows_UI_Xaml_Automation_Peers__IAutomationPeerOverrides * *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] uint__unsigned int,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static uint GetMany(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides[] items)
{
// Setup
uint unsafe_items_mcgLength = 0;
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides__Impl.Vtbl*** unsafe_items = default(global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides__Impl.Vtbl***);
uint unsafe___value__retval;
uint __value__retval;
int unsafe___return__;
try
{
// Marshalling
if (items != null)
unsafe_items_mcgLength = (uint)items.Length;
if (items != null)
unsafe_items = (global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides__Impl.Vtbl***)global::McgInterop.McgHelpers.CoTaskMemAllocAndZeroMemory(((global::System.IntPtr)checked(unsafe_items_mcgLength * sizeof(global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides__Impl.Vtbl**))));
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides>).TypeHandle,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeerOverrides_V___Impl.Vtbl.idx_GetMany,
unsafe_items_mcgLength,
unsafe_items,
&(unsafe___value__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
__value__retval = unsafe___value__retval;
if (items != null)
for (uint mcgIdx = 0; (mcgIdx < unsafe_items_mcgLength); mcgIdx++)
{
// [fwd] [out] [optional] [Mcg.CodeGen.ComInterfaceMarshaller] Windows_UI_Xaml_Automation_Peers_IAutomationPeerOverrides__Windows_UI_Xaml_Automation_Peers__IAutomationPeerOverrides * items
items[mcgIdx] = (global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides)global::System.Runtime.InteropServices.McgModuleManager.ComInterfaceToObject(
((global::System.IntPtr)unsafe_items[mcgIdx]),
typeof(global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides).TypeHandle
);
}
// Return
return __value__retval;
}
finally
{
// Cleanup
if (unsafe_items != null)
for (uint mcgIdx_1 = 0; (mcgIdx_1 < unsafe_items_mcgLength); mcgIdx_1++)
{
// [fwd] [in] [out] [optional] [Mcg.CodeGen.ComInterfaceMarshaller] Windows_UI_Xaml_Automation_Peers_IAutomationPeerOverrides__Windows_UI_Xaml_Automation_Peers__IAutomationPeerOverrides * items
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_items[mcgIdx_1])));
}
global::System.Runtime.InteropServices.ExternalInterop.SafeCoTaskMemFree(unsafe_items);
}
}
}
// DispatchClass for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides>
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IIterator`1.Current")]
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides>.get_Current()
{
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeerOverrides_V___Impl.StubClass.get_Current(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IIterator`1.HasCurrent")]
bool global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides>.get_HasCurrent()
{
bool __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeerOverrides_V___Impl.StubClass.get_HasCurrent(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
bool global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides>.MoveNext()
{
bool __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeerOverrides_V___Impl.StubClass.MoveNext(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
uint global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides>.GetMany(global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides[] items)
{
uint __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeerOverrides_V___Impl.StubClass.GetMany(
this,
items
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides>))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Current = 6;
internal const int idx_get_HasCurrent = 7;
internal const int idx_MoveNext = 8;
internal const int idx_GetMany = 9;
}
}
// Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Automation.Peers.IAutomationPeerProtected>
public unsafe static class IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeerProtected_V___Impl
{
// StubClass for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Automation.Peers.IAutomationPeerProtected>'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerProtected get_Current(global::System.__ComObject __this)
{
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerProtected __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerProtected>, global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerProtected>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeerProtected_V___Impl.Vtbl.idx_get_Current
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool get_HasCurrent(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerProtected>>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeerProtected_V___Impl.Vtbl.idx_get_HasCurrent
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool MoveNext(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerProtected>>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeerProtected_V___Impl.Vtbl.idx_MoveNext
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
// Signature, Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Automation.Peers.IAutomationPeerProtected>.GetMany, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [out] [Mcg.CodeGen.ArrayMarshaller] rg_Windows_UI_Xaml_Automation_Peers_IAutomationPeerProtected__Windows_UI_Xaml_Automation_Peers__IAutomationPeerProtected * *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] uint__unsigned int,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static uint GetMany(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerProtected[] items)
{
// Setup
uint unsafe_items_mcgLength = 0;
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerProtected__Impl.Vtbl*** unsafe_items = default(global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerProtected__Impl.Vtbl***);
uint unsafe___value__retval;
uint __value__retval;
int unsafe___return__;
try
{
// Marshalling
if (items != null)
unsafe_items_mcgLength = (uint)items.Length;
if (items != null)
unsafe_items = (global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerProtected__Impl.Vtbl***)global::McgInterop.McgHelpers.CoTaskMemAllocAndZeroMemory(((global::System.IntPtr)checked(unsafe_items_mcgLength * sizeof(global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerProtected__Impl.Vtbl**))));
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerProtected>).TypeHandle,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeerProtected_V___Impl.Vtbl.idx_GetMany,
unsafe_items_mcgLength,
unsafe_items,
&(unsafe___value__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
__value__retval = unsafe___value__retval;
if (items != null)
for (uint mcgIdx = 0; (mcgIdx < unsafe_items_mcgLength); mcgIdx++)
{
// [fwd] [out] [optional] [Mcg.CodeGen.ComInterfaceMarshaller] Windows_UI_Xaml_Automation_Peers_IAutomationPeerProtected__Windows_UI_Xaml_Automation_Peers__IAutomationPeerProtected * items
items[mcgIdx] = (global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerProtected)global::System.Runtime.InteropServices.McgModuleManager.ComInterfaceToObject(
((global::System.IntPtr)unsafe_items[mcgIdx]),
typeof(global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerProtected).TypeHandle
);
}
// Return
return __value__retval;
}
finally
{
// Cleanup
if (unsafe_items != null)
for (uint mcgIdx_1 = 0; (mcgIdx_1 < unsafe_items_mcgLength); mcgIdx_1++)
{
// [fwd] [in] [out] [optional] [Mcg.CodeGen.ComInterfaceMarshaller] Windows_UI_Xaml_Automation_Peers_IAutomationPeerProtected__Windows_UI_Xaml_Automation_Peers__IAutomationPeerProtected * items
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_items[mcgIdx_1])));
}
global::System.Runtime.InteropServices.ExternalInterop.SafeCoTaskMemFree(unsafe_items);
}
}
}
// DispatchClass for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Automation.Peers.IAutomationPeerProtected>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerProtected>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerProtected>
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IIterator`1.Current")]
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerProtected global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerProtected>.get_Current()
{
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerProtected __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeerProtected_V___Impl.StubClass.get_Current(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IIterator`1.HasCurrent")]
bool global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerProtected>.get_HasCurrent()
{
bool __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeerProtected_V___Impl.StubClass.get_HasCurrent(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
bool global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerProtected>.MoveNext()
{
bool __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeerProtected_V___Impl.StubClass.MoveNext(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
uint global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerProtected>.GetMany(global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerProtected[] items)
{
uint __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeerProtected_V___Impl.StubClass.GetMany(
this,
items
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Automation.Peers.IAutomationPeerProtected>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerProtected>))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Current = 6;
internal const int idx_get_HasCurrent = 7;
internal const int idx_MoveNext = 8;
internal const int idx_GetMany = 9;
}
}
// Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Automation.Peers.IAutomationPeer2>
public unsafe static class IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeer2_V___Impl
{
// StubClass for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Automation.Peers.IAutomationPeer2>'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer2 get_Current(global::System.__ComObject __this)
{
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer2 __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer2>, global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer2>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeer2_V___Impl.Vtbl.idx_get_Current
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool get_HasCurrent(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer2>>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeer2_V___Impl.Vtbl.idx_get_HasCurrent
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool MoveNext(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer2>>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeer2_V___Impl.Vtbl.idx_MoveNext
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
// Signature, Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Automation.Peers.IAutomationPeer2>.GetMany, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [out] [Mcg.CodeGen.ArrayMarshaller] rg_Windows_UI_Xaml_Automation_Peers_IAutomationPeer2__Windows_UI_Xaml_Automation_Peers__IAutomationPeer2 * *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] uint__unsigned int,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static uint GetMany(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer2[] items)
{
// Setup
uint unsafe_items_mcgLength = 0;
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer2__Impl.Vtbl*** unsafe_items = default(global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer2__Impl.Vtbl***);
uint unsafe___value__retval;
uint __value__retval;
int unsafe___return__;
try
{
// Marshalling
if (items != null)
unsafe_items_mcgLength = (uint)items.Length;
if (items != null)
unsafe_items = (global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer2__Impl.Vtbl***)global::McgInterop.McgHelpers.CoTaskMemAllocAndZeroMemory(((global::System.IntPtr)checked(unsafe_items_mcgLength * sizeof(global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer2__Impl.Vtbl**))));
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer2>).TypeHandle,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeer2_V___Impl.Vtbl.idx_GetMany,
unsafe_items_mcgLength,
unsafe_items,
&(unsafe___value__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
__value__retval = unsafe___value__retval;
if (items != null)
for (uint mcgIdx = 0; (mcgIdx < unsafe_items_mcgLength); mcgIdx++)
{
// [fwd] [out] [optional] [Mcg.CodeGen.ComInterfaceMarshaller] Windows_UI_Xaml_Automation_Peers_IAutomationPeer2__Windows_UI_Xaml_Automation_Peers__IAutomationPeer2 * items
items[mcgIdx] = (global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer2)global::System.Runtime.InteropServices.McgModuleManager.ComInterfaceToObject(
((global::System.IntPtr)unsafe_items[mcgIdx]),
typeof(global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer2).TypeHandle
);
}
// Return
return __value__retval;
}
finally
{
// Cleanup
if (unsafe_items != null)
for (uint mcgIdx_1 = 0; (mcgIdx_1 < unsafe_items_mcgLength); mcgIdx_1++)
{
// [fwd] [in] [out] [optional] [Mcg.CodeGen.ComInterfaceMarshaller] Windows_UI_Xaml_Automation_Peers_IAutomationPeer2__Windows_UI_Xaml_Automation_Peers__IAutomationPeer2 * items
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_items[mcgIdx_1])));
}
global::System.Runtime.InteropServices.ExternalInterop.SafeCoTaskMemFree(unsafe_items);
}
}
}
// DispatchClass for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Automation.Peers.IAutomationPeer2>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer2>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer2>
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IIterator`1.Current")]
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer2 global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer2>.get_Current()
{
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer2 __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeer2_V___Impl.StubClass.get_Current(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IIterator`1.HasCurrent")]
bool global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer2>.get_HasCurrent()
{
bool __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeer2_V___Impl.StubClass.get_HasCurrent(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
bool global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer2>.MoveNext()
{
bool __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeer2_V___Impl.StubClass.MoveNext(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
uint global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer2>.GetMany(global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer2[] items)
{
uint __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeer2_V___Impl.StubClass.GetMany(
this,
items
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Automation.Peers.IAutomationPeer2>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer2>))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Current = 6;
internal const int idx_get_HasCurrent = 7;
internal const int idx_MoveNext = 8;
internal const int idx_GetMany = 9;
}
}
// Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides2>
public unsafe static class IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeerOverrides2_V___Impl
{
// StubClass for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides2>'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides2 get_Current(global::System.__ComObject __this)
{
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides2 __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides2>, global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides2>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeerOverrides2_V___Impl.Vtbl.idx_get_Current
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool get_HasCurrent(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides2>>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeerOverrides2_V___Impl.Vtbl.idx_get_HasCurrent
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool MoveNext(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides2>>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeerOverrides2_V___Impl.Vtbl.idx_MoveNext
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
// Signature, Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides2>.GetMany, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [out] [Mcg.CodeGen.ArrayMarshaller] rg_Windows_UI_Xaml_Automation_Peers_IAutomationPeerOverrides2__Windows_UI_Xaml_Automation_Peers__IAutomationPeerOverrides2 * *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] uint__unsigned int,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static uint GetMany(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides2[] items)
{
// Setup
uint unsafe_items_mcgLength = 0;
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides2__Impl.Vtbl*** unsafe_items = default(global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides2__Impl.Vtbl***);
uint unsafe___value__retval;
uint __value__retval;
int unsafe___return__;
try
{
// Marshalling
if (items != null)
unsafe_items_mcgLength = (uint)items.Length;
if (items != null)
unsafe_items = (global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides2__Impl.Vtbl***)global::McgInterop.McgHelpers.CoTaskMemAllocAndZeroMemory(((global::System.IntPtr)checked(unsafe_items_mcgLength * sizeof(global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides2__Impl.Vtbl**))));
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides2>).TypeHandle,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeerOverrides2_V___Impl.Vtbl.idx_GetMany,
unsafe_items_mcgLength,
unsafe_items,
&(unsafe___value__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
__value__retval = unsafe___value__retval;
if (items != null)
for (uint mcgIdx = 0; (mcgIdx < unsafe_items_mcgLength); mcgIdx++)
{
// [fwd] [out] [optional] [Mcg.CodeGen.ComInterfaceMarshaller] Windows_UI_Xaml_Automation_Peers_IAutomationPeerOverrides2__Windows_UI_Xaml_Automation_Peers__IAutomationPeerOverrides2 * items
items[mcgIdx] = (global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides2)global::System.Runtime.InteropServices.McgModuleManager.ComInterfaceToObject(
((global::System.IntPtr)unsafe_items[mcgIdx]),
typeof(global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides2).TypeHandle
);
}
// Return
return __value__retval;
}
finally
{
// Cleanup
if (unsafe_items != null)
for (uint mcgIdx_1 = 0; (mcgIdx_1 < unsafe_items_mcgLength); mcgIdx_1++)
{
// [fwd] [in] [out] [optional] [Mcg.CodeGen.ComInterfaceMarshaller] Windows_UI_Xaml_Automation_Peers_IAutomationPeerOverrides2__Windows_UI_Xaml_Automation_Peers__IAutomationPeerOverrides2 * items
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_items[mcgIdx_1])));
}
global::System.Runtime.InteropServices.ExternalInterop.SafeCoTaskMemFree(unsafe_items);
}
}
}
// DispatchClass for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides2>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides2>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides2>
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IIterator`1.Current")]
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides2 global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides2>.get_Current()
{
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides2 __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeerOverrides2_V___Impl.StubClass.get_Current(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IIterator`1.HasCurrent")]
bool global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides2>.get_HasCurrent()
{
bool __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeerOverrides2_V___Impl.StubClass.get_HasCurrent(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
bool global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides2>.MoveNext()
{
bool __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeerOverrides2_V___Impl.StubClass.MoveNext(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
uint global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides2>.GetMany(global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides2[] items)
{
uint __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeerOverrides2_V___Impl.StubClass.GetMany(
this,
items
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides2>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides2>))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Current = 6;
internal const int idx_get_HasCurrent = 7;
internal const int idx_MoveNext = 8;
internal const int idx_GetMany = 9;
}
}
// Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Automation.Peers.IAutomationPeer3>
public unsafe static class IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeer3_V___Impl
{
// StubClass for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Automation.Peers.IAutomationPeer3>'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer3 get_Current(global::System.__ComObject __this)
{
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer3 __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer3>, global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer3>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeer3_V___Impl.Vtbl.idx_get_Current
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool get_HasCurrent(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer3>>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeer3_V___Impl.Vtbl.idx_get_HasCurrent
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool MoveNext(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer3>>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeer3_V___Impl.Vtbl.idx_MoveNext
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
// Signature, Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Automation.Peers.IAutomationPeer3>.GetMany, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [out] [Mcg.CodeGen.ArrayMarshaller] rg_Windows_UI_Xaml_Automation_Peers_IAutomationPeer3__Windows_UI_Xaml_Automation_Peers__IAutomationPeer3 * *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] uint__unsigned int,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static uint GetMany(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer3[] items)
{
// Setup
uint unsafe_items_mcgLength = 0;
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer3__Impl.Vtbl*** unsafe_items = default(global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer3__Impl.Vtbl***);
uint unsafe___value__retval;
uint __value__retval;
int unsafe___return__;
try
{
// Marshalling
if (items != null)
unsafe_items_mcgLength = (uint)items.Length;
if (items != null)
unsafe_items = (global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer3__Impl.Vtbl***)global::McgInterop.McgHelpers.CoTaskMemAllocAndZeroMemory(((global::System.IntPtr)checked(unsafe_items_mcgLength * sizeof(global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer3__Impl.Vtbl**))));
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer3>).TypeHandle,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeer3_V___Impl.Vtbl.idx_GetMany,
unsafe_items_mcgLength,
unsafe_items,
&(unsafe___value__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
__value__retval = unsafe___value__retval;
if (items != null)
for (uint mcgIdx = 0; (mcgIdx < unsafe_items_mcgLength); mcgIdx++)
{
// [fwd] [out] [optional] [Mcg.CodeGen.ComInterfaceMarshaller] Windows_UI_Xaml_Automation_Peers_IAutomationPeer3__Windows_UI_Xaml_Automation_Peers__IAutomationPeer3 * items
items[mcgIdx] = (global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer3)global::System.Runtime.InteropServices.McgModuleManager.ComInterfaceToObject(
((global::System.IntPtr)unsafe_items[mcgIdx]),
typeof(global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer3).TypeHandle
);
}
// Return
return __value__retval;
}
finally
{
// Cleanup
if (unsafe_items != null)
for (uint mcgIdx_1 = 0; (mcgIdx_1 < unsafe_items_mcgLength); mcgIdx_1++)
{
// [fwd] [in] [out] [optional] [Mcg.CodeGen.ComInterfaceMarshaller] Windows_UI_Xaml_Automation_Peers_IAutomationPeer3__Windows_UI_Xaml_Automation_Peers__IAutomationPeer3 * items
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_items[mcgIdx_1])));
}
global::System.Runtime.InteropServices.ExternalInterop.SafeCoTaskMemFree(unsafe_items);
}
}
}
// DispatchClass for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Automation.Peers.IAutomationPeer3>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer3>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer3>
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IIterator`1.Current")]
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer3 global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer3>.get_Current()
{
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer3 __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeer3_V___Impl.StubClass.get_Current(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IIterator`1.HasCurrent")]
bool global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer3>.get_HasCurrent()
{
bool __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeer3_V___Impl.StubClass.get_HasCurrent(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
bool global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer3>.MoveNext()
{
bool __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeer3_V___Impl.StubClass.MoveNext(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
uint global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer3>.GetMany(global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer3[] items)
{
uint __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeer3_V___Impl.StubClass.GetMany(
this,
items
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Automation.Peers.IAutomationPeer3>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer3>))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Current = 6;
internal const int idx_get_HasCurrent = 7;
internal const int idx_MoveNext = 8;
internal const int idx_GetMany = 9;
}
}
// Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3>
public unsafe static class IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeerOverrides3_V___Impl
{
// StubClass for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3>'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3 get_Current(global::System.__ComObject __this)
{
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3 __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3>, global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeerOverrides3_V___Impl.Vtbl.idx_get_Current
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool get_HasCurrent(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3>>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeerOverrides3_V___Impl.Vtbl.idx_get_HasCurrent
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool MoveNext(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3>>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeerOverrides3_V___Impl.Vtbl.idx_MoveNext
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
// Signature, Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3>.GetMany, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [out] [Mcg.CodeGen.ArrayMarshaller] rg_Windows_UI_Xaml_Automation_Peers_IAutomationPeerOverrides3__Windows_UI_Xaml_Automation_Peers__IAutomationPeerOverrides3 * *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] uint__unsigned int,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static uint GetMany(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3[] items)
{
// Setup
uint unsafe_items_mcgLength = 0;
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3__Impl.Vtbl*** unsafe_items = default(global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3__Impl.Vtbl***);
uint unsafe___value__retval;
uint __value__retval;
int unsafe___return__;
try
{
// Marshalling
if (items != null)
unsafe_items_mcgLength = (uint)items.Length;
if (items != null)
unsafe_items = (global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3__Impl.Vtbl***)global::McgInterop.McgHelpers.CoTaskMemAllocAndZeroMemory(((global::System.IntPtr)checked(unsafe_items_mcgLength * sizeof(global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3__Impl.Vtbl**))));
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3>).TypeHandle,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeerOverrides3_V___Impl.Vtbl.idx_GetMany,
unsafe_items_mcgLength,
unsafe_items,
&(unsafe___value__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
__value__retval = unsafe___value__retval;
if (items != null)
for (uint mcgIdx = 0; (mcgIdx < unsafe_items_mcgLength); mcgIdx++)
{
// [fwd] [out] [optional] [Mcg.CodeGen.ComInterfaceMarshaller] Windows_UI_Xaml_Automation_Peers_IAutomationPeerOverrides3__Windows_UI_Xaml_Automation_Peers__IAutomationPeerOverrides3 * items
items[mcgIdx] = (global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3)global::System.Runtime.InteropServices.McgModuleManager.ComInterfaceToObject(
((global::System.IntPtr)unsafe_items[mcgIdx]),
typeof(global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3).TypeHandle
);
}
// Return
return __value__retval;
}
finally
{
// Cleanup
if (unsafe_items != null)
for (uint mcgIdx_1 = 0; (mcgIdx_1 < unsafe_items_mcgLength); mcgIdx_1++)
{
// [fwd] [in] [out] [optional] [Mcg.CodeGen.ComInterfaceMarshaller] Windows_UI_Xaml_Automation_Peers_IAutomationPeerOverrides3__Windows_UI_Xaml_Automation_Peers__IAutomationPeerOverrides3 * items
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_items[mcgIdx_1])));
}
global::System.Runtime.InteropServices.ExternalInterop.SafeCoTaskMemFree(unsafe_items);
}
}
}
// DispatchClass for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3>
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IIterator`1.Current")]
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3 global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3>.get_Current()
{
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3 __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeerOverrides3_V___Impl.StubClass.get_Current(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IIterator`1.HasCurrent")]
bool global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3>.get_HasCurrent()
{
bool __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeerOverrides3_V___Impl.StubClass.get_HasCurrent(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
bool global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3>.MoveNext()
{
bool __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeerOverrides3_V___Impl.StubClass.MoveNext(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
uint global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3>.GetMany(global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3[] items)
{
uint __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeerOverrides3_V___Impl.StubClass.GetMany(
this,
items
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3>))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Current = 6;
internal const int idx_get_HasCurrent = 7;
internal const int idx_MoveNext = 8;
internal const int idx_GetMany = 9;
}
}
// Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Automation.Peers.IAutomationPeer4>
public unsafe static class IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeer4_V___Impl
{
// StubClass for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Automation.Peers.IAutomationPeer4>'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer4 get_Current(global::System.__ComObject __this)
{
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer4 __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer4>, global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer4>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeer4_V___Impl.Vtbl.idx_get_Current
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool get_HasCurrent(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer4>>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeer4_V___Impl.Vtbl.idx_get_HasCurrent
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool MoveNext(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer4>>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeer4_V___Impl.Vtbl.idx_MoveNext
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
// Signature, Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Automation.Peers.IAutomationPeer4>.GetMany, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [out] [Mcg.CodeGen.ArrayMarshaller] rg_Windows_UI_Xaml_Automation_Peers_IAutomationPeer4__Windows_UI_Xaml_Automation_Peers__IAutomationPeer4 * *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] uint__unsigned int,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static uint GetMany(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer4[] items)
{
// Setup
uint unsafe_items_mcgLength = 0;
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer4__Impl.Vtbl*** unsafe_items = default(global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer4__Impl.Vtbl***);
uint unsafe___value__retval;
uint __value__retval;
int unsafe___return__;
try
{
// Marshalling
if (items != null)
unsafe_items_mcgLength = (uint)items.Length;
if (items != null)
unsafe_items = (global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer4__Impl.Vtbl***)global::McgInterop.McgHelpers.CoTaskMemAllocAndZeroMemory(((global::System.IntPtr)checked(unsafe_items_mcgLength * sizeof(global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer4__Impl.Vtbl**))));
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer4>).TypeHandle,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeer4_V___Impl.Vtbl.idx_GetMany,
unsafe_items_mcgLength,
unsafe_items,
&(unsafe___value__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
__value__retval = unsafe___value__retval;
if (items != null)
for (uint mcgIdx = 0; (mcgIdx < unsafe_items_mcgLength); mcgIdx++)
{
// [fwd] [out] [optional] [Mcg.CodeGen.ComInterfaceMarshaller] Windows_UI_Xaml_Automation_Peers_IAutomationPeer4__Windows_UI_Xaml_Automation_Peers__IAutomationPeer4 * items
items[mcgIdx] = (global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer4)global::System.Runtime.InteropServices.McgModuleManager.ComInterfaceToObject(
((global::System.IntPtr)unsafe_items[mcgIdx]),
typeof(global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer4).TypeHandle
);
}
// Return
return __value__retval;
}
finally
{
// Cleanup
if (unsafe_items != null)
for (uint mcgIdx_1 = 0; (mcgIdx_1 < unsafe_items_mcgLength); mcgIdx_1++)
{
// [fwd] [in] [out] [optional] [Mcg.CodeGen.ComInterfaceMarshaller] Windows_UI_Xaml_Automation_Peers_IAutomationPeer4__Windows_UI_Xaml_Automation_Peers__IAutomationPeer4 * items
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_items[mcgIdx_1])));
}
global::System.Runtime.InteropServices.ExternalInterop.SafeCoTaskMemFree(unsafe_items);
}
}
}
// DispatchClass for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Automation.Peers.IAutomationPeer4>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer4>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer4>
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IIterator`1.Current")]
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer4 global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer4>.get_Current()
{
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer4 __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeer4_V___Impl.StubClass.get_Current(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IIterator`1.HasCurrent")]
bool global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer4>.get_HasCurrent()
{
bool __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeer4_V___Impl.StubClass.get_HasCurrent(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
bool global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer4>.MoveNext()
{
bool __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeer4_V___Impl.StubClass.MoveNext(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
uint global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer4>.GetMany(global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer4[] items)
{
uint __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeer4_V___Impl.StubClass.GetMany(
this,
items
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Automation.Peers.IAutomationPeer4>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer4>))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Current = 6;
internal const int idx_get_HasCurrent = 7;
internal const int idx_MoveNext = 8;
internal const int idx_GetMany = 9;
}
}
// Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides4>
public unsafe static class IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeerOverrides4_V___Impl
{
// StubClass for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides4>'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides4 get_Current(global::System.__ComObject __this)
{
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides4 __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides4>, global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides4>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeerOverrides4_V___Impl.Vtbl.idx_get_Current
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool get_HasCurrent(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides4>>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeerOverrides4_V___Impl.Vtbl.idx_get_HasCurrent
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool MoveNext(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides4>>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeerOverrides4_V___Impl.Vtbl.idx_MoveNext
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
// Signature, Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides4>.GetMany, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [out] [Mcg.CodeGen.ArrayMarshaller] rg_Windows_UI_Xaml_Automation_Peers_IAutomationPeerOverrides4__Windows_UI_Xaml_Automation_Peers__IAutomationPeerOverrides4 * *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] uint__unsigned int,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static uint GetMany(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides4[] items)
{
// Setup
uint unsafe_items_mcgLength = 0;
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides4__Impl.Vtbl*** unsafe_items = default(global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides4__Impl.Vtbl***);
uint unsafe___value__retval;
uint __value__retval;
int unsafe___return__;
try
{
// Marshalling
if (items != null)
unsafe_items_mcgLength = (uint)items.Length;
if (items != null)
unsafe_items = (global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides4__Impl.Vtbl***)global::McgInterop.McgHelpers.CoTaskMemAllocAndZeroMemory(((global::System.IntPtr)checked(unsafe_items_mcgLength * sizeof(global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides4__Impl.Vtbl**))));
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides4>).TypeHandle,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeerOverrides4_V___Impl.Vtbl.idx_GetMany,
unsafe_items_mcgLength,
unsafe_items,
&(unsafe___value__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
__value__retval = unsafe___value__retval;
if (items != null)
for (uint mcgIdx = 0; (mcgIdx < unsafe_items_mcgLength); mcgIdx++)
{
// [fwd] [out] [optional] [Mcg.CodeGen.ComInterfaceMarshaller] Windows_UI_Xaml_Automation_Peers_IAutomationPeerOverrides4__Windows_UI_Xaml_Automation_Peers__IAutomationPeerOverrides4 * items
items[mcgIdx] = (global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides4)global::System.Runtime.InteropServices.McgModuleManager.ComInterfaceToObject(
((global::System.IntPtr)unsafe_items[mcgIdx]),
typeof(global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides4).TypeHandle
);
}
// Return
return __value__retval;
}
finally
{
// Cleanup
if (unsafe_items != null)
for (uint mcgIdx_1 = 0; (mcgIdx_1 < unsafe_items_mcgLength); mcgIdx_1++)
{
// [fwd] [in] [out] [optional] [Mcg.CodeGen.ComInterfaceMarshaller] Windows_UI_Xaml_Automation_Peers_IAutomationPeerOverrides4__Windows_UI_Xaml_Automation_Peers__IAutomationPeerOverrides4 * items
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_items[mcgIdx_1])));
}
global::System.Runtime.InteropServices.ExternalInterop.SafeCoTaskMemFree(unsafe_items);
}
}
}
// DispatchClass for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides4>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides4>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides4>
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IIterator`1.Current")]
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides4 global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides4>.get_Current()
{
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides4 __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeerOverrides4_V___Impl.StubClass.get_Current(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IIterator`1.HasCurrent")]
bool global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides4>.get_HasCurrent()
{
bool __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeerOverrides4_V___Impl.StubClass.get_HasCurrent(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
bool global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides4>.MoveNext()
{
bool __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeerOverrides4_V___Impl.StubClass.MoveNext(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
uint global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides4>.GetMany(global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides4[] items)
{
uint __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeerOverrides4_V___Impl.StubClass.GetMany(
this,
items
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides4>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides4>))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Current = 6;
internal const int idx_get_HasCurrent = 7;
internal const int idx_MoveNext = 8;
internal const int idx_GetMany = 9;
}
}
// Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Automation.Peers.IAutomationPeer5>
public unsafe static class IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeer5_V___Impl
{
// StubClass for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Automation.Peers.IAutomationPeer5>'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer5 get_Current(global::System.__ComObject __this)
{
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer5 __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer5>, global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer5>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeer5_V___Impl.Vtbl.idx_get_Current
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool get_HasCurrent(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer5>>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeer5_V___Impl.Vtbl.idx_get_HasCurrent
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool MoveNext(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer5>>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeer5_V___Impl.Vtbl.idx_MoveNext
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
// Signature, Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Automation.Peers.IAutomationPeer5>.GetMany, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [out] [Mcg.CodeGen.ArrayMarshaller] rg_Windows_UI_Xaml_Automation_Peers_IAutomationPeer5__Windows_UI_Xaml_Automation_Peers__IAutomationPeer5 * *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] uint__unsigned int,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static uint GetMany(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer5[] items)
{
// Setup
uint unsafe_items_mcgLength = 0;
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer5__Impl.Vtbl*** unsafe_items = default(global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer5__Impl.Vtbl***);
uint unsafe___value__retval;
uint __value__retval;
int unsafe___return__;
try
{
// Marshalling
if (items != null)
unsafe_items_mcgLength = (uint)items.Length;
if (items != null)
unsafe_items = (global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer5__Impl.Vtbl***)global::McgInterop.McgHelpers.CoTaskMemAllocAndZeroMemory(((global::System.IntPtr)checked(unsafe_items_mcgLength * sizeof(global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer5__Impl.Vtbl**))));
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer5>).TypeHandle,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeer5_V___Impl.Vtbl.idx_GetMany,
unsafe_items_mcgLength,
unsafe_items,
&(unsafe___value__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
__value__retval = unsafe___value__retval;
if (items != null)
for (uint mcgIdx = 0; (mcgIdx < unsafe_items_mcgLength); mcgIdx++)
{
// [fwd] [out] [optional] [Mcg.CodeGen.ComInterfaceMarshaller] Windows_UI_Xaml_Automation_Peers_IAutomationPeer5__Windows_UI_Xaml_Automation_Peers__IAutomationPeer5 * items
items[mcgIdx] = (global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer5)global::System.Runtime.InteropServices.McgModuleManager.ComInterfaceToObject(
((global::System.IntPtr)unsafe_items[mcgIdx]),
typeof(global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer5).TypeHandle
);
}
// Return
return __value__retval;
}
finally
{
// Cleanup
if (unsafe_items != null)
for (uint mcgIdx_1 = 0; (mcgIdx_1 < unsafe_items_mcgLength); mcgIdx_1++)
{
// [fwd] [in] [out] [optional] [Mcg.CodeGen.ComInterfaceMarshaller] Windows_UI_Xaml_Automation_Peers_IAutomationPeer5__Windows_UI_Xaml_Automation_Peers__IAutomationPeer5 * items
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_items[mcgIdx_1])));
}
global::System.Runtime.InteropServices.ExternalInterop.SafeCoTaskMemFree(unsafe_items);
}
}
}
// DispatchClass for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Automation.Peers.IAutomationPeer5>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer5>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer5>
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IIterator`1.Current")]
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer5 global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer5>.get_Current()
{
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer5 __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeer5_V___Impl.StubClass.get_Current(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IIterator`1.HasCurrent")]
bool global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer5>.get_HasCurrent()
{
bool __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeer5_V___Impl.StubClass.get_HasCurrent(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
bool global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer5>.MoveNext()
{
bool __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeer5_V___Impl.StubClass.MoveNext(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
uint global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer5>.GetMany(global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer5[] items)
{
uint __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeer5_V___Impl.StubClass.GetMany(
this,
items
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Automation.Peers.IAutomationPeer5>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer5>))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Current = 6;
internal const int idx_get_HasCurrent = 7;
internal const int idx_MoveNext = 8;
internal const int idx_GetMany = 9;
}
}
// Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5>
public unsafe static class IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeerOverrides5_V___Impl
{
// StubClass for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5>'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5 get_Current(global::System.__ComObject __this)
{
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5 __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5>, global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeerOverrides5_V___Impl.Vtbl.idx_get_Current
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool get_HasCurrent(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5>>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeerOverrides5_V___Impl.Vtbl.idx_get_HasCurrent
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool MoveNext(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5>>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeerOverrides5_V___Impl.Vtbl.idx_MoveNext
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
// Signature, Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5>.GetMany, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [out] [Mcg.CodeGen.ArrayMarshaller] rg_Windows_UI_Xaml_Automation_Peers_IAutomationPeerOverrides5__Windows_UI_Xaml_Automation_Peers__IAutomationPeerOverrides5 * *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] uint__unsigned int,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static uint GetMany(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5[] items)
{
// Setup
uint unsafe_items_mcgLength = 0;
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5__Impl.Vtbl*** unsafe_items = default(global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5__Impl.Vtbl***);
uint unsafe___value__retval;
uint __value__retval;
int unsafe___return__;
try
{
// Marshalling
if (items != null)
unsafe_items_mcgLength = (uint)items.Length;
if (items != null)
unsafe_items = (global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5__Impl.Vtbl***)global::McgInterop.McgHelpers.CoTaskMemAllocAndZeroMemory(((global::System.IntPtr)checked(unsafe_items_mcgLength * sizeof(global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5__Impl.Vtbl**))));
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5>).TypeHandle,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeerOverrides5_V___Impl.Vtbl.idx_GetMany,
unsafe_items_mcgLength,
unsafe_items,
&(unsafe___value__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
__value__retval = unsafe___value__retval;
if (items != null)
for (uint mcgIdx = 0; (mcgIdx < unsafe_items_mcgLength); mcgIdx++)
{
// [fwd] [out] [optional] [Mcg.CodeGen.ComInterfaceMarshaller] Windows_UI_Xaml_Automation_Peers_IAutomationPeerOverrides5__Windows_UI_Xaml_Automation_Peers__IAutomationPeerOverrides5 * items
items[mcgIdx] = (global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5)global::System.Runtime.InteropServices.McgModuleManager.ComInterfaceToObject(
((global::System.IntPtr)unsafe_items[mcgIdx]),
typeof(global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5).TypeHandle
);
}
// Return
return __value__retval;
}
finally
{
// Cleanup
if (unsafe_items != null)
for (uint mcgIdx_1 = 0; (mcgIdx_1 < unsafe_items_mcgLength); mcgIdx_1++)
{
// [fwd] [in] [out] [optional] [Mcg.CodeGen.ComInterfaceMarshaller] Windows_UI_Xaml_Automation_Peers_IAutomationPeerOverrides5__Windows_UI_Xaml_Automation_Peers__IAutomationPeerOverrides5 * items
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_items[mcgIdx_1])));
}
global::System.Runtime.InteropServices.ExternalInterop.SafeCoTaskMemFree(unsafe_items);
}
}
}
// DispatchClass for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5>
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IIterator`1.Current")]
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5 global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5>.get_Current()
{
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5 __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeerOverrides5_V___Impl.StubClass.get_Current(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IIterator`1.HasCurrent")]
bool global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5>.get_HasCurrent()
{
bool __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeerOverrides5_V___Impl.StubClass.get_HasCurrent(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
bool global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5>.MoveNext()
{
bool __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeerOverrides5_V___Impl.StubClass.MoveNext(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
uint global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5>.GetMany(global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5[] items)
{
uint __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeerOverrides5_V___Impl.StubClass.GetMany(
this,
items
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5>))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Current = 6;
internal const int idx_get_HasCurrent = 7;
internal const int idx_MoveNext = 8;
internal const int idx_GetMany = 9;
}
}
// Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Automation.Peers.IAutomationPeerAnnotation>
public unsafe static class IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeerAnnotation_V___Impl
{
// StubClass for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Automation.Peers.IAutomationPeerAnnotation>'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerAnnotation get_Current(global::System.__ComObject __this)
{
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerAnnotation __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerAnnotation>, global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerAnnotation>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeerAnnotation_V___Impl.Vtbl.idx_get_Current
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool get_HasCurrent(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerAnnotation>>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeerAnnotation_V___Impl.Vtbl.idx_get_HasCurrent
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool MoveNext(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerAnnotation>>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeerAnnotation_V___Impl.Vtbl.idx_MoveNext
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
// Signature, Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Automation.Peers.IAutomationPeerAnnotation>.GetMany, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [out] [Mcg.CodeGen.ArrayMarshaller] rg_Windows_UI_Xaml_Automation_Peers_IAutomationPeerAnnotation__Windows_UI_Xaml_Automation_Peers__IAutomationPeerAnnotation * *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] uint__unsigned int,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static uint GetMany(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerAnnotation[] items)
{
// Setup
uint unsafe_items_mcgLength = 0;
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerAnnotation__Impl.Vtbl*** unsafe_items = default(global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerAnnotation__Impl.Vtbl***);
uint unsafe___value__retval;
uint __value__retval;
int unsafe___return__;
try
{
// Marshalling
if (items != null)
unsafe_items_mcgLength = (uint)items.Length;
if (items != null)
unsafe_items = (global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerAnnotation__Impl.Vtbl***)global::McgInterop.McgHelpers.CoTaskMemAllocAndZeroMemory(((global::System.IntPtr)checked(unsafe_items_mcgLength * sizeof(global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerAnnotation__Impl.Vtbl**))));
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerAnnotation>).TypeHandle,
global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeerAnnotation_V___Impl.Vtbl.idx_GetMany,
unsafe_items_mcgLength,
unsafe_items,
&(unsafe___value__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
__value__retval = unsafe___value__retval;
if (items != null)
for (uint mcgIdx = 0; (mcgIdx < unsafe_items_mcgLength); mcgIdx++)
{
// [fwd] [out] [optional] [Mcg.CodeGen.ComInterfaceMarshaller] Windows_UI_Xaml_Automation_Peers_IAutomationPeerAnnotation__Windows_UI_Xaml_Automation_Peers__IAutomationPeerAnnotation * items
items[mcgIdx] = (global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerAnnotation)global::System.Runtime.InteropServices.McgModuleManager.ComInterfaceToObject(
((global::System.IntPtr)unsafe_items[mcgIdx]),
typeof(global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerAnnotation).TypeHandle
);
}
// Return
return __value__retval;
}
finally
{
// Cleanup
if (unsafe_items != null)
for (uint mcgIdx_1 = 0; (mcgIdx_1 < unsafe_items_mcgLength); mcgIdx_1++)
{
// [fwd] [in] [out] [optional] [Mcg.CodeGen.ComInterfaceMarshaller] Windows_UI_Xaml_Automation_Peers_IAutomationPeerAnnotation__Windows_UI_Xaml_Automation_Peers__IAutomationPeerAnnotation * items
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_items[mcgIdx_1])));
}
global::System.Runtime.InteropServices.ExternalInterop.SafeCoTaskMemFree(unsafe_items);
}
}
}
// DispatchClass for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Automation.Peers.IAutomationPeerAnnotation>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerAnnotation>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerAnnotation>
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IIterator`1.Current")]
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerAnnotation global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerAnnotation>.get_Current()
{
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerAnnotation __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeerAnnotation_V___Impl.StubClass.get_Current(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IIterator`1.HasCurrent")]
bool global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerAnnotation>.get_HasCurrent()
{
bool __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeerAnnotation_V___Impl.StubClass.get_HasCurrent(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
bool global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerAnnotation>.MoveNext()
{
bool __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeerAnnotation_V___Impl.StubClass.MoveNext(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
uint global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerAnnotation>.GetMany(global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerAnnotation[] items)
{
uint __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_UI_Xaml_Automation_Peers_IAutomationPeerAnnotation_V___Impl.StubClass.GetMany(
this,
items
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.Foundation.Collections.IIterator<Windows.UI.Xaml.Automation.Peers.IAutomationPeerAnnotation>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerAnnotation>))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Current = 6;
internal const int idx_get_HasCurrent = 7;
internal const int idx_MoveNext = 8;
internal const int idx_GetMany = 9;
}
}
// Windows.Foundation.Collections.IIterator<Windows.Devices.Enumeration.IDeviceInformation>
public unsafe static class IIterator_A_Windows_Devices_Enumeration_IDeviceInformation_V___Impl
{
// StubClass for 'Windows.Foundation.Collections.IIterator<Windows.Devices.Enumeration.IDeviceInformation>'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.Devices.Enumeration.IDeviceInformation get_Current(global::System.__ComObject __this)
{
global::Windows.Devices.Enumeration.IDeviceInformation __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.Foundation.Collections.IIterator<global::Windows.Devices.Enumeration.IDeviceInformation>, global::Windows.Devices.Enumeration.IDeviceInformation>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_Devices_Enumeration_IDeviceInformation_V___Impl.Vtbl.idx_get_Current
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool get_HasCurrent(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.Foundation.Collections.IIterator<global::Windows.Devices.Enumeration.IDeviceInformation>>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_Devices_Enumeration_IDeviceInformation_V___Impl.Vtbl.idx_get_HasCurrent
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool MoveNext(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.Foundation.Collections.IIterator<global::Windows.Devices.Enumeration.IDeviceInformation>>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_Devices_Enumeration_IDeviceInformation_V___Impl.Vtbl.idx_MoveNext
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
// Signature, Windows.Foundation.Collections.IIterator<Windows.Devices.Enumeration.IDeviceInformation>.GetMany, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [out] [Mcg.CodeGen.ArrayMarshaller] rg_Windows_Devices_Enumeration_IDeviceInformation__Windows_Devices_Enumeration__IDeviceInformation * *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] uint__unsigned int,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static uint GetMany(
global::System.__ComObject __this,
global::Windows.Devices.Enumeration.IDeviceInformation[] items)
{
// Setup
uint unsafe_items_mcgLength = 0;
global::Windows.Devices.Enumeration.IDeviceInformation__Impl.Vtbl*** unsafe_items = default(global::Windows.Devices.Enumeration.IDeviceInformation__Impl.Vtbl***);
uint unsafe___value__retval;
uint __value__retval;
int unsafe___return__;
try
{
// Marshalling
if (items != null)
unsafe_items_mcgLength = (uint)items.Length;
if (items != null)
unsafe_items = (global::Windows.Devices.Enumeration.IDeviceInformation__Impl.Vtbl***)global::McgInterop.McgHelpers.CoTaskMemAllocAndZeroMemory(((global::System.IntPtr)checked(unsafe_items_mcgLength * sizeof(global::Windows.Devices.Enumeration.IDeviceInformation__Impl.Vtbl**))));
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.Devices.Enumeration.IDeviceInformation>).TypeHandle,
global::Windows.Foundation.Collections.IIterator_A_Windows_Devices_Enumeration_IDeviceInformation_V___Impl.Vtbl.idx_GetMany,
unsafe_items_mcgLength,
unsafe_items,
&(unsafe___value__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
__value__retval = unsafe___value__retval;
if (items != null)
for (uint mcgIdx = 0; (mcgIdx < unsafe_items_mcgLength); mcgIdx++)
{
// [fwd] [out] [optional] [Mcg.CodeGen.ComInterfaceMarshaller] Windows_Devices_Enumeration_IDeviceInformation__Windows_Devices_Enumeration__IDeviceInformation * items
items[mcgIdx] = (global::Windows.Devices.Enumeration.IDeviceInformation)global::System.Runtime.InteropServices.McgModuleManager.ComInterfaceToObject(
((global::System.IntPtr)unsafe_items[mcgIdx]),
typeof(global::Windows.Devices.Enumeration.IDeviceInformation).TypeHandle
);
}
// Return
return __value__retval;
}
finally
{
// Cleanup
if (unsafe_items != null)
for (uint mcgIdx_1 = 0; (mcgIdx_1 < unsafe_items_mcgLength); mcgIdx_1++)
{
// [fwd] [in] [out] [optional] [Mcg.CodeGen.ComInterfaceMarshaller] Windows_Devices_Enumeration_IDeviceInformation__Windows_Devices_Enumeration__IDeviceInformation * items
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_items[mcgIdx_1])));
}
global::System.Runtime.InteropServices.ExternalInterop.SafeCoTaskMemFree(unsafe_items);
}
}
}
// DispatchClass for 'Windows.Foundation.Collections.IIterator<Windows.Devices.Enumeration.IDeviceInformation>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.Devices.Enumeration.IDeviceInformation>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Foundation.Collections.IIterator<global::Windows.Devices.Enumeration.IDeviceInformation>
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IIterator`1.Current")]
global::Windows.Devices.Enumeration.IDeviceInformation global::Windows.Foundation.Collections.IIterator<global::Windows.Devices.Enumeration.IDeviceInformation>.get_Current()
{
global::Windows.Devices.Enumeration.IDeviceInformation __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_Devices_Enumeration_IDeviceInformation_V___Impl.StubClass.get_Current(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IIterator`1.HasCurrent")]
bool global::Windows.Foundation.Collections.IIterator<global::Windows.Devices.Enumeration.IDeviceInformation>.get_HasCurrent()
{
bool __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_Devices_Enumeration_IDeviceInformation_V___Impl.StubClass.get_HasCurrent(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
bool global::Windows.Foundation.Collections.IIterator<global::Windows.Devices.Enumeration.IDeviceInformation>.MoveNext()
{
bool __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_Devices_Enumeration_IDeviceInformation_V___Impl.StubClass.MoveNext(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
uint global::Windows.Foundation.Collections.IIterator<global::Windows.Devices.Enumeration.IDeviceInformation>.GetMany(global::Windows.Devices.Enumeration.IDeviceInformation[] items)
{
uint __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_Devices_Enumeration_IDeviceInformation_V___Impl.StubClass.GetMany(
this,
items
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.Foundation.Collections.IIterator<Windows.Devices.Enumeration.IDeviceInformation>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.Devices.Enumeration.IDeviceInformation>))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Current = 6;
internal const int idx_get_HasCurrent = 7;
internal const int idx_MoveNext = 8;
internal const int idx_GetMany = 9;
}
}
// Windows.Foundation.Collections.IIterator<Windows.Devices.Enumeration.IDeviceInformation2>
public unsafe static class IIterator_A_Windows_Devices_Enumeration_IDeviceInformation2_V___Impl
{
// StubClass for 'Windows.Foundation.Collections.IIterator<Windows.Devices.Enumeration.IDeviceInformation2>'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.Devices.Enumeration.IDeviceInformation2 get_Current(global::System.__ComObject __this)
{
global::Windows.Devices.Enumeration.IDeviceInformation2 __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.Foundation.Collections.IIterator<global::Windows.Devices.Enumeration.IDeviceInformation2>, global::Windows.Devices.Enumeration.IDeviceInformation2>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_Devices_Enumeration_IDeviceInformation2_V___Impl.Vtbl.idx_get_Current
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool get_HasCurrent(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.Foundation.Collections.IIterator<global::Windows.Devices.Enumeration.IDeviceInformation2>>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_Devices_Enumeration_IDeviceInformation2_V___Impl.Vtbl.idx_get_HasCurrent
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool MoveNext(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.Foundation.Collections.IIterator<global::Windows.Devices.Enumeration.IDeviceInformation2>>(
__this,
global::Windows.Foundation.Collections.IIterator_A_Windows_Devices_Enumeration_IDeviceInformation2_V___Impl.Vtbl.idx_MoveNext
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
// Signature, Windows.Foundation.Collections.IIterator<Windows.Devices.Enumeration.IDeviceInformation2>.GetMany, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [out] [Mcg.CodeGen.ArrayMarshaller] rg_Windows_Devices_Enumeration_IDeviceInformation2__Windows_Devices_Enumeration__IDeviceInformation2 * *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] uint__unsigned int,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static uint GetMany(
global::System.__ComObject __this,
global::Windows.Devices.Enumeration.IDeviceInformation2[] items)
{
// Setup
uint unsafe_items_mcgLength = 0;
global::Windows.Devices.Enumeration.IDeviceInformation2__Impl.Vtbl*** unsafe_items = default(global::Windows.Devices.Enumeration.IDeviceInformation2__Impl.Vtbl***);
uint unsafe___value__retval;
uint __value__retval;
int unsafe___return__;
try
{
// Marshalling
if (items != null)
unsafe_items_mcgLength = (uint)items.Length;
if (items != null)
unsafe_items = (global::Windows.Devices.Enumeration.IDeviceInformation2__Impl.Vtbl***)global::McgInterop.McgHelpers.CoTaskMemAllocAndZeroMemory(((global::System.IntPtr)checked(unsafe_items_mcgLength * sizeof(global::Windows.Devices.Enumeration.IDeviceInformation2__Impl.Vtbl**))));
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.Devices.Enumeration.IDeviceInformation2>).TypeHandle,
global::Windows.Foundation.Collections.IIterator_A_Windows_Devices_Enumeration_IDeviceInformation2_V___Impl.Vtbl.idx_GetMany,
unsafe_items_mcgLength,
unsafe_items,
&(unsafe___value__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
__value__retval = unsafe___value__retval;
if (items != null)
for (uint mcgIdx = 0; (mcgIdx < unsafe_items_mcgLength); mcgIdx++)
{
// [fwd] [out] [optional] [Mcg.CodeGen.ComInterfaceMarshaller] Windows_Devices_Enumeration_IDeviceInformation2__Windows_Devices_Enumeration__IDeviceInformation2 * items
items[mcgIdx] = (global::Windows.Devices.Enumeration.IDeviceInformation2)global::System.Runtime.InteropServices.McgModuleManager.ComInterfaceToObject(
((global::System.IntPtr)unsafe_items[mcgIdx]),
typeof(global::Windows.Devices.Enumeration.IDeviceInformation2).TypeHandle
);
}
// Return
return __value__retval;
}
finally
{
// Cleanup
if (unsafe_items != null)
for (uint mcgIdx_1 = 0; (mcgIdx_1 < unsafe_items_mcgLength); mcgIdx_1++)
{
// [fwd] [in] [out] [optional] [Mcg.CodeGen.ComInterfaceMarshaller] Windows_Devices_Enumeration_IDeviceInformation2__Windows_Devices_Enumeration__IDeviceInformation2 * items
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_items[mcgIdx_1])));
}
global::System.Runtime.InteropServices.ExternalInterop.SafeCoTaskMemFree(unsafe_items);
}
}
}
// DispatchClass for 'Windows.Foundation.Collections.IIterator<Windows.Devices.Enumeration.IDeviceInformation2>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.Devices.Enumeration.IDeviceInformation2>))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Foundation.Collections.IIterator<global::Windows.Devices.Enumeration.IDeviceInformation2>
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IIterator`1.Current")]
global::Windows.Devices.Enumeration.IDeviceInformation2 global::Windows.Foundation.Collections.IIterator<global::Windows.Devices.Enumeration.IDeviceInformation2>.get_Current()
{
global::Windows.Devices.Enumeration.IDeviceInformation2 __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_Devices_Enumeration_IDeviceInformation2_V___Impl.StubClass.get_Current(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Collections.IIterator`1.HasCurrent")]
bool global::Windows.Foundation.Collections.IIterator<global::Windows.Devices.Enumeration.IDeviceInformation2>.get_HasCurrent()
{
bool __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_Devices_Enumeration_IDeviceInformation2_V___Impl.StubClass.get_HasCurrent(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
bool global::Windows.Foundation.Collections.IIterator<global::Windows.Devices.Enumeration.IDeviceInformation2>.MoveNext()
{
bool __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_Devices_Enumeration_IDeviceInformation2_V___Impl.StubClass.MoveNext(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
uint global::Windows.Foundation.Collections.IIterator<global::Windows.Devices.Enumeration.IDeviceInformation2>.GetMany(global::Windows.Devices.Enumeration.IDeviceInformation2[] items)
{
uint __retVal = global::Windows.Foundation.Collections.IIterator_A_Windows_Devices_Enumeration_IDeviceInformation2_V___Impl.StubClass.GetMany(
this,
items
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.Foundation.Collections.IIterator<Windows.Devices.Enumeration.IDeviceInformation2>'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Collections.IIterator<global::Windows.Devices.Enumeration.IDeviceInformation2>))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Current = 6;
internal const int idx_get_HasCurrent = 7;
internal const int idx_MoveNext = 8;
internal const int idx_GetMany = 9;
}
}
}
namespace Windows.Foundation.Diagnostics
{
// Windows.Foundation.Diagnostics.ITracingStatusChangedEventArgs
public unsafe static class ITracingStatusChangedEventArgs__Impl
{
// StubClass for 'Windows.Foundation.Diagnostics.ITracingStatusChangedEventArgs'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool get_Enabled(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.Foundation.Diagnostics.ITracingStatusChangedEventArgs>(
__this,
global::Windows.Foundation.Diagnostics.ITracingStatusChangedEventArgs__Impl.Vtbl.idx_get_Enabled
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
}
// DispatchClass for 'Windows.Foundation.Diagnostics.ITracingStatusChangedEventArgs'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Diagnostics.ITracingStatusChangedEventArgs))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Foundation.Diagnostics.ITracingStatusChangedEventArgs
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Foundation.Diagnostics.ITracingStatusChangedEventArgs.Enabled")]
bool global::Windows.Foundation.Diagnostics.ITracingStatusChangedEventArgs.get_Enabled()
{
bool __retVal = global::Windows.Foundation.Diagnostics.ITracingStatusChangedEventArgs__Impl.StubClass.get_Enabled(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.Foundation.Diagnostics.ITracingStatusChangedEventArgs'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Diagnostics.ITracingStatusChangedEventArgs))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Enabled = 6;
}
}
// Windows.Foundation.Diagnostics.IAsyncCausalityTracerStatics
public unsafe static class IAsyncCausalityTracerStatics__Impl
{
// StubClass for 'Windows.Foundation.Diagnostics.IAsyncCausalityTracerStatics'
public static partial class StubClass
{
// Signature, Windows.Foundation.Diagnostics.IAsyncCausalityTracerStatics.TraceOperationCreation, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.EnumMarshaller] -> int, [fwd] [in] [Mcg.CodeGen.EnumMarshaller] -> int, [fwd] [in] [Mcg.CodeGen.BlittableValueMarshaller] System_Guid__System.Guid, [fwd] [in] [Mcg.CodeGen.BlittableValueMarshaller] ulong__unsigned __int64, [fwd] [in] [Mcg.CodeGen.HSTRINGMarshaller] string__System.Runtime.InteropServices.HSTRING, [fwd] [in] [Mcg.CodeGen.BlittableValueMarshaller] ulong__unsigned __int64,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void TraceOperationCreation(
global::System.__ComObject __this,
global::Windows.Foundation.Diagnostics.CausalityTraceLevel traceLevel,
global::Windows.Foundation.Diagnostics.CausalitySource source,
global::System.Guid platformId,
ulong operationId,
string operationName,
ulong relatedContext)
{
// Setup
global::System.Runtime.InteropServices.HSTRING unsafe_operationName = default(global::System.Runtime.InteropServices.HSTRING);
int unsafe___return__;
// Marshalling
fixed (char* pBuffer_operationName = operationName)
{
global::System.Runtime.InteropServices.HSTRING_HEADER hstring_header_operationName;
global::System.Runtime.InteropServices.McgMarshal.StringToHStringReference(pBuffer_operationName, operationName, &(hstring_header_operationName), &(unsafe_operationName));
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.Foundation.Diagnostics.IAsyncCausalityTracerStatics).TypeHandle,
global::Windows.Foundation.Diagnostics.IAsyncCausalityTracerStatics__Impl.Vtbl.idx_TraceOperationCreation,
((int)traceLevel),
((int)source),
platformId,
operationId,
unsafe_operationName,
relatedContext
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// Return
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void TraceOperationCompletion(
global::System.__ComObject __this,
global::Windows.Foundation.Diagnostics.CausalityTraceLevel traceLevel,
global::Windows.Foundation.Diagnostics.CausalitySource source,
global::System.Guid platformId,
ulong operationId,
global::Windows.Foundation.AsyncStatus status)
{
global::McgInterop.ForwardComSharedStubs.Proc_intintGuid__ulong__int<global::Windows.Foundation.Diagnostics.IAsyncCausalityTracerStatics>(
__this,
((int)traceLevel),
((int)source),
platformId,
operationId,
((int)status),
global::Windows.Foundation.Diagnostics.IAsyncCausalityTracerStatics__Impl.Vtbl.idx_TraceOperationCompletion
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void TraceOperationRelation(
global::System.__ComObject __this,
global::Windows.Foundation.Diagnostics.CausalityTraceLevel traceLevel,
global::Windows.Foundation.Diagnostics.CausalitySource source,
global::System.Guid platformId,
ulong operationId,
global::Windows.Foundation.Diagnostics.CausalityRelation relation)
{
global::McgInterop.ForwardComSharedStubs.Proc_intintGuid__ulong__int<global::Windows.Foundation.Diagnostics.IAsyncCausalityTracerStatics>(
__this,
((int)traceLevel),
((int)source),
platformId,
operationId,
((int)relation),
global::Windows.Foundation.Diagnostics.IAsyncCausalityTracerStatics__Impl.Vtbl.idx_TraceOperationRelation
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void TraceSynchronousWorkStart(
global::System.__ComObject __this,
global::Windows.Foundation.Diagnostics.CausalityTraceLevel traceLevel,
global::Windows.Foundation.Diagnostics.CausalitySource source,
global::System.Guid platformId,
ulong operationId,
global::Windows.Foundation.Diagnostics.CausalitySynchronousWork work)
{
global::McgInterop.ForwardComSharedStubs.Proc_intintGuid__ulong__int<global::Windows.Foundation.Diagnostics.IAsyncCausalityTracerStatics>(
__this,
((int)traceLevel),
((int)source),
platformId,
operationId,
((int)work),
global::Windows.Foundation.Diagnostics.IAsyncCausalityTracerStatics__Impl.Vtbl.idx_TraceSynchronousWorkStart
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// Signature, Windows.Foundation.Diagnostics.IAsyncCausalityTracerStatics.TraceSynchronousWorkCompletion, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.EnumMarshaller] -> int, [fwd] [in] [Mcg.CodeGen.EnumMarshaller] -> int, [fwd] [in] [Mcg.CodeGen.EnumMarshaller] -> int,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void TraceSynchronousWorkCompletion(
global::System.__ComObject __this,
global::Windows.Foundation.Diagnostics.CausalityTraceLevel traceLevel,
global::Windows.Foundation.Diagnostics.CausalitySource source,
global::Windows.Foundation.Diagnostics.CausalitySynchronousWork work)
{
// Setup
int unsafe___return__;
// Marshalling
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.Foundation.Diagnostics.IAsyncCausalityTracerStatics).TypeHandle,
global::Windows.Foundation.Diagnostics.IAsyncCausalityTracerStatics__Impl.Vtbl.idx_TraceSynchronousWorkCompletion,
((int)traceLevel),
((int)source),
((int)work)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
// Return
}
// Signature, Windows.Foundation.Diagnostics.IAsyncCausalityTracerStatics.add_TracingStatusChanged, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.WinRTDelegateMarshaller] System_EventHandler_1_Windows_Foundation_Diagnostics_TracingStatusChangedEventArgs___Windows_Foundation__EventHandler_A_Windows_Foundation_Diagnostics_TracingStatusChangedEventArgs_V_ *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] System_Runtime_InteropServices_WindowsRuntime_EventRegistrationToken__Windows_Foundation__EventRegistrationToken,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken add_TracingStatusChanged(
global::System.__ComObject __this,
global::System.EventHandler<global::Windows.Foundation.Diagnostics.TracingStatusChangedEventArgs> handler)
{
// Setup
global::System.EventHandler_A_Windows_Foundation_Diagnostics_TracingStatusChangedEventArgs_V___Impl.Vtbl** unsafe_handler = default(global::System.EventHandler_A_Windows_Foundation_Diagnostics_TracingStatusChangedEventArgs_V___Impl.Vtbl**);
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken unsafe_cookie__retval;
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken cookie__retval;
int unsafe___return__;
try
{
// Marshalling
unsafe_handler = (global::System.EventHandler_A_Windows_Foundation_Diagnostics_TracingStatusChangedEventArgs_V___Impl.Vtbl**)global::System.Runtime.InteropServices.McgModuleManager.DelegateToComInterface(
handler,
typeof(global::System.EventHandler<global::Windows.Foundation.Diagnostics.TracingStatusChangedEventArgs>).TypeHandle,
global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget147>(global::System.EventHandler_A_Windows_Foundation_Diagnostics_TracingStatusChangedEventArgs_V___Impl.Invoke)
);
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.Foundation.Diagnostics.IAsyncCausalityTracerStatics).TypeHandle,
global::Windows.Foundation.Diagnostics.IAsyncCausalityTracerStatics__Impl.Vtbl.idx_add_TracingStatusChanged,
unsafe_handler,
&(unsafe_cookie__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
cookie__retval = unsafe_cookie__retval;
// Return
return cookie__retval;
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_handler)));
}
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void remove_TracingStatusChanged(
global::System.__ComObject __this,
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken cookie)
{
global::McgInterop.ForwardComSharedStubs.Proc__WindowsRuntime_EventRegistrationToken__<global::Windows.Foundation.Diagnostics.IAsyncCausalityTracerStatics>(
__this,
cookie,
global::Windows.Foundation.Diagnostics.IAsyncCausalityTracerStatics__Impl.Vtbl.idx_remove_TracingStatusChanged
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// DispatchClass for 'Windows.Foundation.Diagnostics.IAsyncCausalityTracerStatics'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Diagnostics.IAsyncCausalityTracerStatics))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Foundation.Diagnostics.IAsyncCausalityTracerStatics
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.Foundation.Diagnostics.IAsyncCausalityTracerStatics.TraceOperationCreation(
global::Windows.Foundation.Diagnostics.CausalityTraceLevel traceLevel,
global::Windows.Foundation.Diagnostics.CausalitySource source,
global::System.Guid platformId,
ulong operationId,
string operationName,
ulong relatedContext)
{
global::Windows.Foundation.Diagnostics.IAsyncCausalityTracerStatics__Impl.StubClass.TraceOperationCreation(
this,
traceLevel,
source,
platformId,
operationId,
operationName,
relatedContext
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.Foundation.Diagnostics.IAsyncCausalityTracerStatics.TraceOperationCompletion(
global::Windows.Foundation.Diagnostics.CausalityTraceLevel traceLevel,
global::Windows.Foundation.Diagnostics.CausalitySource source,
global::System.Guid platformId,
ulong operationId,
global::Windows.Foundation.AsyncStatus status)
{
global::Windows.Foundation.Diagnostics.IAsyncCausalityTracerStatics__Impl.StubClass.TraceOperationCompletion(
this,
traceLevel,
source,
platformId,
operationId,
status
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.Foundation.Diagnostics.IAsyncCausalityTracerStatics.TraceOperationRelation(
global::Windows.Foundation.Diagnostics.CausalityTraceLevel traceLevel,
global::Windows.Foundation.Diagnostics.CausalitySource source,
global::System.Guid platformId,
ulong operationId,
global::Windows.Foundation.Diagnostics.CausalityRelation relation)
{
global::Windows.Foundation.Diagnostics.IAsyncCausalityTracerStatics__Impl.StubClass.TraceOperationRelation(
this,
traceLevel,
source,
platformId,
operationId,
relation
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.Foundation.Diagnostics.IAsyncCausalityTracerStatics.TraceSynchronousWorkStart(
global::Windows.Foundation.Diagnostics.CausalityTraceLevel traceLevel,
global::Windows.Foundation.Diagnostics.CausalitySource source,
global::System.Guid platformId,
ulong operationId,
global::Windows.Foundation.Diagnostics.CausalitySynchronousWork work)
{
global::Windows.Foundation.Diagnostics.IAsyncCausalityTracerStatics__Impl.StubClass.TraceSynchronousWorkStart(
this,
traceLevel,
source,
platformId,
operationId,
work
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.Foundation.Diagnostics.IAsyncCausalityTracerStatics.TraceSynchronousWorkCompletion(
global::Windows.Foundation.Diagnostics.CausalityTraceLevel traceLevel,
global::Windows.Foundation.Diagnostics.CausalitySource source,
global::Windows.Foundation.Diagnostics.CausalitySynchronousWork work)
{
global::Windows.Foundation.Diagnostics.IAsyncCausalityTracerStatics__Impl.StubClass.TraceSynchronousWorkCompletion(
this,
traceLevel,
source,
work
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventAdd, "Windows.Foundation.Diagnostics.IAsyncCausalityTracerStatics.TracingStatusChanged")]
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken global::Windows.Foundation.Diagnostics.IAsyncCausalityTracerStatics.add_TracingStatusChanged(global::System.EventHandler<global::Windows.Foundation.Diagnostics.TracingStatusChangedEventArgs> handler)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __retVal = global::Windows.Foundation.Diagnostics.IAsyncCausalityTracerStatics__Impl.StubClass.add_TracingStatusChanged(
this,
handler
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventRemove, "Windows.Foundation.Diagnostics.IAsyncCausalityTracerStatics.TracingStatusChanged")]
void global::Windows.Foundation.Diagnostics.IAsyncCausalityTracerStatics.remove_TracingStatusChanged(global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken cookie)
{
global::Windows.Foundation.Diagnostics.IAsyncCausalityTracerStatics__Impl.StubClass.remove_TracingStatusChanged(
this,
cookie
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// v-table for 'Windows.Foundation.Diagnostics.IAsyncCausalityTracerStatics'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Diagnostics.IAsyncCausalityTracerStatics))]
public unsafe partial struct Vtbl
{
internal const int idx_TraceOperationCreation = 6;
internal const int idx_TraceOperationCompletion = 7;
internal const int idx_TraceOperationRelation = 8;
internal const int idx_TraceSynchronousWorkStart = 9;
internal const int idx_TraceSynchronousWorkCompletion = 10;
internal const int idx_add_TracingStatusChanged = 11;
internal const int idx_remove_TracingStatusChanged = 12;
}
}
}
namespace Windows.Foundation.Metadata
{
// Windows.Foundation.Metadata.IApiInformationStatics
public unsafe static class IApiInformationStatics__Impl
{
// StubClass for 'Windows.Foundation.Metadata.IApiInformationStatics'
public static partial class StubClass
{
// Signature, Windows.Foundation.Metadata.IApiInformationStatics.IsTypePresent, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.HSTRINGMarshaller] string__System.Runtime.InteropServices.HSTRING, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.CBoolMarshaller] bool__bool,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool IsTypePresent(
global::System.__ComObject __this,
string typeName)
{
// Setup
global::System.Runtime.InteropServices.HSTRING unsafe_typeName = default(global::System.Runtime.InteropServices.HSTRING);
bool value__retval;
sbyte unsafe_value__retval;
int unsafe___return__;
// Marshalling
fixed (char* pBuffer_typeName = typeName)
{
global::System.Runtime.InteropServices.HSTRING_HEADER hstring_header_typeName;
global::System.Runtime.InteropServices.McgMarshal.StringToHStringReference(pBuffer_typeName, typeName, &(hstring_header_typeName), &(unsafe_typeName));
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.Foundation.Metadata.IApiInformationStatics).TypeHandle,
global::Windows.Foundation.Metadata.IApiInformationStatics__Impl.Vtbl.idx_IsTypePresent,
unsafe_typeName,
&(unsafe_value__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
value__retval = unsafe_value__retval != 0;
}
// Return
return value__retval;
}
}
// DispatchClass for 'Windows.Foundation.Metadata.IApiInformationStatics'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Metadata.IApiInformationStatics))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Foundation.Metadata.IApiInformationStatics
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
bool global::Windows.Foundation.Metadata.IApiInformationStatics.IsTypePresent(string typeName)
{
bool __retVal = global::Windows.Foundation.Metadata.IApiInformationStatics__Impl.StubClass.IsTypePresent(
this,
typeName
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.Foundation.Metadata.IApiInformationStatics'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Foundation.Metadata.IApiInformationStatics))]
public unsafe partial struct Vtbl
{
internal const int idx_IsTypePresent = 6;
}
}
}
namespace Windows.Globalization
{
// Windows.Globalization.ICalendar
public unsafe static class ICalendar__Impl
{
// StubClass for 'Windows.Globalization.ICalendar'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void ChangeCalendarSystem(
global::System.__ComObject __this,
string value)
{
global::McgInterop.ForwardComSharedStubs.Proc_string__<global::Windows.Globalization.ICalendar>(
__this,
value,
global::Windows.Globalization.ICalendar__Impl.Vtbl.idx_ChangeCalendarSystem
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.DateTimeOffset GetDateTime(global::System.__ComObject __this)
{
global::System.DateTimeOffset __ret = global::McgInterop.ForwardComSharedStubs.Func_DateTimeOffset__<global::Windows.Globalization.ICalendar>(
__this,
global::Windows.Globalization.ICalendar__Impl.Vtbl.idx_GetDateTime
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static int get_LastEra(global::System.__ComObject __this)
{
int __ret = global::McgInterop.ForwardComSharedStubs.Func_int__<global::Windows.Globalization.ICalendar>(
__this,
global::Windows.Globalization.ICalendar__Impl.Vtbl.idx_get_LastEra
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void put_Era(
global::System.__ComObject __this,
int value)
{
global::McgInterop.ForwardComSharedStubs.Proc_int__<global::Windows.Globalization.ICalendar>(
__this,
value,
global::Windows.Globalization.ICalendar__Impl.Vtbl.idx_put_Era
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static string EraAsString(global::System.__ComObject __this)
{
string __ret = global::McgInterop.ForwardComSharedStubs.Func_string__<global::Windows.Globalization.ICalendar>(
__this,
global::Windows.Globalization.ICalendar__Impl.Vtbl.idx_EraAsFullString
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
// Signature, Windows.Globalization.ICalendar.EraAsString, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.BlittableValueMarshaller] int__int, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.HSTRINGMarshaller] string__System.Runtime.InteropServices.HSTRING,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static string EraAsString(
global::System.__ComObject __this,
int idealLength)
{
// Setup
global::System.Runtime.InteropServices.HSTRING unsafe_result__retval = default(global::System.Runtime.InteropServices.HSTRING);
string result__retval = default(string);
int unsafe___return__;
try
{
// Marshalling
unsafe_result__retval = default(global::System.Runtime.InteropServices.HSTRING);
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.Globalization.ICalendar).TypeHandle,
global::Windows.Globalization.ICalendar__Impl.Vtbl.idx_EraAsString,
idealLength,
&(unsafe_result__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
result__retval = global::System.Runtime.InteropServices.McgMarshal.HStringToString(unsafe_result__retval);
// Return
return result__retval;
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.FreeHString(unsafe_result__retval.handle);
}
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static int get_FirstYearInThisEra(global::System.__ComObject __this)
{
int __ret = global::McgInterop.ForwardComSharedStubs.Func_int__<global::Windows.Globalization.ICalendar>(
__this,
global::Windows.Globalization.ICalendar__Impl.Vtbl.idx_get_FirstYearInThisEra
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void put_Year(
global::System.__ComObject __this,
int value)
{
global::McgInterop.ForwardComSharedStubs.Proc_int__<global::Windows.Globalization.ICalendar>(
__this,
value,
global::Windows.Globalization.ICalendar__Impl.Vtbl.idx_put_Year
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static int get_FirstMonthInThisYear(global::System.__ComObject __this)
{
int __ret = global::McgInterop.ForwardComSharedStubs.Func_int__<global::Windows.Globalization.ICalendar>(
__this,
global::Windows.Globalization.ICalendar__Impl.Vtbl.idx_get_FirstMonthInThisYear
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void put_Month(
global::System.__ComObject __this,
int value)
{
global::McgInterop.ForwardComSharedStubs.Proc_int__<global::Windows.Globalization.ICalendar>(
__this,
value,
global::Windows.Globalization.ICalendar__Impl.Vtbl.idx_put_Month
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static int get_FirstDayInThisMonth(global::System.__ComObject __this)
{
int __ret = global::McgInterop.ForwardComSharedStubs.Func_int__<global::Windows.Globalization.ICalendar>(
__this,
global::Windows.Globalization.ICalendar__Impl.Vtbl.idx_get_FirstDayInThisMonth
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static int get_Day(global::System.__ComObject __this)
{
int __ret = global::McgInterop.ForwardComSharedStubs.Func_int__<global::Windows.Globalization.ICalendar>(
__this,
global::Windows.Globalization.ICalendar__Impl.Vtbl.idx_get_Day
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void put_Day(
global::System.__ComObject __this,
int value)
{
global::McgInterop.ForwardComSharedStubs.Proc_int__<global::Windows.Globalization.ICalendar>(
__this,
value,
global::Windows.Globalization.ICalendar__Impl.Vtbl.idx_put_Day
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// DispatchClass for 'Windows.Globalization.ICalendar'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Globalization.ICalendar))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Globalization.ICalendar
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.Globalization.ICalendar.ChangeCalendarSystem(string value)
{
global::Windows.Globalization.ICalendar__Impl.StubClass.ChangeCalendarSystem(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
global::System.DateTimeOffset global::Windows.Globalization.ICalendar.GetDateTime()
{
global::System.DateTimeOffset __retVal = global::Windows.Globalization.ICalendar__Impl.StubClass.GetDateTime(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Globalization.ICalendar.LastEra")]
int global::Windows.Globalization.ICalendar.get_LastEra()
{
int __retVal = global::Windows.Globalization.ICalendar__Impl.StubClass.get_LastEra(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertySet, "Windows.Globalization.ICalendar.Era")]
void global::Windows.Globalization.ICalendar.put_Era(int value)
{
global::Windows.Globalization.ICalendar__Impl.StubClass.put_Era(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
string global::Windows.Globalization.ICalendar.EraAsString()
{
string __retVal = global::Windows.Globalization.ICalendar__Impl.StubClass.EraAsString(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
string global::Windows.Globalization.ICalendar.EraAsString(int idealLength)
{
string __retVal = global::Windows.Globalization.ICalendar__Impl.StubClass.EraAsString(
this,
idealLength
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Globalization.ICalendar.FirstYearInThisEra")]
int global::Windows.Globalization.ICalendar.get_FirstYearInThisEra()
{
int __retVal = global::Windows.Globalization.ICalendar__Impl.StubClass.get_FirstYearInThisEra(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertySet, "Windows.Globalization.ICalendar.Year")]
void global::Windows.Globalization.ICalendar.put_Year(int value)
{
global::Windows.Globalization.ICalendar__Impl.StubClass.put_Year(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Globalization.ICalendar.FirstMonthInThisYear")]
int global::Windows.Globalization.ICalendar.get_FirstMonthInThisYear()
{
int __retVal = global::Windows.Globalization.ICalendar__Impl.StubClass.get_FirstMonthInThisYear(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertySet, "Windows.Globalization.ICalendar.Month")]
void global::Windows.Globalization.ICalendar.put_Month(int value)
{
global::Windows.Globalization.ICalendar__Impl.StubClass.put_Month(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Globalization.ICalendar.FirstDayInThisMonth")]
int global::Windows.Globalization.ICalendar.get_FirstDayInThisMonth()
{
int __retVal = global::Windows.Globalization.ICalendar__Impl.StubClass.get_FirstDayInThisMonth(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Globalization.ICalendar.Day")]
int global::Windows.Globalization.ICalendar.get_Day()
{
int __retVal = global::Windows.Globalization.ICalendar__Impl.StubClass.get_Day(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertySet, "Windows.Globalization.ICalendar.Day")]
void global::Windows.Globalization.ICalendar.put_Day(int value)
{
global::Windows.Globalization.ICalendar__Impl.StubClass.put_Day(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// v-table for 'Windows.Globalization.ICalendar'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Globalization.ICalendar))]
public unsafe partial struct Vtbl
{
internal const int idx_ChangeCalendarSystem = 13;
internal const int idx_GetDateTime = 16;
internal const int idx_get_LastEra = 20;
internal const int idx_put_Era = 23;
internal const int idx_EraAsFullString = 25;
internal const int idx_EraAsString = 26;
internal const int idx_get_FirstYearInThisEra = 27;
internal const int idx_put_Year = 31;
internal const int idx_get_FirstMonthInThisYear = 36;
internal const int idx_put_Month = 40;
internal const int idx_get_FirstDayInThisMonth = 49;
internal const int idx_get_Day = 52;
internal const int idx_put_Day = 53;
}
}
// Windows.Globalization.ITimeZoneOnCalendar
public unsafe static class ITimeZoneOnCalendar__Impl
{
// v-table for 'Windows.Globalization.ITimeZoneOnCalendar'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Globalization.ITimeZoneOnCalendar))]
public unsafe partial struct Vtbl
{
}
}
// Windows.Globalization.ILanguageFactory
public unsafe static class ILanguageFactory__Impl
{
// StubClass for 'Windows.Globalization.ILanguageFactory'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.IntPtr CreateLanguage(
global::System.__ComObject __this,
string languageTag)
{
global::System.IntPtr __ret = global::McgInterop.ForwardComSharedStubs.Func_string__IntPtr__<global::Windows.Globalization.ILanguageFactory>(
__this,
languageTag,
global::Windows.Globalization.ILanguageFactory__Impl.Vtbl.idx_CreateLanguage
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
}
// DispatchClass for 'Windows.Globalization.ILanguageFactory'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Globalization.ILanguageFactory))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Globalization.ILanguageFactory
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
global::System.IntPtr global::Windows.Globalization.ILanguageFactory.CreateLanguage(string languageTag)
{
global::System.IntPtr __retVal = global::Windows.Globalization.ILanguageFactory__Impl.StubClass.CreateLanguage(
this,
languageTag
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.Globalization.ILanguageFactory'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Globalization.ILanguageFactory))]
public unsafe partial struct Vtbl
{
internal const int idx_CreateLanguage = 6;
}
}
// Windows.Globalization.ILanguage
public unsafe static class ILanguage__Impl
{
// StubClass for 'Windows.Globalization.ILanguage'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static string get_DisplayName(global::System.__ComObject __this)
{
string __ret = global::McgInterop.ForwardComSharedStubs.Func_string__<global::Windows.Globalization.ILanguage>(
__this,
global::Windows.Globalization.ILanguage__Impl.Vtbl.idx_get_DisplayName
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
}
// DispatchClass for 'Windows.Globalization.ILanguage'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Globalization.ILanguage))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Globalization.ILanguage
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Globalization.ILanguage.DisplayName")]
string global::Windows.Globalization.ILanguage.get_DisplayName()
{
string __retVal = global::Windows.Globalization.ILanguage__Impl.StubClass.get_DisplayName(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.Globalization.ILanguage'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Globalization.ILanguage))]
public unsafe partial struct Vtbl
{
internal const int idx_get_DisplayName = 7;
}
}
// Windows.Globalization.ILanguageExtensionSubtags
public unsafe static class ILanguageExtensionSubtags__Impl
{
// v-table for 'Windows.Globalization.ILanguageExtensionSubtags'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Globalization.ILanguageExtensionSubtags))]
public unsafe partial struct Vtbl
{
}
}
// Windows.Globalization.IGeographicRegionFactory
public unsafe static class IGeographicRegionFactory__Impl
{
// StubClass for 'Windows.Globalization.IGeographicRegionFactory'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.IntPtr CreateGeographicRegion(
global::System.__ComObject __this,
string geographicRegionCode)
{
global::System.IntPtr __ret = global::McgInterop.ForwardComSharedStubs.Func_string__IntPtr__<global::Windows.Globalization.IGeographicRegionFactory>(
__this,
geographicRegionCode,
global::Windows.Globalization.IGeographicRegionFactory__Impl.Vtbl.idx_CreateGeographicRegion
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
}
// DispatchClass for 'Windows.Globalization.IGeographicRegionFactory'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Globalization.IGeographicRegionFactory))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Globalization.IGeographicRegionFactory
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
global::System.IntPtr global::Windows.Globalization.IGeographicRegionFactory.CreateGeographicRegion(string geographicRegionCode)
{
global::System.IntPtr __retVal = global::Windows.Globalization.IGeographicRegionFactory__Impl.StubClass.CreateGeographicRegion(
this,
geographicRegionCode
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.Globalization.IGeographicRegionFactory'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Globalization.IGeographicRegionFactory))]
public unsafe partial struct Vtbl
{
internal const int idx_CreateGeographicRegion = 6;
}
}
// Windows.Globalization.IGeographicRegion
public unsafe static class IGeographicRegion__Impl
{
// StubClass for 'Windows.Globalization.IGeographicRegion'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static string get_DisplayName(global::System.__ComObject __this)
{
string __ret = global::McgInterop.ForwardComSharedStubs.Func_string__<global::Windows.Globalization.IGeographicRegion>(
__this,
global::Windows.Globalization.IGeographicRegion__Impl.Vtbl.idx_get_DisplayName
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
}
// DispatchClass for 'Windows.Globalization.IGeographicRegion'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Globalization.IGeographicRegion))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Globalization.IGeographicRegion
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Globalization.IGeographicRegion.DisplayName")]
string global::Windows.Globalization.IGeographicRegion.get_DisplayName()
{
string __retVal = global::Windows.Globalization.IGeographicRegion__Impl.StubClass.get_DisplayName(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.Globalization.IGeographicRegion'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Globalization.IGeographicRegion))]
public unsafe partial struct Vtbl
{
internal const int idx_get_DisplayName = 10;
}
}
// Windows.Globalization.ICalendarIdentifiersStatics
public unsafe static class ICalendarIdentifiersStatics__Impl
{
// StubClass for 'Windows.Globalization.ICalendarIdentifiersStatics'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static string get_Gregorian(global::System.__ComObject __this)
{
string __ret = global::McgInterop.ForwardComSharedStubs.Func_string__<global::Windows.Globalization.ICalendarIdentifiersStatics>(
__this,
global::Windows.Globalization.ICalendarIdentifiersStatics__Impl.Vtbl.idx_get_Gregorian
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static string get_Hijri(global::System.__ComObject __this)
{
string __ret = global::McgInterop.ForwardComSharedStubs.Func_string__<global::Windows.Globalization.ICalendarIdentifiersStatics>(
__this,
global::Windows.Globalization.ICalendarIdentifiersStatics__Impl.Vtbl.idx_get_Hijri
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static string get_Japanese(global::System.__ComObject __this)
{
string __ret = global::McgInterop.ForwardComSharedStubs.Func_string__<global::Windows.Globalization.ICalendarIdentifiersStatics>(
__this,
global::Windows.Globalization.ICalendarIdentifiersStatics__Impl.Vtbl.idx_get_Japanese
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
}
// DispatchClass for 'Windows.Globalization.ICalendarIdentifiersStatics'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Globalization.ICalendarIdentifiersStatics))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Globalization.ICalendarIdentifiersStatics
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Globalization.ICalendarIdentifiersStatics.Gregorian")]
string global::Windows.Globalization.ICalendarIdentifiersStatics.get_Gregorian()
{
string __retVal = global::Windows.Globalization.ICalendarIdentifiersStatics__Impl.StubClass.get_Gregorian(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Globalization.ICalendarIdentifiersStatics.Hijri")]
string global::Windows.Globalization.ICalendarIdentifiersStatics.get_Hijri()
{
string __retVal = global::Windows.Globalization.ICalendarIdentifiersStatics__Impl.StubClass.get_Hijri(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Globalization.ICalendarIdentifiersStatics.Japanese")]
string global::Windows.Globalization.ICalendarIdentifiersStatics.get_Japanese()
{
string __retVal = global::Windows.Globalization.ICalendarIdentifiersStatics__Impl.StubClass.get_Japanese(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.Globalization.ICalendarIdentifiersStatics'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Globalization.ICalendarIdentifiersStatics))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Gregorian = 6;
internal const int idx_get_Hijri = 8;
internal const int idx_get_Japanese = 9;
}
}
}
namespace Windows.Security.Cryptography
{
// Windows.Security.Cryptography.ICryptographicBufferStatics
public unsafe static class ICryptographicBufferStatics__Impl
{
// StubClass for 'Windows.Security.Cryptography.ICryptographicBufferStatics'
public static partial class StubClass
{
// Signature, Windows.Security.Cryptography.ICryptographicBufferStatics.CreateFromByteArray, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.BlittableArrayMarshaller] rg_byte__unsigned char *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.ComInterfaceMarshaller] Windows_Storage_Streams_IBuffer__Windows_Storage_Streams__IBuffer *,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.Storage.Streams.IBuffer CreateFromByteArray(
global::System.__ComObject __this,
byte[] value)
{
// Setup
uint unsafe_value_mcgLength = 0;
byte* unsafe_value;
global::Windows.Storage.Streams.IBuffer__Impl.Vtbl** unsafe_buffer__retval = default(global::Windows.Storage.Streams.IBuffer__Impl.Vtbl**);
global::Windows.Storage.Streams.IBuffer buffer__retval = default(global::Windows.Storage.Streams.IBuffer);
int unsafe___return__;
try
{
// Marshalling
if (value != null)
unsafe_value_mcgLength = (uint)value.Length;
fixed (byte* pinned_value = global::McgInterop.McgCoreHelpers.GetArrayForCompat(value))
{
unsafe_value = (byte*)pinned_value;
unsafe_buffer__retval = null;
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.Security.Cryptography.ICryptographicBufferStatics).TypeHandle,
global::Windows.Security.Cryptography.ICryptographicBufferStatics__Impl.Vtbl.idx_CreateFromByteArray,
unsafe_value_mcgLength,
unsafe_value,
&(unsafe_buffer__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
buffer__retval = (global::Windows.Storage.Streams.IBuffer)global::System.Runtime.InteropServices.McgModuleManager.ComInterfaceToObject(
((global::System.IntPtr)unsafe_buffer__retval),
typeof(global::Windows.Storage.Streams.IBuffer).TypeHandle
);
}
// Return
return buffer__retval;
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_buffer__retval)));
}
}
// Signature, Windows.Security.Cryptography.ICryptographicBufferStatics.CopyToByteArray, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.ComInterfaceMarshaller] Windows_Storage_Streams_IBuffer__Windows_Storage_Streams__IBuffer *, [fwd] [out] [managedbyref] [nativebyref] [Mcg.CodeGen.BlittableArrayMarshaller] rg_byte__unsigned char *,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void CopyToByteArray(
global::System.__ComObject __this,
global::Windows.Storage.Streams.IBuffer buffer,
out byte[] value)
{
// Setup
global::Windows.Storage.Streams.IBuffer__Impl.Vtbl** unsafe_buffer = default(global::Windows.Storage.Streams.IBuffer__Impl.Vtbl**);
byte* unsafe_value = default(byte*);
uint unsafe_value_mcgLength = 0;
int unsafe___return__;
try
{
// Marshalling
unsafe_buffer = (global::Windows.Storage.Streams.IBuffer__Impl.Vtbl**)global::System.Runtime.InteropServices.McgModuleManager.ObjectToComInterface(
buffer,
typeof(global::Windows.Storage.Streams.IBuffer).TypeHandle
);
unsafe_value = null;
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.Security.Cryptography.ICryptographicBufferStatics).TypeHandle,
global::Windows.Security.Cryptography.ICryptographicBufferStatics__Impl.Vtbl.idx_CopyToByteArray,
unsafe_buffer,
&(unsafe_value_mcgLength),
&(unsafe_value)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
if (unsafe_value == null)
value = null;
else
{
value = new byte[unsafe_value_mcgLength];
if (value != null)
for (uint mcgIdx = 0; (mcgIdx < unsafe_value_mcgLength); mcgIdx++)
{
// [fwd] [out] [managedbyref] [nativebyref] [optional] [Mcg.CodeGen.BlittableValueMarshaller] byte__unsigned char value
value[mcgIdx] = unsafe_value[mcgIdx];
}
}
// Return
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_buffer)));
global::System.GC.KeepAlive(buffer);
global::System.Runtime.InteropServices.ExternalInterop.SafeCoTaskMemFree(unsafe_value);
}
}
}
// DispatchClass for 'Windows.Security.Cryptography.ICryptographicBufferStatics'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Security.Cryptography.ICryptographicBufferStatics))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Security.Cryptography.ICryptographicBufferStatics
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
global::Windows.Storage.Streams.IBuffer global::Windows.Security.Cryptography.ICryptographicBufferStatics.CreateFromByteArray(byte[] value)
{
global::Windows.Storage.Streams.IBuffer __retVal = global::Windows.Security.Cryptography.ICryptographicBufferStatics__Impl.StubClass.CreateFromByteArray(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.Security.Cryptography.ICryptographicBufferStatics.CopyToByteArray(
global::Windows.Storage.Streams.IBuffer buffer,
out byte[] value)
{
global::Windows.Security.Cryptography.ICryptographicBufferStatics__Impl.StubClass.CopyToByteArray(
this,
buffer,
out value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// v-table for 'Windows.Security.Cryptography.ICryptographicBufferStatics'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Security.Cryptography.ICryptographicBufferStatics))]
public unsafe partial struct Vtbl
{
internal const int idx_CreateFromByteArray = 9;
internal const int idx_CopyToByteArray = 10;
}
}
}
namespace Windows.Security.Cryptography.Core
{
// Windows.Security.Cryptography.Core.IHashAlgorithmNamesStatics
public unsafe static class IHashAlgorithmNamesStatics__Impl
{
// StubClass for 'Windows.Security.Cryptography.Core.IHashAlgorithmNamesStatics'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static string get_Sha1(global::System.__ComObject __this)
{
string __ret = global::McgInterop.ForwardComSharedStubs.Func_string__<global::Windows.Security.Cryptography.Core.IHashAlgorithmNamesStatics>(
__this,
global::Windows.Security.Cryptography.Core.IHashAlgorithmNamesStatics__Impl.Vtbl.idx_get_Sha1
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
}
// DispatchClass for 'Windows.Security.Cryptography.Core.IHashAlgorithmNamesStatics'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Security.Cryptography.Core.IHashAlgorithmNamesStatics))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Security.Cryptography.Core.IHashAlgorithmNamesStatics
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Security.Cryptography.Core.IHashAlgorithmNamesStatics.Sha1")]
string global::Windows.Security.Cryptography.Core.IHashAlgorithmNamesStatics.get_Sha1()
{
string __retVal = global::Windows.Security.Cryptography.Core.IHashAlgorithmNamesStatics__Impl.StubClass.get_Sha1(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.Security.Cryptography.Core.IHashAlgorithmNamesStatics'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Security.Cryptography.Core.IHashAlgorithmNamesStatics))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Sha1 = 7;
}
}
// Windows.Security.Cryptography.Core.IHashAlgorithmProviderStatics
public unsafe static class IHashAlgorithmProviderStatics__Impl
{
// StubClass for 'Windows.Security.Cryptography.Core.IHashAlgorithmProviderStatics'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.Security.Cryptography.Core.HashAlgorithmProvider OpenAlgorithm(
global::System.__ComObject __this,
string algorithm)
{
global::Windows.Security.Cryptography.Core.HashAlgorithmProvider __ret = global::McgInterop.ForwardComSharedStubs.Func_string__TResult__<global::Windows.Security.Cryptography.Core.IHashAlgorithmProviderStatics, global::Windows.Security.Cryptography.Core.HashAlgorithmProvider>(
__this,
algorithm,
global::Windows.Security.Cryptography.Core.IHashAlgorithmProviderStatics__Impl.Vtbl.idx_OpenAlgorithm
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
}
// DispatchClass for 'Windows.Security.Cryptography.Core.IHashAlgorithmProviderStatics'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Security.Cryptography.Core.IHashAlgorithmProviderStatics))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Security.Cryptography.Core.IHashAlgorithmProviderStatics
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
global::Windows.Security.Cryptography.Core.HashAlgorithmProvider global::Windows.Security.Cryptography.Core.IHashAlgorithmProviderStatics.OpenAlgorithm(string algorithm)
{
global::Windows.Security.Cryptography.Core.HashAlgorithmProvider __retVal = global::Windows.Security.Cryptography.Core.IHashAlgorithmProviderStatics__Impl.StubClass.OpenAlgorithm(
this,
algorithm
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.Security.Cryptography.Core.IHashAlgorithmProviderStatics'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Security.Cryptography.Core.IHashAlgorithmProviderStatics))]
public unsafe partial struct Vtbl
{
internal const int idx_OpenAlgorithm = 6;
}
}
// Windows.Security.Cryptography.Core.IHashAlgorithmProvider
public unsafe static class IHashAlgorithmProvider__Impl
{
// StubClass for 'Windows.Security.Cryptography.Core.IHashAlgorithmProvider'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.Storage.Streams.IBuffer HashData(
global::System.__ComObject __this,
global::Windows.Storage.Streams.IBuffer data)
{
global::Windows.Storage.Streams.IBuffer __ret = global::McgInterop.ForwardComSharedStubs.Func_TArg0__TResult__<global::Windows.Security.Cryptography.Core.IHashAlgorithmProvider, global::Windows.Storage.Streams.IBuffer, global::Windows.Storage.Streams.IBuffer>(
__this,
data,
global::Windows.Security.Cryptography.Core.IHashAlgorithmProvider__Impl.Vtbl.idx_HashData
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
}
// DispatchClass for 'Windows.Security.Cryptography.Core.IHashAlgorithmProvider'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Security.Cryptography.Core.IHashAlgorithmProvider))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Security.Cryptography.Core.IHashAlgorithmProvider
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
global::Windows.Storage.Streams.IBuffer global::Windows.Security.Cryptography.Core.IHashAlgorithmProvider.HashData(global::Windows.Storage.Streams.IBuffer data)
{
global::Windows.Storage.Streams.IBuffer __retVal = global::Windows.Security.Cryptography.Core.IHashAlgorithmProvider__Impl.StubClass.HashData(
this,
data
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.Security.Cryptography.Core.IHashAlgorithmProvider'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Security.Cryptography.Core.IHashAlgorithmProvider))]
public unsafe partial struct Vtbl
{
internal const int idx_HashData = 8;
}
}
}
namespace Windows.Storage
{
// Windows.Storage.IStorageItem
public unsafe static class IStorageItem__Impl
{
// StubClass for 'Windows.Storage.IStorageItem'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static string get_Path(global::System.__ComObject __this)
{
string __ret = global::McgInterop.ForwardComSharedStubs.Func_string__<global::Windows.Storage.IStorageItem>(
__this,
global::Windows.Storage.IStorageItem__Impl.Vtbl.idx_get_Path
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
}
// DispatchClass for 'Windows.Storage.IStorageItem'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Storage.IStorageItem))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Storage.IStorageItem
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Storage.IStorageItem.Path")]
string global::Windows.Storage.IStorageItem.get_Path()
{
string __retVal = global::Windows.Storage.IStorageItem__Impl.StubClass.get_Path(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.Storage.IStorageItem'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Storage.IStorageItem))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Path = 12;
}
}
// Windows.Storage.IStorageFolder
public unsafe static class IStorageFolder__Impl
{
// StubClass for 'Windows.Storage.IStorageFolder'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.Foundation.IAsyncOperation<global::Windows.Storage.StorageFile> GetFileAsync(
global::System.__ComObject __this,
string name)
{
global::Windows.Foundation.IAsyncOperation<global::Windows.Storage.StorageFile> __ret = global::McgInterop.ForwardComSharedStubs.Func_string__TResult__<global::Windows.Storage.IStorageFolder, global::Windows.Foundation.IAsyncOperation<global::Windows.Storage.StorageFile>>(
__this,
name,
global::Windows.Storage.IStorageFolder__Impl.Vtbl.idx_GetFileAsync
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.Foundation.IAsyncOperation<global::Windows.Storage.IStorageItem> GetItemAsync(
global::System.__ComObject __this,
string name)
{
global::Windows.Foundation.IAsyncOperation<global::Windows.Storage.IStorageItem> __ret = global::McgInterop.ForwardComSharedStubs.Func_string__TResult__<global::Windows.Storage.IStorageFolder, global::Windows.Foundation.IAsyncOperation<global::Windows.Storage.IStorageItem>>(
__this,
name,
global::Windows.Storage.IStorageFolder__Impl.Vtbl.idx_GetItemAsync
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
}
// DispatchClass for 'Windows.Storage.IStorageFolder'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Storage.IStorageFolder))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Storage.IStorageFolder
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Storage.IStorageItem.Path")]
string global::Windows.Storage.IStorageItem.get_Path()
{
global::McgInterop.McgHelpers.FailFastForReducedMethod();
return default(string);
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
global::Windows.Foundation.IAsyncOperation<global::Windows.Storage.StorageFile> global::Windows.Storage.IStorageFolder.GetFileAsync(string name)
{
global::Windows.Foundation.IAsyncOperation<global::Windows.Storage.StorageFile> __retVal = global::Windows.Storage.IStorageFolder__Impl.StubClass.GetFileAsync(
this,
name
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
global::Windows.Foundation.IAsyncOperation<global::Windows.Storage.IStorageItem> global::Windows.Storage.IStorageFolder.GetItemAsync(string name)
{
global::Windows.Foundation.IAsyncOperation<global::Windows.Storage.IStorageItem> __retVal = global::Windows.Storage.IStorageFolder__Impl.StubClass.GetItemAsync(
this,
name
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.Storage.IStorageFolder'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Storage.IStorageFolder))]
public unsafe partial struct Vtbl
{
internal const int idx_GetFileAsync = 10;
internal const int idx_GetItemAsync = 12;
}
}
// Windows.Storage.IStorageFile
public unsafe static class IStorageFile__Impl
{
// StubClass for 'Windows.Storage.IStorageFile'
public static partial class StubClass
{
// Signature, Windows.Storage.IStorageFile.OpenAsync, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.EnumMarshaller] -> int, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.ComInterfaceMarshaller] Windows_Foundation_IAsyncOperation_1_Windows_Storage_Streams_IRandomAccessStream___Windows_Foundation__IAsyncOperation_A_Windows_Storage_Streams_IRandomAccessStream_V_ *,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.Foundation.IAsyncOperation<global::Windows.Storage.Streams.IRandomAccessStream> OpenAsync(
global::System.__ComObject __this,
global::Windows.Storage.FileAccessMode accessMode)
{
// Setup
global::Windows.Foundation.IAsyncOperation_A_Windows_Storage_Streams_IRandomAccessStream_V___Impl.Vtbl** unsafe_operation__retval = default(global::Windows.Foundation.IAsyncOperation_A_Windows_Storage_Streams_IRandomAccessStream_V___Impl.Vtbl**);
global::Windows.Foundation.IAsyncOperation<global::Windows.Storage.Streams.IRandomAccessStream> operation__retval = default(global::Windows.Foundation.IAsyncOperation<global::Windows.Storage.Streams.IRandomAccessStream>);
int unsafe___return__;
try
{
// Marshalling
unsafe_operation__retval = null;
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.Storage.IStorageFile).TypeHandle,
global::Windows.Storage.IStorageFile__Impl.Vtbl.idx_OpenAsync,
((int)accessMode),
&(unsafe_operation__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
operation__retval = (global::Windows.Foundation.IAsyncOperation<global::Windows.Storage.Streams.IRandomAccessStream>)global::System.Runtime.InteropServices.McgModuleManager.ComInterfaceToObject(
((global::System.IntPtr)unsafe_operation__retval),
typeof(global::Windows.Foundation.IAsyncOperation<global::Windows.Storage.Streams.IRandomAccessStream>).TypeHandle
);
// Return
return operation__retval;
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_operation__retval)));
}
}
}
// DispatchClass for 'Windows.Storage.IStorageFile'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Storage.IStorageFile))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Storage.IStorageFile
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Storage.IStorageItem.Path")]
string global::Windows.Storage.IStorageItem.get_Path()
{
global::McgInterop.McgHelpers.FailFastForReducedMethod();
return default(string);
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
global::Windows.Foundation.IAsyncOperation<global::Windows.Storage.Streams.IRandomAccessStream> global::Windows.Storage.IStorageFile.OpenAsync(global::Windows.Storage.FileAccessMode accessMode)
{
global::Windows.Foundation.IAsyncOperation<global::Windows.Storage.Streams.IRandomAccessStream> __retVal = global::Windows.Storage.IStorageFile__Impl.StubClass.OpenAsync(
this,
accessMode
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.Storage.IStorageFile'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Storage.IStorageFile))]
public unsafe partial struct Vtbl
{
internal const int idx_OpenAsync = 8;
}
}
// Windows.Storage.IStorageItemProperties
public unsafe static class IStorageItemProperties__Impl
{
// v-table for 'Windows.Storage.IStorageItemProperties'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Storage.IStorageItemProperties))]
public unsafe partial struct Vtbl
{
}
}
// Windows.Storage.IStorageItemProperties2
public unsafe static class IStorageItemProperties2__Impl
{
// v-table for 'Windows.Storage.IStorageItemProperties2'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Storage.IStorageItemProperties2))]
public unsafe partial struct Vtbl
{
}
}
// Windows.Storage.IStorageItem2
public unsafe static class IStorageItem2__Impl
{
// v-table for 'Windows.Storage.IStorageItem2'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Storage.IStorageItem2))]
public unsafe partial struct Vtbl
{
}
}
// Windows.Storage.IStorageItemPropertiesWithProvider
public unsafe static class IStorageItemPropertiesWithProvider__Impl
{
// v-table for 'Windows.Storage.IStorageItemPropertiesWithProvider'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Storage.IStorageItemPropertiesWithProvider))]
public unsafe partial struct Vtbl
{
}
}
// Windows.Storage.IStorageFilePropertiesWithAvailability
public unsafe static class IStorageFilePropertiesWithAvailability__Impl
{
// v-table for 'Windows.Storage.IStorageFilePropertiesWithAvailability'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Storage.IStorageFilePropertiesWithAvailability))]
public unsafe partial struct Vtbl
{
}
}
// Windows.Storage.IStorageFile2
public unsafe static class IStorageFile2__Impl
{
// v-table for 'Windows.Storage.IStorageFile2'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Storage.IStorageFile2))]
public unsafe partial struct Vtbl
{
}
}
// Windows.Storage.IStorageFolder2
public unsafe static class IStorageFolder2__Impl
{
// v-table for 'Windows.Storage.IStorageFolder2'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Storage.IStorageFolder2))]
public unsafe partial struct Vtbl
{
}
}
}
namespace Windows.Storage.Search
{
// Windows.Storage.Search.IStorageFolderQueryOperations
public unsafe static class IStorageFolderQueryOperations__Impl
{
// v-table for 'Windows.Storage.Search.IStorageFolderQueryOperations'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Storage.Search.IStorageFolderQueryOperations))]
public unsafe partial struct Vtbl
{
}
}
}
namespace Windows.Storage.Streams
{
// Windows.Storage.Streams.IBuffer
public unsafe static class IBuffer__Impl
{
// StubClass for 'Windows.Storage.Streams.IBuffer'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static uint get_Capacity(global::System.__ComObject __this)
{
uint __ret = global::McgInterop.ForwardComSharedStubs.Func_uint__<global::Windows.Storage.Streams.IBuffer>(
__this,
global::Windows.Storage.Streams.IBuffer__Impl.Vtbl.idx_get_Capacity
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static uint get_Length(global::System.__ComObject __this)
{
uint __ret = global::McgInterop.ForwardComSharedStubs.Func_uint__<global::Windows.Storage.Streams.IBuffer>(
__this,
global::Windows.Storage.Streams.IBuffer__Impl.Vtbl.idx_get_Length
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void put_Length(
global::System.__ComObject __this,
uint value)
{
global::McgInterop.ForwardComSharedStubs.Proc_uint__<global::Windows.Storage.Streams.IBuffer>(
__this,
value,
global::Windows.Storage.Streams.IBuffer__Impl.Vtbl.idx_put_Length
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// DispatchClass for 'Windows.Storage.Streams.IBuffer'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Storage.Streams.IBuffer))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Storage.Streams.IBuffer
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Storage.Streams.IBuffer.Capacity")]
uint global::Windows.Storage.Streams.IBuffer.get_Capacity()
{
uint __retVal = global::Windows.Storage.Streams.IBuffer__Impl.StubClass.get_Capacity(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Storage.Streams.IBuffer.Length")]
uint global::Windows.Storage.Streams.IBuffer.get_Length()
{
uint __retVal = global::Windows.Storage.Streams.IBuffer__Impl.StubClass.get_Length(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertySet, "Windows.Storage.Streams.IBuffer.Length")]
void global::Windows.Storage.Streams.IBuffer.put_Length(uint value)
{
global::Windows.Storage.Streams.IBuffer__Impl.StubClass.put_Length(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// v-table for 'Windows.Storage.Streams.IBuffer'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Storage.Streams.IBuffer))]
[global::System.Runtime.InteropServices.McgRootsType(typeof(global::Windows.Storage.Streams.IBuffer))]
public unsafe partial struct Vtbl
{
global::System.IntPtr pfnQueryInterface;
global::System.IntPtr pfnAddRef;
global::System.IntPtr pfnRelease;
global::System.IntPtr pfnGetIids;
global::System.IntPtr pfnGetRuntimeClassName;
global::System.IntPtr pfnGetTrustLevel;
// Windows_Storage_Streams__IBuffer
global::System.IntPtr pfnget_Capacity_Windows_Storage_Streams__IBuffer;
global::System.IntPtr pfnget_Length_Windows_Storage_Streams__IBuffer;
global::System.IntPtr pfnput_Length_Windows_Storage_Streams__IBuffer;
internal const int idx_get_Capacity = 6;
internal const int idx_get_Length = 7;
internal const int idx_put_Length = 8;
[global::System.Runtime.CompilerServices.InitDataBlob(typeof(global::Windows.Storage.Streams.IBuffer__Impl.Vtbl.Windows_Storage_Streams_IBuffer__Impl_Vtbl_McgRvaContainer), "RVA_Windows_Storage_Streams_IBuffer__Impl_Vtbl_s_theCcwVtable")]
public static global::Windows.Storage.Streams.IBuffer__Impl.Vtbl s_theCcwVtable
#if false
= new global::Windows.Storage.Streams.IBuffer__Impl.Vtbl() {
pfnQueryInterface = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfQueryInterface>(System.Runtime.InteropServices.__vtable_IUnknown.QueryInterface),
pfnAddRef = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfAddRef>(System.Runtime.InteropServices.__vtable_IUnknown.AddRef),
pfnRelease = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfRelease>(System.Runtime.InteropServices.__vtable_IUnknown.Release),
pfnGetIids = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget0>(System.Runtime.InteropServices.__vtable_IInspectable.GetIIDs),
pfnGetRuntimeClassName = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget1>(System.Runtime.InteropServices.__vtable_IInspectable.GetRuntimeClassName),
pfnGetTrustLevel = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget1>(System.Runtime.InteropServices.__vtable_IInspectable.GetTrustLevel),
pfnget_Capacity_Windows_Storage_Streams__IBuffer = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget134>(global::Windows.Storage.Streams.IBuffer__Impl.Vtbl.get_Capacity__STUB),
pfnget_Length_Windows_Storage_Streams__IBuffer = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget134>(global::Windows.Storage.Streams.IBuffer__Impl.Vtbl.get_Length__STUB),
pfnput_Length_Windows_Storage_Streams__IBuffer = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget135>(global::Windows.Storage.Streams.IBuffer__Impl.Vtbl.put_Length__STUB),
}
#endif
;
public static global::System.IntPtr pNativeVtable;
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int get_Capacity__STUB(
global::System.IntPtr pComThis,
uint* unsafe_value__retval)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.Storage.Streams.IBuffer>(
__this,
0
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Func_uint__(
__this,
unsafe_value__retval,
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int get_Length__STUB(
global::System.IntPtr pComThis,
uint* unsafe_value__retval)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.Storage.Streams.IBuffer>(
__this,
1
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Func_uint__(
__this,
unsafe_value__retval,
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int put_Length__STUB(
global::System.IntPtr pComThis,
uint unsafe_value)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.Storage.Streams.IBuffer>(
__this,
2
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Proc_uint__(
__this,
unsafe_value,
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
private static class Windows_Storage_Streams_IBuffer__Impl_Vtbl_McgRvaContainer
{
[global::System.Runtime.CompilerServices.MethodAddrFixup(0, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "QueryInterface")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(4, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "AddRef")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(8, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "Release")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(12, typeof(global::System.Runtime.InteropServices.__vtable_IInspectable), "GetIIDs")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(16, typeof(global::System.Runtime.InteropServices.__vtable_IInspectable), "GetRuntimeClassName")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(20, typeof(global::System.Runtime.InteropServices.__vtable_IInspectable), "GetTrustLevel")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(24, typeof(global::Windows.Storage.Streams.IBuffer__Impl.Vtbl), "get_Capacity__STUB")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(28, typeof(global::Windows.Storage.Streams.IBuffer__Impl.Vtbl), "get_Length__STUB")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(32, typeof(global::Windows.Storage.Streams.IBuffer__Impl.Vtbl), "put_Length__STUB")]
[global::System.Runtime.CompilerServices.NonArray]
static readonly byte[] RVA_Windows_Storage_Streams_IBuffer__Impl_Vtbl_s_theCcwVtable = new byte[] {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
}
}
}
// Windows.Storage.Streams.IRandomAccessStreamReference
public unsafe static class IRandomAccessStreamReference__Impl
{
// v-table for 'Windows.Storage.Streams.IRandomAccessStreamReference'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Storage.Streams.IRandomAccessStreamReference))]
public unsafe partial struct Vtbl
{
}
}
// Windows.Storage.Streams.IInputStreamReference
public unsafe static class IInputStreamReference__Impl
{
// v-table for 'Windows.Storage.Streams.IInputStreamReference'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Storage.Streams.IInputStreamReference))]
public unsafe partial struct Vtbl
{
}
}
// Windows.Storage.Streams.IRandomAccessStream
public unsafe static class IRandomAccessStream__Impl
{
// StubClass for 'Windows.Storage.Streams.IRandomAccessStream'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static ulong get_Size(global::System.__ComObject __this)
{
ulong __ret = global::McgInterop.ForwardComSharedStubs.Func_ulong__<global::Windows.Storage.Streams.IRandomAccessStream>(
__this,
global::Windows.Storage.Streams.IRandomAccessStream__Impl.Vtbl.idx_get_Size
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void put_Size(
global::System.__ComObject __this,
ulong value)
{
global::McgInterop.ForwardComSharedStubs.Proc_ulong__<global::Windows.Storage.Streams.IRandomAccessStream>(
__this,
value,
global::Windows.Storage.Streams.IRandomAccessStream__Impl.Vtbl.idx_put_Size
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static ulong get_Position(global::System.__ComObject __this)
{
ulong __ret = global::McgInterop.ForwardComSharedStubs.Func_ulong__<global::Windows.Storage.Streams.IRandomAccessStream>(
__this,
global::Windows.Storage.Streams.IRandomAccessStream__Impl.Vtbl.idx_get_Position
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void Seek(
global::System.__ComObject __this,
ulong position)
{
global::McgInterop.ForwardComSharedStubs.Proc_ulong__<global::Windows.Storage.Streams.IRandomAccessStream>(
__this,
position,
global::Windows.Storage.Streams.IRandomAccessStream__Impl.Vtbl.idx_Seek
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool get_CanRead(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.Storage.Streams.IRandomAccessStream>(
__this,
global::Windows.Storage.Streams.IRandomAccessStream__Impl.Vtbl.idx_get_CanRead
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool get_CanWrite(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.Storage.Streams.IRandomAccessStream>(
__this,
global::Windows.Storage.Streams.IRandomAccessStream__Impl.Vtbl.idx_get_CanWrite
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
}
// DispatchClass for 'Windows.Storage.Streams.IRandomAccessStream'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Storage.Streams.IRandomAccessStream))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Storage.Streams.IRandomAccessStream
{
public virtual void Dispose()
{
global::System.IDisposable__Impl.StubClass.Close(this);
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
global::Windows.Foundation.IAsyncOperationWithProgress<global::Windows.Storage.Streams.IBuffer, uint> global::Windows.Storage.Streams.IInputStream.ReadAsync(
global::Windows.Storage.Streams.IBuffer buffer,
uint count,
global::Windows.Storage.Streams.InputStreamOptions options)
{
global::McgInterop.McgHelpers.FailFastForReducedMethod();
return default(global::Windows.Foundation.IAsyncOperationWithProgress<global::Windows.Storage.Streams.IBuffer, uint>);
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
global::Windows.Foundation.IAsyncOperationWithProgress<uint, uint> global::Windows.Storage.Streams.IOutputStream.WriteAsync(global::Windows.Storage.Streams.IBuffer buffer)
{
global::McgInterop.McgHelpers.FailFastForReducedMethod();
return default(global::Windows.Foundation.IAsyncOperationWithProgress<uint, uint>);
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
global::Windows.Foundation.IAsyncOperation<bool> global::Windows.Storage.Streams.IOutputStream.FlushAsync()
{
global::McgInterop.McgHelpers.FailFastForReducedMethod();
return default(global::Windows.Foundation.IAsyncOperation<bool>);
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Storage.Streams.IRandomAccessStream.Size")]
ulong global::Windows.Storage.Streams.IRandomAccessStream.get_Size()
{
ulong __retVal = global::Windows.Storage.Streams.IRandomAccessStream__Impl.StubClass.get_Size(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertySet, "Windows.Storage.Streams.IRandomAccessStream.Size")]
void global::Windows.Storage.Streams.IRandomAccessStream.put_Size(ulong value)
{
global::Windows.Storage.Streams.IRandomAccessStream__Impl.StubClass.put_Size(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Storage.Streams.IRandomAccessStream.Position")]
ulong global::Windows.Storage.Streams.IRandomAccessStream.get_Position()
{
ulong __retVal = global::Windows.Storage.Streams.IRandomAccessStream__Impl.StubClass.get_Position(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.Storage.Streams.IRandomAccessStream.Seek(ulong position)
{
global::Windows.Storage.Streams.IRandomAccessStream__Impl.StubClass.Seek(
this,
position
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Storage.Streams.IRandomAccessStream.CanRead")]
bool global::Windows.Storage.Streams.IRandomAccessStream.get_CanRead()
{
bool __retVal = global::Windows.Storage.Streams.IRandomAccessStream__Impl.StubClass.get_CanRead(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.Storage.Streams.IRandomAccessStream.CanWrite")]
bool global::Windows.Storage.Streams.IRandomAccessStream.get_CanWrite()
{
bool __retVal = global::Windows.Storage.Streams.IRandomAccessStream__Impl.StubClass.get_CanWrite(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.Storage.Streams.IRandomAccessStream'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Storage.Streams.IRandomAccessStream))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Size = 6;
internal const int idx_put_Size = 7;
internal const int idx_get_Position = 10;
internal const int idx_Seek = 11;
internal const int idx_get_CanRead = 13;
internal const int idx_get_CanWrite = 14;
}
}
// Windows.Storage.Streams.IInputStream
public unsafe static class IInputStream__Impl
{
// StubClass for 'Windows.Storage.Streams.IInputStream'
public static partial class StubClass
{
// Signature, Windows.Storage.Streams.IInputStream.ReadAsync, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.ComInterfaceMarshaller] Windows_Storage_Streams_IBuffer__Windows_Storage_Streams__IBuffer *, [fwd] [in] [Mcg.CodeGen.BlittableValueMarshaller] uint__unsigned int, [fwd] [in] [Mcg.CodeGen.EnumMarshaller] Windows_Storage_Streams_InputStreamOptions__Windows_Storage_Streams__InputStreamOptions, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.ComInterfaceMarshaller] Windows_Foundation_IAsyncOperationWithProgress_2_Windows_Storage_Streams_IBuffer__uint___Windows_Foundation__IAsyncOperationWithProgress_A_Windows_Storage_Streams_IBuffer_j_uint_V_ *,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.Foundation.IAsyncOperationWithProgress<global::Windows.Storage.Streams.IBuffer, uint> ReadAsync(
global::System.__ComObject __this,
global::Windows.Storage.Streams.IBuffer buffer,
uint count,
global::Windows.Storage.Streams.InputStreamOptions options)
{
// Setup
global::Windows.Storage.Streams.IBuffer__Impl.Vtbl** unsafe_buffer = default(global::Windows.Storage.Streams.IBuffer__Impl.Vtbl**);
global::Windows.Foundation.IAsyncOperationWithProgress_A_Windows_Storage_Streams_IBuffer_j_uint_V___Impl.Vtbl** unsafe_operation__retval = default(global::Windows.Foundation.IAsyncOperationWithProgress_A_Windows_Storage_Streams_IBuffer_j_uint_V___Impl.Vtbl**);
global::Windows.Foundation.IAsyncOperationWithProgress<global::Windows.Storage.Streams.IBuffer, uint> operation__retval = default(global::Windows.Foundation.IAsyncOperationWithProgress<global::Windows.Storage.Streams.IBuffer, uint>);
int unsafe___return__;
try
{
// Marshalling
unsafe_buffer = (global::Windows.Storage.Streams.IBuffer__Impl.Vtbl**)global::System.Runtime.InteropServices.McgModuleManager.ObjectToComInterface(
buffer,
typeof(global::Windows.Storage.Streams.IBuffer).TypeHandle
);
unsafe_operation__retval = null;
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.Storage.Streams.IInputStream).TypeHandle,
global::Windows.Storage.Streams.IInputStream__Impl.Vtbl.idx_ReadAsync,
unsafe_buffer,
count,
options,
&(unsafe_operation__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
operation__retval = (global::Windows.Foundation.IAsyncOperationWithProgress<global::Windows.Storage.Streams.IBuffer, uint>)global::System.Runtime.InteropServices.McgModuleManager.ComInterfaceToObject(
((global::System.IntPtr)unsafe_operation__retval),
typeof(global::Windows.Foundation.IAsyncOperationWithProgress<global::Windows.Storage.Streams.IBuffer, uint>).TypeHandle
);
// Return
return operation__retval;
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_buffer)));
global::System.GC.KeepAlive(buffer);
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_operation__retval)));
}
}
}
// DispatchClass for 'Windows.Storage.Streams.IInputStream'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Storage.Streams.IInputStream))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Storage.Streams.IInputStream
{
public virtual void Dispose()
{
global::System.IDisposable__Impl.StubClass.Close(this);
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
global::Windows.Foundation.IAsyncOperationWithProgress<global::Windows.Storage.Streams.IBuffer, uint> global::Windows.Storage.Streams.IInputStream.ReadAsync(
global::Windows.Storage.Streams.IBuffer buffer,
uint count,
global::Windows.Storage.Streams.InputStreamOptions options)
{
global::Windows.Foundation.IAsyncOperationWithProgress<global::Windows.Storage.Streams.IBuffer, uint> __retVal = global::Windows.Storage.Streams.IInputStream__Impl.StubClass.ReadAsync(
this,
buffer,
count,
options
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.Storage.Streams.IInputStream'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Storage.Streams.IInputStream))]
public unsafe partial struct Vtbl
{
internal const int idx_ReadAsync = 6;
}
}
// Windows.Storage.Streams.IOutputStream
public unsafe static class IOutputStream__Impl
{
// StubClass for 'Windows.Storage.Streams.IOutputStream'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.Foundation.IAsyncOperationWithProgress<uint, uint> WriteAsync(
global::System.__ComObject __this,
global::Windows.Storage.Streams.IBuffer buffer)
{
global::Windows.Foundation.IAsyncOperationWithProgress<uint, uint> __ret = global::McgInterop.ForwardComSharedStubs.Func_TArg0__TResult__<global::Windows.Storage.Streams.IOutputStream, global::Windows.Storage.Streams.IBuffer, global::Windows.Foundation.IAsyncOperationWithProgress<uint, uint>>(
__this,
buffer,
global::Windows.Storage.Streams.IOutputStream__Impl.Vtbl.idx_WriteAsync
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.Foundation.IAsyncOperation<bool> FlushAsync(global::System.__ComObject __this)
{
global::Windows.Foundation.IAsyncOperation<bool> __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.Storage.Streams.IOutputStream, global::Windows.Foundation.IAsyncOperation<bool>>(
__this,
global::Windows.Storage.Streams.IOutputStream__Impl.Vtbl.idx_FlushAsync
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
}
// DispatchClass for 'Windows.Storage.Streams.IOutputStream'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Storage.Streams.IOutputStream))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.Storage.Streams.IOutputStream
{
public virtual void Dispose()
{
global::System.IDisposable__Impl.StubClass.Close(this);
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
global::Windows.Foundation.IAsyncOperationWithProgress<uint, uint> global::Windows.Storage.Streams.IOutputStream.WriteAsync(global::Windows.Storage.Streams.IBuffer buffer)
{
global::Windows.Foundation.IAsyncOperationWithProgress<uint, uint> __retVal = global::Windows.Storage.Streams.IOutputStream__Impl.StubClass.WriteAsync(
this,
buffer
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
global::Windows.Foundation.IAsyncOperation<bool> global::Windows.Storage.Streams.IOutputStream.FlushAsync()
{
global::Windows.Foundation.IAsyncOperation<bool> __retVal = global::Windows.Storage.Streams.IOutputStream__Impl.StubClass.FlushAsync(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.Storage.Streams.IOutputStream'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.Storage.Streams.IOutputStream))]
public unsafe partial struct Vtbl
{
internal const int idx_WriteAsync = 6;
internal const int idx_FlushAsync = 7;
}
}
}
namespace Windows.System.Threading
{
// Windows.System.Threading.WorkItemHandler
public unsafe static class WorkItemHandler__Impl
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void Invoke(
this global::System.__ComObject __this,
global::Windows.Foundation.IAsyncAction operation)
{
global::McgInterop.ForwardComSharedStubs.Proc_TArg0__<global::Windows.System.Threading.WorkItemHandler, global::Windows.Foundation.IAsyncAction>(
__this,
operation,
global::Windows.System.Threading.WorkItemHandler__Impl.Vtbl.idx_Invoke
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// v-table for 'Windows.System.Threading.WorkItemHandler'
[global::System.Runtime.InteropServices.McgRootsType(typeof(global::Windows.System.Threading.WorkItemHandler))]
public unsafe partial struct Vtbl
{
global::System.IntPtr pfnQueryInterface;
global::System.IntPtr pfnAddRef;
global::System.IntPtr pfnRelease;
// Windows_System_Threading__WorkItemHandler
global::System.IntPtr pfnInvoke_Windows_System_Threading__WorkItemHandler;
internal const int idx_Invoke = 3;
[global::System.Runtime.CompilerServices.InitDataBlob(typeof(global::Windows.System.Threading.WorkItemHandler__Impl.Vtbl.Windows_System_Threading_WorkItemHandler__Impl_Vtbl_McgRvaContainer), "RVA_Windows_System_Threading_WorkItemHandler__Impl_Vtbl_s_theCcwVtable")]
public static global::Windows.System.Threading.WorkItemHandler__Impl.Vtbl s_theCcwVtable
#if false
= new global::Windows.System.Threading.WorkItemHandler__Impl.Vtbl() {
pfnQueryInterface = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfQueryInterface>(System.Runtime.InteropServices.__vtable_IUnknown.QueryInterface),
pfnAddRef = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfAddRef>(System.Runtime.InteropServices.__vtable_IUnknown.AddRef),
pfnRelease = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfRelease>(System.Runtime.InteropServices.__vtable_IUnknown.Release),
pfnInvoke_Windows_System_Threading__WorkItemHandler = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget119>(global::Windows.System.Threading.WorkItemHandler__Impl.Vtbl.Invoke__STUB),
}
#endif
;
public static global::System.IntPtr pNativeVtable;
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int Invoke__STUB(
global::System.IntPtr pComThis,
global::Windows.Foundation.IAsyncAction__Impl.Vtbl** unsafe_operation)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.System.Threading.WorkItemHandler>(
__this,
0
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Proc_TArg0__<global::Windows.Foundation.IAsyncAction>(
__this,
unsafe_operation,
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
private static class Windows_System_Threading_WorkItemHandler__Impl_Vtbl_McgRvaContainer
{
[global::System.Runtime.CompilerServices.MethodAddrFixup(0, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "QueryInterface")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(4, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "AddRef")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(8, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "Release")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(12, typeof(global::Windows.System.Threading.WorkItemHandler__Impl.Vtbl), "Invoke__STUB")]
[global::System.Runtime.CompilerServices.NonArray]
static readonly byte[] RVA_Windows_System_Threading_WorkItemHandler__Impl_Vtbl_s_theCcwVtable = new byte[] {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
}
}
}
// Windows.System.Threading.TimerElapsedHandler
public unsafe static class TimerElapsedHandler__Impl
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void Invoke(
this global::System.__ComObject __this,
global::Windows.System.Threading.ThreadPoolTimer timer)
{
global::McgInterop.ForwardComSharedStubs.Proc_TArg0__<global::Windows.System.Threading.TimerElapsedHandler, global::Windows.System.Threading.ThreadPoolTimer>(
__this,
timer,
global::Windows.System.Threading.TimerElapsedHandler__Impl.Vtbl.idx_Invoke
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// v-table for 'Windows.System.Threading.TimerElapsedHandler'
[global::System.Runtime.InteropServices.McgRootsType(typeof(global::Windows.System.Threading.TimerElapsedHandler))]
public unsafe partial struct Vtbl
{
global::System.IntPtr pfnQueryInterface;
global::System.IntPtr pfnAddRef;
global::System.IntPtr pfnRelease;
// Windows_System_Threading__TimerElapsedHandler
global::System.IntPtr pfnInvoke_Windows_System_Threading__TimerElapsedHandler;
internal const int idx_Invoke = 3;
[global::System.Runtime.CompilerServices.InitDataBlob(typeof(global::Windows.System.Threading.TimerElapsedHandler__Impl.Vtbl.Windows_System_Threading_TimerElapsedHandler__Impl_Vtbl_McgRvaContainer), "RVA_Windows_System_Threading_TimerElapsedHandler__Impl_Vtbl_s_theCcwVtable")]
public static global::Windows.System.Threading.TimerElapsedHandler__Impl.Vtbl s_theCcwVtable
#if false
= new global::Windows.System.Threading.TimerElapsedHandler__Impl.Vtbl() {
pfnQueryInterface = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfQueryInterface>(System.Runtime.InteropServices.__vtable_IUnknown.QueryInterface),
pfnAddRef = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfAddRef>(System.Runtime.InteropServices.__vtable_IUnknown.AddRef),
pfnRelease = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfRelease>(System.Runtime.InteropServices.__vtable_IUnknown.Release),
pfnInvoke_Windows_System_Threading__TimerElapsedHandler = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget120>(global::Windows.System.Threading.TimerElapsedHandler__Impl.Vtbl.Invoke__STUB),
}
#endif
;
public static global::System.IntPtr pNativeVtable;
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int Invoke__STUB(
global::System.IntPtr pComThis,
global::Windows.System.Threading.IThreadPoolTimer__Impl.Vtbl** unsafe_timer)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.System.Threading.TimerElapsedHandler>(
__this,
0
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Proc_TArg0__<global::Windows.System.Threading.ThreadPoolTimer>(
__this,
unsafe_timer,
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
private static class Windows_System_Threading_TimerElapsedHandler__Impl_Vtbl_McgRvaContainer
{
[global::System.Runtime.CompilerServices.MethodAddrFixup(0, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "QueryInterface")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(4, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "AddRef")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(8, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "Release")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(12, typeof(global::Windows.System.Threading.TimerElapsedHandler__Impl.Vtbl), "Invoke__STUB")]
[global::System.Runtime.CompilerServices.NonArray]
static readonly byte[] RVA_Windows_System_Threading_TimerElapsedHandler__Impl_Vtbl_s_theCcwVtable = new byte[] {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
}
}
}
// Windows.System.Threading.IThreadPoolTimerStatics
public unsafe static class IThreadPoolTimerStatics__Impl
{
// StubClass for 'Windows.System.Threading.IThreadPoolTimerStatics'
public static partial class StubClass
{
// Signature, Windows.System.Threading.IThreadPoolTimerStatics.CreateTimer, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.WinRTDelegateMarshaller] Windows_System_Threading_TimerElapsedHandler__Windows_System_Threading__TimerElapsedHandler *, [fwd] [in] [Mcg.CodeGen.BlittableValueMarshaller] System_TimeSpan__Windows_Foundation__TimeSpan, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.WinRTClassMarshaller] Windows_System_Threading_ThreadPoolTimer__Windows_System_Threading__ThreadPoolTimer *,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.System.Threading.ThreadPoolTimer CreateTimer(
global::System.__ComObject __this,
global::Windows.System.Threading.TimerElapsedHandler handler,
global::System.TimeSpan delay)
{
// Setup
global::Windows.System.Threading.TimerElapsedHandler__Impl.Vtbl** unsafe_handler = default(global::Windows.System.Threading.TimerElapsedHandler__Impl.Vtbl**);
global::Windows.System.Threading.IThreadPoolTimer__Impl.Vtbl** unsafe_timer__retval = default(global::Windows.System.Threading.IThreadPoolTimer__Impl.Vtbl**);
global::Windows.System.Threading.ThreadPoolTimer timer__retval = default(global::Windows.System.Threading.ThreadPoolTimer);
int unsafe___return__;
try
{
// Marshalling
unsafe_handler = (global::Windows.System.Threading.TimerElapsedHandler__Impl.Vtbl**)global::System.Runtime.InteropServices.McgModuleManager.DelegateToComInterface(
handler,
typeof(global::Windows.System.Threading.TimerElapsedHandler).TypeHandle,
global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget121>(global::Windows.System.Threading.TimerElapsedHandler__Impl.Invoke)
);
unsafe_timer__retval = null;
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.System.Threading.IThreadPoolTimerStatics).TypeHandle,
global::Windows.System.Threading.IThreadPoolTimerStatics__Impl.Vtbl.idx_CreateTimer,
unsafe_handler,
delay,
&(unsafe_timer__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
timer__retval = (global::Windows.System.Threading.ThreadPoolTimer)global::System.Runtime.InteropServices.McgModuleManager.ComInterfaceToObject(
((global::System.IntPtr)unsafe_timer__retval),
typeof(global::Windows.System.Threading.ThreadPoolTimer).TypeHandle
);
// Return
return timer__retval;
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_handler)));
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_timer__retval)));
}
}
}
// DispatchClass for 'Windows.System.Threading.IThreadPoolTimerStatics'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.System.Threading.IThreadPoolTimerStatics))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.System.Threading.IThreadPoolTimerStatics
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
global::Windows.System.Threading.ThreadPoolTimer global::Windows.System.Threading.IThreadPoolTimerStatics.CreateTimer(
global::Windows.System.Threading.TimerElapsedHandler handler,
global::System.TimeSpan delay)
{
global::Windows.System.Threading.ThreadPoolTimer __retVal = global::Windows.System.Threading.IThreadPoolTimerStatics__Impl.StubClass.CreateTimer(
this,
handler,
delay
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.System.Threading.IThreadPoolTimerStatics'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.System.Threading.IThreadPoolTimerStatics))]
public unsafe partial struct Vtbl
{
internal const int idx_CreateTimer = 7;
}
}
// Windows.System.Threading.IThreadPoolTimer
public unsafe static class IThreadPoolTimer__Impl
{
// StubClass for 'Windows.System.Threading.IThreadPoolTimer'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void Cancel(global::System.__ComObject __this)
{
global::McgInterop.ForwardComSharedStubs.Proc_<global::Windows.System.Threading.IThreadPoolTimer>(
__this,
global::Windows.System.Threading.IThreadPoolTimer__Impl.Vtbl.idx_Cancel
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// DispatchClass for 'Windows.System.Threading.IThreadPoolTimer'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.System.Threading.IThreadPoolTimer))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.System.Threading.IThreadPoolTimer
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.System.Threading.IThreadPoolTimer.Cancel()
{
global::Windows.System.Threading.IThreadPoolTimer__Impl.StubClass.Cancel(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// v-table for 'Windows.System.Threading.IThreadPoolTimer'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.System.Threading.IThreadPoolTimer))]
public unsafe partial struct Vtbl
{
internal const int idx_Cancel = 8;
}
}
// Windows.System.Threading.IThreadPoolStatics
public unsafe static class IThreadPoolStatics__Impl
{
// StubClass for 'Windows.System.Threading.IThreadPoolStatics'
public static partial class StubClass
{
// Signature, Windows.System.Threading.IThreadPoolStatics.RunAsync, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.WinRTDelegateMarshaller] Windows_System_Threading_WorkItemHandler__Windows_System_Threading__WorkItemHandler *, [fwd] [in] [Mcg.CodeGen.EnumMarshaller] -> int, [fwd] [in] [Mcg.CodeGen.EnumMarshaller] Windows_System_Threading_WorkItemOptions__Windows_System_Threading__WorkItemOptions, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.ComInterfaceMarshaller] Windows_Foundation_IAsyncAction__Windows_Foundation__IAsyncAction *,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.Foundation.IAsyncAction RunAsync(
global::System.__ComObject __this,
global::Windows.System.Threading.WorkItemHandler handler,
global::Windows.System.Threading.WorkItemPriority priority,
global::Windows.System.Threading.WorkItemOptions options)
{
// Setup
global::Windows.System.Threading.WorkItemHandler__Impl.Vtbl** unsafe_handler = default(global::Windows.System.Threading.WorkItemHandler__Impl.Vtbl**);
global::Windows.Foundation.IAsyncAction__Impl.Vtbl** unsafe_operation__retval = default(global::Windows.Foundation.IAsyncAction__Impl.Vtbl**);
global::Windows.Foundation.IAsyncAction operation__retval = default(global::Windows.Foundation.IAsyncAction);
int unsafe___return__;
try
{
// Marshalling
unsafe_handler = (global::Windows.System.Threading.WorkItemHandler__Impl.Vtbl**)global::System.Runtime.InteropServices.McgModuleManager.DelegateToComInterface(
handler,
typeof(global::Windows.System.Threading.WorkItemHandler).TypeHandle,
global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget133>(global::Windows.System.Threading.WorkItemHandler__Impl.Invoke)
);
unsafe_operation__retval = null;
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.System.Threading.IThreadPoolStatics).TypeHandle,
global::Windows.System.Threading.IThreadPoolStatics__Impl.Vtbl.idx_RunWithPriorityAndOptionsAsync,
unsafe_handler,
((int)priority),
options,
&(unsafe_operation__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
operation__retval = (global::Windows.Foundation.IAsyncAction)global::System.Runtime.InteropServices.McgModuleManager.ComInterfaceToObject(
((global::System.IntPtr)unsafe_operation__retval),
typeof(global::Windows.Foundation.IAsyncAction).TypeHandle
);
// Return
return operation__retval;
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_handler)));
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_operation__retval)));
}
}
}
// DispatchClass for 'Windows.System.Threading.IThreadPoolStatics'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.System.Threading.IThreadPoolStatics))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.System.Threading.IThreadPoolStatics
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
global::Windows.Foundation.IAsyncAction global::Windows.System.Threading.IThreadPoolStatics.RunAsync(
global::Windows.System.Threading.WorkItemHandler handler,
global::Windows.System.Threading.WorkItemPriority priority,
global::Windows.System.Threading.WorkItemOptions options)
{
global::Windows.Foundation.IAsyncAction __retVal = global::Windows.System.Threading.IThreadPoolStatics__Impl.StubClass.RunAsync(
this,
handler,
priority,
options
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.System.Threading.IThreadPoolStatics'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.System.Threading.IThreadPoolStatics))]
public unsafe partial struct Vtbl
{
internal const int idx_RunWithPriorityAndOptionsAsync = 8;
}
}
}
namespace Windows.UI.Core
{
// Windows.UI.Core.ICoreDispatcher
public unsafe static class ICoreDispatcher__Impl
{
// StubClass for 'Windows.UI.Core.ICoreDispatcher'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool get_HasThreadAccess(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.UI.Core.ICoreDispatcher>(
__this,
global::Windows.UI.Core.ICoreDispatcher__Impl.Vtbl.idx_get_HasThreadAccess
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
// Signature, Windows.UI.Core.ICoreDispatcher.RunAsync, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.EnumMarshaller] -> int, [fwd] [in] [Mcg.CodeGen.WinRTDelegateMarshaller] Windows_UI_Core_DispatchedHandler__Windows_UI_Core__DispatchedHandler *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.ComInterfaceMarshaller] Windows_Foundation_IAsyncAction__Windows_Foundation__IAsyncAction *,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.Foundation.IAsyncAction RunAsync(
global::System.__ComObject __this,
global::Windows.UI.Core.CoreDispatcherPriority priority,
global::Windows.UI.Core.DispatchedHandler agileCallback)
{
// Setup
global::Windows.UI.Core.DispatchedHandler__Impl.Vtbl** unsafe_agileCallback = default(global::Windows.UI.Core.DispatchedHandler__Impl.Vtbl**);
global::Windows.Foundation.IAsyncAction__Impl.Vtbl** unsafe_asyncAction__retval = default(global::Windows.Foundation.IAsyncAction__Impl.Vtbl**);
global::Windows.Foundation.IAsyncAction asyncAction__retval = default(global::Windows.Foundation.IAsyncAction);
int unsafe___return__;
try
{
// Marshalling
unsafe_agileCallback = (global::Windows.UI.Core.DispatchedHandler__Impl.Vtbl**)global::System.Runtime.InteropServices.McgModuleManager.DelegateToComInterface(
agileCallback,
typeof(global::Windows.UI.Core.DispatchedHandler).TypeHandle,
global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget122>(global::Windows.UI.Core.DispatchedHandler__Impl.Invoke)
);
unsafe_asyncAction__retval = null;
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.UI.Core.ICoreDispatcher).TypeHandle,
global::Windows.UI.Core.ICoreDispatcher__Impl.Vtbl.idx_RunAsync,
((int)priority),
unsafe_agileCallback,
&(unsafe_asyncAction__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
asyncAction__retval = (global::Windows.Foundation.IAsyncAction)global::System.Runtime.InteropServices.McgModuleManager.ComInterfaceToObject(
((global::System.IntPtr)unsafe_asyncAction__retval),
typeof(global::Windows.Foundation.IAsyncAction).TypeHandle
);
// Return
return asyncAction__retval;
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_agileCallback)));
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_asyncAction__retval)));
}
}
}
// DispatchClass for 'Windows.UI.Core.ICoreDispatcher'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Core.ICoreDispatcher))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.UI.Core.ICoreDispatcher
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.UI.Core.ICoreDispatcher.HasThreadAccess")]
bool global::Windows.UI.Core.ICoreDispatcher.get_HasThreadAccess()
{
bool __retVal = global::Windows.UI.Core.ICoreDispatcher__Impl.StubClass.get_HasThreadAccess(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
global::Windows.Foundation.IAsyncAction global::Windows.UI.Core.ICoreDispatcher.RunAsync(
global::Windows.UI.Core.CoreDispatcherPriority priority,
global::Windows.UI.Core.DispatchedHandler agileCallback)
{
global::Windows.Foundation.IAsyncAction __retVal = global::Windows.UI.Core.ICoreDispatcher__Impl.StubClass.RunAsync(
this,
priority,
agileCallback
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.UI.Core.ICoreDispatcher'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Core.ICoreDispatcher))]
public unsafe partial struct Vtbl
{
internal const int idx_get_HasThreadAccess = 6;
internal const int idx_RunAsync = 8;
}
}
// Windows.UI.Core.ICoreAcceleratorKeys
public unsafe static class ICoreAcceleratorKeys__Impl
{
// v-table for 'Windows.UI.Core.ICoreAcceleratorKeys'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Core.ICoreAcceleratorKeys))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Core.DispatchedHandler
public unsafe static class DispatchedHandler__Impl
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void Invoke(this global::System.__ComObject __this)
{
global::McgInterop.ForwardComSharedStubs.Proc_<global::Windows.UI.Core.DispatchedHandler>(
__this,
global::Windows.UI.Core.DispatchedHandler__Impl.Vtbl.idx_Invoke
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// v-table for 'Windows.UI.Core.DispatchedHandler'
[global::System.Runtime.InteropServices.McgRootsType(typeof(global::Windows.UI.Core.DispatchedHandler))]
public unsafe partial struct Vtbl
{
global::System.IntPtr pfnQueryInterface;
global::System.IntPtr pfnAddRef;
global::System.IntPtr pfnRelease;
// Windows_UI_Core__DispatchedHandler
global::System.IntPtr pfnInvoke_Windows_UI_Core__DispatchedHandler;
internal const int idx_Invoke = 3;
[global::System.Runtime.CompilerServices.InitDataBlob(typeof(global::Windows.UI.Core.DispatchedHandler__Impl.Vtbl.Windows_UI_Core_DispatchedHandler__Impl_Vtbl_McgRvaContainer), "RVA_Windows_UI_Core_DispatchedHandler__Impl_Vtbl_s_theCcwVtable")]
public static global::Windows.UI.Core.DispatchedHandler__Impl.Vtbl s_theCcwVtable
#if false
= new global::Windows.UI.Core.DispatchedHandler__Impl.Vtbl() {
pfnQueryInterface = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfQueryInterface>(System.Runtime.InteropServices.__vtable_IUnknown.QueryInterface),
pfnAddRef = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfAddRef>(System.Runtime.InteropServices.__vtable_IUnknown.AddRef),
pfnRelease = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfRelease>(System.Runtime.InteropServices.__vtable_IUnknown.Release),
pfnInvoke_Windows_UI_Core__DispatchedHandler = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget114>(global::Windows.UI.Core.DispatchedHandler__Impl.Vtbl.Invoke__STUB),
}
#endif
;
public static global::System.IntPtr pNativeVtable;
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int Invoke__STUB(global::System.IntPtr pComThis)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.UI.Core.DispatchedHandler>(
__this,
0
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Proc_(
__this,
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
private static class Windows_UI_Core_DispatchedHandler__Impl_Vtbl_McgRvaContainer
{
[global::System.Runtime.CompilerServices.MethodAddrFixup(0, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "QueryInterface")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(4, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "AddRef")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(8, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "Release")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(12, typeof(global::Windows.UI.Core.DispatchedHandler__Impl.Vtbl), "Invoke__STUB")]
[global::System.Runtime.CompilerServices.NonArray]
static readonly byte[] RVA_Windows_UI_Core_DispatchedHandler__Impl_Vtbl_s_theCcwVtable = new byte[] {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
}
}
}
// Windows.UI.Core.ICoreDispatcherWithTaskPriority
public unsafe static class ICoreDispatcherWithTaskPriority__Impl
{
// v-table for 'Windows.UI.Core.ICoreDispatcherWithTaskPriority'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Core.ICoreDispatcherWithTaskPriority))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Core.ICoreDispatcher2
public unsafe static class ICoreDispatcher2__Impl
{
// v-table for 'Windows.UI.Core.ICoreDispatcher2'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Core.ICoreDispatcher2))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Core.ICoreWindowStatic
public unsafe static class ICoreWindowStatic__Impl
{
// StubClass for 'Windows.UI.Core.ICoreWindowStatic'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Core.CoreWindow GetForCurrentThread(global::System.__ComObject __this)
{
global::Windows.UI.Core.CoreWindow __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.UI.Core.ICoreWindowStatic, global::Windows.UI.Core.CoreWindow>(
__this,
global::Windows.UI.Core.ICoreWindowStatic__Impl.Vtbl.idx_GetForCurrentThread
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
}
// DispatchClass for 'Windows.UI.Core.ICoreWindowStatic'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Core.ICoreWindowStatic))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.UI.Core.ICoreWindowStatic
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
global::Windows.UI.Core.CoreWindow global::Windows.UI.Core.ICoreWindowStatic.GetForCurrentThread()
{
global::Windows.UI.Core.CoreWindow __retVal = global::Windows.UI.Core.ICoreWindowStatic__Impl.StubClass.GetForCurrentThread(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.UI.Core.ICoreWindowStatic'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Core.ICoreWindowStatic))]
public unsafe partial struct Vtbl
{
internal const int idx_GetForCurrentThread = 6;
}
}
// Windows.UI.Core.ICoreWindow
public unsafe static class ICoreWindow__Impl
{
// StubClass for 'Windows.UI.Core.ICoreWindow'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Core.CoreDispatcher get_Dispatcher(global::System.__ComObject __this)
{
global::Windows.UI.Core.CoreDispatcher __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.UI.Core.ICoreWindow, global::Windows.UI.Core.CoreDispatcher>(
__this,
global::Windows.UI.Core.ICoreWindow__Impl.Vtbl.idx_get_Dispatcher
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
}
// DispatchClass for 'Windows.UI.Core.ICoreWindow'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Core.ICoreWindow))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.UI.Core.ICoreWindow
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.UI.Core.ICoreWindow.Dispatcher")]
global::Windows.UI.Core.CoreDispatcher global::Windows.UI.Core.ICoreWindow.get_Dispatcher()
{
global::Windows.UI.Core.CoreDispatcher __retVal = global::Windows.UI.Core.ICoreWindow__Impl.StubClass.get_Dispatcher(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.UI.Core.ICoreWindow'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Core.ICoreWindow))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Dispatcher = 9;
}
}
// Windows.UI.Core.ICoreWindow2
public unsafe static class ICoreWindow2__Impl
{
// v-table for 'Windows.UI.Core.ICoreWindow2'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Core.ICoreWindow2))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Core.ICorePointerRedirector
public unsafe static class ICorePointerRedirector__Impl
{
// v-table for 'Windows.UI.Core.ICorePointerRedirector'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Core.ICorePointerRedirector))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Core.ICoreWindow3
public unsafe static class ICoreWindow3__Impl
{
// v-table for 'Windows.UI.Core.ICoreWindow3'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Core.ICoreWindow3))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Core.IWindowActivatedEventArgs
public unsafe static class IWindowActivatedEventArgs__Impl
{
// v-table for 'Windows.UI.Core.IWindowActivatedEventArgs'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Core.IWindowActivatedEventArgs))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Core.ICoreWindowEventArgs
public unsafe static class ICoreWindowEventArgs__Impl
{
// v-table for 'Windows.UI.Core.ICoreWindowEventArgs'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Core.ICoreWindowEventArgs))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Core.IWindowSizeChangedEventArgs
public unsafe static class IWindowSizeChangedEventArgs__Impl
{
// v-table for 'Windows.UI.Core.IWindowSizeChangedEventArgs'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Core.IWindowSizeChangedEventArgs))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Core.IVisibilityChangedEventArgs
public unsafe static class IVisibilityChangedEventArgs__Impl
{
// v-table for 'Windows.UI.Core.IVisibilityChangedEventArgs'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Core.IVisibilityChangedEventArgs))]
public unsafe partial struct Vtbl
{
}
}
}
namespace Windows.UI.Text
{
// Windows.UI.Text.FontWeight
public unsafe static class FontWeight__Impl
{
}
}
namespace Windows.UI.Xaml
{
// Windows.UI.Xaml.IApplicationFactory
public unsafe static class IApplicationFactory__Impl
{
// StubClass for 'Windows.UI.Xaml.IApplicationFactory'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.IntPtr CreateInstance(
global::System.__ComObject __this,
global::System.IntPtr outer,
out global::System.IntPtr inner)
{
global::System.IntPtr __ret = global::McgInterop.ForwardComSharedStubs.Func_IntPtr__out_IntPtr__IntPtr__<global::Windows.UI.Xaml.IApplicationFactory>(
__this,
outer,
out inner,
global::Windows.UI.Xaml.IApplicationFactory__Impl.Vtbl.idx_CreateInstance
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
}
// DispatchClass for 'Windows.UI.Xaml.IApplicationFactory'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.IApplicationFactory))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.UI.Xaml.IApplicationFactory
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
global::System.IntPtr global::Windows.UI.Xaml.IApplicationFactory.CreateInstance(
global::System.IntPtr outer,
out global::System.IntPtr inner)
{
global::System.IntPtr __retVal = global::Windows.UI.Xaml.IApplicationFactory__Impl.StubClass.CreateInstance(
this,
outer,
out inner
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.UI.Xaml.IApplicationFactory'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.IApplicationFactory))]
public unsafe partial struct Vtbl
{
internal const int idx_CreateInstance = 6;
}
}
// Windows.UI.Xaml.IApplicationStatics
public unsafe static class IApplicationStatics__Impl
{
// StubClass for 'Windows.UI.Xaml.IApplicationStatics'
public static partial class StubClass
{
// Signature, Windows.UI.Xaml.IApplicationStatics.Start, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.WinRTDelegateMarshaller] Windows_UI_Xaml_ApplicationInitializationCallback__Windows_UI_Xaml__ApplicationInitializationCallback *,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void Start(
global::System.__ComObject __this,
global::Windows.UI.Xaml.ApplicationInitializationCallback callback)
{
// Setup
global::Windows.UI.Xaml.ApplicationInitializationCallback__Impl.Vtbl** unsafe_callback = default(global::Windows.UI.Xaml.ApplicationInitializationCallback__Impl.Vtbl**);
int unsafe___return__;
try
{
// Marshalling
unsafe_callback = (global::Windows.UI.Xaml.ApplicationInitializationCallback__Impl.Vtbl**)global::System.Runtime.InteropServices.McgModuleManager.DelegateToComInterface(
callback,
typeof(global::Windows.UI.Xaml.ApplicationInitializationCallback).TypeHandle,
global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget4>(global::Windows.UI.Xaml.ApplicationInitializationCallback__Impl.Invoke)
);
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.UI.Xaml.IApplicationStatics).TypeHandle,
global::Windows.UI.Xaml.IApplicationStatics__Impl.Vtbl.idx_Start,
unsafe_callback
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
// Return
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_callback)));
}
}
// Signature, Windows.UI.Xaml.IApplicationStatics.LoadComponent, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.WinRTInspectableMarshaller] object____mcg_IInspectable, [fwd] [in] [Mcg.CodeGen.WinRTUriMarshaller] System_Uri__Windows_Foundation__Uri, [fwd] [in] [Mcg.CodeGen.EnumMarshaller] -> int,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void LoadComponent(
global::System.__ComObject __this,
object component,
global::System.Uri resourceLocator,
global::Windows.UI.Xaml.Controls.Primitives.ComponentResourceLocation componentResourceLocation)
{
// Setup
global::System.Runtime.InteropServices.__vtable_IInspectable* unsafe_component = default(global::System.Runtime.InteropServices.__vtable_IInspectable*);
global::System.Runtime.InteropServices.__vtable_IInspectable* unsafe_resourceLocator = default(global::System.Runtime.InteropServices.__vtable_IInspectable*);
int unsafe___return__;
try
{
// Marshalling
unsafe_component = (global::System.Runtime.InteropServices.__vtable_IInspectable*)global::System.Runtime.InteropServices.McgMarshal.ObjectToIInspectable(component);
if (resourceLocator != null)
unsafe_resourceLocator = (global::System.Runtime.InteropServices.__vtable_IInspectable*)global::McgInterop.McgHelpers.SystemUri2WindowsFoundationUri(resourceLocator);
else
unsafe_resourceLocator = null;
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.UI.Xaml.IApplicationStatics).TypeHandle,
global::Windows.UI.Xaml.IApplicationStatics__Impl.Vtbl.idx_LoadComponentWithResourceLocation,
unsafe_component,
unsafe_resourceLocator,
((int)componentResourceLocation)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
// Return
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_component)));
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_resourceLocator)));
}
}
}
// DispatchClass for 'Windows.UI.Xaml.IApplicationStatics'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.IApplicationStatics))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.UI.Xaml.IApplicationStatics
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.UI.Xaml.IApplicationStatics.Start(global::Windows.UI.Xaml.ApplicationInitializationCallback callback)
{
global::Windows.UI.Xaml.IApplicationStatics__Impl.StubClass.Start(
this,
callback
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.UI.Xaml.IApplicationStatics.LoadComponent(
object component,
global::System.Uri resourceLocator,
global::Windows.UI.Xaml.Controls.Primitives.ComponentResourceLocation componentResourceLocation)
{
global::Windows.UI.Xaml.IApplicationStatics__Impl.StubClass.LoadComponent(
this,
component,
resourceLocator,
componentResourceLocation
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// v-table for 'Windows.UI.Xaml.IApplicationStatics'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.IApplicationStatics))]
public unsafe partial struct Vtbl
{
internal const int idx_Start = 7;
internal const int idx_LoadComponentWithResourceLocation = 9;
}
}
// Windows.UI.Xaml.ApplicationInitializationCallback
public unsafe static class ApplicationInitializationCallback__Impl
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void Invoke(
this global::System.__ComObject __this,
global::Windows.UI.Xaml.ApplicationInitializationCallbackParams p)
{
global::McgInterop.ForwardComSharedStubs.Proc_TArg0__<global::Windows.UI.Xaml.ApplicationInitializationCallback, global::Windows.UI.Xaml.ApplicationInitializationCallbackParams>(
__this,
p,
global::Windows.UI.Xaml.ApplicationInitializationCallback__Impl.Vtbl.idx_Invoke
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// v-table for 'Windows.UI.Xaml.ApplicationInitializationCallback'
[global::System.Runtime.InteropServices.McgRootsType(typeof(global::Windows.UI.Xaml.ApplicationInitializationCallback))]
public unsafe partial struct Vtbl
{
global::System.IntPtr pfnQueryInterface;
global::System.IntPtr pfnAddRef;
global::System.IntPtr pfnRelease;
// Windows_UI_Xaml__ApplicationInitializationCallback
global::System.IntPtr pfnInvoke_Windows_UI_Xaml__ApplicationInitializationCallback;
internal const int idx_Invoke = 3;
[global::System.Runtime.CompilerServices.InitDataBlob(typeof(global::Windows.UI.Xaml.ApplicationInitializationCallback__Impl.Vtbl.Windows_UI_Xaml_ApplicationInitializationCallback__Impl_Vtbl_McgRvaContainer), "RVA_Windows_UI_Xaml_ApplicationInitializationCallback__Impl_Vtbl_s_theCcwVtable")]
public static global::Windows.UI.Xaml.ApplicationInitializationCallback__Impl.Vtbl s_theCcwVtable
#if false
= new global::Windows.UI.Xaml.ApplicationInitializationCallback__Impl.Vtbl() {
pfnQueryInterface = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfQueryInterface>(System.Runtime.InteropServices.__vtable_IUnknown.QueryInterface),
pfnAddRef = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfAddRef>(System.Runtime.InteropServices.__vtable_IUnknown.AddRef),
pfnRelease = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfRelease>(System.Runtime.InteropServices.__vtable_IUnknown.Release),
pfnInvoke_Windows_UI_Xaml__ApplicationInitializationCallback = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget5>(global::Windows.UI.Xaml.ApplicationInitializationCallback__Impl.Vtbl.Invoke__STUB),
}
#endif
;
public static global::System.IntPtr pNativeVtable;
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int Invoke__STUB(
global::System.IntPtr pComThis,
global::Windows.UI.Xaml.IApplicationInitializationCallbackParams__Impl.Vtbl** unsafe_p)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.UI.Xaml.ApplicationInitializationCallback>(
__this,
0
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Proc_TArg0__<global::Windows.UI.Xaml.ApplicationInitializationCallbackParams>(
__this,
unsafe_p,
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
private static class Windows_UI_Xaml_ApplicationInitializationCallback__Impl_Vtbl_McgRvaContainer
{
[global::System.Runtime.CompilerServices.MethodAddrFixup(0, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "QueryInterface")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(4, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "AddRef")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(8, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "Release")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(12, typeof(global::Windows.UI.Xaml.ApplicationInitializationCallback__Impl.Vtbl), "Invoke__STUB")]
[global::System.Runtime.CompilerServices.NonArray]
static readonly byte[] RVA_Windows_UI_Xaml_ApplicationInitializationCallback__Impl_Vtbl_s_theCcwVtable = new byte[] {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
}
}
}
// Windows.UI.Xaml.IApplicationInitializationCallbackParams
public unsafe static class IApplicationInitializationCallbackParams__Impl
{
// v-table for 'Windows.UI.Xaml.IApplicationInitializationCallbackParams'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.IApplicationInitializationCallbackParams))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Xaml.IApplication
public unsafe static class IApplication__Impl
{
// StubClass for 'Windows.UI.Xaml.IApplication'
public static partial class StubClass
{
// Signature, Windows.UI.Xaml.IApplication.get_RequestedTheme, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.EnumMarshaller] Windows_UI_Xaml_ApplicationTheme__Windows_UI_Xaml__ApplicationTheme,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.ApplicationTheme get_RequestedTheme(global::System.__ComObject __this)
{
// Setup
global::Windows.UI.Xaml.ApplicationTheme unsafe_value__retval;
global::Windows.UI.Xaml.ApplicationTheme value__retval;
int unsafe___return__;
// Marshalling
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.UI.Xaml.IApplication).TypeHandle,
global::Windows.UI.Xaml.IApplication__Impl.Vtbl.idx_get_RequestedTheme,
&(unsafe_value__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
value__retval = unsafe_value__retval;
// Return
return value__retval;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void put_RequestedTheme(
global::System.__ComObject __this,
global::Windows.UI.Xaml.ApplicationTheme value)
{
global::McgInterop.ForwardComSharedStubs.Proc_int<global::Windows.UI.Xaml.IApplication>(
__this,
((int)value),
global::Windows.UI.Xaml.IApplication__Impl.Vtbl.idx_put_RequestedTheme
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// Signature, Windows.UI.Xaml.IApplication.add_UnhandledException, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.WinRTDelegateMarshaller] Windows_UI_Xaml_UnhandledExceptionEventHandler__Windows_UI_Xaml__UnhandledExceptionEventHandler *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] System_Runtime_InteropServices_WindowsRuntime_EventRegistrationToken__Windows_Foundation__EventRegistrationToken,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken add_UnhandledException(
global::System.__ComObject __this,
global::Windows.UI.Xaml.UnhandledExceptionEventHandler value)
{
// Setup
global::Windows.UI.Xaml.UnhandledExceptionEventHandler__Impl.Vtbl** unsafe_value = default(global::Windows.UI.Xaml.UnhandledExceptionEventHandler__Impl.Vtbl**);
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken unsafe_token__retval;
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token__retval;
int unsafe___return__;
try
{
// Marshalling
unsafe_value = (global::Windows.UI.Xaml.UnhandledExceptionEventHandler__Impl.Vtbl**)global::System.Runtime.InteropServices.McgModuleManager.DelegateToComInterface(
value,
typeof(global::Windows.UI.Xaml.UnhandledExceptionEventHandler).TypeHandle,
global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget6>(global::Windows.UI.Xaml.UnhandledExceptionEventHandler__Impl.Invoke)
);
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.UI.Xaml.IApplication).TypeHandle,
global::Windows.UI.Xaml.IApplication__Impl.Vtbl.idx_add_UnhandledException,
unsafe_value,
&(unsafe_token__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
token__retval = unsafe_token__retval;
// Return
return token__retval;
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_value)));
}
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void remove_UnhandledException(
global::System.__ComObject __this,
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::McgInterop.ForwardComSharedStubs.Proc__WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.IApplication>(
__this,
token,
global::Windows.UI.Xaml.IApplication__Impl.Vtbl.idx_remove_UnhandledException
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// Signature, Windows.UI.Xaml.IApplication.add_Suspending, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.WinRTDelegateMarshaller] Windows_UI_Xaml_SuspendingEventHandler__Windows_UI_Xaml__SuspendingEventHandler *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] System_Runtime_InteropServices_WindowsRuntime_EventRegistrationToken__Windows_Foundation__EventRegistrationToken,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken add_Suspending(
global::System.__ComObject __this,
global::Windows.UI.Xaml.SuspendingEventHandler value)
{
// Setup
global::Windows.UI.Xaml.SuspendingEventHandler__Impl.Vtbl** unsafe_value = default(global::Windows.UI.Xaml.SuspendingEventHandler__Impl.Vtbl**);
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken unsafe_token__retval;
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token__retval;
int unsafe___return__;
try
{
// Marshalling
unsafe_value = (global::Windows.UI.Xaml.SuspendingEventHandler__Impl.Vtbl**)global::System.Runtime.InteropServices.McgModuleManager.DelegateToComInterface(
value,
typeof(global::Windows.UI.Xaml.SuspendingEventHandler).TypeHandle,
global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget7>(global::Windows.UI.Xaml.SuspendingEventHandler__Impl.Invoke)
);
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.UI.Xaml.IApplication).TypeHandle,
global::Windows.UI.Xaml.IApplication__Impl.Vtbl.idx_add_Suspending,
unsafe_value,
&(unsafe_token__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
token__retval = unsafe_token__retval;
// Return
return token__retval;
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_value)));
}
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void remove_Suspending(
global::System.__ComObject __this,
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::McgInterop.ForwardComSharedStubs.Proc__WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.IApplication>(
__this,
token,
global::Windows.UI.Xaml.IApplication__Impl.Vtbl.idx_remove_Suspending
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken add_Resuming(
global::System.__ComObject __this,
global::System.EventHandler<object> value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __ret = global::McgInterop.ForwardComSharedStubs.Func_EventHandler_1_object__WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.IApplication>(
__this,
value,
global::Windows.UI.Xaml.IApplication__Impl.Vtbl.idx_add_Resuming
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void remove_Resuming(
global::System.__ComObject __this,
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::McgInterop.ForwardComSharedStubs.Proc__WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.IApplication>(
__this,
token,
global::Windows.UI.Xaml.IApplication__Impl.Vtbl.idx_remove_Resuming
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// DispatchClass for 'Windows.UI.Xaml.IApplication'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.IApplication))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.UI.Xaml.IApplication
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.UI.Xaml.IApplication.RequestedTheme")]
global::Windows.UI.Xaml.ApplicationTheme global::Windows.UI.Xaml.IApplication.get_RequestedTheme()
{
global::Windows.UI.Xaml.ApplicationTheme __retVal = global::Windows.UI.Xaml.IApplication__Impl.StubClass.get_RequestedTheme(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertySet, "Windows.UI.Xaml.IApplication.RequestedTheme")]
void global::Windows.UI.Xaml.IApplication.put_RequestedTheme(global::Windows.UI.Xaml.ApplicationTheme value)
{
global::Windows.UI.Xaml.IApplication__Impl.StubClass.put_RequestedTheme(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventAdd, "Windows.UI.Xaml.IApplication.UnhandledException")]
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken global::Windows.UI.Xaml.IApplication.add_UnhandledException(global::Windows.UI.Xaml.UnhandledExceptionEventHandler value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __retVal = global::Windows.UI.Xaml.IApplication__Impl.StubClass.add_UnhandledException(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventRemove, "Windows.UI.Xaml.IApplication.UnhandledException")]
void global::Windows.UI.Xaml.IApplication.remove_UnhandledException(global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::Windows.UI.Xaml.IApplication__Impl.StubClass.remove_UnhandledException(
this,
token
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventAdd, "Windows.UI.Xaml.IApplication.Suspending")]
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken global::Windows.UI.Xaml.IApplication.add_Suspending(global::Windows.UI.Xaml.SuspendingEventHandler value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __retVal = global::Windows.UI.Xaml.IApplication__Impl.StubClass.add_Suspending(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventRemove, "Windows.UI.Xaml.IApplication.Suspending")]
void global::Windows.UI.Xaml.IApplication.remove_Suspending(global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::Windows.UI.Xaml.IApplication__Impl.StubClass.remove_Suspending(
this,
token
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventAdd, "Windows.UI.Xaml.IApplication.Resuming")]
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken global::Windows.UI.Xaml.IApplication.add_Resuming(global::System.EventHandler<object> value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __retVal = global::Windows.UI.Xaml.IApplication__Impl.StubClass.add_Resuming(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventRemove, "Windows.UI.Xaml.IApplication.Resuming")]
void global::Windows.UI.Xaml.IApplication.remove_Resuming(global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::Windows.UI.Xaml.IApplication__Impl.StubClass.remove_Resuming(
this,
token
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// v-table for 'Windows.UI.Xaml.IApplication'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.IApplication))]
public unsafe partial struct Vtbl
{
internal const int idx_get_RequestedTheme = 9;
internal const int idx_put_RequestedTheme = 10;
internal const int idx_add_UnhandledException = 11;
internal const int idx_remove_UnhandledException = 12;
internal const int idx_add_Suspending = 13;
internal const int idx_remove_Suspending = 14;
internal const int idx_add_Resuming = 15;
internal const int idx_remove_Resuming = 16;
}
}
// Windows.UI.Xaml.UnhandledExceptionEventHandler
public unsafe static class UnhandledExceptionEventHandler__Impl
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void Invoke(
this global::System.__ComObject __this,
object sender,
global::Windows.UI.Xaml.UnhandledExceptionEventArgs e)
{
global::McgInterop.ForwardComSharedStubs.Proc_object__TArg0__<global::Windows.UI.Xaml.UnhandledExceptionEventHandler, global::Windows.UI.Xaml.UnhandledExceptionEventArgs>(
__this,
sender,
e,
global::Windows.UI.Xaml.UnhandledExceptionEventHandler__Impl.Vtbl.idx_Invoke
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// v-table for 'Windows.UI.Xaml.UnhandledExceptionEventHandler'
[global::System.Runtime.InteropServices.McgRootsType(typeof(global::Windows.UI.Xaml.UnhandledExceptionEventHandler))]
public unsafe partial struct Vtbl
{
global::System.IntPtr pfnQueryInterface;
global::System.IntPtr pfnAddRef;
global::System.IntPtr pfnRelease;
// Windows_UI_Xaml__UnhandledExceptionEventHandler
global::System.IntPtr pfnInvoke_Windows_UI_Xaml__UnhandledExceptionEventHandler;
internal const int idx_Invoke = 3;
[global::System.Runtime.CompilerServices.InitDataBlob(typeof(global::Windows.UI.Xaml.UnhandledExceptionEventHandler__Impl.Vtbl.Windows_UI_Xaml_UnhandledExceptionEventHandler__Impl_Vtbl_McgRvaContainer), "RVA_Windows_UI_Xaml_UnhandledExceptionEventHandler__Impl_Vtbl_s_theCcwVtable")]
public static global::Windows.UI.Xaml.UnhandledExceptionEventHandler__Impl.Vtbl s_theCcwVtable
#if false
= new global::Windows.UI.Xaml.UnhandledExceptionEventHandler__Impl.Vtbl() {
pfnQueryInterface = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfQueryInterface>(System.Runtime.InteropServices.__vtable_IUnknown.QueryInterface),
pfnAddRef = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfAddRef>(System.Runtime.InteropServices.__vtable_IUnknown.AddRef),
pfnRelease = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfRelease>(System.Runtime.InteropServices.__vtable_IUnknown.Release),
pfnInvoke_Windows_UI_Xaml__UnhandledExceptionEventHandler = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget9>(global::Windows.UI.Xaml.UnhandledExceptionEventHandler__Impl.Vtbl.Invoke__STUB),
}
#endif
;
public static global::System.IntPtr pNativeVtable;
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int Invoke__STUB(
global::System.IntPtr pComThis,
global::System.Runtime.InteropServices.__vtable_IInspectable* unsafe_sender,
global::Windows.UI.Xaml.IUnhandledExceptionEventArgs__Impl.Vtbl** unsafe_e)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.UI.Xaml.UnhandledExceptionEventHandler>(
__this,
0
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Proc_object__TArg0__<global::Windows.UI.Xaml.UnhandledExceptionEventArgs>(
__this,
unsafe_sender,
unsafe_e,
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
private static class Windows_UI_Xaml_UnhandledExceptionEventHandler__Impl_Vtbl_McgRvaContainer
{
[global::System.Runtime.CompilerServices.MethodAddrFixup(0, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "QueryInterface")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(4, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "AddRef")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(8, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "Release")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(12, typeof(global::Windows.UI.Xaml.UnhandledExceptionEventHandler__Impl.Vtbl), "Invoke__STUB")]
[global::System.Runtime.CompilerServices.NonArray]
static readonly byte[] RVA_Windows_UI_Xaml_UnhandledExceptionEventHandler__Impl_Vtbl_s_theCcwVtable = new byte[] {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
}
}
}
// Windows.UI.Xaml.IUnhandledExceptionEventArgs
public unsafe static class IUnhandledExceptionEventArgs__Impl
{
// v-table for 'Windows.UI.Xaml.IUnhandledExceptionEventArgs'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.IUnhandledExceptionEventArgs))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Xaml.SuspendingEventHandler
public unsafe static class SuspendingEventHandler__Impl
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void Invoke(
this global::System.__ComObject __this,
object sender,
global::Windows.ApplicationModel.SuspendingEventArgs e)
{
global::McgInterop.ForwardComSharedStubs.Proc_object__TArg0__<global::Windows.UI.Xaml.SuspendingEventHandler, global::Windows.ApplicationModel.SuspendingEventArgs>(
__this,
sender,
e,
global::Windows.UI.Xaml.SuspendingEventHandler__Impl.Vtbl.idx_Invoke
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// v-table for 'Windows.UI.Xaml.SuspendingEventHandler'
[global::System.Runtime.InteropServices.McgRootsType(typeof(global::Windows.UI.Xaml.SuspendingEventHandler))]
public unsafe partial struct Vtbl
{
global::System.IntPtr pfnQueryInterface;
global::System.IntPtr pfnAddRef;
global::System.IntPtr pfnRelease;
// Windows_UI_Xaml__SuspendingEventHandler
global::System.IntPtr pfnInvoke_Windows_UI_Xaml__SuspendingEventHandler;
internal const int idx_Invoke = 3;
[global::System.Runtime.CompilerServices.InitDataBlob(typeof(global::Windows.UI.Xaml.SuspendingEventHandler__Impl.Vtbl.Windows_UI_Xaml_SuspendingEventHandler__Impl_Vtbl_McgRvaContainer), "RVA_Windows_UI_Xaml_SuspendingEventHandler__Impl_Vtbl_s_theCcwVtable")]
public static global::Windows.UI.Xaml.SuspendingEventHandler__Impl.Vtbl s_theCcwVtable
#if false
= new global::Windows.UI.Xaml.SuspendingEventHandler__Impl.Vtbl() {
pfnQueryInterface = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfQueryInterface>(System.Runtime.InteropServices.__vtable_IUnknown.QueryInterface),
pfnAddRef = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfAddRef>(System.Runtime.InteropServices.__vtable_IUnknown.AddRef),
pfnRelease = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfRelease>(System.Runtime.InteropServices.__vtable_IUnknown.Release),
pfnInvoke_Windows_UI_Xaml__SuspendingEventHandler = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget10>(global::Windows.UI.Xaml.SuspendingEventHandler__Impl.Vtbl.Invoke__STUB),
}
#endif
;
public static global::System.IntPtr pNativeVtable;
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int Invoke__STUB(
global::System.IntPtr pComThis,
global::System.Runtime.InteropServices.__vtable_IInspectable* unsafe_sender,
global::Windows.ApplicationModel.ISuspendingEventArgs__Impl.Vtbl** unsafe_e)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.UI.Xaml.SuspendingEventHandler>(
__this,
0
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Proc_object__TArg0__<global::Windows.ApplicationModel.SuspendingEventArgs>(
__this,
unsafe_sender,
unsafe_e,
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
private static class Windows_UI_Xaml_SuspendingEventHandler__Impl_Vtbl_McgRvaContainer
{
[global::System.Runtime.CompilerServices.MethodAddrFixup(0, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "QueryInterface")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(4, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "AddRef")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(8, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "Release")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(12, typeof(global::Windows.UI.Xaml.SuspendingEventHandler__Impl.Vtbl), "Invoke__STUB")]
[global::System.Runtime.CompilerServices.NonArray]
static readonly byte[] RVA_Windows_UI_Xaml_SuspendingEventHandler__Impl_Vtbl_s_theCcwVtable = new byte[] {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
}
}
}
// Windows.UI.Xaml.IApplicationOverrides
public unsafe static class IApplicationOverrides__Impl
{
// StubClass for 'Windows.UI.Xaml.IApplicationOverrides'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void OnActivated(
global::System.__ComObject __this,
global::Windows.ApplicationModel.Activation.IActivatedEventArgs args)
{
global::McgInterop.ForwardComSharedStubs.Proc_TArg0__<global::Windows.UI.Xaml.IApplicationOverrides, global::Windows.ApplicationModel.Activation.IActivatedEventArgs>(
__this,
args,
global::Windows.UI.Xaml.IApplicationOverrides__Impl.Vtbl.idx_OnActivated
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void OnLaunched(
global::System.__ComObject __this,
global::Windows.ApplicationModel.Activation.LaunchActivatedEventArgs args)
{
global::McgInterop.ForwardComSharedStubs.Proc_TArg0__<global::Windows.UI.Xaml.IApplicationOverrides, global::Windows.ApplicationModel.Activation.LaunchActivatedEventArgs>(
__this,
args,
global::Windows.UI.Xaml.IApplicationOverrides__Impl.Vtbl.idx_OnLaunched
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void OnFileActivated(
global::System.__ComObject __this,
global::Windows.ApplicationModel.Activation.FileActivatedEventArgs args)
{
global::McgInterop.ForwardComSharedStubs.Proc_TArg0__<global::Windows.UI.Xaml.IApplicationOverrides, global::Windows.ApplicationModel.Activation.FileActivatedEventArgs>(
__this,
args,
global::Windows.UI.Xaml.IApplicationOverrides__Impl.Vtbl.idx_OnFileActivated
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void OnSearchActivated(
global::System.__ComObject __this,
global::Windows.ApplicationModel.Activation.SearchActivatedEventArgs args)
{
global::McgInterop.ForwardComSharedStubs.Proc_TArg0__<global::Windows.UI.Xaml.IApplicationOverrides, global::Windows.ApplicationModel.Activation.SearchActivatedEventArgs>(
__this,
args,
global::Windows.UI.Xaml.IApplicationOverrides__Impl.Vtbl.idx_OnSearchActivated
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void OnShareTargetActivated(
global::System.__ComObject __this,
global::Windows.ApplicationModel.Activation.ShareTargetActivatedEventArgs args)
{
global::McgInterop.ForwardComSharedStubs.Proc_TArg0__<global::Windows.UI.Xaml.IApplicationOverrides, global::Windows.ApplicationModel.Activation.ShareTargetActivatedEventArgs>(
__this,
args,
global::Windows.UI.Xaml.IApplicationOverrides__Impl.Vtbl.idx_OnShareTargetActivated
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void OnFileOpenPickerActivated(
global::System.__ComObject __this,
global::Windows.ApplicationModel.Activation.FileOpenPickerActivatedEventArgs args)
{
global::McgInterop.ForwardComSharedStubs.Proc_TArg0__<global::Windows.UI.Xaml.IApplicationOverrides, global::Windows.ApplicationModel.Activation.FileOpenPickerActivatedEventArgs>(
__this,
args,
global::Windows.UI.Xaml.IApplicationOverrides__Impl.Vtbl.idx_OnFileOpenPickerActivated
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void OnFileSavePickerActivated(
global::System.__ComObject __this,
global::Windows.ApplicationModel.Activation.FileSavePickerActivatedEventArgs args)
{
global::McgInterop.ForwardComSharedStubs.Proc_TArg0__<global::Windows.UI.Xaml.IApplicationOverrides, global::Windows.ApplicationModel.Activation.FileSavePickerActivatedEventArgs>(
__this,
args,
global::Windows.UI.Xaml.IApplicationOverrides__Impl.Vtbl.idx_OnFileSavePickerActivated
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void OnCachedFileUpdaterActivated(
global::System.__ComObject __this,
global::Windows.ApplicationModel.Activation.CachedFileUpdaterActivatedEventArgs args)
{
global::McgInterop.ForwardComSharedStubs.Proc_TArg0__<global::Windows.UI.Xaml.IApplicationOverrides, global::Windows.ApplicationModel.Activation.CachedFileUpdaterActivatedEventArgs>(
__this,
args,
global::Windows.UI.Xaml.IApplicationOverrides__Impl.Vtbl.idx_OnCachedFileUpdaterActivated
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void OnWindowCreated(
global::System.__ComObject __this,
global::Windows.UI.Xaml.WindowCreatedEventArgs args)
{
global::McgInterop.ForwardComSharedStubs.Proc_TArg0__<global::Windows.UI.Xaml.IApplicationOverrides, global::Windows.UI.Xaml.WindowCreatedEventArgs>(
__this,
args,
global::Windows.UI.Xaml.IApplicationOverrides__Impl.Vtbl.idx_OnWindowCreated
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// DispatchClass for 'Windows.UI.Xaml.IApplicationOverrides'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.IApplicationOverrides))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.UI.Xaml.IApplicationOverrides
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.UI.Xaml.IApplicationOverrides.OnActivated(global::Windows.ApplicationModel.Activation.IActivatedEventArgs args)
{
global::Windows.UI.Xaml.IApplicationOverrides__Impl.StubClass.OnActivated(
this,
args
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.UI.Xaml.IApplicationOverrides.OnLaunched(global::Windows.ApplicationModel.Activation.LaunchActivatedEventArgs args)
{
global::Windows.UI.Xaml.IApplicationOverrides__Impl.StubClass.OnLaunched(
this,
args
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.UI.Xaml.IApplicationOverrides.OnFileActivated(global::Windows.ApplicationModel.Activation.FileActivatedEventArgs args)
{
global::Windows.UI.Xaml.IApplicationOverrides__Impl.StubClass.OnFileActivated(
this,
args
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.UI.Xaml.IApplicationOverrides.OnSearchActivated(global::Windows.ApplicationModel.Activation.SearchActivatedEventArgs args)
{
global::Windows.UI.Xaml.IApplicationOverrides__Impl.StubClass.OnSearchActivated(
this,
args
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.UI.Xaml.IApplicationOverrides.OnShareTargetActivated(global::Windows.ApplicationModel.Activation.ShareTargetActivatedEventArgs args)
{
global::Windows.UI.Xaml.IApplicationOverrides__Impl.StubClass.OnShareTargetActivated(
this,
args
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.UI.Xaml.IApplicationOverrides.OnFileOpenPickerActivated(global::Windows.ApplicationModel.Activation.FileOpenPickerActivatedEventArgs args)
{
global::Windows.UI.Xaml.IApplicationOverrides__Impl.StubClass.OnFileOpenPickerActivated(
this,
args
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.UI.Xaml.IApplicationOverrides.OnFileSavePickerActivated(global::Windows.ApplicationModel.Activation.FileSavePickerActivatedEventArgs args)
{
global::Windows.UI.Xaml.IApplicationOverrides__Impl.StubClass.OnFileSavePickerActivated(
this,
args
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.UI.Xaml.IApplicationOverrides.OnCachedFileUpdaterActivated(global::Windows.ApplicationModel.Activation.CachedFileUpdaterActivatedEventArgs args)
{
global::Windows.UI.Xaml.IApplicationOverrides__Impl.StubClass.OnCachedFileUpdaterActivated(
this,
args
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.UI.Xaml.IApplicationOverrides.OnWindowCreated(global::Windows.UI.Xaml.WindowCreatedEventArgs args)
{
global::Windows.UI.Xaml.IApplicationOverrides__Impl.StubClass.OnWindowCreated(
this,
args
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// v-table for 'Windows.UI.Xaml.IApplicationOverrides'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.IApplicationOverrides))]
[global::System.Runtime.InteropServices.McgRootsType(typeof(global::Windows.UI.Xaml.IApplicationOverrides))]
public unsafe partial struct Vtbl
{
global::System.IntPtr pfnQueryInterface;
global::System.IntPtr pfnAddRef;
global::System.IntPtr pfnRelease;
global::System.IntPtr pfnGetIids;
global::System.IntPtr pfnGetRuntimeClassName;
global::System.IntPtr pfnGetTrustLevel;
// Windows_UI_Xaml__IApplicationOverrides
global::System.IntPtr pfnOnActivated_Windows_UI_Xaml__IApplicationOverrides;
global::System.IntPtr pfnOnLaunched_Windows_UI_Xaml__IApplicationOverrides;
global::System.IntPtr pfnOnFileActivated_Windows_UI_Xaml__IApplicationOverrides;
global::System.IntPtr pfnOnSearchActivated_Windows_UI_Xaml__IApplicationOverrides;
global::System.IntPtr pfnOnShareTargetActivated_Windows_UI_Xaml__IApplicationOverrides;
global::System.IntPtr pfnOnFileOpenPickerActivated_Windows_UI_Xaml__IApplicationOverrides;
global::System.IntPtr pfnOnFileSavePickerActivated_Windows_UI_Xaml__IApplicationOverrides;
global::System.IntPtr pfnOnCachedFileUpdaterActivated_Windows_UI_Xaml__IApplicationOverrides;
global::System.IntPtr pfnOnWindowCreated_Windows_UI_Xaml__IApplicationOverrides;
internal const int idx_OnActivated = 6;
internal const int idx_OnLaunched = 7;
internal const int idx_OnFileActivated = 8;
internal const int idx_OnSearchActivated = 9;
internal const int idx_OnShareTargetActivated = 10;
internal const int idx_OnFileOpenPickerActivated = 11;
internal const int idx_OnFileSavePickerActivated = 12;
internal const int idx_OnCachedFileUpdaterActivated = 13;
internal const int idx_OnWindowCreated = 14;
[global::System.Runtime.CompilerServices.InitDataBlob(typeof(global::Windows.UI.Xaml.IApplicationOverrides__Impl.Vtbl.Windows_UI_Xaml_IApplicationOverrides__Impl_Vtbl_McgRvaContainer), "RVA_Windows_UI_Xaml_IApplicationOverrides__Impl_Vtbl_s_theCcwVtable")]
public static global::Windows.UI.Xaml.IApplicationOverrides__Impl.Vtbl s_theCcwVtable
#if false
= new global::Windows.UI.Xaml.IApplicationOverrides__Impl.Vtbl() {
pfnQueryInterface = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfQueryInterface>(System.Runtime.InteropServices.__vtable_IUnknown.QueryInterface),
pfnAddRef = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfAddRef>(System.Runtime.InteropServices.__vtable_IUnknown.AddRef),
pfnRelease = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfRelease>(System.Runtime.InteropServices.__vtable_IUnknown.Release),
pfnGetIids = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget0>(System.Runtime.InteropServices.__vtable_IInspectable.GetIIDs),
pfnGetRuntimeClassName = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget1>(System.Runtime.InteropServices.__vtable_IInspectable.GetRuntimeClassName),
pfnGetTrustLevel = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget1>(System.Runtime.InteropServices.__vtable_IInspectable.GetTrustLevel),
pfnOnActivated_Windows_UI_Xaml__IApplicationOverrides = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget11>(global::Windows.UI.Xaml.IApplicationOverrides__Impl.Vtbl.OnActivated__STUB),
pfnOnLaunched_Windows_UI_Xaml__IApplicationOverrides = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget12>(global::Windows.UI.Xaml.IApplicationOverrides__Impl.Vtbl.OnLaunched__STUB),
pfnOnFileActivated_Windows_UI_Xaml__IApplicationOverrides = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget13>(global::Windows.UI.Xaml.IApplicationOverrides__Impl.Vtbl.OnFileActivated__STUB),
pfnOnSearchActivated_Windows_UI_Xaml__IApplicationOverrides = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget14>(global::Windows.UI.Xaml.IApplicationOverrides__Impl.Vtbl.OnSearchActivated__STUB),
pfnOnShareTargetActivated_Windows_UI_Xaml__IApplicationOverrides = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget15>(global::Windows.UI.Xaml.IApplicationOverrides__Impl.Vtbl.OnShareTargetActivated__STUB),
pfnOnFileOpenPickerActivated_Windows_UI_Xaml__IApplicationOverrides = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget16>(global::Windows.UI.Xaml.IApplicationOverrides__Impl.Vtbl.OnFileOpenPickerActivated__STUB),
pfnOnFileSavePickerActivated_Windows_UI_Xaml__IApplicationOverrides = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget17>(global::Windows.UI.Xaml.IApplicationOverrides__Impl.Vtbl.OnFileSavePickerActivated__STUB),
pfnOnCachedFileUpdaterActivated_Windows_UI_Xaml__IApplicationOverrides = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget18>(global::Windows.UI.Xaml.IApplicationOverrides__Impl.Vtbl.OnCachedFileUpdaterActivated__STUB),
pfnOnWindowCreated_Windows_UI_Xaml__IApplicationOverrides = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget19>(global::Windows.UI.Xaml.IApplicationOverrides__Impl.Vtbl.OnWindowCreated__STUB),
}
#endif
;
public static global::System.IntPtr pNativeVtable;
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int OnActivated__STUB(
global::System.IntPtr pComThis,
global::Windows.ApplicationModel.Activation.IActivatedEventArgs__Impl.Vtbl** unsafe_args)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.UI.Xaml.IApplicationOverrides>(
__this,
0
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Proc_TArg0__<global::Windows.ApplicationModel.Activation.IActivatedEventArgs>(
__this,
unsafe_args,
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int OnLaunched__STUB(
global::System.IntPtr pComThis,
global::Windows.ApplicationModel.Activation.ILaunchActivatedEventArgs__Impl.Vtbl** unsafe_args)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.UI.Xaml.IApplicationOverrides>(
__this,
1
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Proc_TArg0__<global::Windows.ApplicationModel.Activation.LaunchActivatedEventArgs>(
__this,
unsafe_args,
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int OnFileActivated__STUB(
global::System.IntPtr pComThis,
global::Windows.ApplicationModel.Activation.IFileActivatedEventArgs__Impl.Vtbl** unsafe_args)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.UI.Xaml.IApplicationOverrides>(
__this,
2
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Proc_TArg0__<global::Windows.ApplicationModel.Activation.FileActivatedEventArgs>(
__this,
unsafe_args,
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int OnSearchActivated__STUB(
global::System.IntPtr pComThis,
global::Windows.ApplicationModel.Activation.ISearchActivatedEventArgs__Impl.Vtbl** unsafe_args)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.UI.Xaml.IApplicationOverrides>(
__this,
3
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Proc_TArg0__<global::Windows.ApplicationModel.Activation.SearchActivatedEventArgs>(
__this,
unsafe_args,
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int OnShareTargetActivated__STUB(
global::System.IntPtr pComThis,
global::Windows.ApplicationModel.Activation.IShareTargetActivatedEventArgs__Impl.Vtbl** unsafe_args)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.UI.Xaml.IApplicationOverrides>(
__this,
4
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Proc_TArg0__<global::Windows.ApplicationModel.Activation.ShareTargetActivatedEventArgs>(
__this,
unsafe_args,
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int OnFileOpenPickerActivated__STUB(
global::System.IntPtr pComThis,
global::Windows.ApplicationModel.Activation.IFileOpenPickerActivatedEventArgs__Impl.Vtbl** unsafe_args)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.UI.Xaml.IApplicationOverrides>(
__this,
5
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Proc_TArg0__<global::Windows.ApplicationModel.Activation.FileOpenPickerActivatedEventArgs>(
__this,
unsafe_args,
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int OnFileSavePickerActivated__STUB(
global::System.IntPtr pComThis,
global::Windows.ApplicationModel.Activation.IFileSavePickerActivatedEventArgs__Impl.Vtbl** unsafe_args)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.UI.Xaml.IApplicationOverrides>(
__this,
6
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Proc_TArg0__<global::Windows.ApplicationModel.Activation.FileSavePickerActivatedEventArgs>(
__this,
unsafe_args,
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int OnCachedFileUpdaterActivated__STUB(
global::System.IntPtr pComThis,
global::Windows.ApplicationModel.Activation.ICachedFileUpdaterActivatedEventArgs__Impl.Vtbl** unsafe_args)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.UI.Xaml.IApplicationOverrides>(
__this,
7
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Proc_TArg0__<global::Windows.ApplicationModel.Activation.CachedFileUpdaterActivatedEventArgs>(
__this,
unsafe_args,
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int OnWindowCreated__STUB(
global::System.IntPtr pComThis,
global::Windows.UI.Xaml.IWindowCreatedEventArgs__Impl.Vtbl** unsafe_args)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.UI.Xaml.IApplicationOverrides>(
__this,
8
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Proc_TArg0__<global::Windows.UI.Xaml.WindowCreatedEventArgs>(
__this,
unsafe_args,
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
private static class Windows_UI_Xaml_IApplicationOverrides__Impl_Vtbl_McgRvaContainer
{
[global::System.Runtime.CompilerServices.MethodAddrFixup(0, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "QueryInterface")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(4, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "AddRef")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(8, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "Release")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(12, typeof(global::System.Runtime.InteropServices.__vtable_IInspectable), "GetIIDs")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(16, typeof(global::System.Runtime.InteropServices.__vtable_IInspectable), "GetRuntimeClassName")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(20, typeof(global::System.Runtime.InteropServices.__vtable_IInspectable), "GetTrustLevel")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(24, typeof(global::Windows.UI.Xaml.IApplicationOverrides__Impl.Vtbl), "OnActivated__STUB")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(28, typeof(global::Windows.UI.Xaml.IApplicationOverrides__Impl.Vtbl), "OnLaunched__STUB")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(32, typeof(global::Windows.UI.Xaml.IApplicationOverrides__Impl.Vtbl), "OnFileActivated__STUB")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(36, typeof(global::Windows.UI.Xaml.IApplicationOverrides__Impl.Vtbl), "OnSearchActivated__STUB")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(40, typeof(global::Windows.UI.Xaml.IApplicationOverrides__Impl.Vtbl), "OnShareTargetActivated__STUB")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(44, typeof(global::Windows.UI.Xaml.IApplicationOverrides__Impl.Vtbl), "OnFileOpenPickerActivated__STUB")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(48, typeof(global::Windows.UI.Xaml.IApplicationOverrides__Impl.Vtbl), "OnFileSavePickerActivated__STUB")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(52, typeof(global::Windows.UI.Xaml.IApplicationOverrides__Impl.Vtbl), "OnCachedFileUpdaterActivated__STUB")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(56, typeof(global::Windows.UI.Xaml.IApplicationOverrides__Impl.Vtbl), "OnWindowCreated__STUB")]
[global::System.Runtime.CompilerServices.NonArray]
static readonly byte[] RVA_Windows_UI_Xaml_IApplicationOverrides__Impl_Vtbl_s_theCcwVtable = new byte[] {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
}
}
}
// Windows.UI.Xaml.IWindowCreatedEventArgs
public unsafe static class IWindowCreatedEventArgs__Impl
{
// v-table for 'Windows.UI.Xaml.IWindowCreatedEventArgs'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.IWindowCreatedEventArgs))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Xaml.IApplication2
public unsafe static class IApplication2__Impl
{
// StubClass for 'Windows.UI.Xaml.IApplication2'
public static partial class StubClass
{
// Signature, Windows.UI.Xaml.IApplication2.add_LeavingBackground, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.WinRTDelegateMarshaller] Windows_UI_Xaml_LeavingBackgroundEventHandler__Windows_UI_Xaml__LeavingBackgroundEventHandler *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] System_Runtime_InteropServices_WindowsRuntime_EventRegistrationToken__Windows_Foundation__EventRegistrationToken,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken add_LeavingBackground(
global::System.__ComObject __this,
global::Windows.UI.Xaml.LeavingBackgroundEventHandler value)
{
// Setup
global::Windows.UI.Xaml.LeavingBackgroundEventHandler__Impl.Vtbl** unsafe_value = default(global::Windows.UI.Xaml.LeavingBackgroundEventHandler__Impl.Vtbl**);
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken unsafe_token__retval;
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token__retval;
int unsafe___return__;
try
{
// Marshalling
unsafe_value = (global::Windows.UI.Xaml.LeavingBackgroundEventHandler__Impl.Vtbl**)global::System.Runtime.InteropServices.McgModuleManager.DelegateToComInterface(
value,
typeof(global::Windows.UI.Xaml.LeavingBackgroundEventHandler).TypeHandle,
global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget20>(global::Windows.UI.Xaml.LeavingBackgroundEventHandler__Impl.Invoke)
);
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.UI.Xaml.IApplication2).TypeHandle,
global::Windows.UI.Xaml.IApplication2__Impl.Vtbl.idx_add_LeavingBackground,
unsafe_value,
&(unsafe_token__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
token__retval = unsafe_token__retval;
// Return
return token__retval;
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_value)));
}
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void remove_LeavingBackground(
global::System.__ComObject __this,
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::McgInterop.ForwardComSharedStubs.Proc__WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.IApplication2>(
__this,
token,
global::Windows.UI.Xaml.IApplication2__Impl.Vtbl.idx_remove_LeavingBackground
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// Signature, Windows.UI.Xaml.IApplication2.add_EnteredBackground, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.WinRTDelegateMarshaller] Windows_UI_Xaml_EnteredBackgroundEventHandler__Windows_UI_Xaml__EnteredBackgroundEventHandler *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] System_Runtime_InteropServices_WindowsRuntime_EventRegistrationToken__Windows_Foundation__EventRegistrationToken,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken add_EnteredBackground(
global::System.__ComObject __this,
global::Windows.UI.Xaml.EnteredBackgroundEventHandler value)
{
// Setup
global::Windows.UI.Xaml.EnteredBackgroundEventHandler__Impl.Vtbl** unsafe_value = default(global::Windows.UI.Xaml.EnteredBackgroundEventHandler__Impl.Vtbl**);
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken unsafe_token__retval;
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token__retval;
int unsafe___return__;
try
{
// Marshalling
unsafe_value = (global::Windows.UI.Xaml.EnteredBackgroundEventHandler__Impl.Vtbl**)global::System.Runtime.InteropServices.McgModuleManager.DelegateToComInterface(
value,
typeof(global::Windows.UI.Xaml.EnteredBackgroundEventHandler).TypeHandle,
global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget21>(global::Windows.UI.Xaml.EnteredBackgroundEventHandler__Impl.Invoke)
);
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.UI.Xaml.IApplication2).TypeHandle,
global::Windows.UI.Xaml.IApplication2__Impl.Vtbl.idx_add_EnteredBackground,
unsafe_value,
&(unsafe_token__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
token__retval = unsafe_token__retval;
// Return
return token__retval;
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_value)));
}
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void remove_EnteredBackground(
global::System.__ComObject __this,
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::McgInterop.ForwardComSharedStubs.Proc__WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.IApplication2>(
__this,
token,
global::Windows.UI.Xaml.IApplication2__Impl.Vtbl.idx_remove_EnteredBackground
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// DispatchClass for 'Windows.UI.Xaml.IApplication2'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.IApplication2))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.UI.Xaml.IApplication2
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventAdd, "Windows.UI.Xaml.IApplication2.LeavingBackground")]
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken global::Windows.UI.Xaml.IApplication2.add_LeavingBackground(global::Windows.UI.Xaml.LeavingBackgroundEventHandler value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __retVal = global::Windows.UI.Xaml.IApplication2__Impl.StubClass.add_LeavingBackground(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventRemove, "Windows.UI.Xaml.IApplication2.LeavingBackground")]
void global::Windows.UI.Xaml.IApplication2.remove_LeavingBackground(global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::Windows.UI.Xaml.IApplication2__Impl.StubClass.remove_LeavingBackground(
this,
token
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventAdd, "Windows.UI.Xaml.IApplication2.EnteredBackground")]
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken global::Windows.UI.Xaml.IApplication2.add_EnteredBackground(global::Windows.UI.Xaml.EnteredBackgroundEventHandler value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __retVal = global::Windows.UI.Xaml.IApplication2__Impl.StubClass.add_EnteredBackground(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventRemove, "Windows.UI.Xaml.IApplication2.EnteredBackground")]
void global::Windows.UI.Xaml.IApplication2.remove_EnteredBackground(global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::Windows.UI.Xaml.IApplication2__Impl.StubClass.remove_EnteredBackground(
this,
token
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// v-table for 'Windows.UI.Xaml.IApplication2'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.IApplication2))]
public unsafe partial struct Vtbl
{
internal const int idx_add_LeavingBackground = 10;
internal const int idx_remove_LeavingBackground = 11;
internal const int idx_add_EnteredBackground = 12;
internal const int idx_remove_EnteredBackground = 13;
}
}
// Windows.UI.Xaml.LeavingBackgroundEventHandler
public unsafe static class LeavingBackgroundEventHandler__Impl
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void Invoke(
this global::System.__ComObject __this,
object sender,
global::Windows.ApplicationModel.LeavingBackgroundEventArgs e)
{
global::McgInterop.ForwardComSharedStubs.Proc_object__TArg0__<global::Windows.UI.Xaml.LeavingBackgroundEventHandler, global::Windows.ApplicationModel.LeavingBackgroundEventArgs>(
__this,
sender,
e,
global::Windows.UI.Xaml.LeavingBackgroundEventHandler__Impl.Vtbl.idx_Invoke
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// v-table for 'Windows.UI.Xaml.LeavingBackgroundEventHandler'
[global::System.Runtime.InteropServices.McgRootsType(typeof(global::Windows.UI.Xaml.LeavingBackgroundEventHandler))]
public unsafe partial struct Vtbl
{
global::System.IntPtr pfnQueryInterface;
global::System.IntPtr pfnAddRef;
global::System.IntPtr pfnRelease;
// Windows_UI_Xaml__LeavingBackgroundEventHandler
global::System.IntPtr pfnInvoke_Windows_UI_Xaml__LeavingBackgroundEventHandler;
internal const int idx_Invoke = 3;
[global::System.Runtime.CompilerServices.InitDataBlob(typeof(global::Windows.UI.Xaml.LeavingBackgroundEventHandler__Impl.Vtbl.Windows_UI_Xaml_LeavingBackgroundEventHandler__Impl_Vtbl_McgRvaContainer), "RVA_Windows_UI_Xaml_LeavingBackgroundEventHandler__Impl_Vtbl_s_theCcwVtable")]
public static global::Windows.UI.Xaml.LeavingBackgroundEventHandler__Impl.Vtbl s_theCcwVtable
#if false
= new global::Windows.UI.Xaml.LeavingBackgroundEventHandler__Impl.Vtbl() {
pfnQueryInterface = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfQueryInterface>(System.Runtime.InteropServices.__vtable_IUnknown.QueryInterface),
pfnAddRef = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfAddRef>(System.Runtime.InteropServices.__vtable_IUnknown.AddRef),
pfnRelease = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfRelease>(System.Runtime.InteropServices.__vtable_IUnknown.Release),
pfnInvoke_Windows_UI_Xaml__LeavingBackgroundEventHandler = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget22>(global::Windows.UI.Xaml.LeavingBackgroundEventHandler__Impl.Vtbl.Invoke__STUB),
}
#endif
;
public static global::System.IntPtr pNativeVtable;
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int Invoke__STUB(
global::System.IntPtr pComThis,
global::System.Runtime.InteropServices.__vtable_IInspectable* unsafe_sender,
global::Windows.ApplicationModel.ILeavingBackgroundEventArgs__Impl.Vtbl** unsafe_e)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.UI.Xaml.LeavingBackgroundEventHandler>(
__this,
0
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Proc_object__TArg0__<global::Windows.ApplicationModel.LeavingBackgroundEventArgs>(
__this,
unsafe_sender,
unsafe_e,
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
private static class Windows_UI_Xaml_LeavingBackgroundEventHandler__Impl_Vtbl_McgRvaContainer
{
[global::System.Runtime.CompilerServices.MethodAddrFixup(0, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "QueryInterface")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(4, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "AddRef")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(8, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "Release")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(12, typeof(global::Windows.UI.Xaml.LeavingBackgroundEventHandler__Impl.Vtbl), "Invoke__STUB")]
[global::System.Runtime.CompilerServices.NonArray]
static readonly byte[] RVA_Windows_UI_Xaml_LeavingBackgroundEventHandler__Impl_Vtbl_s_theCcwVtable = new byte[] {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
}
}
}
// Windows.UI.Xaml.EnteredBackgroundEventHandler
public unsafe static class EnteredBackgroundEventHandler__Impl
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void Invoke(
this global::System.__ComObject __this,
object sender,
global::Windows.ApplicationModel.EnteredBackgroundEventArgs e)
{
global::McgInterop.ForwardComSharedStubs.Proc_object__TArg0__<global::Windows.UI.Xaml.EnteredBackgroundEventHandler, global::Windows.ApplicationModel.EnteredBackgroundEventArgs>(
__this,
sender,
e,
global::Windows.UI.Xaml.EnteredBackgroundEventHandler__Impl.Vtbl.idx_Invoke
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// v-table for 'Windows.UI.Xaml.EnteredBackgroundEventHandler'
[global::System.Runtime.InteropServices.McgRootsType(typeof(global::Windows.UI.Xaml.EnteredBackgroundEventHandler))]
public unsafe partial struct Vtbl
{
global::System.IntPtr pfnQueryInterface;
global::System.IntPtr pfnAddRef;
global::System.IntPtr pfnRelease;
// Windows_UI_Xaml__EnteredBackgroundEventHandler
global::System.IntPtr pfnInvoke_Windows_UI_Xaml__EnteredBackgroundEventHandler;
internal const int idx_Invoke = 3;
[global::System.Runtime.CompilerServices.InitDataBlob(typeof(global::Windows.UI.Xaml.EnteredBackgroundEventHandler__Impl.Vtbl.Windows_UI_Xaml_EnteredBackgroundEventHandler__Impl_Vtbl_McgRvaContainer), "RVA_Windows_UI_Xaml_EnteredBackgroundEventHandler__Impl_Vtbl_s_theCcwVtable")]
public static global::Windows.UI.Xaml.EnteredBackgroundEventHandler__Impl.Vtbl s_theCcwVtable
#if false
= new global::Windows.UI.Xaml.EnteredBackgroundEventHandler__Impl.Vtbl() {
pfnQueryInterface = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfQueryInterface>(System.Runtime.InteropServices.__vtable_IUnknown.QueryInterface),
pfnAddRef = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfAddRef>(System.Runtime.InteropServices.__vtable_IUnknown.AddRef),
pfnRelease = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfRelease>(System.Runtime.InteropServices.__vtable_IUnknown.Release),
pfnInvoke_Windows_UI_Xaml__EnteredBackgroundEventHandler = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget23>(global::Windows.UI.Xaml.EnteredBackgroundEventHandler__Impl.Vtbl.Invoke__STUB),
}
#endif
;
public static global::System.IntPtr pNativeVtable;
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int Invoke__STUB(
global::System.IntPtr pComThis,
global::System.Runtime.InteropServices.__vtable_IInspectable* unsafe_sender,
global::Windows.ApplicationModel.IEnteredBackgroundEventArgs__Impl.Vtbl** unsafe_e)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.UI.Xaml.EnteredBackgroundEventHandler>(
__this,
0
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Proc_object__TArg0__<global::Windows.ApplicationModel.EnteredBackgroundEventArgs>(
__this,
unsafe_sender,
unsafe_e,
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
private static class Windows_UI_Xaml_EnteredBackgroundEventHandler__Impl_Vtbl_McgRvaContainer
{
[global::System.Runtime.CompilerServices.MethodAddrFixup(0, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "QueryInterface")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(4, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "AddRef")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(8, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "Release")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(12, typeof(global::Windows.UI.Xaml.EnteredBackgroundEventHandler__Impl.Vtbl), "Invoke__STUB")]
[global::System.Runtime.CompilerServices.NonArray]
static readonly byte[] RVA_Windows_UI_Xaml_EnteredBackgroundEventHandler__Impl_Vtbl_s_theCcwVtable = new byte[] {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
}
}
}
// Windows.UI.Xaml.IApplicationOverrides2
public unsafe static class IApplicationOverrides2__Impl
{
// StubClass for 'Windows.UI.Xaml.IApplicationOverrides2'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void OnBackgroundActivated(
global::System.__ComObject __this,
global::Windows.ApplicationModel.Activation.BackgroundActivatedEventArgs args)
{
global::McgInterop.ForwardComSharedStubs.Proc_TArg0__<global::Windows.UI.Xaml.IApplicationOverrides2, global::Windows.ApplicationModel.Activation.BackgroundActivatedEventArgs>(
__this,
args,
global::Windows.UI.Xaml.IApplicationOverrides2__Impl.Vtbl.idx_OnBackgroundActivated
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// DispatchClass for 'Windows.UI.Xaml.IApplicationOverrides2'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.IApplicationOverrides2))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.UI.Xaml.IApplicationOverrides2
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.UI.Xaml.IApplicationOverrides2.OnBackgroundActivated(global::Windows.ApplicationModel.Activation.BackgroundActivatedEventArgs args)
{
global::Windows.UI.Xaml.IApplicationOverrides2__Impl.StubClass.OnBackgroundActivated(
this,
args
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// v-table for 'Windows.UI.Xaml.IApplicationOverrides2'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.IApplicationOverrides2))]
public unsafe partial struct Vtbl
{
internal const int idx_OnBackgroundActivated = 6;
}
}
// Windows.UI.Xaml.IDependencyObject
public unsafe static class IDependencyObject__Impl
{
// v-table for 'Windows.UI.Xaml.IDependencyObject'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.IDependencyObject))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Xaml.IDependencyObject2
public unsafe static class IDependencyObject2__Impl
{
// v-table for 'Windows.UI.Xaml.IDependencyObject2'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.IDependencyObject2))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Xaml.IUIElement
public unsafe static class IUIElement__Impl
{
// StubClass for 'Windows.UI.Xaml.IUIElement'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.Media.Transform get_RenderTransform(global::System.__ComObject __this)
{
global::Windows.UI.Xaml.Media.Transform __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.UI.Xaml.IUIElement, global::Windows.UI.Xaml.Media.Transform>(
__this,
global::Windows.UI.Xaml.IUIElement__Impl.Vtbl.idx_get_RenderTransform
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void put_RenderTransform(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Media.Transform value)
{
global::McgInterop.ForwardComSharedStubs.Proc_TArg0__<global::Windows.UI.Xaml.IUIElement, global::Windows.UI.Xaml.Media.Transform>(
__this,
value,
global::Windows.UI.Xaml.IUIElement__Impl.Vtbl.idx_put_RenderTransform
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.Foundation.Point get_RenderTransformOrigin(global::System.__ComObject __this)
{
global::Windows.Foundation.Point __ret = global::McgInterop.ForwardComSharedStubs.Func__Point__<global::Windows.UI.Xaml.IUIElement>(
__this,
global::Windows.UI.Xaml.IUIElement__Impl.Vtbl.idx_get_RenderTransformOrigin
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
// Signature, Windows.UI.Xaml.IUIElement.put_RenderTransformOrigin, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.BlittableValueMarshaller] Windows_Foundation_Point__Windows_Foundation__Point,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void put_RenderTransformOrigin(
global::System.__ComObject __this,
global::Windows.Foundation.Point value)
{
// Setup
int unsafe___return__;
// Marshalling
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.UI.Xaml.IUIElement).TypeHandle,
global::Windows.UI.Xaml.IUIElement__Impl.Vtbl.idx_put_RenderTransformOrigin,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
// Return
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool get_UseLayoutRounding(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.UI.Xaml.IUIElement>(
__this,
global::Windows.UI.Xaml.IUIElement__Impl.Vtbl.idx_get_UseLayoutRounding
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
// Signature, Windows.UI.Xaml.IUIElement.put_UseLayoutRounding, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.CBoolMarshaller] bool__bool,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void put_UseLayoutRounding(
global::System.__ComObject __this,
bool value)
{
// Setup
sbyte unsafe_value;
int unsafe___return__;
// Marshalling
unsafe_value = (value ? ((sbyte)1) : ((sbyte)0));
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.UI.Xaml.IUIElement).TypeHandle,
global::Windows.UI.Xaml.IUIElement__Impl.Vtbl.idx_put_UseLayoutRounding,
unsafe_value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
// Return
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken add_KeyUp(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Input.KeyEventHandler value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __ret = global::McgInterop.ForwardComSharedStubs.Func_UI_Xaml_Input_KeyEventHandler___WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.IUIElement>(
__this,
value,
global::Windows.UI.Xaml.IUIElement__Impl.Vtbl.idx_add_KeyUp
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void remove_KeyUp(
global::System.__ComObject __this,
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::McgInterop.ForwardComSharedStubs.Proc__WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.IUIElement>(
__this,
token,
global::Windows.UI.Xaml.IUIElement__Impl.Vtbl.idx_remove_KeyUp
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken add_KeyDown(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Input.KeyEventHandler value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __ret = global::McgInterop.ForwardComSharedStubs.Func_UI_Xaml_Input_KeyEventHandler___WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.IUIElement>(
__this,
value,
global::Windows.UI.Xaml.IUIElement__Impl.Vtbl.idx_add_KeyDown
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void remove_KeyDown(
global::System.__ComObject __this,
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::McgInterop.ForwardComSharedStubs.Proc__WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.IUIElement>(
__this,
token,
global::Windows.UI.Xaml.IUIElement__Impl.Vtbl.idx_remove_KeyDown
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken add_GotFocus(
global::System.__ComObject __this,
global::Windows.UI.Xaml.RoutedEventHandler value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __ret = global::McgInterop.ForwardComSharedStubs.Func_UI_Xaml_RoutedEventHandler___WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.IUIElement>(
__this,
value,
global::Windows.UI.Xaml.IUIElement__Impl.Vtbl.idx_add_GotFocus
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void remove_GotFocus(
global::System.__ComObject __this,
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::McgInterop.ForwardComSharedStubs.Proc__WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.IUIElement>(
__this,
token,
global::Windows.UI.Xaml.IUIElement__Impl.Vtbl.idx_remove_GotFocus
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken add_LostFocus(
global::System.__ComObject __this,
global::Windows.UI.Xaml.RoutedEventHandler value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __ret = global::McgInterop.ForwardComSharedStubs.Func_UI_Xaml_RoutedEventHandler___WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.IUIElement>(
__this,
value,
global::Windows.UI.Xaml.IUIElement__Impl.Vtbl.idx_add_LostFocus
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void remove_LostFocus(
global::System.__ComObject __this,
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::McgInterop.ForwardComSharedStubs.Proc__WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.IUIElement>(
__this,
token,
global::Windows.UI.Xaml.IUIElement__Impl.Vtbl.idx_remove_LostFocus
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken add_DragEnter(
global::System.__ComObject __this,
global::Windows.UI.Xaml.DragEventHandler value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __ret = global::McgInterop.ForwardComSharedStubs.Func_UI_Xaml_DragEventHandler___WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.IUIElement>(
__this,
value,
global::Windows.UI.Xaml.IUIElement__Impl.Vtbl.idx_add_DragEnter
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void remove_DragEnter(
global::System.__ComObject __this,
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::McgInterop.ForwardComSharedStubs.Proc__WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.IUIElement>(
__this,
token,
global::Windows.UI.Xaml.IUIElement__Impl.Vtbl.idx_remove_DragEnter
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken add_DragLeave(
global::System.__ComObject __this,
global::Windows.UI.Xaml.DragEventHandler value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __ret = global::McgInterop.ForwardComSharedStubs.Func_UI_Xaml_DragEventHandler___WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.IUIElement>(
__this,
value,
global::Windows.UI.Xaml.IUIElement__Impl.Vtbl.idx_add_DragLeave
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void remove_DragLeave(
global::System.__ComObject __this,
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::McgInterop.ForwardComSharedStubs.Proc__WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.IUIElement>(
__this,
token,
global::Windows.UI.Xaml.IUIElement__Impl.Vtbl.idx_remove_DragLeave
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken add_DragOver(
global::System.__ComObject __this,
global::Windows.UI.Xaml.DragEventHandler value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __ret = global::McgInterop.ForwardComSharedStubs.Func_UI_Xaml_DragEventHandler___WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.IUIElement>(
__this,
value,
global::Windows.UI.Xaml.IUIElement__Impl.Vtbl.idx_add_DragOver
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void remove_DragOver(
global::System.__ComObject __this,
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::McgInterop.ForwardComSharedStubs.Proc__WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.IUIElement>(
__this,
token,
global::Windows.UI.Xaml.IUIElement__Impl.Vtbl.idx_remove_DragOver
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken add_Drop(
global::System.__ComObject __this,
global::Windows.UI.Xaml.DragEventHandler value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __ret = global::McgInterop.ForwardComSharedStubs.Func_UI_Xaml_DragEventHandler___WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.IUIElement>(
__this,
value,
global::Windows.UI.Xaml.IUIElement__Impl.Vtbl.idx_add_Drop
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void remove_Drop(
global::System.__ComObject __this,
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::McgInterop.ForwardComSharedStubs.Proc__WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.IUIElement>(
__this,
token,
global::Windows.UI.Xaml.IUIElement__Impl.Vtbl.idx_remove_Drop
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken add_PointerPressed(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Input.PointerEventHandler value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __ret = global::McgInterop.ForwardComSharedStubs.Func_UI_Xaml_Input_PointerEventHandler___WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.IUIElement>(
__this,
value,
global::Windows.UI.Xaml.IUIElement__Impl.Vtbl.idx_add_PointerPressed
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void remove_PointerPressed(
global::System.__ComObject __this,
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::McgInterop.ForwardComSharedStubs.Proc__WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.IUIElement>(
__this,
token,
global::Windows.UI.Xaml.IUIElement__Impl.Vtbl.idx_remove_PointerPressed
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken add_PointerMoved(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Input.PointerEventHandler value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __ret = global::McgInterop.ForwardComSharedStubs.Func_UI_Xaml_Input_PointerEventHandler___WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.IUIElement>(
__this,
value,
global::Windows.UI.Xaml.IUIElement__Impl.Vtbl.idx_add_PointerMoved
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void remove_PointerMoved(
global::System.__ComObject __this,
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::McgInterop.ForwardComSharedStubs.Proc__WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.IUIElement>(
__this,
token,
global::Windows.UI.Xaml.IUIElement__Impl.Vtbl.idx_remove_PointerMoved
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken add_PointerReleased(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Input.PointerEventHandler value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __ret = global::McgInterop.ForwardComSharedStubs.Func_UI_Xaml_Input_PointerEventHandler___WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.IUIElement>(
__this,
value,
global::Windows.UI.Xaml.IUIElement__Impl.Vtbl.idx_add_PointerReleased
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void remove_PointerReleased(
global::System.__ComObject __this,
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::McgInterop.ForwardComSharedStubs.Proc__WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.IUIElement>(
__this,
token,
global::Windows.UI.Xaml.IUIElement__Impl.Vtbl.idx_remove_PointerReleased
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken add_PointerEntered(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Input.PointerEventHandler value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __ret = global::McgInterop.ForwardComSharedStubs.Func_UI_Xaml_Input_PointerEventHandler___WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.IUIElement>(
__this,
value,
global::Windows.UI.Xaml.IUIElement__Impl.Vtbl.idx_add_PointerEntered
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void remove_PointerEntered(
global::System.__ComObject __this,
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::McgInterop.ForwardComSharedStubs.Proc__WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.IUIElement>(
__this,
token,
global::Windows.UI.Xaml.IUIElement__Impl.Vtbl.idx_remove_PointerEntered
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken add_PointerExited(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Input.PointerEventHandler value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __ret = global::McgInterop.ForwardComSharedStubs.Func_UI_Xaml_Input_PointerEventHandler___WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.IUIElement>(
__this,
value,
global::Windows.UI.Xaml.IUIElement__Impl.Vtbl.idx_add_PointerExited
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void remove_PointerExited(
global::System.__ComObject __this,
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::McgInterop.ForwardComSharedStubs.Proc__WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.IUIElement>(
__this,
token,
global::Windows.UI.Xaml.IUIElement__Impl.Vtbl.idx_remove_PointerExited
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken add_PointerCaptureLost(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Input.PointerEventHandler value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __ret = global::McgInterop.ForwardComSharedStubs.Func_UI_Xaml_Input_PointerEventHandler___WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.IUIElement>(
__this,
value,
global::Windows.UI.Xaml.IUIElement__Impl.Vtbl.idx_add_PointerCaptureLost
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void remove_PointerCaptureLost(
global::System.__ComObject __this,
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::McgInterop.ForwardComSharedStubs.Proc__WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.IUIElement>(
__this,
token,
global::Windows.UI.Xaml.IUIElement__Impl.Vtbl.idx_remove_PointerCaptureLost
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken add_PointerCanceled(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Input.PointerEventHandler value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __ret = global::McgInterop.ForwardComSharedStubs.Func_UI_Xaml_Input_PointerEventHandler___WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.IUIElement>(
__this,
value,
global::Windows.UI.Xaml.IUIElement__Impl.Vtbl.idx_add_PointerCanceled
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void remove_PointerCanceled(
global::System.__ComObject __this,
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::McgInterop.ForwardComSharedStubs.Proc__WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.IUIElement>(
__this,
token,
global::Windows.UI.Xaml.IUIElement__Impl.Vtbl.idx_remove_PointerCanceled
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken add_PointerWheelChanged(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Input.PointerEventHandler value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __ret = global::McgInterop.ForwardComSharedStubs.Func_UI_Xaml_Input_PointerEventHandler___WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.IUIElement>(
__this,
value,
global::Windows.UI.Xaml.IUIElement__Impl.Vtbl.idx_add_PointerWheelChanged
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void remove_PointerWheelChanged(
global::System.__ComObject __this,
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::McgInterop.ForwardComSharedStubs.Proc__WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.IUIElement>(
__this,
token,
global::Windows.UI.Xaml.IUIElement__Impl.Vtbl.idx_remove_PointerWheelChanged
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// Signature, Windows.UI.Xaml.IUIElement.add_Tapped, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.WinRTDelegateMarshaller] Windows_UI_Xaml_Input_TappedEventHandler__Windows_UI_Xaml_Input__TappedEventHandler *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] System_Runtime_InteropServices_WindowsRuntime_EventRegistrationToken__Windows_Foundation__EventRegistrationToken,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken add_Tapped(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Input.TappedEventHandler value)
{
// Setup
global::Windows.UI.Xaml.Input.TappedEventHandler__Impl.Vtbl** unsafe_value = default(global::Windows.UI.Xaml.Input.TappedEventHandler__Impl.Vtbl**);
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken unsafe_token__retval;
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token__retval;
int unsafe___return__;
try
{
// Marshalling
unsafe_value = (global::Windows.UI.Xaml.Input.TappedEventHandler__Impl.Vtbl**)global::System.Runtime.InteropServices.McgModuleManager.DelegateToComInterface(
value,
typeof(global::Windows.UI.Xaml.Input.TappedEventHandler).TypeHandle,
global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget28>(global::Windows.UI.Xaml.Input.TappedEventHandler__Impl.Invoke)
);
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.UI.Xaml.IUIElement).TypeHandle,
global::Windows.UI.Xaml.IUIElement__Impl.Vtbl.idx_add_Tapped,
unsafe_value,
&(unsafe_token__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
token__retval = unsafe_token__retval;
// Return
return token__retval;
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_value)));
}
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void remove_Tapped(
global::System.__ComObject __this,
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::McgInterop.ForwardComSharedStubs.Proc__WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.IUIElement>(
__this,
token,
global::Windows.UI.Xaml.IUIElement__Impl.Vtbl.idx_remove_Tapped
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// Signature, Windows.UI.Xaml.IUIElement.add_DoubleTapped, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.WinRTDelegateMarshaller] Windows_UI_Xaml_Input_DoubleTappedEventHandler__Windows_UI_Xaml_Input__DoubleTappedEventHandler *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] System_Runtime_InteropServices_WindowsRuntime_EventRegistrationToken__Windows_Foundation__EventRegistrationToken,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken add_DoubleTapped(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Input.DoubleTappedEventHandler value)
{
// Setup
global::Windows.UI.Xaml.Input.DoubleTappedEventHandler__Impl.Vtbl** unsafe_value = default(global::Windows.UI.Xaml.Input.DoubleTappedEventHandler__Impl.Vtbl**);
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken unsafe_token__retval;
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token__retval;
int unsafe___return__;
try
{
// Marshalling
unsafe_value = (global::Windows.UI.Xaml.Input.DoubleTappedEventHandler__Impl.Vtbl**)global::System.Runtime.InteropServices.McgModuleManager.DelegateToComInterface(
value,
typeof(global::Windows.UI.Xaml.Input.DoubleTappedEventHandler).TypeHandle,
global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget29>(global::Windows.UI.Xaml.Input.DoubleTappedEventHandler__Impl.Invoke)
);
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.UI.Xaml.IUIElement).TypeHandle,
global::Windows.UI.Xaml.IUIElement__Impl.Vtbl.idx_add_DoubleTapped,
unsafe_value,
&(unsafe_token__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
token__retval = unsafe_token__retval;
// Return
return token__retval;
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_value)));
}
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void remove_DoubleTapped(
global::System.__ComObject __this,
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::McgInterop.ForwardComSharedStubs.Proc__WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.IUIElement>(
__this,
token,
global::Windows.UI.Xaml.IUIElement__Impl.Vtbl.idx_remove_DoubleTapped
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// Signature, Windows.UI.Xaml.IUIElement.add_Holding, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.WinRTDelegateMarshaller] Windows_UI_Xaml_Input_HoldingEventHandler__Windows_UI_Xaml_Input__HoldingEventHandler *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] System_Runtime_InteropServices_WindowsRuntime_EventRegistrationToken__Windows_Foundation__EventRegistrationToken,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken add_Holding(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Input.HoldingEventHandler value)
{
// Setup
global::Windows.UI.Xaml.Input.HoldingEventHandler__Impl.Vtbl** unsafe_value = default(global::Windows.UI.Xaml.Input.HoldingEventHandler__Impl.Vtbl**);
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken unsafe_token__retval;
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token__retval;
int unsafe___return__;
try
{
// Marshalling
unsafe_value = (global::Windows.UI.Xaml.Input.HoldingEventHandler__Impl.Vtbl**)global::System.Runtime.InteropServices.McgModuleManager.DelegateToComInterface(
value,
typeof(global::Windows.UI.Xaml.Input.HoldingEventHandler).TypeHandle,
global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget30>(global::Windows.UI.Xaml.Input.HoldingEventHandler__Impl.Invoke)
);
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.UI.Xaml.IUIElement).TypeHandle,
global::Windows.UI.Xaml.IUIElement__Impl.Vtbl.idx_add_Holding,
unsafe_value,
&(unsafe_token__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
token__retval = unsafe_token__retval;
// Return
return token__retval;
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_value)));
}
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void remove_Holding(
global::System.__ComObject __this,
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::McgInterop.ForwardComSharedStubs.Proc__WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.IUIElement>(
__this,
token,
global::Windows.UI.Xaml.IUIElement__Impl.Vtbl.idx_remove_Holding
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// Signature, Windows.UI.Xaml.IUIElement.add_RightTapped, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.WinRTDelegateMarshaller] Windows_UI_Xaml_Input_RightTappedEventHandler__Windows_UI_Xaml_Input__RightTappedEventHandler *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] System_Runtime_InteropServices_WindowsRuntime_EventRegistrationToken__Windows_Foundation__EventRegistrationToken,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken add_RightTapped(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Input.RightTappedEventHandler value)
{
// Setup
global::Windows.UI.Xaml.Input.RightTappedEventHandler__Impl.Vtbl** unsafe_value = default(global::Windows.UI.Xaml.Input.RightTappedEventHandler__Impl.Vtbl**);
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken unsafe_token__retval;
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token__retval;
int unsafe___return__;
try
{
// Marshalling
unsafe_value = (global::Windows.UI.Xaml.Input.RightTappedEventHandler__Impl.Vtbl**)global::System.Runtime.InteropServices.McgModuleManager.DelegateToComInterface(
value,
typeof(global::Windows.UI.Xaml.Input.RightTappedEventHandler).TypeHandle,
global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget31>(global::Windows.UI.Xaml.Input.RightTappedEventHandler__Impl.Invoke)
);
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.UI.Xaml.IUIElement).TypeHandle,
global::Windows.UI.Xaml.IUIElement__Impl.Vtbl.idx_add_RightTapped,
unsafe_value,
&(unsafe_token__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
token__retval = unsafe_token__retval;
// Return
return token__retval;
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_value)));
}
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void remove_RightTapped(
global::System.__ComObject __this,
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::McgInterop.ForwardComSharedStubs.Proc__WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.IUIElement>(
__this,
token,
global::Windows.UI.Xaml.IUIElement__Impl.Vtbl.idx_remove_RightTapped
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// Signature, Windows.UI.Xaml.IUIElement.add_ManipulationStarting, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.WinRTDelegateMarshaller] Windows_UI_Xaml_Input_ManipulationStartingEventHandler__Windows_UI_Xaml_Input__ManipulationStartingEventHandler *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] System_Runtime_InteropServices_WindowsRuntime_EventRegistrationToken__Windows_Foundation__EventRegistrationToken,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken add_ManipulationStarting(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Input.ManipulationStartingEventHandler value)
{
// Setup
global::Windows.UI.Xaml.Input.ManipulationStartingEventHandler__Impl.Vtbl** unsafe_value = default(global::Windows.UI.Xaml.Input.ManipulationStartingEventHandler__Impl.Vtbl**);
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken unsafe_token__retval;
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token__retval;
int unsafe___return__;
try
{
// Marshalling
unsafe_value = (global::Windows.UI.Xaml.Input.ManipulationStartingEventHandler__Impl.Vtbl**)global::System.Runtime.InteropServices.McgModuleManager.DelegateToComInterface(
value,
typeof(global::Windows.UI.Xaml.Input.ManipulationStartingEventHandler).TypeHandle,
global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget32>(global::Windows.UI.Xaml.Input.ManipulationStartingEventHandler__Impl.Invoke)
);
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.UI.Xaml.IUIElement).TypeHandle,
global::Windows.UI.Xaml.IUIElement__Impl.Vtbl.idx_add_ManipulationStarting,
unsafe_value,
&(unsafe_token__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
token__retval = unsafe_token__retval;
// Return
return token__retval;
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_value)));
}
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void remove_ManipulationStarting(
global::System.__ComObject __this,
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::McgInterop.ForwardComSharedStubs.Proc__WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.IUIElement>(
__this,
token,
global::Windows.UI.Xaml.IUIElement__Impl.Vtbl.idx_remove_ManipulationStarting
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// Signature, Windows.UI.Xaml.IUIElement.add_ManipulationInertiaStarting, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.WinRTDelegateMarshaller] Windows_UI_Xaml_Input_ManipulationInertiaStartingEventHandler__Windows_UI_Xaml_Input__ManipulationInertiaStartingEventHandler *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] System_Runtime_InteropServices_WindowsRuntime_EventRegistrationToken__Windows_Foundation__EventRegistrationToken,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken add_ManipulationInertiaStarting(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Input.ManipulationInertiaStartingEventHandler value)
{
// Setup
global::Windows.UI.Xaml.Input.ManipulationInertiaStartingEventHandler__Impl.Vtbl** unsafe_value = default(global::Windows.UI.Xaml.Input.ManipulationInertiaStartingEventHandler__Impl.Vtbl**);
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken unsafe_token__retval;
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token__retval;
int unsafe___return__;
try
{
// Marshalling
unsafe_value = (global::Windows.UI.Xaml.Input.ManipulationInertiaStartingEventHandler__Impl.Vtbl**)global::System.Runtime.InteropServices.McgModuleManager.DelegateToComInterface(
value,
typeof(global::Windows.UI.Xaml.Input.ManipulationInertiaStartingEventHandler).TypeHandle,
global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget33>(global::Windows.UI.Xaml.Input.ManipulationInertiaStartingEventHandler__Impl.Invoke)
);
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.UI.Xaml.IUIElement).TypeHandle,
global::Windows.UI.Xaml.IUIElement__Impl.Vtbl.idx_add_ManipulationInertiaStarting,
unsafe_value,
&(unsafe_token__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
token__retval = unsafe_token__retval;
// Return
return token__retval;
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_value)));
}
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void remove_ManipulationInertiaStarting(
global::System.__ComObject __this,
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::McgInterop.ForwardComSharedStubs.Proc__WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.IUIElement>(
__this,
token,
global::Windows.UI.Xaml.IUIElement__Impl.Vtbl.idx_remove_ManipulationInertiaStarting
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// Signature, Windows.UI.Xaml.IUIElement.add_ManipulationStarted, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.WinRTDelegateMarshaller] Windows_UI_Xaml_Input_ManipulationStartedEventHandler__Windows_UI_Xaml_Input__ManipulationStartedEventHandler *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] System_Runtime_InteropServices_WindowsRuntime_EventRegistrationToken__Windows_Foundation__EventRegistrationToken,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken add_ManipulationStarted(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Input.ManipulationStartedEventHandler value)
{
// Setup
global::Windows.UI.Xaml.Input.ManipulationStartedEventHandler__Impl.Vtbl** unsafe_value = default(global::Windows.UI.Xaml.Input.ManipulationStartedEventHandler__Impl.Vtbl**);
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken unsafe_token__retval;
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token__retval;
int unsafe___return__;
try
{
// Marshalling
unsafe_value = (global::Windows.UI.Xaml.Input.ManipulationStartedEventHandler__Impl.Vtbl**)global::System.Runtime.InteropServices.McgModuleManager.DelegateToComInterface(
value,
typeof(global::Windows.UI.Xaml.Input.ManipulationStartedEventHandler).TypeHandle,
global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget34>(global::Windows.UI.Xaml.Input.ManipulationStartedEventHandler__Impl.Invoke)
);
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.UI.Xaml.IUIElement).TypeHandle,
global::Windows.UI.Xaml.IUIElement__Impl.Vtbl.idx_add_ManipulationStarted,
unsafe_value,
&(unsafe_token__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
token__retval = unsafe_token__retval;
// Return
return token__retval;
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_value)));
}
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void remove_ManipulationStarted(
global::System.__ComObject __this,
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::McgInterop.ForwardComSharedStubs.Proc__WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.IUIElement>(
__this,
token,
global::Windows.UI.Xaml.IUIElement__Impl.Vtbl.idx_remove_ManipulationStarted
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// Signature, Windows.UI.Xaml.IUIElement.add_ManipulationDelta, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.WinRTDelegateMarshaller] Windows_UI_Xaml_Input_ManipulationDeltaEventHandler__Windows_UI_Xaml_Input__ManipulationDeltaEventHandler *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] System_Runtime_InteropServices_WindowsRuntime_EventRegistrationToken__Windows_Foundation__EventRegistrationToken,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken add_ManipulationDelta(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Input.ManipulationDeltaEventHandler value)
{
// Setup
global::Windows.UI.Xaml.Input.ManipulationDeltaEventHandler__Impl.Vtbl** unsafe_value = default(global::Windows.UI.Xaml.Input.ManipulationDeltaEventHandler__Impl.Vtbl**);
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken unsafe_token__retval;
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token__retval;
int unsafe___return__;
try
{
// Marshalling
unsafe_value = (global::Windows.UI.Xaml.Input.ManipulationDeltaEventHandler__Impl.Vtbl**)global::System.Runtime.InteropServices.McgModuleManager.DelegateToComInterface(
value,
typeof(global::Windows.UI.Xaml.Input.ManipulationDeltaEventHandler).TypeHandle,
global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget35>(global::Windows.UI.Xaml.Input.ManipulationDeltaEventHandler__Impl.Invoke)
);
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.UI.Xaml.IUIElement).TypeHandle,
global::Windows.UI.Xaml.IUIElement__Impl.Vtbl.idx_add_ManipulationDelta,
unsafe_value,
&(unsafe_token__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
token__retval = unsafe_token__retval;
// Return
return token__retval;
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_value)));
}
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void remove_ManipulationDelta(
global::System.__ComObject __this,
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::McgInterop.ForwardComSharedStubs.Proc__WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.IUIElement>(
__this,
token,
global::Windows.UI.Xaml.IUIElement__Impl.Vtbl.idx_remove_ManipulationDelta
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// Signature, Windows.UI.Xaml.IUIElement.add_ManipulationCompleted, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.WinRTDelegateMarshaller] Windows_UI_Xaml_Input_ManipulationCompletedEventHandler__Windows_UI_Xaml_Input__ManipulationCompletedEventHandler *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] System_Runtime_InteropServices_WindowsRuntime_EventRegistrationToken__Windows_Foundation__EventRegistrationToken,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken add_ManipulationCompleted(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Input.ManipulationCompletedEventHandler value)
{
// Setup
global::Windows.UI.Xaml.Input.ManipulationCompletedEventHandler__Impl.Vtbl** unsafe_value = default(global::Windows.UI.Xaml.Input.ManipulationCompletedEventHandler__Impl.Vtbl**);
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken unsafe_token__retval;
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token__retval;
int unsafe___return__;
try
{
// Marshalling
unsafe_value = (global::Windows.UI.Xaml.Input.ManipulationCompletedEventHandler__Impl.Vtbl**)global::System.Runtime.InteropServices.McgModuleManager.DelegateToComInterface(
value,
typeof(global::Windows.UI.Xaml.Input.ManipulationCompletedEventHandler).TypeHandle,
global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget36>(global::Windows.UI.Xaml.Input.ManipulationCompletedEventHandler__Impl.Invoke)
);
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.UI.Xaml.IUIElement).TypeHandle,
global::Windows.UI.Xaml.IUIElement__Impl.Vtbl.idx_add_ManipulationCompleted,
unsafe_value,
&(unsafe_token__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
token__retval = unsafe_token__retval;
// Return
return token__retval;
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_value)));
}
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void remove_ManipulationCompleted(
global::System.__ComObject __this,
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::McgInterop.ForwardComSharedStubs.Proc__WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.IUIElement>(
__this,
token,
global::Windows.UI.Xaml.IUIElement__Impl.Vtbl.idx_remove_ManipulationCompleted
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// DispatchClass for 'Windows.UI.Xaml.IUIElement'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.IUIElement))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.UI.Xaml.IUIElement
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.UI.Xaml.IUIElement.RenderTransform")]
global::Windows.UI.Xaml.Media.Transform global::Windows.UI.Xaml.IUIElement.get_RenderTransform()
{
global::Windows.UI.Xaml.Media.Transform __retVal = global::Windows.UI.Xaml.IUIElement__Impl.StubClass.get_RenderTransform(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertySet, "Windows.UI.Xaml.IUIElement.RenderTransform")]
void global::Windows.UI.Xaml.IUIElement.put_RenderTransform(global::Windows.UI.Xaml.Media.Transform value)
{
global::Windows.UI.Xaml.IUIElement__Impl.StubClass.put_RenderTransform(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.UI.Xaml.IUIElement.RenderTransformOrigin")]
global::Windows.Foundation.Point global::Windows.UI.Xaml.IUIElement.get_RenderTransformOrigin()
{
global::Windows.Foundation.Point __retVal = global::Windows.UI.Xaml.IUIElement__Impl.StubClass.get_RenderTransformOrigin(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertySet, "Windows.UI.Xaml.IUIElement.RenderTransformOrigin")]
void global::Windows.UI.Xaml.IUIElement.put_RenderTransformOrigin(global::Windows.Foundation.Point value)
{
global::Windows.UI.Xaml.IUIElement__Impl.StubClass.put_RenderTransformOrigin(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.UI.Xaml.IUIElement.UseLayoutRounding")]
bool global::Windows.UI.Xaml.IUIElement.get_UseLayoutRounding()
{
bool __retVal = global::Windows.UI.Xaml.IUIElement__Impl.StubClass.get_UseLayoutRounding(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertySet, "Windows.UI.Xaml.IUIElement.UseLayoutRounding")]
void global::Windows.UI.Xaml.IUIElement.put_UseLayoutRounding(bool value)
{
global::Windows.UI.Xaml.IUIElement__Impl.StubClass.put_UseLayoutRounding(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventAdd, "Windows.UI.Xaml.IUIElement.KeyUp")]
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken global::Windows.UI.Xaml.IUIElement.add_KeyUp(global::Windows.UI.Xaml.Input.KeyEventHandler value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __retVal = global::Windows.UI.Xaml.IUIElement__Impl.StubClass.add_KeyUp(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventRemove, "Windows.UI.Xaml.IUIElement.KeyUp")]
void global::Windows.UI.Xaml.IUIElement.remove_KeyUp(global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::Windows.UI.Xaml.IUIElement__Impl.StubClass.remove_KeyUp(
this,
token
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventAdd, "Windows.UI.Xaml.IUIElement.KeyDown")]
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken global::Windows.UI.Xaml.IUIElement.add_KeyDown(global::Windows.UI.Xaml.Input.KeyEventHandler value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __retVal = global::Windows.UI.Xaml.IUIElement__Impl.StubClass.add_KeyDown(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventRemove, "Windows.UI.Xaml.IUIElement.KeyDown")]
void global::Windows.UI.Xaml.IUIElement.remove_KeyDown(global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::Windows.UI.Xaml.IUIElement__Impl.StubClass.remove_KeyDown(
this,
token
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventAdd, "Windows.UI.Xaml.IUIElement.GotFocus")]
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken global::Windows.UI.Xaml.IUIElement.add_GotFocus(global::Windows.UI.Xaml.RoutedEventHandler value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __retVal = global::Windows.UI.Xaml.IUIElement__Impl.StubClass.add_GotFocus(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventRemove, "Windows.UI.Xaml.IUIElement.GotFocus")]
void global::Windows.UI.Xaml.IUIElement.remove_GotFocus(global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::Windows.UI.Xaml.IUIElement__Impl.StubClass.remove_GotFocus(
this,
token
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventAdd, "Windows.UI.Xaml.IUIElement.LostFocus")]
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken global::Windows.UI.Xaml.IUIElement.add_LostFocus(global::Windows.UI.Xaml.RoutedEventHandler value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __retVal = global::Windows.UI.Xaml.IUIElement__Impl.StubClass.add_LostFocus(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventRemove, "Windows.UI.Xaml.IUIElement.LostFocus")]
void global::Windows.UI.Xaml.IUIElement.remove_LostFocus(global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::Windows.UI.Xaml.IUIElement__Impl.StubClass.remove_LostFocus(
this,
token
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventAdd, "Windows.UI.Xaml.IUIElement.DragEnter")]
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken global::Windows.UI.Xaml.IUIElement.add_DragEnter(global::Windows.UI.Xaml.DragEventHandler value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __retVal = global::Windows.UI.Xaml.IUIElement__Impl.StubClass.add_DragEnter(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventRemove, "Windows.UI.Xaml.IUIElement.DragEnter")]
void global::Windows.UI.Xaml.IUIElement.remove_DragEnter(global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::Windows.UI.Xaml.IUIElement__Impl.StubClass.remove_DragEnter(
this,
token
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventAdd, "Windows.UI.Xaml.IUIElement.DragLeave")]
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken global::Windows.UI.Xaml.IUIElement.add_DragLeave(global::Windows.UI.Xaml.DragEventHandler value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __retVal = global::Windows.UI.Xaml.IUIElement__Impl.StubClass.add_DragLeave(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventRemove, "Windows.UI.Xaml.IUIElement.DragLeave")]
void global::Windows.UI.Xaml.IUIElement.remove_DragLeave(global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::Windows.UI.Xaml.IUIElement__Impl.StubClass.remove_DragLeave(
this,
token
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventAdd, "Windows.UI.Xaml.IUIElement.DragOver")]
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken global::Windows.UI.Xaml.IUIElement.add_DragOver(global::Windows.UI.Xaml.DragEventHandler value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __retVal = global::Windows.UI.Xaml.IUIElement__Impl.StubClass.add_DragOver(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventRemove, "Windows.UI.Xaml.IUIElement.DragOver")]
void global::Windows.UI.Xaml.IUIElement.remove_DragOver(global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::Windows.UI.Xaml.IUIElement__Impl.StubClass.remove_DragOver(
this,
token
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventAdd, "Windows.UI.Xaml.IUIElement.Drop")]
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken global::Windows.UI.Xaml.IUIElement.add_Drop(global::Windows.UI.Xaml.DragEventHandler value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __retVal = global::Windows.UI.Xaml.IUIElement__Impl.StubClass.add_Drop(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventRemove, "Windows.UI.Xaml.IUIElement.Drop")]
void global::Windows.UI.Xaml.IUIElement.remove_Drop(global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::Windows.UI.Xaml.IUIElement__Impl.StubClass.remove_Drop(
this,
token
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventAdd, "Windows.UI.Xaml.IUIElement.PointerPressed")]
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken global::Windows.UI.Xaml.IUIElement.add_PointerPressed(global::Windows.UI.Xaml.Input.PointerEventHandler value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __retVal = global::Windows.UI.Xaml.IUIElement__Impl.StubClass.add_PointerPressed(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventRemove, "Windows.UI.Xaml.IUIElement.PointerPressed")]
void global::Windows.UI.Xaml.IUIElement.remove_PointerPressed(global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::Windows.UI.Xaml.IUIElement__Impl.StubClass.remove_PointerPressed(
this,
token
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventAdd, "Windows.UI.Xaml.IUIElement.PointerMoved")]
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken global::Windows.UI.Xaml.IUIElement.add_PointerMoved(global::Windows.UI.Xaml.Input.PointerEventHandler value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __retVal = global::Windows.UI.Xaml.IUIElement__Impl.StubClass.add_PointerMoved(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventRemove, "Windows.UI.Xaml.IUIElement.PointerMoved")]
void global::Windows.UI.Xaml.IUIElement.remove_PointerMoved(global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::Windows.UI.Xaml.IUIElement__Impl.StubClass.remove_PointerMoved(
this,
token
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventAdd, "Windows.UI.Xaml.IUIElement.PointerReleased")]
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken global::Windows.UI.Xaml.IUIElement.add_PointerReleased(global::Windows.UI.Xaml.Input.PointerEventHandler value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __retVal = global::Windows.UI.Xaml.IUIElement__Impl.StubClass.add_PointerReleased(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventRemove, "Windows.UI.Xaml.IUIElement.PointerReleased")]
void global::Windows.UI.Xaml.IUIElement.remove_PointerReleased(global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::Windows.UI.Xaml.IUIElement__Impl.StubClass.remove_PointerReleased(
this,
token
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventAdd, "Windows.UI.Xaml.IUIElement.PointerEntered")]
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken global::Windows.UI.Xaml.IUIElement.add_PointerEntered(global::Windows.UI.Xaml.Input.PointerEventHandler value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __retVal = global::Windows.UI.Xaml.IUIElement__Impl.StubClass.add_PointerEntered(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventRemove, "Windows.UI.Xaml.IUIElement.PointerEntered")]
void global::Windows.UI.Xaml.IUIElement.remove_PointerEntered(global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::Windows.UI.Xaml.IUIElement__Impl.StubClass.remove_PointerEntered(
this,
token
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventAdd, "Windows.UI.Xaml.IUIElement.PointerExited")]
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken global::Windows.UI.Xaml.IUIElement.add_PointerExited(global::Windows.UI.Xaml.Input.PointerEventHandler value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __retVal = global::Windows.UI.Xaml.IUIElement__Impl.StubClass.add_PointerExited(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventRemove, "Windows.UI.Xaml.IUIElement.PointerExited")]
void global::Windows.UI.Xaml.IUIElement.remove_PointerExited(global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::Windows.UI.Xaml.IUIElement__Impl.StubClass.remove_PointerExited(
this,
token
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventAdd, "Windows.UI.Xaml.IUIElement.PointerCaptureLost")]
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken global::Windows.UI.Xaml.IUIElement.add_PointerCaptureLost(global::Windows.UI.Xaml.Input.PointerEventHandler value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __retVal = global::Windows.UI.Xaml.IUIElement__Impl.StubClass.add_PointerCaptureLost(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventRemove, "Windows.UI.Xaml.IUIElement.PointerCaptureLost")]
void global::Windows.UI.Xaml.IUIElement.remove_PointerCaptureLost(global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::Windows.UI.Xaml.IUIElement__Impl.StubClass.remove_PointerCaptureLost(
this,
token
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventAdd, "Windows.UI.Xaml.IUIElement.PointerCanceled")]
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken global::Windows.UI.Xaml.IUIElement.add_PointerCanceled(global::Windows.UI.Xaml.Input.PointerEventHandler value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __retVal = global::Windows.UI.Xaml.IUIElement__Impl.StubClass.add_PointerCanceled(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventRemove, "Windows.UI.Xaml.IUIElement.PointerCanceled")]
void global::Windows.UI.Xaml.IUIElement.remove_PointerCanceled(global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::Windows.UI.Xaml.IUIElement__Impl.StubClass.remove_PointerCanceled(
this,
token
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventAdd, "Windows.UI.Xaml.IUIElement.PointerWheelChanged")]
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken global::Windows.UI.Xaml.IUIElement.add_PointerWheelChanged(global::Windows.UI.Xaml.Input.PointerEventHandler value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __retVal = global::Windows.UI.Xaml.IUIElement__Impl.StubClass.add_PointerWheelChanged(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventRemove, "Windows.UI.Xaml.IUIElement.PointerWheelChanged")]
void global::Windows.UI.Xaml.IUIElement.remove_PointerWheelChanged(global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::Windows.UI.Xaml.IUIElement__Impl.StubClass.remove_PointerWheelChanged(
this,
token
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventAdd, "Windows.UI.Xaml.IUIElement.Tapped")]
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken global::Windows.UI.Xaml.IUIElement.add_Tapped(global::Windows.UI.Xaml.Input.TappedEventHandler value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __retVal = global::Windows.UI.Xaml.IUIElement__Impl.StubClass.add_Tapped(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventRemove, "Windows.UI.Xaml.IUIElement.Tapped")]
void global::Windows.UI.Xaml.IUIElement.remove_Tapped(global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::Windows.UI.Xaml.IUIElement__Impl.StubClass.remove_Tapped(
this,
token
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventAdd, "Windows.UI.Xaml.IUIElement.DoubleTapped")]
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken global::Windows.UI.Xaml.IUIElement.add_DoubleTapped(global::Windows.UI.Xaml.Input.DoubleTappedEventHandler value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __retVal = global::Windows.UI.Xaml.IUIElement__Impl.StubClass.add_DoubleTapped(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventRemove, "Windows.UI.Xaml.IUIElement.DoubleTapped")]
void global::Windows.UI.Xaml.IUIElement.remove_DoubleTapped(global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::Windows.UI.Xaml.IUIElement__Impl.StubClass.remove_DoubleTapped(
this,
token
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventAdd, "Windows.UI.Xaml.IUIElement.Holding")]
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken global::Windows.UI.Xaml.IUIElement.add_Holding(global::Windows.UI.Xaml.Input.HoldingEventHandler value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __retVal = global::Windows.UI.Xaml.IUIElement__Impl.StubClass.add_Holding(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventRemove, "Windows.UI.Xaml.IUIElement.Holding")]
void global::Windows.UI.Xaml.IUIElement.remove_Holding(global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::Windows.UI.Xaml.IUIElement__Impl.StubClass.remove_Holding(
this,
token
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventAdd, "Windows.UI.Xaml.IUIElement.RightTapped")]
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken global::Windows.UI.Xaml.IUIElement.add_RightTapped(global::Windows.UI.Xaml.Input.RightTappedEventHandler value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __retVal = global::Windows.UI.Xaml.IUIElement__Impl.StubClass.add_RightTapped(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventRemove, "Windows.UI.Xaml.IUIElement.RightTapped")]
void global::Windows.UI.Xaml.IUIElement.remove_RightTapped(global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::Windows.UI.Xaml.IUIElement__Impl.StubClass.remove_RightTapped(
this,
token
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventAdd, "Windows.UI.Xaml.IUIElement.ManipulationStarting")]
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken global::Windows.UI.Xaml.IUIElement.add_ManipulationStarting(global::Windows.UI.Xaml.Input.ManipulationStartingEventHandler value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __retVal = global::Windows.UI.Xaml.IUIElement__Impl.StubClass.add_ManipulationStarting(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventRemove, "Windows.UI.Xaml.IUIElement.ManipulationStarting")]
void global::Windows.UI.Xaml.IUIElement.remove_ManipulationStarting(global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::Windows.UI.Xaml.IUIElement__Impl.StubClass.remove_ManipulationStarting(
this,
token
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventAdd, "Windows.UI.Xaml.IUIElement.ManipulationInertiaStarting")]
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken global::Windows.UI.Xaml.IUIElement.add_ManipulationInertiaStarting(global::Windows.UI.Xaml.Input.ManipulationInertiaStartingEventHandler value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __retVal = global::Windows.UI.Xaml.IUIElement__Impl.StubClass.add_ManipulationInertiaStarting(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventRemove, "Windows.UI.Xaml.IUIElement.ManipulationInertiaStarting")]
void global::Windows.UI.Xaml.IUIElement.remove_ManipulationInertiaStarting(global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::Windows.UI.Xaml.IUIElement__Impl.StubClass.remove_ManipulationInertiaStarting(
this,
token
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventAdd, "Windows.UI.Xaml.IUIElement.ManipulationStarted")]
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken global::Windows.UI.Xaml.IUIElement.add_ManipulationStarted(global::Windows.UI.Xaml.Input.ManipulationStartedEventHandler value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __retVal = global::Windows.UI.Xaml.IUIElement__Impl.StubClass.add_ManipulationStarted(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventRemove, "Windows.UI.Xaml.IUIElement.ManipulationStarted")]
void global::Windows.UI.Xaml.IUIElement.remove_ManipulationStarted(global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::Windows.UI.Xaml.IUIElement__Impl.StubClass.remove_ManipulationStarted(
this,
token
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventAdd, "Windows.UI.Xaml.IUIElement.ManipulationDelta")]
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken global::Windows.UI.Xaml.IUIElement.add_ManipulationDelta(global::Windows.UI.Xaml.Input.ManipulationDeltaEventHandler value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __retVal = global::Windows.UI.Xaml.IUIElement__Impl.StubClass.add_ManipulationDelta(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventRemove, "Windows.UI.Xaml.IUIElement.ManipulationDelta")]
void global::Windows.UI.Xaml.IUIElement.remove_ManipulationDelta(global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::Windows.UI.Xaml.IUIElement__Impl.StubClass.remove_ManipulationDelta(
this,
token
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventAdd, "Windows.UI.Xaml.IUIElement.ManipulationCompleted")]
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken global::Windows.UI.Xaml.IUIElement.add_ManipulationCompleted(global::Windows.UI.Xaml.Input.ManipulationCompletedEventHandler value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __retVal = global::Windows.UI.Xaml.IUIElement__Impl.StubClass.add_ManipulationCompleted(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventRemove, "Windows.UI.Xaml.IUIElement.ManipulationCompleted")]
void global::Windows.UI.Xaml.IUIElement.remove_ManipulationCompleted(global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::Windows.UI.Xaml.IUIElement__Impl.StubClass.remove_ManipulationCompleted(
this,
token
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// v-table for 'Windows.UI.Xaml.IUIElement'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.IUIElement))]
public unsafe partial struct Vtbl
{
internal const int idx_get_RenderTransform = 13;
internal const int idx_put_RenderTransform = 14;
internal const int idx_get_RenderTransformOrigin = 17;
internal const int idx_put_RenderTransformOrigin = 18;
internal const int idx_get_UseLayoutRounding = 24;
internal const int idx_put_UseLayoutRounding = 25;
internal const int idx_add_KeyUp = 41;
internal const int idx_remove_KeyUp = 42;
internal const int idx_add_KeyDown = 43;
internal const int idx_remove_KeyDown = 44;
internal const int idx_add_GotFocus = 45;
internal const int idx_remove_GotFocus = 46;
internal const int idx_add_LostFocus = 47;
internal const int idx_remove_LostFocus = 48;
internal const int idx_add_DragEnter = 49;
internal const int idx_remove_DragEnter = 50;
internal const int idx_add_DragLeave = 51;
internal const int idx_remove_DragLeave = 52;
internal const int idx_add_DragOver = 53;
internal const int idx_remove_DragOver = 54;
internal const int idx_add_Drop = 55;
internal const int idx_remove_Drop = 56;
internal const int idx_add_PointerPressed = 57;
internal const int idx_remove_PointerPressed = 58;
internal const int idx_add_PointerMoved = 59;
internal const int idx_remove_PointerMoved = 60;
internal const int idx_add_PointerReleased = 61;
internal const int idx_remove_PointerReleased = 62;
internal const int idx_add_PointerEntered = 63;
internal const int idx_remove_PointerEntered = 64;
internal const int idx_add_PointerExited = 65;
internal const int idx_remove_PointerExited = 66;
internal const int idx_add_PointerCaptureLost = 67;
internal const int idx_remove_PointerCaptureLost = 68;
internal const int idx_add_PointerCanceled = 69;
internal const int idx_remove_PointerCanceled = 70;
internal const int idx_add_PointerWheelChanged = 71;
internal const int idx_remove_PointerWheelChanged = 72;
internal const int idx_add_Tapped = 73;
internal const int idx_remove_Tapped = 74;
internal const int idx_add_DoubleTapped = 75;
internal const int idx_remove_DoubleTapped = 76;
internal const int idx_add_Holding = 77;
internal const int idx_remove_Holding = 78;
internal const int idx_add_RightTapped = 79;
internal const int idx_remove_RightTapped = 80;
internal const int idx_add_ManipulationStarting = 81;
internal const int idx_remove_ManipulationStarting = 82;
internal const int idx_add_ManipulationInertiaStarting = 83;
internal const int idx_remove_ManipulationInertiaStarting = 84;
internal const int idx_add_ManipulationStarted = 85;
internal const int idx_remove_ManipulationStarted = 86;
internal const int idx_add_ManipulationDelta = 87;
internal const int idx_remove_ManipulationDelta = 88;
internal const int idx_add_ManipulationCompleted = 89;
internal const int idx_remove_ManipulationCompleted = 90;
}
}
// Windows.UI.Xaml.IRoutedEventArgs
public unsafe static class IRoutedEventArgs__Impl
{
// v-table for 'Windows.UI.Xaml.IRoutedEventArgs'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.IRoutedEventArgs))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Xaml.RoutedEventHandler
public unsafe static class RoutedEventHandler__Impl
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void Invoke(
this global::System.__ComObject __this,
object sender,
global::Windows.UI.Xaml.RoutedEventArgs e)
{
global::McgInterop.ForwardComSharedStubs.Proc_object__TArg0__<global::Windows.UI.Xaml.RoutedEventHandler, global::Windows.UI.Xaml.RoutedEventArgs>(
__this,
sender,
e,
global::Windows.UI.Xaml.RoutedEventHandler__Impl.Vtbl.idx_Invoke
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// v-table for 'Windows.UI.Xaml.RoutedEventHandler'
[global::System.Runtime.InteropServices.McgRootsType(typeof(global::Windows.UI.Xaml.RoutedEventHandler))]
public unsafe partial struct Vtbl
{
global::System.IntPtr pfnQueryInterface;
global::System.IntPtr pfnAddRef;
global::System.IntPtr pfnRelease;
// Windows_UI_Xaml__RoutedEventHandler
global::System.IntPtr pfnInvoke_Windows_UI_Xaml__RoutedEventHandler;
internal const int idx_Invoke = 3;
[global::System.Runtime.CompilerServices.InitDataBlob(typeof(global::Windows.UI.Xaml.RoutedEventHandler__Impl.Vtbl.Windows_UI_Xaml_RoutedEventHandler__Impl_Vtbl_McgRvaContainer), "RVA_Windows_UI_Xaml_RoutedEventHandler__Impl_Vtbl_s_theCcwVtable")]
public static global::Windows.UI.Xaml.RoutedEventHandler__Impl.Vtbl s_theCcwVtable
#if false
= new global::Windows.UI.Xaml.RoutedEventHandler__Impl.Vtbl() {
pfnQueryInterface = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfQueryInterface>(System.Runtime.InteropServices.__vtable_IUnknown.QueryInterface),
pfnAddRef = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfAddRef>(System.Runtime.InteropServices.__vtable_IUnknown.AddRef),
pfnRelease = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfRelease>(System.Runtime.InteropServices.__vtable_IUnknown.Release),
pfnInvoke_Windows_UI_Xaml__RoutedEventHandler = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget38>(global::Windows.UI.Xaml.RoutedEventHandler__Impl.Vtbl.Invoke__STUB),
}
#endif
;
public static global::System.IntPtr pNativeVtable;
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int Invoke__STUB(
global::System.IntPtr pComThis,
global::System.Runtime.InteropServices.__vtable_IInspectable* unsafe_sender,
global::Windows.UI.Xaml.IRoutedEventArgs__Impl.Vtbl** unsafe_e)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.UI.Xaml.RoutedEventHandler>(
__this,
0
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Proc_object__TArg0__<global::Windows.UI.Xaml.RoutedEventArgs>(
__this,
unsafe_sender,
unsafe_e,
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
private static class Windows_UI_Xaml_RoutedEventHandler__Impl_Vtbl_McgRvaContainer
{
[global::System.Runtime.CompilerServices.MethodAddrFixup(0, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "QueryInterface")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(4, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "AddRef")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(8, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "Release")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(12, typeof(global::Windows.UI.Xaml.RoutedEventHandler__Impl.Vtbl), "Invoke__STUB")]
[global::System.Runtime.CompilerServices.NonArray]
static readonly byte[] RVA_Windows_UI_Xaml_RoutedEventHandler__Impl_Vtbl_s_theCcwVtable = new byte[] {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
}
}
}
// Windows.UI.Xaml.DragEventHandler
public unsafe static class DragEventHandler__Impl
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void Invoke(
this global::System.__ComObject __this,
object sender,
global::Windows.UI.Xaml.DragEventArgs e)
{
global::McgInterop.ForwardComSharedStubs.Proc_object__TArg0__<global::Windows.UI.Xaml.DragEventHandler, global::Windows.UI.Xaml.DragEventArgs>(
__this,
sender,
e,
global::Windows.UI.Xaml.DragEventHandler__Impl.Vtbl.idx_Invoke
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// v-table for 'Windows.UI.Xaml.DragEventHandler'
[global::System.Runtime.InteropServices.McgRootsType(typeof(global::Windows.UI.Xaml.DragEventHandler))]
public unsafe partial struct Vtbl
{
global::System.IntPtr pfnQueryInterface;
global::System.IntPtr pfnAddRef;
global::System.IntPtr pfnRelease;
// Windows_UI_Xaml__DragEventHandler
global::System.IntPtr pfnInvoke_Windows_UI_Xaml__DragEventHandler;
internal const int idx_Invoke = 3;
[global::System.Runtime.CompilerServices.InitDataBlob(typeof(global::Windows.UI.Xaml.DragEventHandler__Impl.Vtbl.Windows_UI_Xaml_DragEventHandler__Impl_Vtbl_McgRvaContainer), "RVA_Windows_UI_Xaml_DragEventHandler__Impl_Vtbl_s_theCcwVtable")]
public static global::Windows.UI.Xaml.DragEventHandler__Impl.Vtbl s_theCcwVtable
#if false
= new global::Windows.UI.Xaml.DragEventHandler__Impl.Vtbl() {
pfnQueryInterface = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfQueryInterface>(System.Runtime.InteropServices.__vtable_IUnknown.QueryInterface),
pfnAddRef = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfAddRef>(System.Runtime.InteropServices.__vtable_IUnknown.AddRef),
pfnRelease = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfRelease>(System.Runtime.InteropServices.__vtable_IUnknown.Release),
pfnInvoke_Windows_UI_Xaml__DragEventHandler = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget39>(global::Windows.UI.Xaml.DragEventHandler__Impl.Vtbl.Invoke__STUB),
}
#endif
;
public static global::System.IntPtr pNativeVtable;
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int Invoke__STUB(
global::System.IntPtr pComThis,
global::System.Runtime.InteropServices.__vtable_IInspectable* unsafe_sender,
global::Windows.UI.Xaml.IDragEventArgs__Impl.Vtbl** unsafe_e)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.UI.Xaml.DragEventHandler>(
__this,
0
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Proc_object__TArg0__<global::Windows.UI.Xaml.DragEventArgs>(
__this,
unsafe_sender,
unsafe_e,
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
private static class Windows_UI_Xaml_DragEventHandler__Impl_Vtbl_McgRvaContainer
{
[global::System.Runtime.CompilerServices.MethodAddrFixup(0, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "QueryInterface")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(4, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "AddRef")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(8, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "Release")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(12, typeof(global::Windows.UI.Xaml.DragEventHandler__Impl.Vtbl), "Invoke__STUB")]
[global::System.Runtime.CompilerServices.NonArray]
static readonly byte[] RVA_Windows_UI_Xaml_DragEventHandler__Impl_Vtbl_s_theCcwVtable = new byte[] {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
}
}
}
// Windows.UI.Xaml.IDragEventArgs
public unsafe static class IDragEventArgs__Impl
{
// v-table for 'Windows.UI.Xaml.IDragEventArgs'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.IDragEventArgs))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Xaml.IDragEventArgs2
public unsafe static class IDragEventArgs2__Impl
{
// v-table for 'Windows.UI.Xaml.IDragEventArgs2'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.IDragEventArgs2))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Xaml.IDragEventArgs3
public unsafe static class IDragEventArgs3__Impl
{
// v-table for 'Windows.UI.Xaml.IDragEventArgs3'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.IDragEventArgs3))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Xaml.IUIElementOverrides
public unsafe static class IUIElementOverrides__Impl
{
// StubClass for 'Windows.UI.Xaml.IUIElementOverrides'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.Automation.Peers.AutomationPeer OnCreateAutomationPeer(global::System.__ComObject __this)
{
global::Windows.UI.Xaml.Automation.Peers.AutomationPeer __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.UI.Xaml.IUIElementOverrides, global::Windows.UI.Xaml.Automation.Peers.AutomationPeer>(
__this,
global::Windows.UI.Xaml.IUIElementOverrides__Impl.Vtbl.idx_OnCreateAutomationPeer
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void OnDisconnectVisualChildren(global::System.__ComObject __this)
{
global::McgInterop.ForwardComSharedStubs.Proc_<global::Windows.UI.Xaml.IUIElementOverrides>(
__this,
global::Windows.UI.Xaml.IUIElementOverrides__Impl.Vtbl.idx_OnDisconnectVisualChildren
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// Signature, Windows.UI.Xaml.IUIElementOverrides.FindSubElementsForTouchTargeting, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.BlittableValueMarshaller] Windows_Foundation_Point__Windows_Foundation__Point, [fwd] [in] [Mcg.CodeGen.BlittableValueMarshaller] Windows_Foundation_Rect__Windows_Foundation__Rect, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.ComInterfaceMarshaller] System_Collections_Generic_IEnumerable_1_System_Collections_Generic_IEnumerable_1_Windows_Foundation_Point____Windows_Foundation_Collections__IIterable_A_Windows_Foundation_Collections_IIterable_A_Windows_Foundation_Point_V__V_ *,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Collections.Generic.IEnumerable<global::System.Collections.Generic.IEnumerable<global::Windows.Foundation.Point>> FindSubElementsForTouchTargeting(
global::System.__ComObject __this,
global::Windows.Foundation.Point point,
global::Windows.Foundation.Rect boundingRect)
{
// Setup
global::System.Collections.Generic.IEnumerable_A_System_Collections_Generic_IEnumerable_A_Windows_Foundation_Point_V__V___Impl.Vtbl** unsafe_returnValue__retval = default(global::System.Collections.Generic.IEnumerable_A_System_Collections_Generic_IEnumerable_A_Windows_Foundation_Point_V__V___Impl.Vtbl**);
global::System.Collections.Generic.IEnumerable<global::System.Collections.Generic.IEnumerable<global::Windows.Foundation.Point>> returnValue__retval = default(global::System.Collections.Generic.IEnumerable<global::System.Collections.Generic.IEnumerable<global::Windows.Foundation.Point>>);
int unsafe___return__;
try
{
// Marshalling
unsafe_returnValue__retval = null;
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.UI.Xaml.IUIElementOverrides).TypeHandle,
global::Windows.UI.Xaml.IUIElementOverrides__Impl.Vtbl.idx_FindSubElementsForTouchTargeting,
point,
boundingRect,
&(unsafe_returnValue__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
returnValue__retval = (global::System.Collections.Generic.IEnumerable<global::System.Collections.Generic.IEnumerable<global::Windows.Foundation.Point>>)global::System.Runtime.InteropServices.McgModuleManager.ComInterfaceToObject(
((global::System.IntPtr)unsafe_returnValue__retval),
typeof(global::System.Collections.Generic.IEnumerable<global::System.Collections.Generic.IEnumerable<global::Windows.Foundation.Point>>).TypeHandle
);
// Return
return returnValue__retval;
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_returnValue__retval)));
}
}
}
// DispatchClass for 'Windows.UI.Xaml.IUIElementOverrides'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.IUIElementOverrides))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.UI.Xaml.IUIElementOverrides
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
global::Windows.UI.Xaml.Automation.Peers.AutomationPeer global::Windows.UI.Xaml.IUIElementOverrides.OnCreateAutomationPeer()
{
global::Windows.UI.Xaml.Automation.Peers.AutomationPeer __retVal = global::Windows.UI.Xaml.IUIElementOverrides__Impl.StubClass.OnCreateAutomationPeer(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.UI.Xaml.IUIElementOverrides.OnDisconnectVisualChildren()
{
global::Windows.UI.Xaml.IUIElementOverrides__Impl.StubClass.OnDisconnectVisualChildren(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
global::System.Collections.Generic.IEnumerable<global::System.Collections.Generic.IEnumerable<global::Windows.Foundation.Point>> global::Windows.UI.Xaml.IUIElementOverrides.FindSubElementsForTouchTargeting(
global::Windows.Foundation.Point point,
global::Windows.Foundation.Rect boundingRect)
{
global::System.Collections.Generic.IEnumerable<global::System.Collections.Generic.IEnumerable<global::Windows.Foundation.Point>> __retVal = global::Windows.UI.Xaml.IUIElementOverrides__Impl.StubClass.FindSubElementsForTouchTargeting(
this,
point,
boundingRect
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.UI.Xaml.IUIElementOverrides'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.IUIElementOverrides))]
public unsafe partial struct Vtbl
{
internal const int idx_OnCreateAutomationPeer = 6;
internal const int idx_OnDisconnectVisualChildren = 7;
internal const int idx_FindSubElementsForTouchTargeting = 8;
}
}
// Windows.UI.Xaml.IUIElement2
public unsafe static class IUIElement2__Impl
{
// v-table for 'Windows.UI.Xaml.IUIElement2'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.IUIElement2))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Xaml.IUIElement3
public unsafe static class IUIElement3__Impl
{
// StubClass for 'Windows.UI.Xaml.IUIElement3'
public static partial class StubClass
{
// Signature, Windows.UI.Xaml.IUIElement3.add_DragStarting, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.WinRTDelegateMarshaller] Windows_Foundation_TypedEventHandler_2_Windows_UI_Xaml_UIElement__Windows_UI_Xaml_DragStartingEventArgs___Windows_Foundation__TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_DragStartingEventArgs_V_ *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] System_Runtime_InteropServices_WindowsRuntime_EventRegistrationToken__Windows_Foundation__EventRegistrationToken,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken add_DragStarting(
global::System.__ComObject __this,
global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.UIElement, global::Windows.UI.Xaml.DragStartingEventArgs> value)
{
// Setup
global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_DragStartingEventArgs_V___Impl.Vtbl** unsafe_value = default(global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_DragStartingEventArgs_V___Impl.Vtbl**);
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken unsafe_token__retval;
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token__retval;
int unsafe___return__;
try
{
// Marshalling
unsafe_value = (global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_DragStartingEventArgs_V___Impl.Vtbl**)global::System.Runtime.InteropServices.McgModuleManager.DelegateToComInterface(
value,
typeof(global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.UIElement, global::Windows.UI.Xaml.DragStartingEventArgs>).TypeHandle,
global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget50>(global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_DragStartingEventArgs_V___Impl.Invoke)
);
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.UI.Xaml.IUIElement3).TypeHandle,
global::Windows.UI.Xaml.IUIElement3__Impl.Vtbl.idx_add_DragStarting,
unsafe_value,
&(unsafe_token__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
token__retval = unsafe_token__retval;
// Return
return token__retval;
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_value)));
}
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void remove_DragStarting(
global::System.__ComObject __this,
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::McgInterop.ForwardComSharedStubs.Proc__WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.IUIElement3>(
__this,
token,
global::Windows.UI.Xaml.IUIElement3__Impl.Vtbl.idx_remove_DragStarting
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// Signature, Windows.UI.Xaml.IUIElement3.add_DropCompleted, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.WinRTDelegateMarshaller] Windows_Foundation_TypedEventHandler_2_Windows_UI_Xaml_UIElement__Windows_UI_Xaml_DropCompletedEventArgs___Windows_Foundation__TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_DropCompletedEventArgs_V_ *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] System_Runtime_InteropServices_WindowsRuntime_EventRegistrationToken__Windows_Foundation__EventRegistrationToken,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken add_DropCompleted(
global::System.__ComObject __this,
global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.UIElement, global::Windows.UI.Xaml.DropCompletedEventArgs> value)
{
// Setup
global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_DropCompletedEventArgs_V___Impl.Vtbl** unsafe_value = default(global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_DropCompletedEventArgs_V___Impl.Vtbl**);
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken unsafe_token__retval;
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token__retval;
int unsafe___return__;
try
{
// Marshalling
unsafe_value = (global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_DropCompletedEventArgs_V___Impl.Vtbl**)global::System.Runtime.InteropServices.McgModuleManager.DelegateToComInterface(
value,
typeof(global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.UIElement, global::Windows.UI.Xaml.DropCompletedEventArgs>).TypeHandle,
global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget51>(global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_DropCompletedEventArgs_V___Impl.Invoke)
);
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.UI.Xaml.IUIElement3).TypeHandle,
global::Windows.UI.Xaml.IUIElement3__Impl.Vtbl.idx_add_DropCompleted,
unsafe_value,
&(unsafe_token__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
token__retval = unsafe_token__retval;
// Return
return token__retval;
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_value)));
}
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void remove_DropCompleted(
global::System.__ComObject __this,
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::McgInterop.ForwardComSharedStubs.Proc__WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.IUIElement3>(
__this,
token,
global::Windows.UI.Xaml.IUIElement3__Impl.Vtbl.idx_remove_DropCompleted
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// DispatchClass for 'Windows.UI.Xaml.IUIElement3'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.IUIElement3))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.UI.Xaml.IUIElement3
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventAdd, "Windows.UI.Xaml.IUIElement3.DragStarting")]
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken global::Windows.UI.Xaml.IUIElement3.add_DragStarting(global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.UIElement, global::Windows.UI.Xaml.DragStartingEventArgs> value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __retVal = global::Windows.UI.Xaml.IUIElement3__Impl.StubClass.add_DragStarting(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventRemove, "Windows.UI.Xaml.IUIElement3.DragStarting")]
void global::Windows.UI.Xaml.IUIElement3.remove_DragStarting(global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::Windows.UI.Xaml.IUIElement3__Impl.StubClass.remove_DragStarting(
this,
token
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventAdd, "Windows.UI.Xaml.IUIElement3.DropCompleted")]
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken global::Windows.UI.Xaml.IUIElement3.add_DropCompleted(global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.UIElement, global::Windows.UI.Xaml.DropCompletedEventArgs> value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __retVal = global::Windows.UI.Xaml.IUIElement3__Impl.StubClass.add_DropCompleted(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventRemove, "Windows.UI.Xaml.IUIElement3.DropCompleted")]
void global::Windows.UI.Xaml.IUIElement3.remove_DropCompleted(global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::Windows.UI.Xaml.IUIElement3__Impl.StubClass.remove_DropCompleted(
this,
token
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// v-table for 'Windows.UI.Xaml.IUIElement3'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.IUIElement3))]
public unsafe partial struct Vtbl
{
internal const int idx_add_DragStarting = 10;
internal const int idx_remove_DragStarting = 11;
internal const int idx_add_DropCompleted = 12;
internal const int idx_remove_DropCompleted = 13;
}
}
// Windows.UI.Xaml.IDragStartingEventArgs
public unsafe static class IDragStartingEventArgs__Impl
{
// v-table for 'Windows.UI.Xaml.IDragStartingEventArgs'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.IDragStartingEventArgs))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Xaml.IDragStartingEventArgs2
public unsafe static class IDragStartingEventArgs2__Impl
{
// v-table for 'Windows.UI.Xaml.IDragStartingEventArgs2'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.IDragStartingEventArgs2))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Xaml.IDropCompletedEventArgs
public unsafe static class IDropCompletedEventArgs__Impl
{
// v-table for 'Windows.UI.Xaml.IDropCompletedEventArgs'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.IDropCompletedEventArgs))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Xaml.IUIElement4
public unsafe static class IUIElement4__Impl
{
// StubClass for 'Windows.UI.Xaml.IUIElement4'
public static partial class StubClass
{
// Signature, Windows.UI.Xaml.IUIElement4.add_ContextRequested, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.WinRTDelegateMarshaller] Windows_Foundation_TypedEventHandler_2_Windows_UI_Xaml_UIElement__Windows_UI_Xaml_Input_ContextRequestedEventArgs___Windows_Foundation__TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_Input_ContextRequestedEventArgs_V_ *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] System_Runtime_InteropServices_WindowsRuntime_EventRegistrationToken__Windows_Foundation__EventRegistrationToken,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken add_ContextRequested(
global::System.__ComObject __this,
global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.UIElement, global::Windows.UI.Xaml.Input.ContextRequestedEventArgs> value)
{
// Setup
global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_Input_ContextRequestedEventArgs_V___Impl.Vtbl** unsafe_value = default(global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_Input_ContextRequestedEventArgs_V___Impl.Vtbl**);
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken unsafe_token__retval;
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token__retval;
int unsafe___return__;
try
{
// Marshalling
unsafe_value = (global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_Input_ContextRequestedEventArgs_V___Impl.Vtbl**)global::System.Runtime.InteropServices.McgModuleManager.DelegateToComInterface(
value,
typeof(global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.UIElement, global::Windows.UI.Xaml.Input.ContextRequestedEventArgs>).TypeHandle,
global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget54>(global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_Input_ContextRequestedEventArgs_V___Impl.Invoke)
);
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.UI.Xaml.IUIElement4).TypeHandle,
global::Windows.UI.Xaml.IUIElement4__Impl.Vtbl.idx_add_ContextRequested,
unsafe_value,
&(unsafe_token__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
token__retval = unsafe_token__retval;
// Return
return token__retval;
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_value)));
}
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void remove_ContextRequested(
global::System.__ComObject __this,
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::McgInterop.ForwardComSharedStubs.Proc__WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.IUIElement4>(
__this,
token,
global::Windows.UI.Xaml.IUIElement4__Impl.Vtbl.idx_remove_ContextRequested
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// Signature, Windows.UI.Xaml.IUIElement4.add_ContextCanceled, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.WinRTDelegateMarshaller] Windows_Foundation_TypedEventHandler_2_Windows_UI_Xaml_UIElement__Windows_UI_Xaml_RoutedEventArgs___Windows_Foundation__TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_RoutedEventArgs_V_ *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] System_Runtime_InteropServices_WindowsRuntime_EventRegistrationToken__Windows_Foundation__EventRegistrationToken,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken add_ContextCanceled(
global::System.__ComObject __this,
global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.UIElement, global::Windows.UI.Xaml.RoutedEventArgs> value)
{
// Setup
global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_RoutedEventArgs_V___Impl.Vtbl** unsafe_value = default(global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_RoutedEventArgs_V___Impl.Vtbl**);
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken unsafe_token__retval;
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token__retval;
int unsafe___return__;
try
{
// Marshalling
unsafe_value = (global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_RoutedEventArgs_V___Impl.Vtbl**)global::System.Runtime.InteropServices.McgModuleManager.DelegateToComInterface(
value,
typeof(global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.UIElement, global::Windows.UI.Xaml.RoutedEventArgs>).TypeHandle,
global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget55>(global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_RoutedEventArgs_V___Impl.Invoke)
);
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.UI.Xaml.IUIElement4).TypeHandle,
global::Windows.UI.Xaml.IUIElement4__Impl.Vtbl.idx_add_ContextCanceled,
unsafe_value,
&(unsafe_token__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
token__retval = unsafe_token__retval;
// Return
return token__retval;
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_value)));
}
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void remove_ContextCanceled(
global::System.__ComObject __this,
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::McgInterop.ForwardComSharedStubs.Proc__WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.IUIElement4>(
__this,
token,
global::Windows.UI.Xaml.IUIElement4__Impl.Vtbl.idx_remove_ContextCanceled
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// Signature, Windows.UI.Xaml.IUIElement4.add_AccessKeyDisplayRequested, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.WinRTDelegateMarshaller] Windows_Foundation_TypedEventHandler_2_Windows_UI_Xaml_UIElement__Windows_UI_Xaml_Input_AccessKeyDisplayRequestedEventArgs___Windows_Foundation__TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_Input_AccessKeyDisplayRequestedEventArgs_V_ *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] System_Runtime_InteropServices_WindowsRuntime_EventRegistrationToken__Windows_Foundation__EventRegistrationToken,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken add_AccessKeyDisplayRequested(
global::System.__ComObject __this,
global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.UIElement, global::Windows.UI.Xaml.Input.AccessKeyDisplayRequestedEventArgs> value)
{
// Setup
global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_Input_AccessKeyDisplayRequestedEventArgs_V___Impl.Vtbl** unsafe_value = default(global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_Input_AccessKeyDisplayRequestedEventArgs_V___Impl.Vtbl**);
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken unsafe_token__retval;
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token__retval;
int unsafe___return__;
try
{
// Marshalling
unsafe_value = (global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_Input_AccessKeyDisplayRequestedEventArgs_V___Impl.Vtbl**)global::System.Runtime.InteropServices.McgModuleManager.DelegateToComInterface(
value,
typeof(global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.UIElement, global::Windows.UI.Xaml.Input.AccessKeyDisplayRequestedEventArgs>).TypeHandle,
global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget56>(global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_Input_AccessKeyDisplayRequestedEventArgs_V___Impl.Invoke)
);
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.UI.Xaml.IUIElement4).TypeHandle,
global::Windows.UI.Xaml.IUIElement4__Impl.Vtbl.idx_add_AccessKeyDisplayRequested,
unsafe_value,
&(unsafe_token__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
token__retval = unsafe_token__retval;
// Return
return token__retval;
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_value)));
}
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void remove_AccessKeyDisplayRequested(
global::System.__ComObject __this,
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::McgInterop.ForwardComSharedStubs.Proc__WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.IUIElement4>(
__this,
token,
global::Windows.UI.Xaml.IUIElement4__Impl.Vtbl.idx_remove_AccessKeyDisplayRequested
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// Signature, Windows.UI.Xaml.IUIElement4.add_AccessKeyDisplayDismissed, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.WinRTDelegateMarshaller] Windows_Foundation_TypedEventHandler_2_Windows_UI_Xaml_UIElement__Windows_UI_Xaml_Input_AccessKeyDisplayDismissedEventArgs___Windows_Foundation__TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_Input_AccessKeyDisplayDismissedEventArgs_V_ *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] System_Runtime_InteropServices_WindowsRuntime_EventRegistrationToken__Windows_Foundation__EventRegistrationToken,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken add_AccessKeyDisplayDismissed(
global::System.__ComObject __this,
global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.UIElement, global::Windows.UI.Xaml.Input.AccessKeyDisplayDismissedEventArgs> value)
{
// Setup
global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_Input_AccessKeyDisplayDismissedEventArgs_V___Impl.Vtbl** unsafe_value = default(global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_Input_AccessKeyDisplayDismissedEventArgs_V___Impl.Vtbl**);
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken unsafe_token__retval;
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token__retval;
int unsafe___return__;
try
{
// Marshalling
unsafe_value = (global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_Input_AccessKeyDisplayDismissedEventArgs_V___Impl.Vtbl**)global::System.Runtime.InteropServices.McgModuleManager.DelegateToComInterface(
value,
typeof(global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.UIElement, global::Windows.UI.Xaml.Input.AccessKeyDisplayDismissedEventArgs>).TypeHandle,
global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget57>(global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_Input_AccessKeyDisplayDismissedEventArgs_V___Impl.Invoke)
);
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.UI.Xaml.IUIElement4).TypeHandle,
global::Windows.UI.Xaml.IUIElement4__Impl.Vtbl.idx_add_AccessKeyDisplayDismissed,
unsafe_value,
&(unsafe_token__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
token__retval = unsafe_token__retval;
// Return
return token__retval;
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_value)));
}
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void remove_AccessKeyDisplayDismissed(
global::System.__ComObject __this,
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::McgInterop.ForwardComSharedStubs.Proc__WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.IUIElement4>(
__this,
token,
global::Windows.UI.Xaml.IUIElement4__Impl.Vtbl.idx_remove_AccessKeyDisplayDismissed
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// Signature, Windows.UI.Xaml.IUIElement4.add_AccessKeyInvoked, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.WinRTDelegateMarshaller] Windows_Foundation_TypedEventHandler_2_Windows_UI_Xaml_UIElement__Windows_UI_Xaml_Input_AccessKeyInvokedEventArgs___Windows_Foundation__TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_Input_AccessKeyInvokedEventArgs_V_ *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] System_Runtime_InteropServices_WindowsRuntime_EventRegistrationToken__Windows_Foundation__EventRegistrationToken,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken add_AccessKeyInvoked(
global::System.__ComObject __this,
global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.UIElement, global::Windows.UI.Xaml.Input.AccessKeyInvokedEventArgs> value)
{
// Setup
global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_Input_AccessKeyInvokedEventArgs_V___Impl.Vtbl** unsafe_value = default(global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_Input_AccessKeyInvokedEventArgs_V___Impl.Vtbl**);
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken unsafe_token__retval;
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token__retval;
int unsafe___return__;
try
{
// Marshalling
unsafe_value = (global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_Input_AccessKeyInvokedEventArgs_V___Impl.Vtbl**)global::System.Runtime.InteropServices.McgModuleManager.DelegateToComInterface(
value,
typeof(global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.UIElement, global::Windows.UI.Xaml.Input.AccessKeyInvokedEventArgs>).TypeHandle,
global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget58>(global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_UIElement_j_Windows_UI_Xaml_Input_AccessKeyInvokedEventArgs_V___Impl.Invoke)
);
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.UI.Xaml.IUIElement4).TypeHandle,
global::Windows.UI.Xaml.IUIElement4__Impl.Vtbl.idx_add_AccessKeyInvoked,
unsafe_value,
&(unsafe_token__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
token__retval = unsafe_token__retval;
// Return
return token__retval;
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_value)));
}
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void remove_AccessKeyInvoked(
global::System.__ComObject __this,
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::McgInterop.ForwardComSharedStubs.Proc__WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.IUIElement4>(
__this,
token,
global::Windows.UI.Xaml.IUIElement4__Impl.Vtbl.idx_remove_AccessKeyInvoked
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// DispatchClass for 'Windows.UI.Xaml.IUIElement4'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.IUIElement4))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.UI.Xaml.IUIElement4
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventAdd, "Windows.UI.Xaml.IUIElement4.ContextRequested")]
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken global::Windows.UI.Xaml.IUIElement4.add_ContextRequested(global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.UIElement, global::Windows.UI.Xaml.Input.ContextRequestedEventArgs> value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __retVal = global::Windows.UI.Xaml.IUIElement4__Impl.StubClass.add_ContextRequested(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventRemove, "Windows.UI.Xaml.IUIElement4.ContextRequested")]
void global::Windows.UI.Xaml.IUIElement4.remove_ContextRequested(global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::Windows.UI.Xaml.IUIElement4__Impl.StubClass.remove_ContextRequested(
this,
token
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventAdd, "Windows.UI.Xaml.IUIElement4.ContextCanceled")]
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken global::Windows.UI.Xaml.IUIElement4.add_ContextCanceled(global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.UIElement, global::Windows.UI.Xaml.RoutedEventArgs> value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __retVal = global::Windows.UI.Xaml.IUIElement4__Impl.StubClass.add_ContextCanceled(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventRemove, "Windows.UI.Xaml.IUIElement4.ContextCanceled")]
void global::Windows.UI.Xaml.IUIElement4.remove_ContextCanceled(global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::Windows.UI.Xaml.IUIElement4__Impl.StubClass.remove_ContextCanceled(
this,
token
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventAdd, "Windows.UI.Xaml.IUIElement4.AccessKeyDisplayRequested")]
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken global::Windows.UI.Xaml.IUIElement4.add_AccessKeyDisplayRequested(global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.UIElement, global::Windows.UI.Xaml.Input.AccessKeyDisplayRequestedEventArgs> value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __retVal = global::Windows.UI.Xaml.IUIElement4__Impl.StubClass.add_AccessKeyDisplayRequested(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventRemove, "Windows.UI.Xaml.IUIElement4.AccessKeyDisplayRequested")]
void global::Windows.UI.Xaml.IUIElement4.remove_AccessKeyDisplayRequested(global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::Windows.UI.Xaml.IUIElement4__Impl.StubClass.remove_AccessKeyDisplayRequested(
this,
token
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventAdd, "Windows.UI.Xaml.IUIElement4.AccessKeyDisplayDismissed")]
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken global::Windows.UI.Xaml.IUIElement4.add_AccessKeyDisplayDismissed(global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.UIElement, global::Windows.UI.Xaml.Input.AccessKeyDisplayDismissedEventArgs> value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __retVal = global::Windows.UI.Xaml.IUIElement4__Impl.StubClass.add_AccessKeyDisplayDismissed(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventRemove, "Windows.UI.Xaml.IUIElement4.AccessKeyDisplayDismissed")]
void global::Windows.UI.Xaml.IUIElement4.remove_AccessKeyDisplayDismissed(global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::Windows.UI.Xaml.IUIElement4__Impl.StubClass.remove_AccessKeyDisplayDismissed(
this,
token
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventAdd, "Windows.UI.Xaml.IUIElement4.AccessKeyInvoked")]
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken global::Windows.UI.Xaml.IUIElement4.add_AccessKeyInvoked(global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.UIElement, global::Windows.UI.Xaml.Input.AccessKeyInvokedEventArgs> value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __retVal = global::Windows.UI.Xaml.IUIElement4__Impl.StubClass.add_AccessKeyInvoked(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventRemove, "Windows.UI.Xaml.IUIElement4.AccessKeyInvoked")]
void global::Windows.UI.Xaml.IUIElement4.remove_AccessKeyInvoked(global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::Windows.UI.Xaml.IUIElement4__Impl.StubClass.remove_AccessKeyInvoked(
this,
token
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// v-table for 'Windows.UI.Xaml.IUIElement4'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.IUIElement4))]
public unsafe partial struct Vtbl
{
internal const int idx_add_ContextRequested = 16;
internal const int idx_remove_ContextRequested = 17;
internal const int idx_add_ContextCanceled = 18;
internal const int idx_remove_ContextCanceled = 19;
internal const int idx_add_AccessKeyDisplayRequested = 20;
internal const int idx_remove_AccessKeyDisplayRequested = 21;
internal const int idx_add_AccessKeyDisplayDismissed = 22;
internal const int idx_remove_AccessKeyDisplayDismissed = 23;
internal const int idx_add_AccessKeyInvoked = 24;
internal const int idx_remove_AccessKeyInvoked = 25;
}
}
// Windows.UI.Xaml.IResourceDictionary
public unsafe static class IResourceDictionary__Impl
{
// v-table for 'Windows.UI.Xaml.IResourceDictionary'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.IResourceDictionary))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Xaml.IFrameworkElement
public unsafe static class IFrameworkElement__Impl
{
// StubClass for 'Windows.UI.Xaml.IFrameworkElement'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.ResourceDictionary get_Resources(global::System.__ComObject __this)
{
global::Windows.UI.Xaml.ResourceDictionary __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.UI.Xaml.IFrameworkElement, global::Windows.UI.Xaml.ResourceDictionary>(
__this,
global::Windows.UI.Xaml.IFrameworkElement__Impl.Vtbl.idx_get_Resources
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void put_Resources(
global::System.__ComObject __this,
global::Windows.UI.Xaml.ResourceDictionary value)
{
global::McgInterop.ForwardComSharedStubs.Proc_TArg0__<global::Windows.UI.Xaml.IFrameworkElement, global::Windows.UI.Xaml.ResourceDictionary>(
__this,
value,
global::Windows.UI.Xaml.IFrameworkElement__Impl.Vtbl.idx_put_Resources
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static double get_Width(global::System.__ComObject __this)
{
double __ret = global::McgInterop.ForwardComSharedStubs.Func_double__<global::Windows.UI.Xaml.IFrameworkElement>(
__this,
global::Windows.UI.Xaml.IFrameworkElement__Impl.Vtbl.idx_get_Width
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void put_Width(
global::System.__ComObject __this,
double value)
{
global::McgInterop.ForwardComSharedStubs.Proc_double__<global::Windows.UI.Xaml.IFrameworkElement>(
__this,
value,
global::Windows.UI.Xaml.IFrameworkElement__Impl.Vtbl.idx_put_Width
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static double get_Height(global::System.__ComObject __this)
{
double __ret = global::McgInterop.ForwardComSharedStubs.Func_double__<global::Windows.UI.Xaml.IFrameworkElement>(
__this,
global::Windows.UI.Xaml.IFrameworkElement__Impl.Vtbl.idx_get_Height
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void put_Height(
global::System.__ComObject __this,
double value)
{
global::McgInterop.ForwardComSharedStubs.Proc_double__<global::Windows.UI.Xaml.IFrameworkElement>(
__this,
value,
global::Windows.UI.Xaml.IFrameworkElement__Impl.Vtbl.idx_put_Height
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// Signature, Windows.UI.Xaml.IFrameworkElement.get_HorizontalAlignment, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.EnumMarshaller] Windows_UI_Xaml_HorizontalAlignment__Windows_UI_Xaml__HorizontalAlignment,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.HorizontalAlignment get_HorizontalAlignment(global::System.__ComObject __this)
{
// Setup
global::Windows.UI.Xaml.HorizontalAlignment unsafe_value__retval;
global::Windows.UI.Xaml.HorizontalAlignment value__retval;
int unsafe___return__;
// Marshalling
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.UI.Xaml.IFrameworkElement).TypeHandle,
global::Windows.UI.Xaml.IFrameworkElement__Impl.Vtbl.idx_get_HorizontalAlignment,
&(unsafe_value__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
value__retval = unsafe_value__retval;
// Return
return value__retval;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void put_HorizontalAlignment(
global::System.__ComObject __this,
global::Windows.UI.Xaml.HorizontalAlignment value)
{
global::McgInterop.ForwardComSharedStubs.Proc_int<global::Windows.UI.Xaml.IFrameworkElement>(
__this,
((int)value),
global::Windows.UI.Xaml.IFrameworkElement__Impl.Vtbl.idx_put_HorizontalAlignment
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// Signature, Windows.UI.Xaml.IFrameworkElement.get_VerticalAlignment, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.EnumMarshaller] Windows_UI_Xaml_VerticalAlignment__Windows_UI_Xaml__VerticalAlignment,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.VerticalAlignment get_VerticalAlignment(global::System.__ComObject __this)
{
// Setup
global::Windows.UI.Xaml.VerticalAlignment unsafe_value__retval;
global::Windows.UI.Xaml.VerticalAlignment value__retval;
int unsafe___return__;
// Marshalling
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.UI.Xaml.IFrameworkElement).TypeHandle,
global::Windows.UI.Xaml.IFrameworkElement__Impl.Vtbl.idx_get_VerticalAlignment,
&(unsafe_value__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
value__retval = unsafe_value__retval;
// Return
return value__retval;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void put_VerticalAlignment(
global::System.__ComObject __this,
global::Windows.UI.Xaml.VerticalAlignment value)
{
global::McgInterop.ForwardComSharedStubs.Proc_int<global::Windows.UI.Xaml.IFrameworkElement>(
__this,
((int)value),
global::Windows.UI.Xaml.IFrameworkElement__Impl.Vtbl.idx_put_VerticalAlignment
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.Thickness get_Margin(global::System.__ComObject __this)
{
global::Windows.UI.Xaml.Thickness __ret = global::McgInterop.ForwardComSharedStubs.Func_UI_Xaml_Thickness__<global::Windows.UI.Xaml.IFrameworkElement>(
__this,
global::Windows.UI.Xaml.IFrameworkElement__Impl.Vtbl.idx_get_Margin
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void put_Margin(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Thickness value)
{
global::McgInterop.ForwardComSharedStubs.Proc_UI_Xaml_Thickness__<global::Windows.UI.Xaml.IFrameworkElement>(
__this,
value,
global::Windows.UI.Xaml.IFrameworkElement__Impl.Vtbl.idx_put_Margin
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static string get_Name(global::System.__ComObject __this)
{
string __ret = global::McgInterop.ForwardComSharedStubs.Func_string__<global::Windows.UI.Xaml.IFrameworkElement>(
__this,
global::Windows.UI.Xaml.IFrameworkElement__Impl.Vtbl.idx_get_Name
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
// Signature, Windows.UI.Xaml.IFrameworkElement.get_FlowDirection, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.EnumMarshaller] Windows_UI_Xaml_FlowDirection__Windows_UI_Xaml__FlowDirection,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.FlowDirection get_FlowDirection(global::System.__ComObject __this)
{
// Setup
global::Windows.UI.Xaml.FlowDirection unsafe_value__retval;
global::Windows.UI.Xaml.FlowDirection value__retval;
int unsafe___return__;
// Marshalling
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.UI.Xaml.IFrameworkElement).TypeHandle,
global::Windows.UI.Xaml.IFrameworkElement__Impl.Vtbl.idx_get_FlowDirection,
&(unsafe_value__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
value__retval = unsafe_value__retval;
// Return
return value__retval;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void put_FlowDirection(
global::System.__ComObject __this,
global::Windows.UI.Xaml.FlowDirection value)
{
global::McgInterop.ForwardComSharedStubs.Proc_int<global::Windows.UI.Xaml.IFrameworkElement>(
__this,
((int)value),
global::Windows.UI.Xaml.IFrameworkElement__Impl.Vtbl.idx_put_FlowDirection
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken add_Loaded(
global::System.__ComObject __this,
global::Windows.UI.Xaml.RoutedEventHandler value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __ret = global::McgInterop.ForwardComSharedStubs.Func_UI_Xaml_RoutedEventHandler___WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.IFrameworkElement>(
__this,
value,
global::Windows.UI.Xaml.IFrameworkElement__Impl.Vtbl.idx_add_Loaded
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void remove_Loaded(
global::System.__ComObject __this,
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::McgInterop.ForwardComSharedStubs.Proc__WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.IFrameworkElement>(
__this,
token,
global::Windows.UI.Xaml.IFrameworkElement__Impl.Vtbl.idx_remove_Loaded
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken add_Unloaded(
global::System.__ComObject __this,
global::Windows.UI.Xaml.RoutedEventHandler value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __ret = global::McgInterop.ForwardComSharedStubs.Func_UI_Xaml_RoutedEventHandler___WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.IFrameworkElement>(
__this,
value,
global::Windows.UI.Xaml.IFrameworkElement__Impl.Vtbl.idx_add_Unloaded
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void remove_Unloaded(
global::System.__ComObject __this,
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::McgInterop.ForwardComSharedStubs.Proc__WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.IFrameworkElement>(
__this,
token,
global::Windows.UI.Xaml.IFrameworkElement__Impl.Vtbl.idx_remove_Unloaded
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// Signature, Windows.UI.Xaml.IFrameworkElement.add_SizeChanged, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.WinRTDelegateMarshaller] Windows_UI_Xaml_SizeChangedEventHandler__Windows_UI_Xaml__SizeChangedEventHandler *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] System_Runtime_InteropServices_WindowsRuntime_EventRegistrationToken__Windows_Foundation__EventRegistrationToken,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken add_SizeChanged(
global::System.__ComObject __this,
global::Windows.UI.Xaml.SizeChangedEventHandler value)
{
// Setup
global::Windows.UI.Xaml.SizeChangedEventHandler__Impl.Vtbl** unsafe_value = default(global::Windows.UI.Xaml.SizeChangedEventHandler__Impl.Vtbl**);
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken unsafe_token__retval;
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token__retval;
int unsafe___return__;
try
{
// Marshalling
unsafe_value = (global::Windows.UI.Xaml.SizeChangedEventHandler__Impl.Vtbl**)global::System.Runtime.InteropServices.McgModuleManager.DelegateToComInterface(
value,
typeof(global::Windows.UI.Xaml.SizeChangedEventHandler).TypeHandle,
global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget64>(global::Windows.UI.Xaml.SizeChangedEventHandler__Impl.Invoke)
);
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.UI.Xaml.IFrameworkElement).TypeHandle,
global::Windows.UI.Xaml.IFrameworkElement__Impl.Vtbl.idx_add_SizeChanged,
unsafe_value,
&(unsafe_token__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
token__retval = unsafe_token__retval;
// Return
return token__retval;
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_value)));
}
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void remove_SizeChanged(
global::System.__ComObject __this,
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::McgInterop.ForwardComSharedStubs.Proc__WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.IFrameworkElement>(
__this,
token,
global::Windows.UI.Xaml.IFrameworkElement__Impl.Vtbl.idx_remove_SizeChanged
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken add_LayoutUpdated(
global::System.__ComObject __this,
global::System.EventHandler<object> value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __ret = global::McgInterop.ForwardComSharedStubs.Func_EventHandler_1_object__WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.IFrameworkElement>(
__this,
value,
global::Windows.UI.Xaml.IFrameworkElement__Impl.Vtbl.idx_add_LayoutUpdated
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void remove_LayoutUpdated(
global::System.__ComObject __this,
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::McgInterop.ForwardComSharedStubs.Proc__WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.IFrameworkElement>(
__this,
token,
global::Windows.UI.Xaml.IFrameworkElement__Impl.Vtbl.idx_remove_LayoutUpdated
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// DispatchClass for 'Windows.UI.Xaml.IFrameworkElement'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.IFrameworkElement))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.UI.Xaml.IFrameworkElement
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.UI.Xaml.IFrameworkElement.Resources")]
global::Windows.UI.Xaml.ResourceDictionary global::Windows.UI.Xaml.IFrameworkElement.get_Resources()
{
global::Windows.UI.Xaml.ResourceDictionary __retVal = global::Windows.UI.Xaml.IFrameworkElement__Impl.StubClass.get_Resources(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertySet, "Windows.UI.Xaml.IFrameworkElement.Resources")]
void global::Windows.UI.Xaml.IFrameworkElement.put_Resources(global::Windows.UI.Xaml.ResourceDictionary value)
{
global::Windows.UI.Xaml.IFrameworkElement__Impl.StubClass.put_Resources(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.UI.Xaml.IFrameworkElement.Width")]
double global::Windows.UI.Xaml.IFrameworkElement.get_Width()
{
double __retVal = global::Windows.UI.Xaml.IFrameworkElement__Impl.StubClass.get_Width(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertySet, "Windows.UI.Xaml.IFrameworkElement.Width")]
void global::Windows.UI.Xaml.IFrameworkElement.put_Width(double value)
{
global::Windows.UI.Xaml.IFrameworkElement__Impl.StubClass.put_Width(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.UI.Xaml.IFrameworkElement.Height")]
double global::Windows.UI.Xaml.IFrameworkElement.get_Height()
{
double __retVal = global::Windows.UI.Xaml.IFrameworkElement__Impl.StubClass.get_Height(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertySet, "Windows.UI.Xaml.IFrameworkElement.Height")]
void global::Windows.UI.Xaml.IFrameworkElement.put_Height(double value)
{
global::Windows.UI.Xaml.IFrameworkElement__Impl.StubClass.put_Height(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.UI.Xaml.IFrameworkElement.HorizontalAlignment")]
global::Windows.UI.Xaml.HorizontalAlignment global::Windows.UI.Xaml.IFrameworkElement.get_HorizontalAlignment()
{
global::Windows.UI.Xaml.HorizontalAlignment __retVal = global::Windows.UI.Xaml.IFrameworkElement__Impl.StubClass.get_HorizontalAlignment(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertySet, "Windows.UI.Xaml.IFrameworkElement.HorizontalAlignment")]
void global::Windows.UI.Xaml.IFrameworkElement.put_HorizontalAlignment(global::Windows.UI.Xaml.HorizontalAlignment value)
{
global::Windows.UI.Xaml.IFrameworkElement__Impl.StubClass.put_HorizontalAlignment(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.UI.Xaml.IFrameworkElement.VerticalAlignment")]
global::Windows.UI.Xaml.VerticalAlignment global::Windows.UI.Xaml.IFrameworkElement.get_VerticalAlignment()
{
global::Windows.UI.Xaml.VerticalAlignment __retVal = global::Windows.UI.Xaml.IFrameworkElement__Impl.StubClass.get_VerticalAlignment(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertySet, "Windows.UI.Xaml.IFrameworkElement.VerticalAlignment")]
void global::Windows.UI.Xaml.IFrameworkElement.put_VerticalAlignment(global::Windows.UI.Xaml.VerticalAlignment value)
{
global::Windows.UI.Xaml.IFrameworkElement__Impl.StubClass.put_VerticalAlignment(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.UI.Xaml.IFrameworkElement.Margin")]
global::Windows.UI.Xaml.Thickness global::Windows.UI.Xaml.IFrameworkElement.get_Margin()
{
global::Windows.UI.Xaml.Thickness __retVal = global::Windows.UI.Xaml.IFrameworkElement__Impl.StubClass.get_Margin(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertySet, "Windows.UI.Xaml.IFrameworkElement.Margin")]
void global::Windows.UI.Xaml.IFrameworkElement.put_Margin(global::Windows.UI.Xaml.Thickness value)
{
global::Windows.UI.Xaml.IFrameworkElement__Impl.StubClass.put_Margin(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.UI.Xaml.IFrameworkElement.Name")]
string global::Windows.UI.Xaml.IFrameworkElement.get_Name()
{
string __retVal = global::Windows.UI.Xaml.IFrameworkElement__Impl.StubClass.get_Name(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.UI.Xaml.IFrameworkElement.FlowDirection")]
global::Windows.UI.Xaml.FlowDirection global::Windows.UI.Xaml.IFrameworkElement.get_FlowDirection()
{
global::Windows.UI.Xaml.FlowDirection __retVal = global::Windows.UI.Xaml.IFrameworkElement__Impl.StubClass.get_FlowDirection(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertySet, "Windows.UI.Xaml.IFrameworkElement.FlowDirection")]
void global::Windows.UI.Xaml.IFrameworkElement.put_FlowDirection(global::Windows.UI.Xaml.FlowDirection value)
{
global::Windows.UI.Xaml.IFrameworkElement__Impl.StubClass.put_FlowDirection(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventAdd, "Windows.UI.Xaml.IFrameworkElement.Loaded")]
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken global::Windows.UI.Xaml.IFrameworkElement.add_Loaded(global::Windows.UI.Xaml.RoutedEventHandler value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __retVal = global::Windows.UI.Xaml.IFrameworkElement__Impl.StubClass.add_Loaded(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventRemove, "Windows.UI.Xaml.IFrameworkElement.Loaded")]
void global::Windows.UI.Xaml.IFrameworkElement.remove_Loaded(global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::Windows.UI.Xaml.IFrameworkElement__Impl.StubClass.remove_Loaded(
this,
token
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventAdd, "Windows.UI.Xaml.IFrameworkElement.Unloaded")]
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken global::Windows.UI.Xaml.IFrameworkElement.add_Unloaded(global::Windows.UI.Xaml.RoutedEventHandler value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __retVal = global::Windows.UI.Xaml.IFrameworkElement__Impl.StubClass.add_Unloaded(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventRemove, "Windows.UI.Xaml.IFrameworkElement.Unloaded")]
void global::Windows.UI.Xaml.IFrameworkElement.remove_Unloaded(global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::Windows.UI.Xaml.IFrameworkElement__Impl.StubClass.remove_Unloaded(
this,
token
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventAdd, "Windows.UI.Xaml.IFrameworkElement.SizeChanged")]
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken global::Windows.UI.Xaml.IFrameworkElement.add_SizeChanged(global::Windows.UI.Xaml.SizeChangedEventHandler value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __retVal = global::Windows.UI.Xaml.IFrameworkElement__Impl.StubClass.add_SizeChanged(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventRemove, "Windows.UI.Xaml.IFrameworkElement.SizeChanged")]
void global::Windows.UI.Xaml.IFrameworkElement.remove_SizeChanged(global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::Windows.UI.Xaml.IFrameworkElement__Impl.StubClass.remove_SizeChanged(
this,
token
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventAdd, "Windows.UI.Xaml.IFrameworkElement.LayoutUpdated")]
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken global::Windows.UI.Xaml.IFrameworkElement.add_LayoutUpdated(global::System.EventHandler<object> value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __retVal = global::Windows.UI.Xaml.IFrameworkElement__Impl.StubClass.add_LayoutUpdated(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventRemove, "Windows.UI.Xaml.IFrameworkElement.LayoutUpdated")]
void global::Windows.UI.Xaml.IFrameworkElement.remove_LayoutUpdated(global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::Windows.UI.Xaml.IFrameworkElement__Impl.StubClass.remove_LayoutUpdated(
this,
token
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// v-table for 'Windows.UI.Xaml.IFrameworkElement'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.IFrameworkElement))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Resources = 7;
internal const int idx_put_Resources = 8;
internal const int idx_get_Width = 15;
internal const int idx_put_Width = 16;
internal const int idx_get_Height = 17;
internal const int idx_put_Height = 18;
internal const int idx_get_HorizontalAlignment = 27;
internal const int idx_put_HorizontalAlignment = 28;
internal const int idx_get_VerticalAlignment = 29;
internal const int idx_put_VerticalAlignment = 30;
internal const int idx_get_Margin = 31;
internal const int idx_put_Margin = 32;
internal const int idx_get_Name = 33;
internal const int idx_get_FlowDirection = 41;
internal const int idx_put_FlowDirection = 42;
internal const int idx_add_Loaded = 43;
internal const int idx_remove_Loaded = 44;
internal const int idx_add_Unloaded = 45;
internal const int idx_remove_Unloaded = 46;
internal const int idx_add_SizeChanged = 47;
internal const int idx_remove_SizeChanged = 48;
internal const int idx_add_LayoutUpdated = 49;
internal const int idx_remove_LayoutUpdated = 50;
}
}
// Windows.UI.Xaml.SizeChangedEventHandler
public unsafe static class SizeChangedEventHandler__Impl
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void Invoke(
this global::System.__ComObject __this,
object sender,
global::Windows.UI.Xaml.SizeChangedEventArgs e)
{
global::McgInterop.ForwardComSharedStubs.Proc_object__TArg0__<global::Windows.UI.Xaml.SizeChangedEventHandler, global::Windows.UI.Xaml.SizeChangedEventArgs>(
__this,
sender,
e,
global::Windows.UI.Xaml.SizeChangedEventHandler__Impl.Vtbl.idx_Invoke
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// v-table for 'Windows.UI.Xaml.SizeChangedEventHandler'
[global::System.Runtime.InteropServices.McgRootsType(typeof(global::Windows.UI.Xaml.SizeChangedEventHandler))]
public unsafe partial struct Vtbl
{
global::System.IntPtr pfnQueryInterface;
global::System.IntPtr pfnAddRef;
global::System.IntPtr pfnRelease;
// Windows_UI_Xaml__SizeChangedEventHandler
global::System.IntPtr pfnInvoke_Windows_UI_Xaml__SizeChangedEventHandler;
internal const int idx_Invoke = 3;
[global::System.Runtime.CompilerServices.InitDataBlob(typeof(global::Windows.UI.Xaml.SizeChangedEventHandler__Impl.Vtbl.Windows_UI_Xaml_SizeChangedEventHandler__Impl_Vtbl_McgRvaContainer), "RVA_Windows_UI_Xaml_SizeChangedEventHandler__Impl_Vtbl_s_theCcwVtable")]
public static global::Windows.UI.Xaml.SizeChangedEventHandler__Impl.Vtbl s_theCcwVtable
#if false
= new global::Windows.UI.Xaml.SizeChangedEventHandler__Impl.Vtbl() {
pfnQueryInterface = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfQueryInterface>(System.Runtime.InteropServices.__vtable_IUnknown.QueryInterface),
pfnAddRef = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfAddRef>(System.Runtime.InteropServices.__vtable_IUnknown.AddRef),
pfnRelease = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfRelease>(System.Runtime.InteropServices.__vtable_IUnknown.Release),
pfnInvoke_Windows_UI_Xaml__SizeChangedEventHandler = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget65>(global::Windows.UI.Xaml.SizeChangedEventHandler__Impl.Vtbl.Invoke__STUB),
}
#endif
;
public static global::System.IntPtr pNativeVtable;
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int Invoke__STUB(
global::System.IntPtr pComThis,
global::System.Runtime.InteropServices.__vtable_IInspectable* unsafe_sender,
global::Windows.UI.Xaml.ISizeChangedEventArgs__Impl.Vtbl** unsafe_e)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.UI.Xaml.SizeChangedEventHandler>(
__this,
0
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Proc_object__TArg0__<global::Windows.UI.Xaml.SizeChangedEventArgs>(
__this,
unsafe_sender,
unsafe_e,
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
private static class Windows_UI_Xaml_SizeChangedEventHandler__Impl_Vtbl_McgRvaContainer
{
[global::System.Runtime.CompilerServices.MethodAddrFixup(0, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "QueryInterface")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(4, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "AddRef")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(8, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "Release")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(12, typeof(global::Windows.UI.Xaml.SizeChangedEventHandler__Impl.Vtbl), "Invoke__STUB")]
[global::System.Runtime.CompilerServices.NonArray]
static readonly byte[] RVA_Windows_UI_Xaml_SizeChangedEventHandler__Impl_Vtbl_s_theCcwVtable = new byte[] {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
}
}
}
// Windows.UI.Xaml.ISizeChangedEventArgs
public unsafe static class ISizeChangedEventArgs__Impl
{
// v-table for 'Windows.UI.Xaml.ISizeChangedEventArgs'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.ISizeChangedEventArgs))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Xaml.IFrameworkElementOverrides
public unsafe static class IFrameworkElementOverrides__Impl
{
// StubClass for 'Windows.UI.Xaml.IFrameworkElementOverrides'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.Foundation.Size MeasureOverride(
global::System.__ComObject __this,
global::Windows.Foundation.Size availableSize)
{
global::Windows.Foundation.Size __ret = global::McgInterop.ForwardComSharedStubs.Func__Size___Size__<global::Windows.UI.Xaml.IFrameworkElementOverrides>(
__this,
availableSize,
global::Windows.UI.Xaml.IFrameworkElementOverrides__Impl.Vtbl.idx_MeasureOverride
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.Foundation.Size ArrangeOverride(
global::System.__ComObject __this,
global::Windows.Foundation.Size finalSize)
{
global::Windows.Foundation.Size __ret = global::McgInterop.ForwardComSharedStubs.Func__Size___Size__<global::Windows.UI.Xaml.IFrameworkElementOverrides>(
__this,
finalSize,
global::Windows.UI.Xaml.IFrameworkElementOverrides__Impl.Vtbl.idx_ArrangeOverride
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void OnApplyTemplate(global::System.__ComObject __this)
{
global::McgInterop.ForwardComSharedStubs.Proc_<global::Windows.UI.Xaml.IFrameworkElementOverrides>(
__this,
global::Windows.UI.Xaml.IFrameworkElementOverrides__Impl.Vtbl.idx_OnApplyTemplate
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// DispatchClass for 'Windows.UI.Xaml.IFrameworkElementOverrides'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.IFrameworkElementOverrides))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.UI.Xaml.IFrameworkElementOverrides
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
global::Windows.Foundation.Size global::Windows.UI.Xaml.IFrameworkElementOverrides.MeasureOverride(global::Windows.Foundation.Size availableSize)
{
global::Windows.Foundation.Size __retVal = global::Windows.UI.Xaml.IFrameworkElementOverrides__Impl.StubClass.MeasureOverride(
this,
availableSize
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
global::Windows.Foundation.Size global::Windows.UI.Xaml.IFrameworkElementOverrides.ArrangeOverride(global::Windows.Foundation.Size finalSize)
{
global::Windows.Foundation.Size __retVal = global::Windows.UI.Xaml.IFrameworkElementOverrides__Impl.StubClass.ArrangeOverride(
this,
finalSize
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.UI.Xaml.IFrameworkElementOverrides.OnApplyTemplate()
{
global::Windows.UI.Xaml.IFrameworkElementOverrides__Impl.StubClass.OnApplyTemplate(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// v-table for 'Windows.UI.Xaml.IFrameworkElementOverrides'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.IFrameworkElementOverrides))]
public unsafe partial struct Vtbl
{
internal const int idx_MeasureOverride = 6;
internal const int idx_ArrangeOverride = 7;
internal const int idx_OnApplyTemplate = 8;
}
}
// Windows.UI.Xaml.IFrameworkElement2
public unsafe static class IFrameworkElement2__Impl
{
// StubClass for 'Windows.UI.Xaml.IFrameworkElement2'
public static partial class StubClass
{
// Signature, Windows.UI.Xaml.IFrameworkElement2.get_RequestedTheme, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.EnumMarshaller] Windows_UI_Xaml_ElementTheme__Windows_UI_Xaml__ElementTheme,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.ElementTheme get_RequestedTheme(global::System.__ComObject __this)
{
// Setup
global::Windows.UI.Xaml.ElementTheme unsafe_value__retval;
global::Windows.UI.Xaml.ElementTheme value__retval;
int unsafe___return__;
// Marshalling
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.UI.Xaml.IFrameworkElement2).TypeHandle,
global::Windows.UI.Xaml.IFrameworkElement2__Impl.Vtbl.idx_get_RequestedTheme,
&(unsafe_value__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
value__retval = unsafe_value__retval;
// Return
return value__retval;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void put_RequestedTheme(
global::System.__ComObject __this,
global::Windows.UI.Xaml.ElementTheme value)
{
global::McgInterop.ForwardComSharedStubs.Proc_int<global::Windows.UI.Xaml.IFrameworkElement2>(
__this,
((int)value),
global::Windows.UI.Xaml.IFrameworkElement2__Impl.Vtbl.idx_put_RequestedTheme
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// Signature, Windows.UI.Xaml.IFrameworkElement2.add_DataContextChanged, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.WinRTDelegateMarshaller] Windows_Foundation_TypedEventHandler_2_Windows_UI_Xaml_FrameworkElement__Windows_UI_Xaml_DataContextChangedEventArgs___Windows_Foundation__TypedEventHandler_A_Windows_UI_Xaml_FrameworkElement_j_Windows_UI_Xaml_DataContextChangedEventArgs_V_ *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] System_Runtime_InteropServices_WindowsRuntime_EventRegistrationToken__Windows_Foundation__EventRegistrationToken,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken add_DataContextChanged(
global::System.__ComObject __this,
global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.FrameworkElement, global::Windows.UI.Xaml.DataContextChangedEventArgs> value)
{
// Setup
global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_FrameworkElement_j_Windows_UI_Xaml_DataContextChangedEventArgs_V___Impl.Vtbl** unsafe_value = default(global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_FrameworkElement_j_Windows_UI_Xaml_DataContextChangedEventArgs_V___Impl.Vtbl**);
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken unsafe_token__retval;
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token__retval;
int unsafe___return__;
try
{
// Marshalling
unsafe_value = (global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_FrameworkElement_j_Windows_UI_Xaml_DataContextChangedEventArgs_V___Impl.Vtbl**)global::System.Runtime.InteropServices.McgModuleManager.DelegateToComInterface(
value,
typeof(global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.FrameworkElement, global::Windows.UI.Xaml.DataContextChangedEventArgs>).TypeHandle,
global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget66>(global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_FrameworkElement_j_Windows_UI_Xaml_DataContextChangedEventArgs_V___Impl.Invoke)
);
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.UI.Xaml.IFrameworkElement2).TypeHandle,
global::Windows.UI.Xaml.IFrameworkElement2__Impl.Vtbl.idx_add_DataContextChanged,
unsafe_value,
&(unsafe_token__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
token__retval = unsafe_token__retval;
// Return
return token__retval;
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_value)));
}
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void remove_DataContextChanged(
global::System.__ComObject __this,
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::McgInterop.ForwardComSharedStubs.Proc__WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.IFrameworkElement2>(
__this,
token,
global::Windows.UI.Xaml.IFrameworkElement2__Impl.Vtbl.idx_remove_DataContextChanged
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// DispatchClass for 'Windows.UI.Xaml.IFrameworkElement2'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.IFrameworkElement2))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.UI.Xaml.IFrameworkElement2
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.UI.Xaml.IFrameworkElement2.RequestedTheme")]
global::Windows.UI.Xaml.ElementTheme global::Windows.UI.Xaml.IFrameworkElement2.get_RequestedTheme()
{
global::Windows.UI.Xaml.ElementTheme __retVal = global::Windows.UI.Xaml.IFrameworkElement2__Impl.StubClass.get_RequestedTheme(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertySet, "Windows.UI.Xaml.IFrameworkElement2.RequestedTheme")]
void global::Windows.UI.Xaml.IFrameworkElement2.put_RequestedTheme(global::Windows.UI.Xaml.ElementTheme value)
{
global::Windows.UI.Xaml.IFrameworkElement2__Impl.StubClass.put_RequestedTheme(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventAdd, "Windows.UI.Xaml.IFrameworkElement2.DataContextChanged")]
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken global::Windows.UI.Xaml.IFrameworkElement2.add_DataContextChanged(global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.FrameworkElement, global::Windows.UI.Xaml.DataContextChangedEventArgs> value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __retVal = global::Windows.UI.Xaml.IFrameworkElement2__Impl.StubClass.add_DataContextChanged(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventRemove, "Windows.UI.Xaml.IFrameworkElement2.DataContextChanged")]
void global::Windows.UI.Xaml.IFrameworkElement2.remove_DataContextChanged(global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::Windows.UI.Xaml.IFrameworkElement2__Impl.StubClass.remove_DataContextChanged(
this,
token
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// v-table for 'Windows.UI.Xaml.IFrameworkElement2'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.IFrameworkElement2))]
public unsafe partial struct Vtbl
{
internal const int idx_get_RequestedTheme = 6;
internal const int idx_put_RequestedTheme = 7;
internal const int idx_add_DataContextChanged = 8;
internal const int idx_remove_DataContextChanged = 9;
}
}
// Windows.UI.Xaml.IDataContextChangedEventArgs
public unsafe static class IDataContextChangedEventArgs__Impl
{
// v-table for 'Windows.UI.Xaml.IDataContextChangedEventArgs'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.IDataContextChangedEventArgs))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Xaml.IFrameworkElementOverrides2
public unsafe static class IFrameworkElementOverrides2__Impl
{
// StubClass for 'Windows.UI.Xaml.IFrameworkElementOverrides2'
public static partial class StubClass
{
// Signature, Windows.UI.Xaml.IFrameworkElementOverrides2.GoToElementStateCore, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.HSTRINGMarshaller] string__System.Runtime.InteropServices.HSTRING, [fwd] [in] [Mcg.CodeGen.CBoolMarshaller] bool__bool, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.CBoolMarshaller] bool__bool,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool GoToElementStateCore(
global::System.__ComObject __this,
string stateName,
bool useTransitions)
{
// Setup
global::System.Runtime.InteropServices.HSTRING unsafe_stateName = default(global::System.Runtime.InteropServices.HSTRING);
sbyte unsafe_useTransitions;
bool returnValue__retval;
sbyte unsafe_returnValue__retval;
int unsafe___return__;
// Marshalling
fixed (char* pBuffer_stateName = stateName)
{
global::System.Runtime.InteropServices.HSTRING_HEADER hstring_header_stateName;
global::System.Runtime.InteropServices.McgMarshal.StringToHStringReference(pBuffer_stateName, stateName, &(hstring_header_stateName), &(unsafe_stateName));
unsafe_useTransitions = (useTransitions ? ((sbyte)1) : ((sbyte)0));
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.UI.Xaml.IFrameworkElementOverrides2).TypeHandle,
global::Windows.UI.Xaml.IFrameworkElementOverrides2__Impl.Vtbl.idx_GoToElementStateCore,
unsafe_stateName,
unsafe_useTransitions,
&(unsafe_returnValue__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
returnValue__retval = unsafe_returnValue__retval != 0;
}
// Return
return returnValue__retval;
}
}
// DispatchClass for 'Windows.UI.Xaml.IFrameworkElementOverrides2'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.IFrameworkElementOverrides2))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.UI.Xaml.IFrameworkElementOverrides2
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
bool global::Windows.UI.Xaml.IFrameworkElementOverrides2.GoToElementStateCore(
string stateName,
bool useTransitions)
{
bool __retVal = global::Windows.UI.Xaml.IFrameworkElementOverrides2__Impl.StubClass.GoToElementStateCore(
this,
stateName,
useTransitions
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.UI.Xaml.IFrameworkElementOverrides2'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.IFrameworkElementOverrides2))]
public unsafe partial struct Vtbl
{
internal const int idx_GoToElementStateCore = 6;
}
}
// Windows.UI.Xaml.IFrameworkElement3
public unsafe static class IFrameworkElement3__Impl
{
// StubClass for 'Windows.UI.Xaml.IFrameworkElement3'
public static partial class StubClass
{
// Signature, Windows.UI.Xaml.IFrameworkElement3.add_Loading, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.WinRTDelegateMarshaller] Windows_Foundation_TypedEventHandler_2_Windows_UI_Xaml_FrameworkElement__object___Windows_Foundation__TypedEventHandler_A_Windows_UI_Xaml_FrameworkElement_j_object_V_ *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] System_Runtime_InteropServices_WindowsRuntime_EventRegistrationToken__Windows_Foundation__EventRegistrationToken,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken add_Loading(
global::System.__ComObject __this,
global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.FrameworkElement, object> value)
{
// Setup
global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_FrameworkElement_j_System_Object_V___Impl.Vtbl** unsafe_value = default(global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_FrameworkElement_j_System_Object_V___Impl.Vtbl**);
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken unsafe_token__retval;
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token__retval;
int unsafe___return__;
try
{
// Marshalling
unsafe_value = (global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_FrameworkElement_j_System_Object_V___Impl.Vtbl**)global::System.Runtime.InteropServices.McgModuleManager.DelegateToComInterface(
value,
typeof(global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.FrameworkElement, object>).TypeHandle,
global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget68>(global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_FrameworkElement_j_System_Object_V___Impl.Invoke)
);
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.UI.Xaml.IFrameworkElement3).TypeHandle,
global::Windows.UI.Xaml.IFrameworkElement3__Impl.Vtbl.idx_add_Loading,
unsafe_value,
&(unsafe_token__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
token__retval = unsafe_token__retval;
// Return
return token__retval;
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_value)));
}
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void remove_Loading(
global::System.__ComObject __this,
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::McgInterop.ForwardComSharedStubs.Proc__WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.IFrameworkElement3>(
__this,
token,
global::Windows.UI.Xaml.IFrameworkElement3__Impl.Vtbl.idx_remove_Loading
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// DispatchClass for 'Windows.UI.Xaml.IFrameworkElement3'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.IFrameworkElement3))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.UI.Xaml.IFrameworkElement3
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventAdd, "Windows.UI.Xaml.IFrameworkElement3.Loading")]
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken global::Windows.UI.Xaml.IFrameworkElement3.add_Loading(global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.FrameworkElement, object> value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __retVal = global::Windows.UI.Xaml.IFrameworkElement3__Impl.StubClass.add_Loading(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventRemove, "Windows.UI.Xaml.IFrameworkElement3.Loading")]
void global::Windows.UI.Xaml.IFrameworkElement3.remove_Loading(global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::Windows.UI.Xaml.IFrameworkElement3__Impl.StubClass.remove_Loading(
this,
token
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// v-table for 'Windows.UI.Xaml.IFrameworkElement3'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.IFrameworkElement3))]
public unsafe partial struct Vtbl
{
internal const int idx_add_Loading = 6;
internal const int idx_remove_Loading = 7;
}
}
// Windows.UI.Xaml.IFrameworkElement4
public unsafe static class IFrameworkElement4__Impl
{
// v-table for 'Windows.UI.Xaml.IFrameworkElement4'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.IFrameworkElement4))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Xaml.DependencyPropertyChangedEventHandler
public unsafe static class DependencyPropertyChangedEventHandler__Impl
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void Invoke(
this global::System.__ComObject __this,
object sender,
global::Windows.UI.Xaml.DependencyPropertyChangedEventArgs e)
{
global::McgInterop.ForwardComSharedStubs.Proc_object__TArg0__<global::Windows.UI.Xaml.DependencyPropertyChangedEventHandler, global::Windows.UI.Xaml.DependencyPropertyChangedEventArgs>(
__this,
sender,
e,
global::Windows.UI.Xaml.DependencyPropertyChangedEventHandler__Impl.Vtbl.idx_Invoke
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// v-table for 'Windows.UI.Xaml.DependencyPropertyChangedEventHandler'
[global::System.Runtime.InteropServices.McgRootsType(typeof(global::Windows.UI.Xaml.DependencyPropertyChangedEventHandler))]
public unsafe partial struct Vtbl
{
global::System.IntPtr pfnQueryInterface;
global::System.IntPtr pfnAddRef;
global::System.IntPtr pfnRelease;
// Windows_UI_Xaml__DependencyPropertyChangedEventHandler
global::System.IntPtr pfnInvoke_Windows_UI_Xaml__DependencyPropertyChangedEventHandler;
internal const int idx_Invoke = 3;
[global::System.Runtime.CompilerServices.InitDataBlob(typeof(global::Windows.UI.Xaml.DependencyPropertyChangedEventHandler__Impl.Vtbl.Windows_UI_Xaml_DependencyPropertyChangedEventHandler__Impl_Vtbl_McgRvaContainer), "RVA_Windows_UI_Xaml_DependencyPropertyChangedEventHandler__Impl_Vtbl_s_theCcwVtable")]
public static global::Windows.UI.Xaml.DependencyPropertyChangedEventHandler__Impl.Vtbl s_theCcwVtable
#if false
= new global::Windows.UI.Xaml.DependencyPropertyChangedEventHandler__Impl.Vtbl() {
pfnQueryInterface = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfQueryInterface>(System.Runtime.InteropServices.__vtable_IUnknown.QueryInterface),
pfnAddRef = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfAddRef>(System.Runtime.InteropServices.__vtable_IUnknown.AddRef),
pfnRelease = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfRelease>(System.Runtime.InteropServices.__vtable_IUnknown.Release),
pfnInvoke_Windows_UI_Xaml__DependencyPropertyChangedEventHandler = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget71>(global::Windows.UI.Xaml.DependencyPropertyChangedEventHandler__Impl.Vtbl.Invoke__STUB),
}
#endif
;
public static global::System.IntPtr pNativeVtable;
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int Invoke__STUB(
global::System.IntPtr pComThis,
global::System.Runtime.InteropServices.__vtable_IInspectable* unsafe_sender,
global::Windows.UI.Xaml.IDependencyPropertyChangedEventArgs__Impl.Vtbl** unsafe_e)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.UI.Xaml.DependencyPropertyChangedEventHandler>(
__this,
0
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Proc_object__TArg0__<global::Windows.UI.Xaml.DependencyPropertyChangedEventArgs>(
__this,
unsafe_sender,
unsafe_e,
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
private static class Windows_UI_Xaml_DependencyPropertyChangedEventHandler__Impl_Vtbl_McgRvaContainer
{
[global::System.Runtime.CompilerServices.MethodAddrFixup(0, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "QueryInterface")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(4, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "AddRef")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(8, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "Release")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(12, typeof(global::Windows.UI.Xaml.DependencyPropertyChangedEventHandler__Impl.Vtbl), "Invoke__STUB")]
[global::System.Runtime.CompilerServices.NonArray]
static readonly byte[] RVA_Windows_UI_Xaml_DependencyPropertyChangedEventHandler__Impl_Vtbl_s_theCcwVtable = new byte[] {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
}
}
}
// Windows.UI.Xaml.IDependencyPropertyChangedEventArgs
public unsafe static class IDependencyPropertyChangedEventArgs__Impl
{
// v-table for 'Windows.UI.Xaml.IDependencyPropertyChangedEventArgs'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.IDependencyPropertyChangedEventArgs))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Xaml.IFrameworkTemplate
public unsafe static class IFrameworkTemplate__Impl
{
// v-table for 'Windows.UI.Xaml.IFrameworkTemplate'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.IFrameworkTemplate))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Xaml.IDataTemplate
public unsafe static class IDataTemplate__Impl
{
// v-table for 'Windows.UI.Xaml.IDataTemplate'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.IDataTemplate))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Xaml.ExceptionRoutedEventHandler
public unsafe static class ExceptionRoutedEventHandler__Impl
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void Invoke(
this global::System.__ComObject __this,
object sender,
global::Windows.UI.Xaml.ExceptionRoutedEventArgs e)
{
global::McgInterop.ForwardComSharedStubs.Proc_object__TArg0__<global::Windows.UI.Xaml.ExceptionRoutedEventHandler, global::Windows.UI.Xaml.ExceptionRoutedEventArgs>(
__this,
sender,
e,
global::Windows.UI.Xaml.ExceptionRoutedEventHandler__Impl.Vtbl.idx_Invoke
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// v-table for 'Windows.UI.Xaml.ExceptionRoutedEventHandler'
[global::System.Runtime.InteropServices.McgRootsType(typeof(global::Windows.UI.Xaml.ExceptionRoutedEventHandler))]
public unsafe partial struct Vtbl
{
global::System.IntPtr pfnQueryInterface;
global::System.IntPtr pfnAddRef;
global::System.IntPtr pfnRelease;
// Windows_UI_Xaml__ExceptionRoutedEventHandler
global::System.IntPtr pfnInvoke_Windows_UI_Xaml__ExceptionRoutedEventHandler;
internal const int idx_Invoke = 3;
[global::System.Runtime.CompilerServices.InitDataBlob(typeof(global::Windows.UI.Xaml.ExceptionRoutedEventHandler__Impl.Vtbl.Windows_UI_Xaml_ExceptionRoutedEventHandler__Impl_Vtbl_McgRvaContainer), "RVA_Windows_UI_Xaml_ExceptionRoutedEventHandler__Impl_Vtbl_s_theCcwVtable")]
public static global::Windows.UI.Xaml.ExceptionRoutedEventHandler__Impl.Vtbl s_theCcwVtable
#if false
= new global::Windows.UI.Xaml.ExceptionRoutedEventHandler__Impl.Vtbl() {
pfnQueryInterface = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfQueryInterface>(System.Runtime.InteropServices.__vtable_IUnknown.QueryInterface),
pfnAddRef = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfAddRef>(System.Runtime.InteropServices.__vtable_IUnknown.AddRef),
pfnRelease = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfRelease>(System.Runtime.InteropServices.__vtable_IUnknown.Release),
pfnInvoke_Windows_UI_Xaml__ExceptionRoutedEventHandler = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget99>(global::Windows.UI.Xaml.ExceptionRoutedEventHandler__Impl.Vtbl.Invoke__STUB),
}
#endif
;
public static global::System.IntPtr pNativeVtable;
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int Invoke__STUB(
global::System.IntPtr pComThis,
global::System.Runtime.InteropServices.__vtable_IInspectable* unsafe_sender,
global::Windows.UI.Xaml.IExceptionRoutedEventArgs__Impl.Vtbl** unsafe_e)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.UI.Xaml.ExceptionRoutedEventHandler>(
__this,
0
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Proc_object__TArg0__<global::Windows.UI.Xaml.ExceptionRoutedEventArgs>(
__this,
unsafe_sender,
unsafe_e,
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
private static class Windows_UI_Xaml_ExceptionRoutedEventHandler__Impl_Vtbl_McgRvaContainer
{
[global::System.Runtime.CompilerServices.MethodAddrFixup(0, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "QueryInterface")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(4, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "AddRef")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(8, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "Release")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(12, typeof(global::Windows.UI.Xaml.ExceptionRoutedEventHandler__Impl.Vtbl), "Invoke__STUB")]
[global::System.Runtime.CompilerServices.NonArray]
static readonly byte[] RVA_Windows_UI_Xaml_ExceptionRoutedEventHandler__Impl_Vtbl_s_theCcwVtable = new byte[] {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
}
}
}
// Windows.UI.Xaml.IExceptionRoutedEventArgs
public unsafe static class IExceptionRoutedEventArgs__Impl
{
// v-table for 'Windows.UI.Xaml.IExceptionRoutedEventArgs'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.IExceptionRoutedEventArgs))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Xaml.IWindowStatics
public unsafe static class IWindowStatics__Impl
{
// StubClass for 'Windows.UI.Xaml.IWindowStatics'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.Window get_Current(global::System.__ComObject __this)
{
global::Windows.UI.Xaml.Window __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.UI.Xaml.IWindowStatics, global::Windows.UI.Xaml.Window>(
__this,
global::Windows.UI.Xaml.IWindowStatics__Impl.Vtbl.idx_get_Current
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
}
// DispatchClass for 'Windows.UI.Xaml.IWindowStatics'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.IWindowStatics))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.UI.Xaml.IWindowStatics
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.UI.Xaml.IWindowStatics.Current")]
global::Windows.UI.Xaml.Window global::Windows.UI.Xaml.IWindowStatics.get_Current()
{
global::Windows.UI.Xaml.Window __retVal = global::Windows.UI.Xaml.IWindowStatics__Impl.StubClass.get_Current(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.UI.Xaml.IWindowStatics'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.IWindowStatics))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Current = 6;
}
}
// Windows.UI.Xaml.IWindow
public unsafe static class IWindow__Impl
{
// StubClass for 'Windows.UI.Xaml.IWindow'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.UIElement get_Content(global::System.__ComObject __this)
{
global::Windows.UI.Xaml.UIElement __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.UI.Xaml.IWindow, global::Windows.UI.Xaml.UIElement>(
__this,
global::Windows.UI.Xaml.IWindow__Impl.Vtbl.idx_get_Content
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void put_Content(
global::System.__ComObject __this,
global::Windows.UI.Xaml.UIElement value)
{
global::McgInterop.ForwardComSharedStubs.Proc_TArg0__<global::Windows.UI.Xaml.IWindow, global::Windows.UI.Xaml.UIElement>(
__this,
value,
global::Windows.UI.Xaml.IWindow__Impl.Vtbl.idx_put_Content
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// Signature, Windows.UI.Xaml.IWindow.add_Activated, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.WinRTDelegateMarshaller] Windows_UI_Xaml_WindowActivatedEventHandler__Windows_UI_Xaml__WindowActivatedEventHandler *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] System_Runtime_InteropServices_WindowsRuntime_EventRegistrationToken__Windows_Foundation__EventRegistrationToken,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken add_Activated(
global::System.__ComObject __this,
global::Windows.UI.Xaml.WindowActivatedEventHandler value)
{
// Setup
global::Windows.UI.Xaml.WindowActivatedEventHandler__Impl.Vtbl** unsafe_value = default(global::Windows.UI.Xaml.WindowActivatedEventHandler__Impl.Vtbl**);
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken unsafe_token__retval;
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token__retval;
int unsafe___return__;
try
{
// Marshalling
unsafe_value = (global::Windows.UI.Xaml.WindowActivatedEventHandler__Impl.Vtbl**)global::System.Runtime.InteropServices.McgModuleManager.DelegateToComInterface(
value,
typeof(global::Windows.UI.Xaml.WindowActivatedEventHandler).TypeHandle,
global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget148>(global::Windows.UI.Xaml.WindowActivatedEventHandler__Impl.Invoke)
);
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.UI.Xaml.IWindow).TypeHandle,
global::Windows.UI.Xaml.IWindow__Impl.Vtbl.idx_add_Activated,
unsafe_value,
&(unsafe_token__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
token__retval = unsafe_token__retval;
// Return
return token__retval;
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_value)));
}
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void remove_Activated(
global::System.__ComObject __this,
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::McgInterop.ForwardComSharedStubs.Proc__WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.IWindow>(
__this,
token,
global::Windows.UI.Xaml.IWindow__Impl.Vtbl.idx_remove_Activated
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// Signature, Windows.UI.Xaml.IWindow.add_Closed, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.WinRTDelegateMarshaller] Windows_UI_Xaml_WindowClosedEventHandler__Windows_UI_Xaml__WindowClosedEventHandler *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] System_Runtime_InteropServices_WindowsRuntime_EventRegistrationToken__Windows_Foundation__EventRegistrationToken,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken add_Closed(
global::System.__ComObject __this,
global::Windows.UI.Xaml.WindowClosedEventHandler value)
{
// Setup
global::Windows.UI.Xaml.WindowClosedEventHandler__Impl.Vtbl** unsafe_value = default(global::Windows.UI.Xaml.WindowClosedEventHandler__Impl.Vtbl**);
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken unsafe_token__retval;
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token__retval;
int unsafe___return__;
try
{
// Marshalling
unsafe_value = (global::Windows.UI.Xaml.WindowClosedEventHandler__Impl.Vtbl**)global::System.Runtime.InteropServices.McgModuleManager.DelegateToComInterface(
value,
typeof(global::Windows.UI.Xaml.WindowClosedEventHandler).TypeHandle,
global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget149>(global::Windows.UI.Xaml.WindowClosedEventHandler__Impl.Invoke)
);
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.UI.Xaml.IWindow).TypeHandle,
global::Windows.UI.Xaml.IWindow__Impl.Vtbl.idx_add_Closed,
unsafe_value,
&(unsafe_token__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
token__retval = unsafe_token__retval;
// Return
return token__retval;
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_value)));
}
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void remove_Closed(
global::System.__ComObject __this,
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::McgInterop.ForwardComSharedStubs.Proc__WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.IWindow>(
__this,
token,
global::Windows.UI.Xaml.IWindow__Impl.Vtbl.idx_remove_Closed
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// Signature, Windows.UI.Xaml.IWindow.add_SizeChanged, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.WinRTDelegateMarshaller] Windows_UI_Xaml_WindowSizeChangedEventHandler__Windows_UI_Xaml__WindowSizeChangedEventHandler *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] System_Runtime_InteropServices_WindowsRuntime_EventRegistrationToken__Windows_Foundation__EventRegistrationToken,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken add_SizeChanged(
global::System.__ComObject __this,
global::Windows.UI.Xaml.WindowSizeChangedEventHandler value)
{
// Setup
global::Windows.UI.Xaml.WindowSizeChangedEventHandler__Impl.Vtbl** unsafe_value = default(global::Windows.UI.Xaml.WindowSizeChangedEventHandler__Impl.Vtbl**);
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken unsafe_token__retval;
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token__retval;
int unsafe___return__;
try
{
// Marshalling
unsafe_value = (global::Windows.UI.Xaml.WindowSizeChangedEventHandler__Impl.Vtbl**)global::System.Runtime.InteropServices.McgModuleManager.DelegateToComInterface(
value,
typeof(global::Windows.UI.Xaml.WindowSizeChangedEventHandler).TypeHandle,
global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget150>(global::Windows.UI.Xaml.WindowSizeChangedEventHandler__Impl.Invoke)
);
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.UI.Xaml.IWindow).TypeHandle,
global::Windows.UI.Xaml.IWindow__Impl.Vtbl.idx_add_SizeChanged,
unsafe_value,
&(unsafe_token__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
token__retval = unsafe_token__retval;
// Return
return token__retval;
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_value)));
}
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void remove_SizeChanged(
global::System.__ComObject __this,
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::McgInterop.ForwardComSharedStubs.Proc__WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.IWindow>(
__this,
token,
global::Windows.UI.Xaml.IWindow__Impl.Vtbl.idx_remove_SizeChanged
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// Signature, Windows.UI.Xaml.IWindow.add_VisibilityChanged, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.WinRTDelegateMarshaller] Windows_UI_Xaml_WindowVisibilityChangedEventHandler__Windows_UI_Xaml__WindowVisibilityChangedEventHandler *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] System_Runtime_InteropServices_WindowsRuntime_EventRegistrationToken__Windows_Foundation__EventRegistrationToken,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken add_VisibilityChanged(
global::System.__ComObject __this,
global::Windows.UI.Xaml.WindowVisibilityChangedEventHandler value)
{
// Setup
global::Windows.UI.Xaml.WindowVisibilityChangedEventHandler__Impl.Vtbl** unsafe_value = default(global::Windows.UI.Xaml.WindowVisibilityChangedEventHandler__Impl.Vtbl**);
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken unsafe_token__retval;
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token__retval;
int unsafe___return__;
try
{
// Marshalling
unsafe_value = (global::Windows.UI.Xaml.WindowVisibilityChangedEventHandler__Impl.Vtbl**)global::System.Runtime.InteropServices.McgModuleManager.DelegateToComInterface(
value,
typeof(global::Windows.UI.Xaml.WindowVisibilityChangedEventHandler).TypeHandle,
global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget151>(global::Windows.UI.Xaml.WindowVisibilityChangedEventHandler__Impl.Invoke)
);
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.UI.Xaml.IWindow).TypeHandle,
global::Windows.UI.Xaml.IWindow__Impl.Vtbl.idx_add_VisibilityChanged,
unsafe_value,
&(unsafe_token__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
token__retval = unsafe_token__retval;
// Return
return token__retval;
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_value)));
}
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void remove_VisibilityChanged(
global::System.__ComObject __this,
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::McgInterop.ForwardComSharedStubs.Proc__WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.IWindow>(
__this,
token,
global::Windows.UI.Xaml.IWindow__Impl.Vtbl.idx_remove_VisibilityChanged
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void Activate(global::System.__ComObject __this)
{
global::McgInterop.ForwardComSharedStubs.Proc_<global::Windows.UI.Xaml.IWindow>(
__this,
global::Windows.UI.Xaml.IWindow__Impl.Vtbl.idx_Activate
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// DispatchClass for 'Windows.UI.Xaml.IWindow'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.IWindow))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.UI.Xaml.IWindow
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.UI.Xaml.IWindow.Content")]
global::Windows.UI.Xaml.UIElement global::Windows.UI.Xaml.IWindow.get_Content()
{
global::Windows.UI.Xaml.UIElement __retVal = global::Windows.UI.Xaml.IWindow__Impl.StubClass.get_Content(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertySet, "Windows.UI.Xaml.IWindow.Content")]
void global::Windows.UI.Xaml.IWindow.put_Content(global::Windows.UI.Xaml.UIElement value)
{
global::Windows.UI.Xaml.IWindow__Impl.StubClass.put_Content(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventAdd, "Windows.UI.Xaml.IWindow.Activated")]
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken global::Windows.UI.Xaml.IWindow.add_Activated(global::Windows.UI.Xaml.WindowActivatedEventHandler value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __retVal = global::Windows.UI.Xaml.IWindow__Impl.StubClass.add_Activated(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventRemove, "Windows.UI.Xaml.IWindow.Activated")]
void global::Windows.UI.Xaml.IWindow.remove_Activated(global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::Windows.UI.Xaml.IWindow__Impl.StubClass.remove_Activated(
this,
token
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventAdd, "Windows.UI.Xaml.IWindow.Closed")]
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken global::Windows.UI.Xaml.IWindow.add_Closed(global::Windows.UI.Xaml.WindowClosedEventHandler value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __retVal = global::Windows.UI.Xaml.IWindow__Impl.StubClass.add_Closed(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventRemove, "Windows.UI.Xaml.IWindow.Closed")]
void global::Windows.UI.Xaml.IWindow.remove_Closed(global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::Windows.UI.Xaml.IWindow__Impl.StubClass.remove_Closed(
this,
token
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventAdd, "Windows.UI.Xaml.IWindow.SizeChanged")]
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken global::Windows.UI.Xaml.IWindow.add_SizeChanged(global::Windows.UI.Xaml.WindowSizeChangedEventHandler value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __retVal = global::Windows.UI.Xaml.IWindow__Impl.StubClass.add_SizeChanged(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventRemove, "Windows.UI.Xaml.IWindow.SizeChanged")]
void global::Windows.UI.Xaml.IWindow.remove_SizeChanged(global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::Windows.UI.Xaml.IWindow__Impl.StubClass.remove_SizeChanged(
this,
token
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventAdd, "Windows.UI.Xaml.IWindow.VisibilityChanged")]
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken global::Windows.UI.Xaml.IWindow.add_VisibilityChanged(global::Windows.UI.Xaml.WindowVisibilityChangedEventHandler value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __retVal = global::Windows.UI.Xaml.IWindow__Impl.StubClass.add_VisibilityChanged(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventRemove, "Windows.UI.Xaml.IWindow.VisibilityChanged")]
void global::Windows.UI.Xaml.IWindow.remove_VisibilityChanged(global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::Windows.UI.Xaml.IWindow__Impl.StubClass.remove_VisibilityChanged(
this,
token
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.UI.Xaml.IWindow.Activate()
{
global::Windows.UI.Xaml.IWindow__Impl.StubClass.Activate(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// v-table for 'Windows.UI.Xaml.IWindow'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.IWindow))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Content = 8;
internal const int idx_put_Content = 9;
internal const int idx_add_Activated = 12;
internal const int idx_remove_Activated = 13;
internal const int idx_add_Closed = 14;
internal const int idx_remove_Closed = 15;
internal const int idx_add_SizeChanged = 16;
internal const int idx_remove_SizeChanged = 17;
internal const int idx_add_VisibilityChanged = 18;
internal const int idx_remove_VisibilityChanged = 19;
internal const int idx_Activate = 20;
}
}
// Windows.UI.Xaml.WindowActivatedEventHandler
public unsafe static class WindowActivatedEventHandler__Impl
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void Invoke(
this global::System.__ComObject __this,
object sender,
global::Windows.UI.Core.WindowActivatedEventArgs e)
{
global::McgInterop.ForwardComSharedStubs.Proc_object__TArg0__<global::Windows.UI.Xaml.WindowActivatedEventHandler, global::Windows.UI.Core.WindowActivatedEventArgs>(
__this,
sender,
e,
global::Windows.UI.Xaml.WindowActivatedEventHandler__Impl.Vtbl.idx_Invoke
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// v-table for 'Windows.UI.Xaml.WindowActivatedEventHandler'
[global::System.Runtime.InteropServices.McgRootsType(typeof(global::Windows.UI.Xaml.WindowActivatedEventHandler))]
public unsafe partial struct Vtbl
{
global::System.IntPtr pfnQueryInterface;
global::System.IntPtr pfnAddRef;
global::System.IntPtr pfnRelease;
// Windows_UI_Xaml__WindowActivatedEventHandler
global::System.IntPtr pfnInvoke_Windows_UI_Xaml__WindowActivatedEventHandler;
internal const int idx_Invoke = 3;
[global::System.Runtime.CompilerServices.InitDataBlob(typeof(global::Windows.UI.Xaml.WindowActivatedEventHandler__Impl.Vtbl.Windows_UI_Xaml_WindowActivatedEventHandler__Impl_Vtbl_McgRvaContainer), "RVA_Windows_UI_Xaml_WindowActivatedEventHandler__Impl_Vtbl_s_theCcwVtable")]
public static global::Windows.UI.Xaml.WindowActivatedEventHandler__Impl.Vtbl s_theCcwVtable
#if false
= new global::Windows.UI.Xaml.WindowActivatedEventHandler__Impl.Vtbl() {
pfnQueryInterface = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfQueryInterface>(System.Runtime.InteropServices.__vtable_IUnknown.QueryInterface),
pfnAddRef = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfAddRef>(System.Runtime.InteropServices.__vtable_IUnknown.AddRef),
pfnRelease = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfRelease>(System.Runtime.InteropServices.__vtable_IUnknown.Release),
pfnInvoke_Windows_UI_Xaml__WindowActivatedEventHandler = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget152>(global::Windows.UI.Xaml.WindowActivatedEventHandler__Impl.Vtbl.Invoke__STUB),
}
#endif
;
public static global::System.IntPtr pNativeVtable;
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int Invoke__STUB(
global::System.IntPtr pComThis,
global::System.Runtime.InteropServices.__vtable_IInspectable* unsafe_sender,
global::Windows.UI.Core.IWindowActivatedEventArgs__Impl.Vtbl** unsafe_e)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.UI.Xaml.WindowActivatedEventHandler>(
__this,
0
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Proc_object__TArg0__<global::Windows.UI.Core.WindowActivatedEventArgs>(
__this,
unsafe_sender,
unsafe_e,
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
private static class Windows_UI_Xaml_WindowActivatedEventHandler__Impl_Vtbl_McgRvaContainer
{
[global::System.Runtime.CompilerServices.MethodAddrFixup(0, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "QueryInterface")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(4, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "AddRef")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(8, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "Release")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(12, typeof(global::Windows.UI.Xaml.WindowActivatedEventHandler__Impl.Vtbl), "Invoke__STUB")]
[global::System.Runtime.CompilerServices.NonArray]
static readonly byte[] RVA_Windows_UI_Xaml_WindowActivatedEventHandler__Impl_Vtbl_s_theCcwVtable = new byte[] {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
}
}
}
// Windows.UI.Xaml.WindowClosedEventHandler
public unsafe static class WindowClosedEventHandler__Impl
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void Invoke(
this global::System.__ComObject __this,
object sender,
global::Windows.UI.Core.CoreWindowEventArgs e)
{
global::McgInterop.ForwardComSharedStubs.Proc_object__TArg0__<global::Windows.UI.Xaml.WindowClosedEventHandler, global::Windows.UI.Core.CoreWindowEventArgs>(
__this,
sender,
e,
global::Windows.UI.Xaml.WindowClosedEventHandler__Impl.Vtbl.idx_Invoke
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// v-table for 'Windows.UI.Xaml.WindowClosedEventHandler'
[global::System.Runtime.InteropServices.McgRootsType(typeof(global::Windows.UI.Xaml.WindowClosedEventHandler))]
public unsafe partial struct Vtbl
{
global::System.IntPtr pfnQueryInterface;
global::System.IntPtr pfnAddRef;
global::System.IntPtr pfnRelease;
// Windows_UI_Xaml__WindowClosedEventHandler
global::System.IntPtr pfnInvoke_Windows_UI_Xaml__WindowClosedEventHandler;
internal const int idx_Invoke = 3;
[global::System.Runtime.CompilerServices.InitDataBlob(typeof(global::Windows.UI.Xaml.WindowClosedEventHandler__Impl.Vtbl.Windows_UI_Xaml_WindowClosedEventHandler__Impl_Vtbl_McgRvaContainer), "RVA_Windows_UI_Xaml_WindowClosedEventHandler__Impl_Vtbl_s_theCcwVtable")]
public static global::Windows.UI.Xaml.WindowClosedEventHandler__Impl.Vtbl s_theCcwVtable
#if false
= new global::Windows.UI.Xaml.WindowClosedEventHandler__Impl.Vtbl() {
pfnQueryInterface = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfQueryInterface>(System.Runtime.InteropServices.__vtable_IUnknown.QueryInterface),
pfnAddRef = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfAddRef>(System.Runtime.InteropServices.__vtable_IUnknown.AddRef),
pfnRelease = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfRelease>(System.Runtime.InteropServices.__vtable_IUnknown.Release),
pfnInvoke_Windows_UI_Xaml__WindowClosedEventHandler = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget153>(global::Windows.UI.Xaml.WindowClosedEventHandler__Impl.Vtbl.Invoke__STUB),
}
#endif
;
public static global::System.IntPtr pNativeVtable;
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int Invoke__STUB(
global::System.IntPtr pComThis,
global::System.Runtime.InteropServices.__vtable_IInspectable* unsafe_sender,
global::Windows.UI.Core.ICoreWindowEventArgs__Impl.Vtbl** unsafe_e)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.UI.Xaml.WindowClosedEventHandler>(
__this,
0
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Proc_object__TArg0__<global::Windows.UI.Core.CoreWindowEventArgs>(
__this,
unsafe_sender,
unsafe_e,
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
private static class Windows_UI_Xaml_WindowClosedEventHandler__Impl_Vtbl_McgRvaContainer
{
[global::System.Runtime.CompilerServices.MethodAddrFixup(0, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "QueryInterface")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(4, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "AddRef")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(8, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "Release")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(12, typeof(global::Windows.UI.Xaml.WindowClosedEventHandler__Impl.Vtbl), "Invoke__STUB")]
[global::System.Runtime.CompilerServices.NonArray]
static readonly byte[] RVA_Windows_UI_Xaml_WindowClosedEventHandler__Impl_Vtbl_s_theCcwVtable = new byte[] {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
}
}
}
// Windows.UI.Xaml.WindowSizeChangedEventHandler
public unsafe static class WindowSizeChangedEventHandler__Impl
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void Invoke(
this global::System.__ComObject __this,
object sender,
global::Windows.UI.Core.WindowSizeChangedEventArgs e)
{
global::McgInterop.ForwardComSharedStubs.Proc_object__TArg0__<global::Windows.UI.Xaml.WindowSizeChangedEventHandler, global::Windows.UI.Core.WindowSizeChangedEventArgs>(
__this,
sender,
e,
global::Windows.UI.Xaml.WindowSizeChangedEventHandler__Impl.Vtbl.idx_Invoke
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// v-table for 'Windows.UI.Xaml.WindowSizeChangedEventHandler'
[global::System.Runtime.InteropServices.McgRootsType(typeof(global::Windows.UI.Xaml.WindowSizeChangedEventHandler))]
public unsafe partial struct Vtbl
{
global::System.IntPtr pfnQueryInterface;
global::System.IntPtr pfnAddRef;
global::System.IntPtr pfnRelease;
// Windows_UI_Xaml__WindowSizeChangedEventHandler
global::System.IntPtr pfnInvoke_Windows_UI_Xaml__WindowSizeChangedEventHandler;
internal const int idx_Invoke = 3;
[global::System.Runtime.CompilerServices.InitDataBlob(typeof(global::Windows.UI.Xaml.WindowSizeChangedEventHandler__Impl.Vtbl.Windows_UI_Xaml_WindowSizeChangedEventHandler__Impl_Vtbl_McgRvaContainer), "RVA_Windows_UI_Xaml_WindowSizeChangedEventHandler__Impl_Vtbl_s_theCcwVtable")]
public static global::Windows.UI.Xaml.WindowSizeChangedEventHandler__Impl.Vtbl s_theCcwVtable
#if false
= new global::Windows.UI.Xaml.WindowSizeChangedEventHandler__Impl.Vtbl() {
pfnQueryInterface = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfQueryInterface>(System.Runtime.InteropServices.__vtable_IUnknown.QueryInterface),
pfnAddRef = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfAddRef>(System.Runtime.InteropServices.__vtable_IUnknown.AddRef),
pfnRelease = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfRelease>(System.Runtime.InteropServices.__vtable_IUnknown.Release),
pfnInvoke_Windows_UI_Xaml__WindowSizeChangedEventHandler = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget154>(global::Windows.UI.Xaml.WindowSizeChangedEventHandler__Impl.Vtbl.Invoke__STUB),
}
#endif
;
public static global::System.IntPtr pNativeVtable;
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int Invoke__STUB(
global::System.IntPtr pComThis,
global::System.Runtime.InteropServices.__vtable_IInspectable* unsafe_sender,
global::Windows.UI.Core.IWindowSizeChangedEventArgs__Impl.Vtbl** unsafe_e)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.UI.Xaml.WindowSizeChangedEventHandler>(
__this,
0
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Proc_object__TArg0__<global::Windows.UI.Core.WindowSizeChangedEventArgs>(
__this,
unsafe_sender,
unsafe_e,
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
private static class Windows_UI_Xaml_WindowSizeChangedEventHandler__Impl_Vtbl_McgRvaContainer
{
[global::System.Runtime.CompilerServices.MethodAddrFixup(0, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "QueryInterface")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(4, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "AddRef")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(8, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "Release")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(12, typeof(global::Windows.UI.Xaml.WindowSizeChangedEventHandler__Impl.Vtbl), "Invoke__STUB")]
[global::System.Runtime.CompilerServices.NonArray]
static readonly byte[] RVA_Windows_UI_Xaml_WindowSizeChangedEventHandler__Impl_Vtbl_s_theCcwVtable = new byte[] {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
}
}
}
// Windows.UI.Xaml.WindowVisibilityChangedEventHandler
public unsafe static class WindowVisibilityChangedEventHandler__Impl
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void Invoke(
this global::System.__ComObject __this,
object sender,
global::Windows.UI.Core.VisibilityChangedEventArgs e)
{
global::McgInterop.ForwardComSharedStubs.Proc_object__TArg0__<global::Windows.UI.Xaml.WindowVisibilityChangedEventHandler, global::Windows.UI.Core.VisibilityChangedEventArgs>(
__this,
sender,
e,
global::Windows.UI.Xaml.WindowVisibilityChangedEventHandler__Impl.Vtbl.idx_Invoke
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// v-table for 'Windows.UI.Xaml.WindowVisibilityChangedEventHandler'
[global::System.Runtime.InteropServices.McgRootsType(typeof(global::Windows.UI.Xaml.WindowVisibilityChangedEventHandler))]
public unsafe partial struct Vtbl
{
global::System.IntPtr pfnQueryInterface;
global::System.IntPtr pfnAddRef;
global::System.IntPtr pfnRelease;
// Windows_UI_Xaml__WindowVisibilityChangedEventHandler
global::System.IntPtr pfnInvoke_Windows_UI_Xaml__WindowVisibilityChangedEventHandler;
internal const int idx_Invoke = 3;
[global::System.Runtime.CompilerServices.InitDataBlob(typeof(global::Windows.UI.Xaml.WindowVisibilityChangedEventHandler__Impl.Vtbl.Windows_UI_Xaml_WindowVisibilityChangedEventHandler__Impl_Vtbl_McgRvaContainer), "RVA_Windows_UI_Xaml_WindowVisibilityChangedEventHandler__Impl_Vtbl_s_theCcwVtable")]
public static global::Windows.UI.Xaml.WindowVisibilityChangedEventHandler__Impl.Vtbl s_theCcwVtable
#if false
= new global::Windows.UI.Xaml.WindowVisibilityChangedEventHandler__Impl.Vtbl() {
pfnQueryInterface = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfQueryInterface>(System.Runtime.InteropServices.__vtable_IUnknown.QueryInterface),
pfnAddRef = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfAddRef>(System.Runtime.InteropServices.__vtable_IUnknown.AddRef),
pfnRelease = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfRelease>(System.Runtime.InteropServices.__vtable_IUnknown.Release),
pfnInvoke_Windows_UI_Xaml__WindowVisibilityChangedEventHandler = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget155>(global::Windows.UI.Xaml.WindowVisibilityChangedEventHandler__Impl.Vtbl.Invoke__STUB),
}
#endif
;
public static global::System.IntPtr pNativeVtable;
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int Invoke__STUB(
global::System.IntPtr pComThis,
global::System.Runtime.InteropServices.__vtable_IInspectable* unsafe_sender,
global::Windows.UI.Core.IVisibilityChangedEventArgs__Impl.Vtbl** unsafe_e)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.UI.Xaml.WindowVisibilityChangedEventHandler>(
__this,
0
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Proc_object__TArg0__<global::Windows.UI.Core.VisibilityChangedEventArgs>(
__this,
unsafe_sender,
unsafe_e,
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
private static class Windows_UI_Xaml_WindowVisibilityChangedEventHandler__Impl_Vtbl_McgRvaContainer
{
[global::System.Runtime.CompilerServices.MethodAddrFixup(0, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "QueryInterface")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(4, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "AddRef")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(8, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "Release")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(12, typeof(global::Windows.UI.Xaml.WindowVisibilityChangedEventHandler__Impl.Vtbl), "Invoke__STUB")]
[global::System.Runtime.CompilerServices.NonArray]
static readonly byte[] RVA_Windows_UI_Xaml_WindowVisibilityChangedEventHandler__Impl_Vtbl_s_theCcwVtable = new byte[] {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
}
}
}
// Windows.UI.Xaml.IWindow2
public unsafe static class IWindow2__Impl
{
// v-table for 'Windows.UI.Xaml.IWindow2'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.IWindow2))]
public unsafe partial struct Vtbl
{
}
}
}
namespace Windows.UI.Xaml.Automation.Peers
{
// Windows.UI.Xaml.Automation.Peers.IAutomationPeer
public unsafe static class IAutomationPeer__Impl
{
// v-table for 'Windows.UI.Xaml.Automation.Peers.IAutomationPeer'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides
public unsafe static class IAutomationPeerOverrides__Impl
{
// StubClass for 'Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static object GetPatternCore(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Automation.Peers.PatternInterface patternInterface)
{
object __ret = global::McgInterop.ForwardComSharedStubs.Func_intobject__<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides>(
__this,
((int)patternInterface),
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides__Impl.Vtbl.idx_GetPatternCore
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static string GetAcceleratorKeyCore(global::System.__ComObject __this)
{
string __ret = global::McgInterop.ForwardComSharedStubs.Func_string__<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides>(
__this,
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides__Impl.Vtbl.idx_GetAcceleratorKeyCore
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static string GetAccessKeyCore(global::System.__ComObject __this)
{
string __ret = global::McgInterop.ForwardComSharedStubs.Func_string__<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides>(
__this,
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides__Impl.Vtbl.idx_GetAccessKeyCore
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
// Signature, Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides.GetAutomationControlTypeCore, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.EnumMarshaller] Windows_UI_Xaml_Automation_Peers_AutomationControlType__Windows_UI_Xaml_Automation_Peers__AutomationControlType,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.Automation.Peers.AutomationControlType GetAutomationControlTypeCore(global::System.__ComObject __this)
{
// Setup
global::Windows.UI.Xaml.Automation.Peers.AutomationControlType unsafe_returnValue__retval;
global::Windows.UI.Xaml.Automation.Peers.AutomationControlType returnValue__retval;
int unsafe___return__;
// Marshalling
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides).TypeHandle,
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides__Impl.Vtbl.idx_GetAutomationControlTypeCore,
&(unsafe_returnValue__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
returnValue__retval = unsafe_returnValue__retval;
// Return
return returnValue__retval;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static string GetAutomationIdCore(global::System.__ComObject __this)
{
string __ret = global::McgInterop.ForwardComSharedStubs.Func_string__<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides>(
__this,
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides__Impl.Vtbl.idx_GetAutomationIdCore
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
// Signature, Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides.GetBoundingRectangleCore, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] Windows_Foundation_Rect__Windows_Foundation__Rect,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.Foundation.Rect GetBoundingRectangleCore(global::System.__ComObject __this)
{
// Setup
global::Windows.Foundation.Rect unsafe_returnValue__retval;
global::Windows.Foundation.Rect returnValue__retval;
int unsafe___return__;
// Marshalling
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides).TypeHandle,
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides__Impl.Vtbl.idx_GetBoundingRectangleCore,
&(unsafe_returnValue__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
returnValue__retval = unsafe_returnValue__retval;
// Return
return returnValue__retval;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Collections.Generic.IList<global::Windows.UI.Xaml.Automation.Peers.AutomationPeer> GetChildrenCore(global::System.__ComObject __this)
{
global::System.Collections.Generic.IList<global::Windows.UI.Xaml.Automation.Peers.AutomationPeer> __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides, global::System.Collections.Generic.IList<global::Windows.UI.Xaml.Automation.Peers.AutomationPeer>>(
__this,
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides__Impl.Vtbl.idx_GetChildrenCore
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static string GetClassNameCore(global::System.__ComObject __this)
{
string __ret = global::McgInterop.ForwardComSharedStubs.Func_string__<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides>(
__this,
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides__Impl.Vtbl.idx_GetClassNameCore
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.Foundation.Point GetClickablePointCore(global::System.__ComObject __this)
{
global::Windows.Foundation.Point __ret = global::McgInterop.ForwardComSharedStubs.Func__Point__<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides>(
__this,
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides__Impl.Vtbl.idx_GetClickablePointCore
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static string GetHelpTextCore(global::System.__ComObject __this)
{
string __ret = global::McgInterop.ForwardComSharedStubs.Func_string__<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides>(
__this,
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides__Impl.Vtbl.idx_GetHelpTextCore
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static string GetItemStatusCore(global::System.__ComObject __this)
{
string __ret = global::McgInterop.ForwardComSharedStubs.Func_string__<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides>(
__this,
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides__Impl.Vtbl.idx_GetItemStatusCore
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static string GetItemTypeCore(global::System.__ComObject __this)
{
string __ret = global::McgInterop.ForwardComSharedStubs.Func_string__<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides>(
__this,
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides__Impl.Vtbl.idx_GetItemTypeCore
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.Automation.Peers.AutomationPeer GetLabeledByCore(global::System.__ComObject __this)
{
global::Windows.UI.Xaml.Automation.Peers.AutomationPeer __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides, global::Windows.UI.Xaml.Automation.Peers.AutomationPeer>(
__this,
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides__Impl.Vtbl.idx_GetLabeledByCore
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static string GetLocalizedControlTypeCore(global::System.__ComObject __this)
{
string __ret = global::McgInterop.ForwardComSharedStubs.Func_string__<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides>(
__this,
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides__Impl.Vtbl.idx_GetLocalizedControlTypeCore
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static string GetNameCore(global::System.__ComObject __this)
{
string __ret = global::McgInterop.ForwardComSharedStubs.Func_string__<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides>(
__this,
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides__Impl.Vtbl.idx_GetNameCore
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
// Signature, Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides.GetOrientationCore, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.EnumMarshaller] Windows_UI_Xaml_Automation_Peers_AutomationOrientation__Windows_UI_Xaml_Automation_Peers__AutomationOrientation,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.Automation.Peers.AutomationOrientation GetOrientationCore(global::System.__ComObject __this)
{
// Setup
global::Windows.UI.Xaml.Automation.Peers.AutomationOrientation unsafe_returnValue__retval;
global::Windows.UI.Xaml.Automation.Peers.AutomationOrientation returnValue__retval;
int unsafe___return__;
// Marshalling
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides).TypeHandle,
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides__Impl.Vtbl.idx_GetOrientationCore,
&(unsafe_returnValue__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
returnValue__retval = unsafe_returnValue__retval;
// Return
return returnValue__retval;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool HasKeyboardFocusCore(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides>(
__this,
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides__Impl.Vtbl.idx_HasKeyboardFocusCore
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool IsContentElementCore(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides>(
__this,
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides__Impl.Vtbl.idx_IsContentElementCore
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool IsControlElementCore(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides>(
__this,
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides__Impl.Vtbl.idx_IsControlElementCore
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool IsEnabledCore(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides>(
__this,
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides__Impl.Vtbl.idx_IsEnabledCore
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool IsKeyboardFocusableCore(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides>(
__this,
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides__Impl.Vtbl.idx_IsKeyboardFocusableCore
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool IsOffscreenCore(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides>(
__this,
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides__Impl.Vtbl.idx_IsOffscreenCore
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool IsPasswordCore(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides>(
__this,
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides__Impl.Vtbl.idx_IsPasswordCore
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool IsRequiredForFormCore(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides>(
__this,
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides__Impl.Vtbl.idx_IsRequiredForFormCore
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void SetFocusCore(global::System.__ComObject __this)
{
global::McgInterop.ForwardComSharedStubs.Proc_<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides>(
__this,
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides__Impl.Vtbl.idx_SetFocusCore
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// Signature, Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides.GetPeerFromPointCore, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.BlittableValueMarshaller] Windows_Foundation_Point__Windows_Foundation__Point, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.WinRTClassMarshaller] Windows_UI_Xaml_Automation_Peers_AutomationPeer__Windows_UI_Xaml_Automation_Peers__AutomationPeer *,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.Automation.Peers.AutomationPeer GetPeerFromPointCore(
global::System.__ComObject __this,
global::Windows.Foundation.Point point)
{
// Setup
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer__Impl.Vtbl** unsafe_returnValue__retval = default(global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer__Impl.Vtbl**);
global::Windows.UI.Xaml.Automation.Peers.AutomationPeer returnValue__retval = default(global::Windows.UI.Xaml.Automation.Peers.AutomationPeer);
int unsafe___return__;
try
{
// Marshalling
unsafe_returnValue__retval = null;
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides).TypeHandle,
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides__Impl.Vtbl.idx_GetPeerFromPointCore,
point,
&(unsafe_returnValue__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
returnValue__retval = (global::Windows.UI.Xaml.Automation.Peers.AutomationPeer)global::System.Runtime.InteropServices.McgModuleManager.ComInterfaceToObject(
((global::System.IntPtr)unsafe_returnValue__retval),
typeof(global::Windows.UI.Xaml.Automation.Peers.AutomationPeer).TypeHandle
);
// Return
return returnValue__retval;
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_returnValue__retval)));
}
}
// Signature, Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides.GetLiveSettingCore, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.EnumMarshaller] Windows_UI_Xaml_Automation_Peers_AutomationLiveSetting__Windows_UI_Xaml_Automation_Peers__AutomationLiveSetting,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.Automation.Peers.AutomationLiveSetting GetLiveSettingCore(global::System.__ComObject __this)
{
// Setup
global::Windows.UI.Xaml.Automation.Peers.AutomationLiveSetting unsafe_returnValue__retval;
global::Windows.UI.Xaml.Automation.Peers.AutomationLiveSetting returnValue__retval;
int unsafe___return__;
// Marshalling
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides).TypeHandle,
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides__Impl.Vtbl.idx_GetLiveSettingCore,
&(unsafe_returnValue__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
returnValue__retval = unsafe_returnValue__retval;
// Return
return returnValue__retval;
}
}
// DispatchClass for 'Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
object global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides.GetPatternCore(global::Windows.UI.Xaml.Automation.Peers.PatternInterface patternInterface)
{
object __retVal = global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides__Impl.StubClass.GetPatternCore(
this,
patternInterface
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
string global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides.GetAcceleratorKeyCore()
{
string __retVal = global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides__Impl.StubClass.GetAcceleratorKeyCore(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
string global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides.GetAccessKeyCore()
{
string __retVal = global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides__Impl.StubClass.GetAccessKeyCore(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
global::Windows.UI.Xaml.Automation.Peers.AutomationControlType global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides.GetAutomationControlTypeCore()
{
global::Windows.UI.Xaml.Automation.Peers.AutomationControlType __retVal = global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides__Impl.StubClass.GetAutomationControlTypeCore(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
string global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides.GetAutomationIdCore()
{
string __retVal = global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides__Impl.StubClass.GetAutomationIdCore(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
global::Windows.Foundation.Rect global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides.GetBoundingRectangleCore()
{
global::Windows.Foundation.Rect __retVal = global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides__Impl.StubClass.GetBoundingRectangleCore(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
global::System.Collections.Generic.IList<global::Windows.UI.Xaml.Automation.Peers.AutomationPeer> global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides.GetChildrenCore()
{
global::System.Collections.Generic.IList<global::Windows.UI.Xaml.Automation.Peers.AutomationPeer> __retVal = global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides__Impl.StubClass.GetChildrenCore(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
string global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides.GetClassNameCore()
{
string __retVal = global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides__Impl.StubClass.GetClassNameCore(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
global::Windows.Foundation.Point global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides.GetClickablePointCore()
{
global::Windows.Foundation.Point __retVal = global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides__Impl.StubClass.GetClickablePointCore(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
string global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides.GetHelpTextCore()
{
string __retVal = global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides__Impl.StubClass.GetHelpTextCore(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
string global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides.GetItemStatusCore()
{
string __retVal = global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides__Impl.StubClass.GetItemStatusCore(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
string global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides.GetItemTypeCore()
{
string __retVal = global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides__Impl.StubClass.GetItemTypeCore(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
global::Windows.UI.Xaml.Automation.Peers.AutomationPeer global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides.GetLabeledByCore()
{
global::Windows.UI.Xaml.Automation.Peers.AutomationPeer __retVal = global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides__Impl.StubClass.GetLabeledByCore(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
string global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides.GetLocalizedControlTypeCore()
{
string __retVal = global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides__Impl.StubClass.GetLocalizedControlTypeCore(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
string global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides.GetNameCore()
{
string __retVal = global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides__Impl.StubClass.GetNameCore(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
global::Windows.UI.Xaml.Automation.Peers.AutomationOrientation global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides.GetOrientationCore()
{
global::Windows.UI.Xaml.Automation.Peers.AutomationOrientation __retVal = global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides__Impl.StubClass.GetOrientationCore(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
bool global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides.HasKeyboardFocusCore()
{
bool __retVal = global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides__Impl.StubClass.HasKeyboardFocusCore(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
bool global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides.IsContentElementCore()
{
bool __retVal = global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides__Impl.StubClass.IsContentElementCore(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
bool global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides.IsControlElementCore()
{
bool __retVal = global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides__Impl.StubClass.IsControlElementCore(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
bool global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides.IsEnabledCore()
{
bool __retVal = global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides__Impl.StubClass.IsEnabledCore(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
bool global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides.IsKeyboardFocusableCore()
{
bool __retVal = global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides__Impl.StubClass.IsKeyboardFocusableCore(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
bool global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides.IsOffscreenCore()
{
bool __retVal = global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides__Impl.StubClass.IsOffscreenCore(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
bool global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides.IsPasswordCore()
{
bool __retVal = global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides__Impl.StubClass.IsPasswordCore(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
bool global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides.IsRequiredForFormCore()
{
bool __retVal = global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides__Impl.StubClass.IsRequiredForFormCore(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides.SetFocusCore()
{
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides__Impl.StubClass.SetFocusCore(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
global::Windows.UI.Xaml.Automation.Peers.AutomationPeer global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides.GetPeerFromPointCore(global::Windows.Foundation.Point point)
{
global::Windows.UI.Xaml.Automation.Peers.AutomationPeer __retVal = global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides__Impl.StubClass.GetPeerFromPointCore(
this,
point
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
global::Windows.UI.Xaml.Automation.Peers.AutomationLiveSetting global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides.GetLiveSettingCore()
{
global::Windows.UI.Xaml.Automation.Peers.AutomationLiveSetting __retVal = global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides__Impl.StubClass.GetLiveSettingCore(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides))]
public unsafe partial struct Vtbl
{
internal const int idx_GetPatternCore = 6;
internal const int idx_GetAcceleratorKeyCore = 7;
internal const int idx_GetAccessKeyCore = 8;
internal const int idx_GetAutomationControlTypeCore = 9;
internal const int idx_GetAutomationIdCore = 10;
internal const int idx_GetBoundingRectangleCore = 11;
internal const int idx_GetChildrenCore = 12;
internal const int idx_GetClassNameCore = 13;
internal const int idx_GetClickablePointCore = 14;
internal const int idx_GetHelpTextCore = 15;
internal const int idx_GetItemStatusCore = 16;
internal const int idx_GetItemTypeCore = 17;
internal const int idx_GetLabeledByCore = 18;
internal const int idx_GetLocalizedControlTypeCore = 19;
internal const int idx_GetNameCore = 20;
internal const int idx_GetOrientationCore = 21;
internal const int idx_HasKeyboardFocusCore = 22;
internal const int idx_IsContentElementCore = 23;
internal const int idx_IsControlElementCore = 24;
internal const int idx_IsEnabledCore = 25;
internal const int idx_IsKeyboardFocusableCore = 26;
internal const int idx_IsOffscreenCore = 27;
internal const int idx_IsPasswordCore = 28;
internal const int idx_IsRequiredForFormCore = 29;
internal const int idx_SetFocusCore = 30;
internal const int idx_GetPeerFromPointCore = 31;
internal const int idx_GetLiveSettingCore = 32;
}
}
// Windows.UI.Xaml.Automation.Peers.IAutomationPeerProtected
public unsafe static class IAutomationPeerProtected__Impl
{
// StubClass for 'Windows.UI.Xaml.Automation.Peers.IAutomationPeerProtected'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.Automation.Peers.AutomationPeer PeerFromProvider(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Automation.Provider.IRawElementProviderSimple provider)
{
global::Windows.UI.Xaml.Automation.Peers.AutomationPeer __ret = global::McgInterop.ForwardComSharedStubs.Func_TArg0__TResult__<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerProtected, global::Windows.UI.Xaml.Automation.Provider.IRawElementProviderSimple, global::Windows.UI.Xaml.Automation.Peers.AutomationPeer>(
__this,
provider,
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerProtected__Impl.Vtbl.idx_PeerFromProvider
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.Automation.Provider.IRawElementProviderSimple ProviderFromPeer(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Automation.Peers.AutomationPeer peer)
{
global::Windows.UI.Xaml.Automation.Provider.IRawElementProviderSimple __ret = global::McgInterop.ForwardComSharedStubs.Func_TArg0__TResult__<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerProtected, global::Windows.UI.Xaml.Automation.Peers.AutomationPeer, global::Windows.UI.Xaml.Automation.Provider.IRawElementProviderSimple>(
__this,
peer,
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerProtected__Impl.Vtbl.idx_ProviderFromPeer
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
}
// DispatchClass for 'Windows.UI.Xaml.Automation.Peers.IAutomationPeerProtected'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerProtected))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerProtected
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
global::Windows.UI.Xaml.Automation.Peers.AutomationPeer global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerProtected.PeerFromProvider(global::Windows.UI.Xaml.Automation.Provider.IRawElementProviderSimple provider)
{
global::Windows.UI.Xaml.Automation.Peers.AutomationPeer __retVal = global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerProtected__Impl.StubClass.PeerFromProvider(
this,
provider
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
global::Windows.UI.Xaml.Automation.Provider.IRawElementProviderSimple global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerProtected.ProviderFromPeer(global::Windows.UI.Xaml.Automation.Peers.AutomationPeer peer)
{
global::Windows.UI.Xaml.Automation.Provider.IRawElementProviderSimple __retVal = global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerProtected__Impl.StubClass.ProviderFromPeer(
this,
peer
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.UI.Xaml.Automation.Peers.IAutomationPeerProtected'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerProtected))]
public unsafe partial struct Vtbl
{
internal const int idx_PeerFromProvider = 6;
internal const int idx_ProviderFromPeer = 7;
}
}
// Windows.UI.Xaml.Automation.Peers.IAutomationPeer2
public unsafe static class IAutomationPeer2__Impl
{
// v-table for 'Windows.UI.Xaml.Automation.Peers.IAutomationPeer2'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer2))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides2
public unsafe static class IAutomationPeerOverrides2__Impl
{
// StubClass for 'Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides2'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void ShowContextMenuCore(global::System.__ComObject __this)
{
global::McgInterop.ForwardComSharedStubs.Proc_<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides2>(
__this,
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides2__Impl.Vtbl.idx_ShowContextMenuCore
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Automation.Peers.AutomationPeer> GetControlledPeersCore(global::System.__ComObject __this)
{
global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Automation.Peers.AutomationPeer> __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides2, global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Automation.Peers.AutomationPeer>>(
__this,
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides2__Impl.Vtbl.idx_GetControlledPeersCore
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
}
// DispatchClass for 'Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides2'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides2))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides2
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides2.ShowContextMenuCore()
{
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides2__Impl.StubClass.ShowContextMenuCore(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Automation.Peers.AutomationPeer> global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides2.GetControlledPeersCore()
{
global::System.Collections.Generic.IReadOnlyList<global::Windows.UI.Xaml.Automation.Peers.AutomationPeer> __retVal = global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides2__Impl.StubClass.GetControlledPeersCore(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides2'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides2))]
public unsafe partial struct Vtbl
{
internal const int idx_ShowContextMenuCore = 6;
internal const int idx_GetControlledPeersCore = 7;
}
}
// Windows.UI.Xaml.Automation.Peers.IAutomationPeer3
public unsafe static class IAutomationPeer3__Impl
{
// v-table for 'Windows.UI.Xaml.Automation.Peers.IAutomationPeer3'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer3))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3
public unsafe static class IAutomationPeerOverrides3__Impl
{
// StubClass for 'Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static object NavigateCore(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Automation.Peers.AutomationNavigationDirection direction)
{
object __ret = global::McgInterop.ForwardComSharedStubs.Func_intobject__<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3>(
__this,
((int)direction),
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3__Impl.Vtbl.idx_NavigateCore
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
// Signature, Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3.GetElementFromPointCore, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.BlittableValueMarshaller] Windows_Foundation_Point__Windows_Foundation__Point, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.WinRTInspectableMarshaller] object____mcg_IInspectable,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static object GetElementFromPointCore(
global::System.__ComObject __this,
global::Windows.Foundation.Point pointInWindowCoordinates)
{
// Setup
global::System.Runtime.InteropServices.__vtable_IInspectable* unsafe_returnValue__retval = default(global::System.Runtime.InteropServices.__vtable_IInspectable*);
object returnValue__retval = default(object);
int unsafe___return__;
try
{
// Marshalling
unsafe_returnValue__retval = null;
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3).TypeHandle,
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3__Impl.Vtbl.idx_GetElementFromPointCore,
pointInWindowCoordinates,
&(unsafe_returnValue__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
returnValue__retval = global::System.Runtime.InteropServices.McgMarshal.IInspectableToObject(((global::System.IntPtr)unsafe_returnValue__retval));
// Return
return returnValue__retval;
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_returnValue__retval)));
}
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static object GetFocusedElementCore(global::System.__ComObject __this)
{
object __ret = global::McgInterop.ForwardComSharedStubs.Func_object__<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3>(
__this,
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3__Impl.Vtbl.idx_GetFocusedElementCore
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Collections.Generic.IList<global::Windows.UI.Xaml.Automation.Peers.AutomationPeerAnnotation> GetAnnotationsCore(global::System.__ComObject __this)
{
global::System.Collections.Generic.IList<global::Windows.UI.Xaml.Automation.Peers.AutomationPeerAnnotation> __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3, global::System.Collections.Generic.IList<global::Windows.UI.Xaml.Automation.Peers.AutomationPeerAnnotation>>(
__this,
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3__Impl.Vtbl.idx_GetAnnotationsCore
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static int GetPositionInSetCore(global::System.__ComObject __this)
{
int __ret = global::McgInterop.ForwardComSharedStubs.Func_int__<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3>(
__this,
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3__Impl.Vtbl.idx_GetPositionInSetCore
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static int GetSizeOfSetCore(global::System.__ComObject __this)
{
int __ret = global::McgInterop.ForwardComSharedStubs.Func_int__<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3>(
__this,
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3__Impl.Vtbl.idx_GetSizeOfSetCore
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static int GetLevelCore(global::System.__ComObject __this)
{
int __ret = global::McgInterop.ForwardComSharedStubs.Func_int__<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3>(
__this,
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3__Impl.Vtbl.idx_GetLevelCore
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
}
// DispatchClass for 'Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
object global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3.NavigateCore(global::Windows.UI.Xaml.Automation.Peers.AutomationNavigationDirection direction)
{
object __retVal = global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3__Impl.StubClass.NavigateCore(
this,
direction
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
object global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3.GetElementFromPointCore(global::Windows.Foundation.Point pointInWindowCoordinates)
{
object __retVal = global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3__Impl.StubClass.GetElementFromPointCore(
this,
pointInWindowCoordinates
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
object global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3.GetFocusedElementCore()
{
object __retVal = global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3__Impl.StubClass.GetFocusedElementCore(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
global::System.Collections.Generic.IList<global::Windows.UI.Xaml.Automation.Peers.AutomationPeerAnnotation> global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3.GetAnnotationsCore()
{
global::System.Collections.Generic.IList<global::Windows.UI.Xaml.Automation.Peers.AutomationPeerAnnotation> __retVal = global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3__Impl.StubClass.GetAnnotationsCore(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
int global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3.GetPositionInSetCore()
{
int __retVal = global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3__Impl.StubClass.GetPositionInSetCore(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
int global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3.GetSizeOfSetCore()
{
int __retVal = global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3__Impl.StubClass.GetSizeOfSetCore(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
int global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3.GetLevelCore()
{
int __retVal = global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3__Impl.StubClass.GetLevelCore(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides3))]
public unsafe partial struct Vtbl
{
internal const int idx_NavigateCore = 6;
internal const int idx_GetElementFromPointCore = 7;
internal const int idx_GetFocusedElementCore = 8;
internal const int idx_GetAnnotationsCore = 9;
internal const int idx_GetPositionInSetCore = 10;
internal const int idx_GetSizeOfSetCore = 11;
internal const int idx_GetLevelCore = 12;
}
}
// Windows.UI.Xaml.Automation.Peers.IAutomationPeerAnnotation
public unsafe static class IAutomationPeerAnnotation__Impl
{
// v-table for 'Windows.UI.Xaml.Automation.Peers.IAutomationPeerAnnotation'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerAnnotation))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Xaml.Automation.Peers.IAutomationPeer4
public unsafe static class IAutomationPeer4__Impl
{
// v-table for 'Windows.UI.Xaml.Automation.Peers.IAutomationPeer4'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer4))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides4
public unsafe static class IAutomationPeerOverrides4__Impl
{
// StubClass for 'Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides4'
public static partial class StubClass
{
// Signature, Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides4.GetLandmarkTypeCore, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.EnumMarshaller] Windows_UI_Xaml_Automation_Peers_AutomationLandmarkType__Windows_UI_Xaml_Automation_Peers__AutomationLandmarkType,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.Automation.Peers.AutomationLandmarkType GetLandmarkTypeCore(global::System.__ComObject __this)
{
// Setup
global::Windows.UI.Xaml.Automation.Peers.AutomationLandmarkType unsafe_returnValue__retval;
global::Windows.UI.Xaml.Automation.Peers.AutomationLandmarkType returnValue__retval;
int unsafe___return__;
// Marshalling
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides4).TypeHandle,
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides4__Impl.Vtbl.idx_GetLandmarkTypeCore,
&(unsafe_returnValue__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
returnValue__retval = unsafe_returnValue__retval;
// Return
return returnValue__retval;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static string GetLocalizedLandmarkTypeCore(global::System.__ComObject __this)
{
string __ret = global::McgInterop.ForwardComSharedStubs.Func_string__<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides4>(
__this,
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides4__Impl.Vtbl.idx_GetLocalizedLandmarkTypeCore
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
}
// DispatchClass for 'Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides4'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides4))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides4
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
global::Windows.UI.Xaml.Automation.Peers.AutomationLandmarkType global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides4.GetLandmarkTypeCore()
{
global::Windows.UI.Xaml.Automation.Peers.AutomationLandmarkType __retVal = global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides4__Impl.StubClass.GetLandmarkTypeCore(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
string global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides4.GetLocalizedLandmarkTypeCore()
{
string __retVal = global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides4__Impl.StubClass.GetLocalizedLandmarkTypeCore(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides4'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides4))]
public unsafe partial struct Vtbl
{
internal const int idx_GetLandmarkTypeCore = 6;
internal const int idx_GetLocalizedLandmarkTypeCore = 7;
}
}
// Windows.UI.Xaml.Automation.Peers.IAutomationPeer5
public unsafe static class IAutomationPeer5__Impl
{
// v-table for 'Windows.UI.Xaml.Automation.Peers.IAutomationPeer5'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Automation.Peers.IAutomationPeer5))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5
public unsafe static class IAutomationPeerOverrides5__Impl
{
// StubClass for 'Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool IsPeripheralCore(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5>(
__this,
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5__Impl.Vtbl.idx_IsPeripheralCore
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool IsDataValidForFormCore(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5>(
__this,
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5__Impl.Vtbl.idx_IsDataValidForFormCore
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static string GetFullDescriptionCore(global::System.__ComObject __this)
{
string __ret = global::McgInterop.ForwardComSharedStubs.Func_string__<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5>(
__this,
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5__Impl.Vtbl.idx_GetFullDescriptionCore
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.AutomationPeer> GetDescribedByCore(global::System.__ComObject __this)
{
global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.AutomationPeer> __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5, global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.AutomationPeer>>(
__this,
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5__Impl.Vtbl.idx_GetDescribedByCore
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.AutomationPeer> GetFlowsToCore(global::System.__ComObject __this)
{
global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.AutomationPeer> __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5, global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.AutomationPeer>>(
__this,
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5__Impl.Vtbl.idx_GetFlowsToCore
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.AutomationPeer> GetFlowsFromCore(global::System.__ComObject __this)
{
global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.AutomationPeer> __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5, global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.AutomationPeer>>(
__this,
global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5__Impl.Vtbl.idx_GetFlowsFromCore
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
}
// DispatchClass for 'Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
bool global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5.IsPeripheralCore()
{
bool __retVal = global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5__Impl.StubClass.IsPeripheralCore(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
bool global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5.IsDataValidForFormCore()
{
bool __retVal = global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5__Impl.StubClass.IsDataValidForFormCore(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
string global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5.GetFullDescriptionCore()
{
string __retVal = global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5__Impl.StubClass.GetFullDescriptionCore(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.AutomationPeer> global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5.GetDescribedByCore()
{
global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.AutomationPeer> __retVal = global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5__Impl.StubClass.GetDescribedByCore(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.AutomationPeer> global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5.GetFlowsToCore()
{
global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.AutomationPeer> __retVal = global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5__Impl.StubClass.GetFlowsToCore(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.AutomationPeer> global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5.GetFlowsFromCore()
{
global::System.Collections.Generic.IEnumerable<global::Windows.UI.Xaml.Automation.Peers.AutomationPeer> __retVal = global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5__Impl.StubClass.GetFlowsFromCore(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Automation.Peers.IAutomationPeerOverrides5))]
public unsafe partial struct Vtbl
{
internal const int idx_IsPeripheralCore = 6;
internal const int idx_IsDataValidForFormCore = 7;
internal const int idx_GetFullDescriptionCore = 8;
internal const int idx_GetDescribedByCore = 9;
internal const int idx_GetFlowsToCore = 10;
internal const int idx_GetFlowsFromCore = 11;
}
}
}
namespace Windows.UI.Xaml.Automation.Provider
{
// Windows.UI.Xaml.Automation.Provider.IIRawElementProviderSimple
public unsafe static class IIRawElementProviderSimple__Impl
{
// v-table for 'Windows.UI.Xaml.Automation.Provider.IIRawElementProviderSimple'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Automation.Provider.IIRawElementProviderSimple))]
public unsafe partial struct Vtbl
{
}
}
}
namespace Windows.UI.Xaml.Controls
{
// Windows.UI.Xaml.Controls.IControl
public unsafe static class IControl__Impl
{
// StubClass for 'Windows.UI.Xaml.Controls.IControl'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static double get_FontSize(global::System.__ComObject __this)
{
double __ret = global::McgInterop.ForwardComSharedStubs.Func_double__<global::Windows.UI.Xaml.Controls.IControl>(
__this,
global::Windows.UI.Xaml.Controls.IControl__Impl.Vtbl.idx_get_FontSize
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void put_FontSize(
global::System.__ComObject __this,
double value)
{
global::McgInterop.ForwardComSharedStubs.Proc_double__<global::Windows.UI.Xaml.Controls.IControl>(
__this,
value,
global::Windows.UI.Xaml.Controls.IControl__Impl.Vtbl.idx_put_FontSize
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.Media.FontFamily get_FontFamily(global::System.__ComObject __this)
{
global::Windows.UI.Xaml.Media.FontFamily __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.UI.Xaml.Controls.IControl, global::Windows.UI.Xaml.Media.FontFamily>(
__this,
global::Windows.UI.Xaml.Controls.IControl__Impl.Vtbl.idx_get_FontFamily
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void put_FontFamily(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Media.FontFamily value)
{
global::McgInterop.ForwardComSharedStubs.Proc_TArg0__<global::Windows.UI.Xaml.Controls.IControl, global::Windows.UI.Xaml.Media.FontFamily>(
__this,
value,
global::Windows.UI.Xaml.Controls.IControl__Impl.Vtbl.idx_put_FontFamily
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.Thickness get_Padding(global::System.__ComObject __this)
{
global::Windows.UI.Xaml.Thickness __ret = global::McgInterop.ForwardComSharedStubs.Func_UI_Xaml_Thickness__<global::Windows.UI.Xaml.Controls.IControl>(
__this,
global::Windows.UI.Xaml.Controls.IControl__Impl.Vtbl.idx_get_Padding
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void put_Padding(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Thickness value)
{
global::McgInterop.ForwardComSharedStubs.Proc_UI_Xaml_Thickness__<global::Windows.UI.Xaml.Controls.IControl>(
__this,
value,
global::Windows.UI.Xaml.Controls.IControl__Impl.Vtbl.idx_put_Padding
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.Media.Brush get_Background(global::System.__ComObject __this)
{
global::Windows.UI.Xaml.Media.Brush __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.UI.Xaml.Controls.IControl, global::Windows.UI.Xaml.Media.Brush>(
__this,
global::Windows.UI.Xaml.Controls.IControl__Impl.Vtbl.idx_get_Background
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void put_Background(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Media.Brush value)
{
global::McgInterop.ForwardComSharedStubs.Proc_TArg0__<global::Windows.UI.Xaml.Controls.IControl, global::Windows.UI.Xaml.Media.Brush>(
__this,
value,
global::Windows.UI.Xaml.Controls.IControl__Impl.Vtbl.idx_put_Background
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.Thickness get_BorderThickness(global::System.__ComObject __this)
{
global::Windows.UI.Xaml.Thickness __ret = global::McgInterop.ForwardComSharedStubs.Func_UI_Xaml_Thickness__<global::Windows.UI.Xaml.Controls.IControl>(
__this,
global::Windows.UI.Xaml.Controls.IControl__Impl.Vtbl.idx_get_BorderThickness
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void put_BorderThickness(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Thickness value)
{
global::McgInterop.ForwardComSharedStubs.Proc_UI_Xaml_Thickness__<global::Windows.UI.Xaml.Controls.IControl>(
__this,
value,
global::Windows.UI.Xaml.Controls.IControl__Impl.Vtbl.idx_put_BorderThickness
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.Media.Brush get_BorderBrush(global::System.__ComObject __this)
{
global::Windows.UI.Xaml.Media.Brush __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.UI.Xaml.Controls.IControl, global::Windows.UI.Xaml.Media.Brush>(
__this,
global::Windows.UI.Xaml.Controls.IControl__Impl.Vtbl.idx_get_BorderBrush
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void put_BorderBrush(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Media.Brush value)
{
global::McgInterop.ForwardComSharedStubs.Proc_TArg0__<global::Windows.UI.Xaml.Controls.IControl, global::Windows.UI.Xaml.Media.Brush>(
__this,
value,
global::Windows.UI.Xaml.Controls.IControl__Impl.Vtbl.idx_put_BorderBrush
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// Signature, Windows.UI.Xaml.Controls.IControl.add_IsEnabledChanged, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.WinRTDelegateMarshaller] Windows_UI_Xaml_DependencyPropertyChangedEventHandler__Windows_UI_Xaml__DependencyPropertyChangedEventHandler *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] System_Runtime_InteropServices_WindowsRuntime_EventRegistrationToken__Windows_Foundation__EventRegistrationToken,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken add_IsEnabledChanged(
global::System.__ComObject __this,
global::Windows.UI.Xaml.DependencyPropertyChangedEventHandler value)
{
// Setup
global::Windows.UI.Xaml.DependencyPropertyChangedEventHandler__Impl.Vtbl** unsafe_value = default(global::Windows.UI.Xaml.DependencyPropertyChangedEventHandler__Impl.Vtbl**);
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken unsafe_token__retval;
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token__retval;
int unsafe___return__;
try
{
// Marshalling
unsafe_value = (global::Windows.UI.Xaml.DependencyPropertyChangedEventHandler__Impl.Vtbl**)global::System.Runtime.InteropServices.McgModuleManager.DelegateToComInterface(
value,
typeof(global::Windows.UI.Xaml.DependencyPropertyChangedEventHandler).TypeHandle,
global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget70>(global::Windows.UI.Xaml.DependencyPropertyChangedEventHandler__Impl.Invoke)
);
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.UI.Xaml.Controls.IControl).TypeHandle,
global::Windows.UI.Xaml.Controls.IControl__Impl.Vtbl.idx_add_IsEnabledChanged,
unsafe_value,
&(unsafe_token__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
token__retval = unsafe_token__retval;
// Return
return token__retval;
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_value)));
}
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void remove_IsEnabledChanged(
global::System.__ComObject __this,
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::McgInterop.ForwardComSharedStubs.Proc__WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.Controls.IControl>(
__this,
token,
global::Windows.UI.Xaml.Controls.IControl__Impl.Vtbl.idx_remove_IsEnabledChanged
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// DispatchClass for 'Windows.UI.Xaml.Controls.IControl'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.IControl))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.UI.Xaml.Controls.IControl
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.UI.Xaml.Controls.IControl.FontSize")]
double global::Windows.UI.Xaml.Controls.IControl.get_FontSize()
{
double __retVal = global::Windows.UI.Xaml.Controls.IControl__Impl.StubClass.get_FontSize(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertySet, "Windows.UI.Xaml.Controls.IControl.FontSize")]
void global::Windows.UI.Xaml.Controls.IControl.put_FontSize(double value)
{
global::Windows.UI.Xaml.Controls.IControl__Impl.StubClass.put_FontSize(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.UI.Xaml.Controls.IControl.FontFamily")]
global::Windows.UI.Xaml.Media.FontFamily global::Windows.UI.Xaml.Controls.IControl.get_FontFamily()
{
global::Windows.UI.Xaml.Media.FontFamily __retVal = global::Windows.UI.Xaml.Controls.IControl__Impl.StubClass.get_FontFamily(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertySet, "Windows.UI.Xaml.Controls.IControl.FontFamily")]
void global::Windows.UI.Xaml.Controls.IControl.put_FontFamily(global::Windows.UI.Xaml.Media.FontFamily value)
{
global::Windows.UI.Xaml.Controls.IControl__Impl.StubClass.put_FontFamily(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.UI.Xaml.Controls.IControl.Padding")]
global::Windows.UI.Xaml.Thickness global::Windows.UI.Xaml.Controls.IControl.get_Padding()
{
global::Windows.UI.Xaml.Thickness __retVal = global::Windows.UI.Xaml.Controls.IControl__Impl.StubClass.get_Padding(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertySet, "Windows.UI.Xaml.Controls.IControl.Padding")]
void global::Windows.UI.Xaml.Controls.IControl.put_Padding(global::Windows.UI.Xaml.Thickness value)
{
global::Windows.UI.Xaml.Controls.IControl__Impl.StubClass.put_Padding(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.UI.Xaml.Controls.IControl.Background")]
global::Windows.UI.Xaml.Media.Brush global::Windows.UI.Xaml.Controls.IControl.get_Background()
{
global::Windows.UI.Xaml.Media.Brush __retVal = global::Windows.UI.Xaml.Controls.IControl__Impl.StubClass.get_Background(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertySet, "Windows.UI.Xaml.Controls.IControl.Background")]
void global::Windows.UI.Xaml.Controls.IControl.put_Background(global::Windows.UI.Xaml.Media.Brush value)
{
global::Windows.UI.Xaml.Controls.IControl__Impl.StubClass.put_Background(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.UI.Xaml.Controls.IControl.BorderThickness")]
global::Windows.UI.Xaml.Thickness global::Windows.UI.Xaml.Controls.IControl.get_BorderThickness()
{
global::Windows.UI.Xaml.Thickness __retVal = global::Windows.UI.Xaml.Controls.IControl__Impl.StubClass.get_BorderThickness(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertySet, "Windows.UI.Xaml.Controls.IControl.BorderThickness")]
void global::Windows.UI.Xaml.Controls.IControl.put_BorderThickness(global::Windows.UI.Xaml.Thickness value)
{
global::Windows.UI.Xaml.Controls.IControl__Impl.StubClass.put_BorderThickness(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.UI.Xaml.Controls.IControl.BorderBrush")]
global::Windows.UI.Xaml.Media.Brush global::Windows.UI.Xaml.Controls.IControl.get_BorderBrush()
{
global::Windows.UI.Xaml.Media.Brush __retVal = global::Windows.UI.Xaml.Controls.IControl__Impl.StubClass.get_BorderBrush(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertySet, "Windows.UI.Xaml.Controls.IControl.BorderBrush")]
void global::Windows.UI.Xaml.Controls.IControl.put_BorderBrush(global::Windows.UI.Xaml.Media.Brush value)
{
global::Windows.UI.Xaml.Controls.IControl__Impl.StubClass.put_BorderBrush(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventAdd, "Windows.UI.Xaml.Controls.IControl.IsEnabledChanged")]
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken global::Windows.UI.Xaml.Controls.IControl.add_IsEnabledChanged(global::Windows.UI.Xaml.DependencyPropertyChangedEventHandler value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __retVal = global::Windows.UI.Xaml.Controls.IControl__Impl.StubClass.add_IsEnabledChanged(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventRemove, "Windows.UI.Xaml.Controls.IControl.IsEnabledChanged")]
void global::Windows.UI.Xaml.Controls.IControl.remove_IsEnabledChanged(global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::Windows.UI.Xaml.Controls.IControl__Impl.StubClass.remove_IsEnabledChanged(
this,
token
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// v-table for 'Windows.UI.Xaml.Controls.IControl'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.IControl))]
public unsafe partial struct Vtbl
{
internal const int idx_get_FontSize = 6;
internal const int idx_put_FontSize = 7;
internal const int idx_get_FontFamily = 8;
internal const int idx_put_FontFamily = 9;
internal const int idx_get_Padding = 30;
internal const int idx_put_Padding = 31;
internal const int idx_get_Background = 36;
internal const int idx_put_Background = 37;
internal const int idx_get_BorderThickness = 38;
internal const int idx_put_BorderThickness = 39;
internal const int idx_get_BorderBrush = 40;
internal const int idx_put_BorderBrush = 41;
internal const int idx_add_IsEnabledChanged = 43;
internal const int idx_remove_IsEnabledChanged = 44;
}
}
// Windows.UI.Xaml.Controls.IControlOverrides
public unsafe static class IControlOverrides__Impl
{
// StubClass for 'Windows.UI.Xaml.Controls.IControlOverrides'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void OnPointerEntered(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Input.PointerRoutedEventArgs e)
{
global::McgInterop.ForwardComSharedStubs.Proc_TArg0__<global::Windows.UI.Xaml.Controls.IControlOverrides, global::Windows.UI.Xaml.Input.PointerRoutedEventArgs>(
__this,
e,
global::Windows.UI.Xaml.Controls.IControlOverrides__Impl.Vtbl.idx_OnPointerEntered
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void OnPointerPressed(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Input.PointerRoutedEventArgs e)
{
global::McgInterop.ForwardComSharedStubs.Proc_TArg0__<global::Windows.UI.Xaml.Controls.IControlOverrides, global::Windows.UI.Xaml.Input.PointerRoutedEventArgs>(
__this,
e,
global::Windows.UI.Xaml.Controls.IControlOverrides__Impl.Vtbl.idx_OnPointerPressed
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void OnPointerMoved(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Input.PointerRoutedEventArgs e)
{
global::McgInterop.ForwardComSharedStubs.Proc_TArg0__<global::Windows.UI.Xaml.Controls.IControlOverrides, global::Windows.UI.Xaml.Input.PointerRoutedEventArgs>(
__this,
e,
global::Windows.UI.Xaml.Controls.IControlOverrides__Impl.Vtbl.idx_OnPointerMoved
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void OnPointerReleased(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Input.PointerRoutedEventArgs e)
{
global::McgInterop.ForwardComSharedStubs.Proc_TArg0__<global::Windows.UI.Xaml.Controls.IControlOverrides, global::Windows.UI.Xaml.Input.PointerRoutedEventArgs>(
__this,
e,
global::Windows.UI.Xaml.Controls.IControlOverrides__Impl.Vtbl.idx_OnPointerReleased
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void OnPointerExited(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Input.PointerRoutedEventArgs e)
{
global::McgInterop.ForwardComSharedStubs.Proc_TArg0__<global::Windows.UI.Xaml.Controls.IControlOverrides, global::Windows.UI.Xaml.Input.PointerRoutedEventArgs>(
__this,
e,
global::Windows.UI.Xaml.Controls.IControlOverrides__Impl.Vtbl.idx_OnPointerExited
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void OnPointerCaptureLost(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Input.PointerRoutedEventArgs e)
{
global::McgInterop.ForwardComSharedStubs.Proc_TArg0__<global::Windows.UI.Xaml.Controls.IControlOverrides, global::Windows.UI.Xaml.Input.PointerRoutedEventArgs>(
__this,
e,
global::Windows.UI.Xaml.Controls.IControlOverrides__Impl.Vtbl.idx_OnPointerCaptureLost
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void OnPointerCanceled(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Input.PointerRoutedEventArgs e)
{
global::McgInterop.ForwardComSharedStubs.Proc_TArg0__<global::Windows.UI.Xaml.Controls.IControlOverrides, global::Windows.UI.Xaml.Input.PointerRoutedEventArgs>(
__this,
e,
global::Windows.UI.Xaml.Controls.IControlOverrides__Impl.Vtbl.idx_OnPointerCanceled
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void OnPointerWheelChanged(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Input.PointerRoutedEventArgs e)
{
global::McgInterop.ForwardComSharedStubs.Proc_TArg0__<global::Windows.UI.Xaml.Controls.IControlOverrides, global::Windows.UI.Xaml.Input.PointerRoutedEventArgs>(
__this,
e,
global::Windows.UI.Xaml.Controls.IControlOverrides__Impl.Vtbl.idx_OnPointerWheelChanged
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void OnTapped(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Input.TappedRoutedEventArgs e)
{
global::McgInterop.ForwardComSharedStubs.Proc_TArg0__<global::Windows.UI.Xaml.Controls.IControlOverrides, global::Windows.UI.Xaml.Input.TappedRoutedEventArgs>(
__this,
e,
global::Windows.UI.Xaml.Controls.IControlOverrides__Impl.Vtbl.idx_OnTapped
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void OnDoubleTapped(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Input.DoubleTappedRoutedEventArgs e)
{
global::McgInterop.ForwardComSharedStubs.Proc_TArg0__<global::Windows.UI.Xaml.Controls.IControlOverrides, global::Windows.UI.Xaml.Input.DoubleTappedRoutedEventArgs>(
__this,
e,
global::Windows.UI.Xaml.Controls.IControlOverrides__Impl.Vtbl.idx_OnDoubleTapped
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void OnHolding(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Input.HoldingRoutedEventArgs e)
{
global::McgInterop.ForwardComSharedStubs.Proc_TArg0__<global::Windows.UI.Xaml.Controls.IControlOverrides, global::Windows.UI.Xaml.Input.HoldingRoutedEventArgs>(
__this,
e,
global::Windows.UI.Xaml.Controls.IControlOverrides__Impl.Vtbl.idx_OnHolding
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void OnRightTapped(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Input.RightTappedRoutedEventArgs e)
{
global::McgInterop.ForwardComSharedStubs.Proc_TArg0__<global::Windows.UI.Xaml.Controls.IControlOverrides, global::Windows.UI.Xaml.Input.RightTappedRoutedEventArgs>(
__this,
e,
global::Windows.UI.Xaml.Controls.IControlOverrides__Impl.Vtbl.idx_OnRightTapped
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void OnManipulationStarting(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Input.ManipulationStartingRoutedEventArgs e)
{
global::McgInterop.ForwardComSharedStubs.Proc_TArg0__<global::Windows.UI.Xaml.Controls.IControlOverrides, global::Windows.UI.Xaml.Input.ManipulationStartingRoutedEventArgs>(
__this,
e,
global::Windows.UI.Xaml.Controls.IControlOverrides__Impl.Vtbl.idx_OnManipulationStarting
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void OnManipulationInertiaStarting(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Input.ManipulationInertiaStartingRoutedEventArgs e)
{
global::McgInterop.ForwardComSharedStubs.Proc_TArg0__<global::Windows.UI.Xaml.Controls.IControlOverrides, global::Windows.UI.Xaml.Input.ManipulationInertiaStartingRoutedEventArgs>(
__this,
e,
global::Windows.UI.Xaml.Controls.IControlOverrides__Impl.Vtbl.idx_OnManipulationInertiaStarting
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void OnManipulationStarted(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Input.ManipulationStartedRoutedEventArgs e)
{
global::McgInterop.ForwardComSharedStubs.Proc_TArg0__<global::Windows.UI.Xaml.Controls.IControlOverrides, global::Windows.UI.Xaml.Input.ManipulationStartedRoutedEventArgs>(
__this,
e,
global::Windows.UI.Xaml.Controls.IControlOverrides__Impl.Vtbl.idx_OnManipulationStarted
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void OnManipulationDelta(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Input.ManipulationDeltaRoutedEventArgs e)
{
global::McgInterop.ForwardComSharedStubs.Proc_TArg0__<global::Windows.UI.Xaml.Controls.IControlOverrides, global::Windows.UI.Xaml.Input.ManipulationDeltaRoutedEventArgs>(
__this,
e,
global::Windows.UI.Xaml.Controls.IControlOverrides__Impl.Vtbl.idx_OnManipulationDelta
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void OnManipulationCompleted(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Input.ManipulationCompletedRoutedEventArgs e)
{
global::McgInterop.ForwardComSharedStubs.Proc_TArg0__<global::Windows.UI.Xaml.Controls.IControlOverrides, global::Windows.UI.Xaml.Input.ManipulationCompletedRoutedEventArgs>(
__this,
e,
global::Windows.UI.Xaml.Controls.IControlOverrides__Impl.Vtbl.idx_OnManipulationCompleted
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void OnKeyUp(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Input.KeyRoutedEventArgs e)
{
global::McgInterop.ForwardComSharedStubs.Proc_TArg0__<global::Windows.UI.Xaml.Controls.IControlOverrides, global::Windows.UI.Xaml.Input.KeyRoutedEventArgs>(
__this,
e,
global::Windows.UI.Xaml.Controls.IControlOverrides__Impl.Vtbl.idx_OnKeyUp
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void OnKeyDown(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Input.KeyRoutedEventArgs e)
{
global::McgInterop.ForwardComSharedStubs.Proc_TArg0__<global::Windows.UI.Xaml.Controls.IControlOverrides, global::Windows.UI.Xaml.Input.KeyRoutedEventArgs>(
__this,
e,
global::Windows.UI.Xaml.Controls.IControlOverrides__Impl.Vtbl.idx_OnKeyDown
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void OnGotFocus(
global::System.__ComObject __this,
global::Windows.UI.Xaml.RoutedEventArgs e)
{
global::McgInterop.ForwardComSharedStubs.Proc_TArg0__<global::Windows.UI.Xaml.Controls.IControlOverrides, global::Windows.UI.Xaml.RoutedEventArgs>(
__this,
e,
global::Windows.UI.Xaml.Controls.IControlOverrides__Impl.Vtbl.idx_OnGotFocus
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void OnLostFocus(
global::System.__ComObject __this,
global::Windows.UI.Xaml.RoutedEventArgs e)
{
global::McgInterop.ForwardComSharedStubs.Proc_TArg0__<global::Windows.UI.Xaml.Controls.IControlOverrides, global::Windows.UI.Xaml.RoutedEventArgs>(
__this,
e,
global::Windows.UI.Xaml.Controls.IControlOverrides__Impl.Vtbl.idx_OnLostFocus
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void OnDragEnter(
global::System.__ComObject __this,
global::Windows.UI.Xaml.DragEventArgs e)
{
global::McgInterop.ForwardComSharedStubs.Proc_TArg0__<global::Windows.UI.Xaml.Controls.IControlOverrides, global::Windows.UI.Xaml.DragEventArgs>(
__this,
e,
global::Windows.UI.Xaml.Controls.IControlOverrides__Impl.Vtbl.idx_OnDragEnter
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void OnDragLeave(
global::System.__ComObject __this,
global::Windows.UI.Xaml.DragEventArgs e)
{
global::McgInterop.ForwardComSharedStubs.Proc_TArg0__<global::Windows.UI.Xaml.Controls.IControlOverrides, global::Windows.UI.Xaml.DragEventArgs>(
__this,
e,
global::Windows.UI.Xaml.Controls.IControlOverrides__Impl.Vtbl.idx_OnDragLeave
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void OnDragOver(
global::System.__ComObject __this,
global::Windows.UI.Xaml.DragEventArgs e)
{
global::McgInterop.ForwardComSharedStubs.Proc_TArg0__<global::Windows.UI.Xaml.Controls.IControlOverrides, global::Windows.UI.Xaml.DragEventArgs>(
__this,
e,
global::Windows.UI.Xaml.Controls.IControlOverrides__Impl.Vtbl.idx_OnDragOver
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void OnDrop(
global::System.__ComObject __this,
global::Windows.UI.Xaml.DragEventArgs e)
{
global::McgInterop.ForwardComSharedStubs.Proc_TArg0__<global::Windows.UI.Xaml.Controls.IControlOverrides, global::Windows.UI.Xaml.DragEventArgs>(
__this,
e,
global::Windows.UI.Xaml.Controls.IControlOverrides__Impl.Vtbl.idx_OnDrop
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// DispatchClass for 'Windows.UI.Xaml.Controls.IControlOverrides'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.IControlOverrides))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.UI.Xaml.Controls.IControlOverrides
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.UI.Xaml.Controls.IControlOverrides.OnPointerEntered(global::Windows.UI.Xaml.Input.PointerRoutedEventArgs e)
{
global::Windows.UI.Xaml.Controls.IControlOverrides__Impl.StubClass.OnPointerEntered(
this,
e
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.UI.Xaml.Controls.IControlOverrides.OnPointerPressed(global::Windows.UI.Xaml.Input.PointerRoutedEventArgs e)
{
global::Windows.UI.Xaml.Controls.IControlOverrides__Impl.StubClass.OnPointerPressed(
this,
e
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.UI.Xaml.Controls.IControlOverrides.OnPointerMoved(global::Windows.UI.Xaml.Input.PointerRoutedEventArgs e)
{
global::Windows.UI.Xaml.Controls.IControlOverrides__Impl.StubClass.OnPointerMoved(
this,
e
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.UI.Xaml.Controls.IControlOverrides.OnPointerReleased(global::Windows.UI.Xaml.Input.PointerRoutedEventArgs e)
{
global::Windows.UI.Xaml.Controls.IControlOverrides__Impl.StubClass.OnPointerReleased(
this,
e
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.UI.Xaml.Controls.IControlOverrides.OnPointerExited(global::Windows.UI.Xaml.Input.PointerRoutedEventArgs e)
{
global::Windows.UI.Xaml.Controls.IControlOverrides__Impl.StubClass.OnPointerExited(
this,
e
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.UI.Xaml.Controls.IControlOverrides.OnPointerCaptureLost(global::Windows.UI.Xaml.Input.PointerRoutedEventArgs e)
{
global::Windows.UI.Xaml.Controls.IControlOverrides__Impl.StubClass.OnPointerCaptureLost(
this,
e
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.UI.Xaml.Controls.IControlOverrides.OnPointerCanceled(global::Windows.UI.Xaml.Input.PointerRoutedEventArgs e)
{
global::Windows.UI.Xaml.Controls.IControlOverrides__Impl.StubClass.OnPointerCanceled(
this,
e
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.UI.Xaml.Controls.IControlOverrides.OnPointerWheelChanged(global::Windows.UI.Xaml.Input.PointerRoutedEventArgs e)
{
global::Windows.UI.Xaml.Controls.IControlOverrides__Impl.StubClass.OnPointerWheelChanged(
this,
e
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.UI.Xaml.Controls.IControlOverrides.OnTapped(global::Windows.UI.Xaml.Input.TappedRoutedEventArgs e)
{
global::Windows.UI.Xaml.Controls.IControlOverrides__Impl.StubClass.OnTapped(
this,
e
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.UI.Xaml.Controls.IControlOverrides.OnDoubleTapped(global::Windows.UI.Xaml.Input.DoubleTappedRoutedEventArgs e)
{
global::Windows.UI.Xaml.Controls.IControlOverrides__Impl.StubClass.OnDoubleTapped(
this,
e
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.UI.Xaml.Controls.IControlOverrides.OnHolding(global::Windows.UI.Xaml.Input.HoldingRoutedEventArgs e)
{
global::Windows.UI.Xaml.Controls.IControlOverrides__Impl.StubClass.OnHolding(
this,
e
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.UI.Xaml.Controls.IControlOverrides.OnRightTapped(global::Windows.UI.Xaml.Input.RightTappedRoutedEventArgs e)
{
global::Windows.UI.Xaml.Controls.IControlOverrides__Impl.StubClass.OnRightTapped(
this,
e
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.UI.Xaml.Controls.IControlOverrides.OnManipulationStarting(global::Windows.UI.Xaml.Input.ManipulationStartingRoutedEventArgs e)
{
global::Windows.UI.Xaml.Controls.IControlOverrides__Impl.StubClass.OnManipulationStarting(
this,
e
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.UI.Xaml.Controls.IControlOverrides.OnManipulationInertiaStarting(global::Windows.UI.Xaml.Input.ManipulationInertiaStartingRoutedEventArgs e)
{
global::Windows.UI.Xaml.Controls.IControlOverrides__Impl.StubClass.OnManipulationInertiaStarting(
this,
e
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.UI.Xaml.Controls.IControlOverrides.OnManipulationStarted(global::Windows.UI.Xaml.Input.ManipulationStartedRoutedEventArgs e)
{
global::Windows.UI.Xaml.Controls.IControlOverrides__Impl.StubClass.OnManipulationStarted(
this,
e
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.UI.Xaml.Controls.IControlOverrides.OnManipulationDelta(global::Windows.UI.Xaml.Input.ManipulationDeltaRoutedEventArgs e)
{
global::Windows.UI.Xaml.Controls.IControlOverrides__Impl.StubClass.OnManipulationDelta(
this,
e
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.UI.Xaml.Controls.IControlOverrides.OnManipulationCompleted(global::Windows.UI.Xaml.Input.ManipulationCompletedRoutedEventArgs e)
{
global::Windows.UI.Xaml.Controls.IControlOverrides__Impl.StubClass.OnManipulationCompleted(
this,
e
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.UI.Xaml.Controls.IControlOverrides.OnKeyUp(global::Windows.UI.Xaml.Input.KeyRoutedEventArgs e)
{
global::Windows.UI.Xaml.Controls.IControlOverrides__Impl.StubClass.OnKeyUp(
this,
e
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.UI.Xaml.Controls.IControlOverrides.OnKeyDown(global::Windows.UI.Xaml.Input.KeyRoutedEventArgs e)
{
global::Windows.UI.Xaml.Controls.IControlOverrides__Impl.StubClass.OnKeyDown(
this,
e
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.UI.Xaml.Controls.IControlOverrides.OnGotFocus(global::Windows.UI.Xaml.RoutedEventArgs e)
{
global::Windows.UI.Xaml.Controls.IControlOverrides__Impl.StubClass.OnGotFocus(
this,
e
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.UI.Xaml.Controls.IControlOverrides.OnLostFocus(global::Windows.UI.Xaml.RoutedEventArgs e)
{
global::Windows.UI.Xaml.Controls.IControlOverrides__Impl.StubClass.OnLostFocus(
this,
e
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.UI.Xaml.Controls.IControlOverrides.OnDragEnter(global::Windows.UI.Xaml.DragEventArgs e)
{
global::Windows.UI.Xaml.Controls.IControlOverrides__Impl.StubClass.OnDragEnter(
this,
e
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.UI.Xaml.Controls.IControlOverrides.OnDragLeave(global::Windows.UI.Xaml.DragEventArgs e)
{
global::Windows.UI.Xaml.Controls.IControlOverrides__Impl.StubClass.OnDragLeave(
this,
e
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.UI.Xaml.Controls.IControlOverrides.OnDragOver(global::Windows.UI.Xaml.DragEventArgs e)
{
global::Windows.UI.Xaml.Controls.IControlOverrides__Impl.StubClass.OnDragOver(
this,
e
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.UI.Xaml.Controls.IControlOverrides.OnDrop(global::Windows.UI.Xaml.DragEventArgs e)
{
global::Windows.UI.Xaml.Controls.IControlOverrides__Impl.StubClass.OnDrop(
this,
e
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// v-table for 'Windows.UI.Xaml.Controls.IControlOverrides'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.IControlOverrides))]
public unsafe partial struct Vtbl
{
internal const int idx_OnPointerEntered = 6;
internal const int idx_OnPointerPressed = 7;
internal const int idx_OnPointerMoved = 8;
internal const int idx_OnPointerReleased = 9;
internal const int idx_OnPointerExited = 10;
internal const int idx_OnPointerCaptureLost = 11;
internal const int idx_OnPointerCanceled = 12;
internal const int idx_OnPointerWheelChanged = 13;
internal const int idx_OnTapped = 14;
internal const int idx_OnDoubleTapped = 15;
internal const int idx_OnHolding = 16;
internal const int idx_OnRightTapped = 17;
internal const int idx_OnManipulationStarting = 18;
internal const int idx_OnManipulationInertiaStarting = 19;
internal const int idx_OnManipulationStarted = 20;
internal const int idx_OnManipulationDelta = 21;
internal const int idx_OnManipulationCompleted = 22;
internal const int idx_OnKeyUp = 23;
internal const int idx_OnKeyDown = 24;
internal const int idx_OnGotFocus = 25;
internal const int idx_OnLostFocus = 26;
internal const int idx_OnDragEnter = 27;
internal const int idx_OnDragLeave = 28;
internal const int idx_OnDragOver = 29;
internal const int idx_OnDrop = 30;
}
}
// Windows.UI.Xaml.Controls.IControlProtected
public unsafe static class IControlProtected__Impl
{
// StubClass for 'Windows.UI.Xaml.Controls.IControlProtected'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static object get_DefaultStyleKey(global::System.__ComObject __this)
{
object __ret = global::McgInterop.ForwardComSharedStubs.Func_object__<global::Windows.UI.Xaml.Controls.IControlProtected>(
__this,
global::Windows.UI.Xaml.Controls.IControlProtected__Impl.Vtbl.idx_get_DefaultStyleKey
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void put_DefaultStyleKey(
global::System.__ComObject __this,
object value)
{
global::McgInterop.ForwardComSharedStubs.Proc_object__<global::Windows.UI.Xaml.Controls.IControlProtected>(
__this,
value,
global::Windows.UI.Xaml.Controls.IControlProtected__Impl.Vtbl.idx_put_DefaultStyleKey
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.DependencyObject GetTemplateChild(
global::System.__ComObject __this,
string childName)
{
global::Windows.UI.Xaml.DependencyObject __ret = global::McgInterop.ForwardComSharedStubs.Func_string__TResult__<global::Windows.UI.Xaml.Controls.IControlProtected, global::Windows.UI.Xaml.DependencyObject>(
__this,
childName,
global::Windows.UI.Xaml.Controls.IControlProtected__Impl.Vtbl.idx_GetTemplateChild
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
}
// DispatchClass for 'Windows.UI.Xaml.Controls.IControlProtected'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.IControlProtected))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.UI.Xaml.Controls.IControlProtected
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.UI.Xaml.Controls.IControlProtected.DefaultStyleKey")]
object global::Windows.UI.Xaml.Controls.IControlProtected.get_DefaultStyleKey()
{
object __retVal = global::Windows.UI.Xaml.Controls.IControlProtected__Impl.StubClass.get_DefaultStyleKey(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertySet, "Windows.UI.Xaml.Controls.IControlProtected.DefaultStyleKey")]
void global::Windows.UI.Xaml.Controls.IControlProtected.put_DefaultStyleKey(object value)
{
global::Windows.UI.Xaml.Controls.IControlProtected__Impl.StubClass.put_DefaultStyleKey(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
global::Windows.UI.Xaml.DependencyObject global::Windows.UI.Xaml.Controls.IControlProtected.GetTemplateChild(string childName)
{
global::Windows.UI.Xaml.DependencyObject __retVal = global::Windows.UI.Xaml.Controls.IControlProtected__Impl.StubClass.GetTemplateChild(
this,
childName
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.UI.Xaml.Controls.IControlProtected'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.IControlProtected))]
public unsafe partial struct Vtbl
{
internal const int idx_get_DefaultStyleKey = 6;
internal const int idx_put_DefaultStyleKey = 7;
internal const int idx_GetTemplateChild = 8;
}
}
// Windows.UI.Xaml.Controls.IControl2
public unsafe static class IControl2__Impl
{
// v-table for 'Windows.UI.Xaml.Controls.IControl2'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.IControl2))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Xaml.Controls.IControl3
public unsafe static class IControl3__Impl
{
// v-table for 'Windows.UI.Xaml.Controls.IControl3'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.IControl3))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Xaml.Controls.IControl4
public unsafe static class IControl4__Impl
{
// StubClass for 'Windows.UI.Xaml.Controls.IControl4'
public static partial class StubClass
{
// Signature, Windows.UI.Xaml.Controls.IControl4.add_FocusEngaged, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.WinRTDelegateMarshaller] Windows_Foundation_TypedEventHandler_2_Windows_UI_Xaml_Controls_Control__Windows_UI_Xaml_Controls_FocusEngagedEventArgs___Windows_Foundation__TypedEventHandler_A_Windows_UI_Xaml_Controls_Control_j_Windows_UI_Xaml_Controls_FocusEngagedEventArgs_V_ *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] System_Runtime_InteropServices_WindowsRuntime_EventRegistrationToken__Windows_Foundation__EventRegistrationToken,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken add_FocusEngaged(
global::System.__ComObject __this,
global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.Controls.Control, global::Windows.UI.Xaml.Controls.FocusEngagedEventArgs> value)
{
// Setup
global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_Controls_Control_j_Windows_UI_Xaml_Controls_FocusEngagedEventArgs_V___Impl.Vtbl** unsafe_value = default(global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_Controls_Control_j_Windows_UI_Xaml_Controls_FocusEngagedEventArgs_V___Impl.Vtbl**);
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken unsafe_token__retval;
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token__retval;
int unsafe___return__;
try
{
// Marshalling
unsafe_value = (global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_Controls_Control_j_Windows_UI_Xaml_Controls_FocusEngagedEventArgs_V___Impl.Vtbl**)global::System.Runtime.InteropServices.McgModuleManager.DelegateToComInterface(
value,
typeof(global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.Controls.Control, global::Windows.UI.Xaml.Controls.FocusEngagedEventArgs>).TypeHandle,
global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget72>(global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_Controls_Control_j_Windows_UI_Xaml_Controls_FocusEngagedEventArgs_V___Impl.Invoke)
);
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.UI.Xaml.Controls.IControl4).TypeHandle,
global::Windows.UI.Xaml.Controls.IControl4__Impl.Vtbl.idx_add_FocusEngaged,
unsafe_value,
&(unsafe_token__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
token__retval = unsafe_token__retval;
// Return
return token__retval;
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_value)));
}
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void remove_FocusEngaged(
global::System.__ComObject __this,
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::McgInterop.ForwardComSharedStubs.Proc__WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.Controls.IControl4>(
__this,
token,
global::Windows.UI.Xaml.Controls.IControl4__Impl.Vtbl.idx_remove_FocusEngaged
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// Signature, Windows.UI.Xaml.Controls.IControl4.add_FocusDisengaged, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.WinRTDelegateMarshaller] Windows_Foundation_TypedEventHandler_2_Windows_UI_Xaml_Controls_Control__Windows_UI_Xaml_Controls_FocusDisengagedEventArgs___Windows_Foundation__TypedEventHandler_A_Windows_UI_Xaml_Controls_Control_j_Windows_UI_Xaml_Controls_FocusDisengagedEventArgs_V_ *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] System_Runtime_InteropServices_WindowsRuntime_EventRegistrationToken__Windows_Foundation__EventRegistrationToken,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken add_FocusDisengaged(
global::System.__ComObject __this,
global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.Controls.Control, global::Windows.UI.Xaml.Controls.FocusDisengagedEventArgs> value)
{
// Setup
global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_Controls_Control_j_Windows_UI_Xaml_Controls_FocusDisengagedEventArgs_V___Impl.Vtbl** unsafe_value = default(global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_Controls_Control_j_Windows_UI_Xaml_Controls_FocusDisengagedEventArgs_V___Impl.Vtbl**);
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken unsafe_token__retval;
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token__retval;
int unsafe___return__;
try
{
// Marshalling
unsafe_value = (global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_Controls_Control_j_Windows_UI_Xaml_Controls_FocusDisengagedEventArgs_V___Impl.Vtbl**)global::System.Runtime.InteropServices.McgModuleManager.DelegateToComInterface(
value,
typeof(global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.Controls.Control, global::Windows.UI.Xaml.Controls.FocusDisengagedEventArgs>).TypeHandle,
global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget73>(global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_Controls_Control_j_Windows_UI_Xaml_Controls_FocusDisengagedEventArgs_V___Impl.Invoke)
);
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.UI.Xaml.Controls.IControl4).TypeHandle,
global::Windows.UI.Xaml.Controls.IControl4__Impl.Vtbl.idx_add_FocusDisengaged,
unsafe_value,
&(unsafe_token__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
token__retval = unsafe_token__retval;
// Return
return token__retval;
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_value)));
}
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void remove_FocusDisengaged(
global::System.__ComObject __this,
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::McgInterop.ForwardComSharedStubs.Proc__WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.Controls.IControl4>(
__this,
token,
global::Windows.UI.Xaml.Controls.IControl4__Impl.Vtbl.idx_remove_FocusDisengaged
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// DispatchClass for 'Windows.UI.Xaml.Controls.IControl4'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.IControl4))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.UI.Xaml.Controls.IControl4
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventAdd, "Windows.UI.Xaml.Controls.IControl4.FocusEngaged")]
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken global::Windows.UI.Xaml.Controls.IControl4.add_FocusEngaged(global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.Controls.Control, global::Windows.UI.Xaml.Controls.FocusEngagedEventArgs> value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __retVal = global::Windows.UI.Xaml.Controls.IControl4__Impl.StubClass.add_FocusEngaged(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventRemove, "Windows.UI.Xaml.Controls.IControl4.FocusEngaged")]
void global::Windows.UI.Xaml.Controls.IControl4.remove_FocusEngaged(global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::Windows.UI.Xaml.Controls.IControl4__Impl.StubClass.remove_FocusEngaged(
this,
token
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventAdd, "Windows.UI.Xaml.Controls.IControl4.FocusDisengaged")]
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken global::Windows.UI.Xaml.Controls.IControl4.add_FocusDisengaged(global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.Controls.Control, global::Windows.UI.Xaml.Controls.FocusDisengagedEventArgs> value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __retVal = global::Windows.UI.Xaml.Controls.IControl4__Impl.StubClass.add_FocusDisengaged(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventRemove, "Windows.UI.Xaml.Controls.IControl4.FocusDisengaged")]
void global::Windows.UI.Xaml.Controls.IControl4.remove_FocusDisengaged(global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::Windows.UI.Xaml.Controls.IControl4__Impl.StubClass.remove_FocusDisengaged(
this,
token
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// v-table for 'Windows.UI.Xaml.Controls.IControl4'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.IControl4))]
public unsafe partial struct Vtbl
{
internal const int idx_add_FocusEngaged = 22;
internal const int idx_remove_FocusEngaged = 23;
internal const int idx_add_FocusDisengaged = 24;
internal const int idx_remove_FocusDisengaged = 25;
}
}
// Windows.UI.Xaml.Controls.IFocusEngagedEventArgs
public unsafe static class IFocusEngagedEventArgs__Impl
{
// v-table for 'Windows.UI.Xaml.Controls.IFocusEngagedEventArgs'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.IFocusEngagedEventArgs))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Xaml.Controls.IFocusDisengagedEventArgs
public unsafe static class IFocusDisengagedEventArgs__Impl
{
// v-table for 'Windows.UI.Xaml.Controls.IFocusDisengagedEventArgs'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.IFocusDisengagedEventArgs))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Xaml.Controls.IUserControlFactory
public unsafe static class IUserControlFactory__Impl
{
// StubClass for 'Windows.UI.Xaml.Controls.IUserControlFactory'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.IntPtr CreateInstance(
global::System.__ComObject __this,
global::System.IntPtr outer,
out global::System.IntPtr inner)
{
global::System.IntPtr __ret = global::McgInterop.ForwardComSharedStubs.Func_IntPtr__out_IntPtr__IntPtr__<global::Windows.UI.Xaml.Controls.IUserControlFactory>(
__this,
outer,
out inner,
global::Windows.UI.Xaml.Controls.IUserControlFactory__Impl.Vtbl.idx_CreateInstance
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
}
// DispatchClass for 'Windows.UI.Xaml.Controls.IUserControlFactory'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.IUserControlFactory))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.UI.Xaml.Controls.IUserControlFactory
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
global::System.IntPtr global::Windows.UI.Xaml.Controls.IUserControlFactory.CreateInstance(
global::System.IntPtr outer,
out global::System.IntPtr inner)
{
global::System.IntPtr __retVal = global::Windows.UI.Xaml.Controls.IUserControlFactory__Impl.StubClass.CreateInstance(
this,
outer,
out inner
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.UI.Xaml.Controls.IUserControlFactory'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.IUserControlFactory))]
public unsafe partial struct Vtbl
{
internal const int idx_CreateInstance = 6;
}
}
// Windows.UI.Xaml.Controls.IUserControl
public unsafe static class IUserControl__Impl
{
// StubClass for 'Windows.UI.Xaml.Controls.IUserControl'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.UIElement get_Content(global::System.__ComObject __this)
{
global::Windows.UI.Xaml.UIElement __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.UI.Xaml.Controls.IUserControl, global::Windows.UI.Xaml.UIElement>(
__this,
global::Windows.UI.Xaml.Controls.IUserControl__Impl.Vtbl.idx_get_Content
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void put_Content(
global::System.__ComObject __this,
global::Windows.UI.Xaml.UIElement value)
{
global::McgInterop.ForwardComSharedStubs.Proc_TArg0__<global::Windows.UI.Xaml.Controls.IUserControl, global::Windows.UI.Xaml.UIElement>(
__this,
value,
global::Windows.UI.Xaml.Controls.IUserControl__Impl.Vtbl.idx_put_Content
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// DispatchClass for 'Windows.UI.Xaml.Controls.IUserControl'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.IUserControl))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.UI.Xaml.Controls.IUserControl
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.UI.Xaml.Controls.IUserControl.Content")]
global::Windows.UI.Xaml.UIElement global::Windows.UI.Xaml.Controls.IUserControl.get_Content()
{
global::Windows.UI.Xaml.UIElement __retVal = global::Windows.UI.Xaml.Controls.IUserControl__Impl.StubClass.get_Content(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertySet, "Windows.UI.Xaml.Controls.IUserControl.Content")]
void global::Windows.UI.Xaml.Controls.IUserControl.put_Content(global::Windows.UI.Xaml.UIElement value)
{
global::Windows.UI.Xaml.Controls.IUserControl__Impl.StubClass.put_Content(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// v-table for 'Windows.UI.Xaml.Controls.IUserControl'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.IUserControl))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Content = 6;
internal const int idx_put_Content = 7;
}
}
// Windows.UI.Xaml.Controls.IPageFactory
public unsafe static class IPageFactory__Impl
{
// StubClass for 'Windows.UI.Xaml.Controls.IPageFactory'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.IntPtr CreateInstance(
global::System.__ComObject __this,
global::System.IntPtr outer,
out global::System.IntPtr inner)
{
global::System.IntPtr __ret = global::McgInterop.ForwardComSharedStubs.Func_IntPtr__out_IntPtr__IntPtr__<global::Windows.UI.Xaml.Controls.IPageFactory>(
__this,
outer,
out inner,
global::Windows.UI.Xaml.Controls.IPageFactory__Impl.Vtbl.idx_CreateInstance
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
}
// DispatchClass for 'Windows.UI.Xaml.Controls.IPageFactory'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.IPageFactory))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.UI.Xaml.Controls.IPageFactory
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
global::System.IntPtr global::Windows.UI.Xaml.Controls.IPageFactory.CreateInstance(
global::System.IntPtr outer,
out global::System.IntPtr inner)
{
global::System.IntPtr __retVal = global::Windows.UI.Xaml.Controls.IPageFactory__Impl.StubClass.CreateInstance(
this,
outer,
out inner
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.UI.Xaml.Controls.IPageFactory'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.IPageFactory))]
public unsafe partial struct Vtbl
{
internal const int idx_CreateInstance = 6;
}
}
// Windows.UI.Xaml.Controls.IPage
public unsafe static class IPage__Impl
{
// v-table for 'Windows.UI.Xaml.Controls.IPage'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.IPage))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Xaml.Controls.IPageOverrides
public unsafe static class IPageOverrides__Impl
{
// StubClass for 'Windows.UI.Xaml.Controls.IPageOverrides'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void OnNavigatedFrom(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Navigation.NavigationEventArgs e)
{
global::McgInterop.ForwardComSharedStubs.Proc_TArg0__<global::Windows.UI.Xaml.Controls.IPageOverrides, global::Windows.UI.Xaml.Navigation.NavigationEventArgs>(
__this,
e,
global::Windows.UI.Xaml.Controls.IPageOverrides__Impl.Vtbl.idx_OnNavigatedFrom
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void OnNavigatedTo(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Navigation.NavigationEventArgs e)
{
global::McgInterop.ForwardComSharedStubs.Proc_TArg0__<global::Windows.UI.Xaml.Controls.IPageOverrides, global::Windows.UI.Xaml.Navigation.NavigationEventArgs>(
__this,
e,
global::Windows.UI.Xaml.Controls.IPageOverrides__Impl.Vtbl.idx_OnNavigatedTo
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void OnNavigatingFrom(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Navigation.NavigatingCancelEventArgs e)
{
global::McgInterop.ForwardComSharedStubs.Proc_TArg0__<global::Windows.UI.Xaml.Controls.IPageOverrides, global::Windows.UI.Xaml.Navigation.NavigatingCancelEventArgs>(
__this,
e,
global::Windows.UI.Xaml.Controls.IPageOverrides__Impl.Vtbl.idx_OnNavigatingFrom
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// DispatchClass for 'Windows.UI.Xaml.Controls.IPageOverrides'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.IPageOverrides))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.UI.Xaml.Controls.IPageOverrides
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.UI.Xaml.Controls.IPageOverrides.OnNavigatedFrom(global::Windows.UI.Xaml.Navigation.NavigationEventArgs e)
{
global::Windows.UI.Xaml.Controls.IPageOverrides__Impl.StubClass.OnNavigatedFrom(
this,
e
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.UI.Xaml.Controls.IPageOverrides.OnNavigatedTo(global::Windows.UI.Xaml.Navigation.NavigationEventArgs e)
{
global::Windows.UI.Xaml.Controls.IPageOverrides__Impl.StubClass.OnNavigatedTo(
this,
e
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.UI.Xaml.Controls.IPageOverrides.OnNavigatingFrom(global::Windows.UI.Xaml.Navigation.NavigatingCancelEventArgs e)
{
global::Windows.UI.Xaml.Controls.IPageOverrides__Impl.StubClass.OnNavigatingFrom(
this,
e
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// v-table for 'Windows.UI.Xaml.Controls.IPageOverrides'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.IPageOverrides))]
public unsafe partial struct Vtbl
{
internal const int idx_OnNavigatedFrom = 6;
internal const int idx_OnNavigatedTo = 7;
internal const int idx_OnNavigatingFrom = 8;
}
}
// Windows.UI.Xaml.Controls.IGridStatics
public unsafe static class IGridStatics__Impl
{
// StubClass for 'Windows.UI.Xaml.Controls.IGridStatics'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static int GetRow(
global::System.__ComObject __this,
global::Windows.UI.Xaml.FrameworkElement element)
{
int __ret = global::McgInterop.ForwardComSharedStubs.Func_TArg0__int__<global::Windows.UI.Xaml.Controls.IGridStatics, global::Windows.UI.Xaml.FrameworkElement>(
__this,
element,
global::Windows.UI.Xaml.Controls.IGridStatics__Impl.Vtbl.idx_GetRow
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void SetRow(
global::System.__ComObject __this,
global::Windows.UI.Xaml.FrameworkElement element,
int value)
{
global::McgInterop.ForwardComSharedStubs.Proc_TArg0__int__<global::Windows.UI.Xaml.Controls.IGridStatics, global::Windows.UI.Xaml.FrameworkElement>(
__this,
element,
value,
global::Windows.UI.Xaml.Controls.IGridStatics__Impl.Vtbl.idx_SetRow
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static int GetColumn(
global::System.__ComObject __this,
global::Windows.UI.Xaml.FrameworkElement element)
{
int __ret = global::McgInterop.ForwardComSharedStubs.Func_TArg0__int__<global::Windows.UI.Xaml.Controls.IGridStatics, global::Windows.UI.Xaml.FrameworkElement>(
__this,
element,
global::Windows.UI.Xaml.Controls.IGridStatics__Impl.Vtbl.idx_GetColumn
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void SetColumn(
global::System.__ComObject __this,
global::Windows.UI.Xaml.FrameworkElement element,
int value)
{
global::McgInterop.ForwardComSharedStubs.Proc_TArg0__int__<global::Windows.UI.Xaml.Controls.IGridStatics, global::Windows.UI.Xaml.FrameworkElement>(
__this,
element,
value,
global::Windows.UI.Xaml.Controls.IGridStatics__Impl.Vtbl.idx_SetColumn
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// DispatchClass for 'Windows.UI.Xaml.Controls.IGridStatics'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.IGridStatics))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.UI.Xaml.Controls.IGridStatics
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
int global::Windows.UI.Xaml.Controls.IGridStatics.GetRow(global::Windows.UI.Xaml.FrameworkElement element)
{
int __retVal = global::Windows.UI.Xaml.Controls.IGridStatics__Impl.StubClass.GetRow(
this,
element
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.UI.Xaml.Controls.IGridStatics.SetRow(
global::Windows.UI.Xaml.FrameworkElement element,
int value)
{
global::Windows.UI.Xaml.Controls.IGridStatics__Impl.StubClass.SetRow(
this,
element,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
int global::Windows.UI.Xaml.Controls.IGridStatics.GetColumn(global::Windows.UI.Xaml.FrameworkElement element)
{
int __retVal = global::Windows.UI.Xaml.Controls.IGridStatics__Impl.StubClass.GetColumn(
this,
element
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.UI.Xaml.Controls.IGridStatics.SetColumn(
global::Windows.UI.Xaml.FrameworkElement element,
int value)
{
global::Windows.UI.Xaml.Controls.IGridStatics__Impl.StubClass.SetColumn(
this,
element,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// v-table for 'Windows.UI.Xaml.Controls.IGridStatics'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.IGridStatics))]
public unsafe partial struct Vtbl
{
internal const int idx_GetRow = 7;
internal const int idx_SetRow = 8;
internal const int idx_GetColumn = 10;
internal const int idx_SetColumn = 11;
}
}
// Windows.UI.Xaml.Controls.IPanel
public unsafe static class IPanel__Impl
{
// StubClass for 'Windows.UI.Xaml.Controls.IPanel'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.Controls.UIElementCollection get_Children(global::System.__ComObject __this)
{
global::Windows.UI.Xaml.Controls.UIElementCollection __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.UI.Xaml.Controls.IPanel, global::Windows.UI.Xaml.Controls.UIElementCollection>(
__this,
global::Windows.UI.Xaml.Controls.IPanel__Impl.Vtbl.idx_get_Children
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.Media.Brush get_Background(global::System.__ComObject __this)
{
global::Windows.UI.Xaml.Media.Brush __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.UI.Xaml.Controls.IPanel, global::Windows.UI.Xaml.Media.Brush>(
__this,
global::Windows.UI.Xaml.Controls.IPanel__Impl.Vtbl.idx_get_Background
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void put_Background(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Media.Brush value)
{
global::McgInterop.ForwardComSharedStubs.Proc_TArg0__<global::Windows.UI.Xaml.Controls.IPanel, global::Windows.UI.Xaml.Media.Brush>(
__this,
value,
global::Windows.UI.Xaml.Controls.IPanel__Impl.Vtbl.idx_put_Background
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// DispatchClass for 'Windows.UI.Xaml.Controls.IPanel'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.IPanel))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.UI.Xaml.Controls.IPanel
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.UI.Xaml.Controls.IPanel.Children")]
global::Windows.UI.Xaml.Controls.UIElementCollection global::Windows.UI.Xaml.Controls.IPanel.get_Children()
{
global::Windows.UI.Xaml.Controls.UIElementCollection __retVal = global::Windows.UI.Xaml.Controls.IPanel__Impl.StubClass.get_Children(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.UI.Xaml.Controls.IPanel.Background")]
global::Windows.UI.Xaml.Media.Brush global::Windows.UI.Xaml.Controls.IPanel.get_Background()
{
global::Windows.UI.Xaml.Media.Brush __retVal = global::Windows.UI.Xaml.Controls.IPanel__Impl.StubClass.get_Background(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertySet, "Windows.UI.Xaml.Controls.IPanel.Background")]
void global::Windows.UI.Xaml.Controls.IPanel.put_Background(global::Windows.UI.Xaml.Media.Brush value)
{
global::Windows.UI.Xaml.Controls.IPanel__Impl.StubClass.put_Background(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// v-table for 'Windows.UI.Xaml.Controls.IPanel'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.IPanel))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Children = 6;
internal const int idx_get_Background = 7;
internal const int idx_put_Background = 8;
}
}
// Windows.UI.Xaml.Controls.IUIElementCollection
public unsafe static class IUIElementCollection__Impl
{
// v-table for 'Windows.UI.Xaml.Controls.IUIElementCollection'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.IUIElementCollection))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Xaml.Controls.IGridFactory
public unsafe static class IGridFactory__Impl
{
// StubClass for 'Windows.UI.Xaml.Controls.IGridFactory'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.IntPtr CreateInstance(
global::System.__ComObject __this,
global::System.IntPtr outer,
out global::System.IntPtr inner)
{
global::System.IntPtr __ret = global::McgInterop.ForwardComSharedStubs.Func_IntPtr__out_IntPtr__IntPtr__<global::Windows.UI.Xaml.Controls.IGridFactory>(
__this,
outer,
out inner,
global::Windows.UI.Xaml.Controls.IGridFactory__Impl.Vtbl.idx_CreateInstance
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
}
// DispatchClass for 'Windows.UI.Xaml.Controls.IGridFactory'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.IGridFactory))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.UI.Xaml.Controls.IGridFactory
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
global::System.IntPtr global::Windows.UI.Xaml.Controls.IGridFactory.CreateInstance(
global::System.IntPtr outer,
out global::System.IntPtr inner)
{
global::System.IntPtr __retVal = global::Windows.UI.Xaml.Controls.IGridFactory__Impl.StubClass.CreateInstance(
this,
outer,
out inner
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.UI.Xaml.Controls.IGridFactory'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.IGridFactory))]
public unsafe partial struct Vtbl
{
internal const int idx_CreateInstance = 6;
}
}
// Windows.UI.Xaml.Controls.IGrid
public unsafe static class IGrid__Impl
{
// StubClass for 'Windows.UI.Xaml.Controls.IGrid'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.Controls.RowDefinitionCollection get_RowDefinitions(global::System.__ComObject __this)
{
global::Windows.UI.Xaml.Controls.RowDefinitionCollection __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.UI.Xaml.Controls.IGrid, global::Windows.UI.Xaml.Controls.RowDefinitionCollection>(
__this,
global::Windows.UI.Xaml.Controls.IGrid__Impl.Vtbl.idx_get_RowDefinitions
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
}
// DispatchClass for 'Windows.UI.Xaml.Controls.IGrid'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.IGrid))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.UI.Xaml.Controls.IGrid
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.UI.Xaml.Controls.IGrid.RowDefinitions")]
global::Windows.UI.Xaml.Controls.RowDefinitionCollection global::Windows.UI.Xaml.Controls.IGrid.get_RowDefinitions()
{
global::Windows.UI.Xaml.Controls.RowDefinitionCollection __retVal = global::Windows.UI.Xaml.Controls.IGrid__Impl.StubClass.get_RowDefinitions(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.UI.Xaml.Controls.IGrid'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.IGrid))]
public unsafe partial struct Vtbl
{
internal const int idx_get_RowDefinitions = 6;
}
}
// Windows.UI.Xaml.Controls.IRowDefinition
public unsafe static class IRowDefinition__Impl
{
// StubClass for 'Windows.UI.Xaml.Controls.IRowDefinition'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.GridLength get_Height(global::System.__ComObject __this)
{
global::Windows.UI.Xaml.GridLength __ret = global::McgInterop.ForwardComSharedStubs.Func_UI_Xaml_GridLength__<global::Windows.UI.Xaml.Controls.IRowDefinition>(
__this,
global::Windows.UI.Xaml.Controls.IRowDefinition__Impl.Vtbl.idx_get_Height
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
// Signature, Windows.UI.Xaml.Controls.IRowDefinition.put_Height, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.BlittableValueMarshaller] Windows_UI_Xaml_GridLength__Windows_UI_Xaml__GridLength,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void put_Height(
global::System.__ComObject __this,
global::Windows.UI.Xaml.GridLength value)
{
// Setup
int unsafe___return__;
// Marshalling
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.UI.Xaml.Controls.IRowDefinition).TypeHandle,
global::Windows.UI.Xaml.Controls.IRowDefinition__Impl.Vtbl.idx_put_Height,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
// Return
}
}
// DispatchClass for 'Windows.UI.Xaml.Controls.IRowDefinition'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.IRowDefinition))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.UI.Xaml.Controls.IRowDefinition
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.UI.Xaml.Controls.IRowDefinition.Height")]
global::Windows.UI.Xaml.GridLength global::Windows.UI.Xaml.Controls.IRowDefinition.get_Height()
{
global::Windows.UI.Xaml.GridLength __retVal = global::Windows.UI.Xaml.Controls.IRowDefinition__Impl.StubClass.get_Height(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertySet, "Windows.UI.Xaml.Controls.IRowDefinition.Height")]
void global::Windows.UI.Xaml.Controls.IRowDefinition.put_Height(global::Windows.UI.Xaml.GridLength value)
{
global::Windows.UI.Xaml.Controls.IRowDefinition__Impl.StubClass.put_Height(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// v-table for 'Windows.UI.Xaml.Controls.IRowDefinition'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.IRowDefinition))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Height = 6;
internal const int idx_put_Height = 7;
}
}
// Windows.UI.Xaml.Controls.IGrid2
public unsafe static class IGrid2__Impl
{
// v-table for 'Windows.UI.Xaml.Controls.IGrid2'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.IGrid2))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Xaml.Controls.IBorder
public unsafe static class IBorder__Impl
{
// StubClass for 'Windows.UI.Xaml.Controls.IBorder'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.Media.Brush get_BorderBrush(global::System.__ComObject __this)
{
global::Windows.UI.Xaml.Media.Brush __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.UI.Xaml.Controls.IBorder, global::Windows.UI.Xaml.Media.Brush>(
__this,
global::Windows.UI.Xaml.Controls.IBorder__Impl.Vtbl.idx_get_BorderBrush
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void put_BorderBrush(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Media.Brush value)
{
global::McgInterop.ForwardComSharedStubs.Proc_TArg0__<global::Windows.UI.Xaml.Controls.IBorder, global::Windows.UI.Xaml.Media.Brush>(
__this,
value,
global::Windows.UI.Xaml.Controls.IBorder__Impl.Vtbl.idx_put_BorderBrush
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.Thickness get_BorderThickness(global::System.__ComObject __this)
{
global::Windows.UI.Xaml.Thickness __ret = global::McgInterop.ForwardComSharedStubs.Func_UI_Xaml_Thickness__<global::Windows.UI.Xaml.Controls.IBorder>(
__this,
global::Windows.UI.Xaml.Controls.IBorder__Impl.Vtbl.idx_get_BorderThickness
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void put_BorderThickness(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Thickness value)
{
global::McgInterop.ForwardComSharedStubs.Proc_UI_Xaml_Thickness__<global::Windows.UI.Xaml.Controls.IBorder>(
__this,
value,
global::Windows.UI.Xaml.Controls.IBorder__Impl.Vtbl.idx_put_BorderThickness
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// DispatchClass for 'Windows.UI.Xaml.Controls.IBorder'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.IBorder))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.UI.Xaml.Controls.IBorder
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.UI.Xaml.Controls.IBorder.BorderBrush")]
global::Windows.UI.Xaml.Media.Brush global::Windows.UI.Xaml.Controls.IBorder.get_BorderBrush()
{
global::Windows.UI.Xaml.Media.Brush __retVal = global::Windows.UI.Xaml.Controls.IBorder__Impl.StubClass.get_BorderBrush(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertySet, "Windows.UI.Xaml.Controls.IBorder.BorderBrush")]
void global::Windows.UI.Xaml.Controls.IBorder.put_BorderBrush(global::Windows.UI.Xaml.Media.Brush value)
{
global::Windows.UI.Xaml.Controls.IBorder__Impl.StubClass.put_BorderBrush(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.UI.Xaml.Controls.IBorder.BorderThickness")]
global::Windows.UI.Xaml.Thickness global::Windows.UI.Xaml.Controls.IBorder.get_BorderThickness()
{
global::Windows.UI.Xaml.Thickness __retVal = global::Windows.UI.Xaml.Controls.IBorder__Impl.StubClass.get_BorderThickness(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertySet, "Windows.UI.Xaml.Controls.IBorder.BorderThickness")]
void global::Windows.UI.Xaml.Controls.IBorder.put_BorderThickness(global::Windows.UI.Xaml.Thickness value)
{
global::Windows.UI.Xaml.Controls.IBorder__Impl.StubClass.put_BorderThickness(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// v-table for 'Windows.UI.Xaml.Controls.IBorder'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.IBorder))]
public unsafe partial struct Vtbl
{
internal const int idx_get_BorderBrush = 6;
internal const int idx_put_BorderBrush = 7;
internal const int idx_get_BorderThickness = 8;
internal const int idx_put_BorderThickness = 9;
}
}
// Windows.UI.Xaml.Controls.IContentControl
public unsafe static class IContentControl__Impl
{
// StubClass for 'Windows.UI.Xaml.Controls.IContentControl'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static object get_Content(global::System.__ComObject __this)
{
object __ret = global::McgInterop.ForwardComSharedStubs.Func_object__<global::Windows.UI.Xaml.Controls.IContentControl>(
__this,
global::Windows.UI.Xaml.Controls.IContentControl__Impl.Vtbl.idx_get_Content
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void put_Content(
global::System.__ComObject __this,
object value)
{
global::McgInterop.ForwardComSharedStubs.Proc_object__<global::Windows.UI.Xaml.Controls.IContentControl>(
__this,
value,
global::Windows.UI.Xaml.Controls.IContentControl__Impl.Vtbl.idx_put_Content
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// DispatchClass for 'Windows.UI.Xaml.Controls.IContentControl'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.IContentControl))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.UI.Xaml.Controls.IContentControl
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.UI.Xaml.Controls.IContentControl.Content")]
object global::Windows.UI.Xaml.Controls.IContentControl.get_Content()
{
object __retVal = global::Windows.UI.Xaml.Controls.IContentControl__Impl.StubClass.get_Content(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertySet, "Windows.UI.Xaml.Controls.IContentControl.Content")]
void global::Windows.UI.Xaml.Controls.IContentControl.put_Content(object value)
{
global::Windows.UI.Xaml.Controls.IContentControl__Impl.StubClass.put_Content(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// v-table for 'Windows.UI.Xaml.Controls.IContentControl'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.IContentControl))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Content = 6;
internal const int idx_put_Content = 7;
}
}
// Windows.UI.Xaml.Controls.IContentControlOverrides
public unsafe static class IContentControlOverrides__Impl
{
// StubClass for 'Windows.UI.Xaml.Controls.IContentControlOverrides'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void OnContentChanged(
global::System.__ComObject __this,
object oldContent,
object newContent)
{
global::McgInterop.ForwardComSharedStubs.Proc_object__object__<global::Windows.UI.Xaml.Controls.IContentControlOverrides>(
__this,
oldContent,
newContent,
global::Windows.UI.Xaml.Controls.IContentControlOverrides__Impl.Vtbl.idx_OnContentChanged
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void OnContentTemplateChanged(
global::System.__ComObject __this,
global::Windows.UI.Xaml.DataTemplate oldContentTemplate,
global::Windows.UI.Xaml.DataTemplate newContentTemplate)
{
global::McgInterop.ForwardComSharedStubs.Proc_TArg0__TArg1__<global::Windows.UI.Xaml.Controls.IContentControlOverrides, global::Windows.UI.Xaml.DataTemplate, global::Windows.UI.Xaml.DataTemplate>(
__this,
oldContentTemplate,
newContentTemplate,
global::Windows.UI.Xaml.Controls.IContentControlOverrides__Impl.Vtbl.idx_OnContentTemplateChanged
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void OnContentTemplateSelectorChanged(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Controls.DataTemplateSelector oldContentTemplateSelector,
global::Windows.UI.Xaml.Controls.DataTemplateSelector newContentTemplateSelector)
{
global::McgInterop.ForwardComSharedStubs.Proc_TArg0__TArg1__<global::Windows.UI.Xaml.Controls.IContentControlOverrides, global::Windows.UI.Xaml.Controls.DataTemplateSelector, global::Windows.UI.Xaml.Controls.DataTemplateSelector>(
__this,
oldContentTemplateSelector,
newContentTemplateSelector,
global::Windows.UI.Xaml.Controls.IContentControlOverrides__Impl.Vtbl.idx_OnContentTemplateSelectorChanged
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// DispatchClass for 'Windows.UI.Xaml.Controls.IContentControlOverrides'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.IContentControlOverrides))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.UI.Xaml.Controls.IContentControlOverrides
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.UI.Xaml.Controls.IContentControlOverrides.OnContentChanged(
object oldContent,
object newContent)
{
global::Windows.UI.Xaml.Controls.IContentControlOverrides__Impl.StubClass.OnContentChanged(
this,
oldContent,
newContent
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.UI.Xaml.Controls.IContentControlOverrides.OnContentTemplateChanged(
global::Windows.UI.Xaml.DataTemplate oldContentTemplate,
global::Windows.UI.Xaml.DataTemplate newContentTemplate)
{
global::Windows.UI.Xaml.Controls.IContentControlOverrides__Impl.StubClass.OnContentTemplateChanged(
this,
oldContentTemplate,
newContentTemplate
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.UI.Xaml.Controls.IContentControlOverrides.OnContentTemplateSelectorChanged(
global::Windows.UI.Xaml.Controls.DataTemplateSelector oldContentTemplateSelector,
global::Windows.UI.Xaml.Controls.DataTemplateSelector newContentTemplateSelector)
{
global::Windows.UI.Xaml.Controls.IContentControlOverrides__Impl.StubClass.OnContentTemplateSelectorChanged(
this,
oldContentTemplateSelector,
newContentTemplateSelector
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// v-table for 'Windows.UI.Xaml.Controls.IContentControlOverrides'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.IContentControlOverrides))]
public unsafe partial struct Vtbl
{
internal const int idx_OnContentChanged = 6;
internal const int idx_OnContentTemplateChanged = 7;
internal const int idx_OnContentTemplateSelectorChanged = 8;
}
}
// Windows.UI.Xaml.Controls.IDataTemplateSelector
public unsafe static class IDataTemplateSelector__Impl
{
// v-table for 'Windows.UI.Xaml.Controls.IDataTemplateSelector'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.IDataTemplateSelector))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Xaml.Controls.IDataTemplateSelectorOverrides
public unsafe static class IDataTemplateSelectorOverrides__Impl
{
// StubClass for 'Windows.UI.Xaml.Controls.IDataTemplateSelectorOverrides'
public static partial class StubClass
{
// Signature, Windows.UI.Xaml.Controls.IDataTemplateSelectorOverrides.SelectTemplateCore, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.WinRTInspectableMarshaller] object____mcg_IInspectable, [fwd] [in] [Mcg.CodeGen.WinRTClassMarshaller] Windows_UI_Xaml_DependencyObject__Windows_UI_Xaml__DependencyObject *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.WinRTClassMarshaller] Windows_UI_Xaml_DataTemplate__Windows_UI_Xaml__DataTemplate *,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.DataTemplate SelectTemplateCore(
global::System.__ComObject __this,
object item,
global::Windows.UI.Xaml.DependencyObject container)
{
// Setup
global::System.Runtime.InteropServices.__vtable_IInspectable* unsafe_item = default(global::System.Runtime.InteropServices.__vtable_IInspectable*);
global::Windows.UI.Xaml.IDependencyObject__Impl.Vtbl** unsafe_container = default(global::Windows.UI.Xaml.IDependencyObject__Impl.Vtbl**);
global::Windows.UI.Xaml.IDataTemplate__Impl.Vtbl** unsafe_returnValue__retval = default(global::Windows.UI.Xaml.IDataTemplate__Impl.Vtbl**);
global::Windows.UI.Xaml.DataTemplate returnValue__retval = default(global::Windows.UI.Xaml.DataTemplate);
int unsafe___return__;
try
{
// Marshalling
unsafe_item = (global::System.Runtime.InteropServices.__vtable_IInspectable*)global::System.Runtime.InteropServices.McgMarshal.ObjectToIInspectable(item);
unsafe_container = (global::Windows.UI.Xaml.IDependencyObject__Impl.Vtbl**)global::System.Runtime.InteropServices.McgModuleManager.ObjectToComInterface(
container,
typeof(global::Windows.UI.Xaml.DependencyObject).TypeHandle
);
unsafe_returnValue__retval = null;
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.UI.Xaml.Controls.IDataTemplateSelectorOverrides).TypeHandle,
global::Windows.UI.Xaml.Controls.IDataTemplateSelectorOverrides__Impl.Vtbl.idx_SelectTemplateCore,
unsafe_item,
unsafe_container,
&(unsafe_returnValue__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
returnValue__retval = (global::Windows.UI.Xaml.DataTemplate)global::System.Runtime.InteropServices.McgModuleManager.ComInterfaceToObject(
((global::System.IntPtr)unsafe_returnValue__retval),
typeof(global::Windows.UI.Xaml.DataTemplate).TypeHandle
);
// Return
return returnValue__retval;
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_item)));
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_container)));
global::System.GC.KeepAlive(container);
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_returnValue__retval)));
}
}
}
// DispatchClass for 'Windows.UI.Xaml.Controls.IDataTemplateSelectorOverrides'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.IDataTemplateSelectorOverrides))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.UI.Xaml.Controls.IDataTemplateSelectorOverrides
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
global::Windows.UI.Xaml.DataTemplate global::Windows.UI.Xaml.Controls.IDataTemplateSelectorOverrides.SelectTemplateCore(
object item,
global::Windows.UI.Xaml.DependencyObject container)
{
global::Windows.UI.Xaml.DataTemplate __retVal = global::Windows.UI.Xaml.Controls.IDataTemplateSelectorOverrides__Impl.StubClass.SelectTemplateCore(
this,
item,
container
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.UI.Xaml.Controls.IDataTemplateSelectorOverrides'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.IDataTemplateSelectorOverrides))]
public unsafe partial struct Vtbl
{
internal const int idx_SelectTemplateCore = 6;
}
}
// Windows.UI.Xaml.Controls.IDataTemplateSelector2
public unsafe static class IDataTemplateSelector2__Impl
{
// v-table for 'Windows.UI.Xaml.Controls.IDataTemplateSelector2'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.IDataTemplateSelector2))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Xaml.Controls.IDataTemplateSelectorOverrides2
public unsafe static class IDataTemplateSelectorOverrides2__Impl
{
// StubClass for 'Windows.UI.Xaml.Controls.IDataTemplateSelectorOverrides2'
public static partial class StubClass
{
// Signature, Windows.UI.Xaml.Controls.IDataTemplateSelectorOverrides2.SelectTemplateCore, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.WinRTInspectableMarshaller] object____mcg_IInspectable, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.WinRTClassMarshaller] Windows_UI_Xaml_DataTemplate__Windows_UI_Xaml__DataTemplate *,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.DataTemplate SelectTemplateCore(
global::System.__ComObject __this,
object item)
{
// Setup
global::System.Runtime.InteropServices.__vtable_IInspectable* unsafe_item = default(global::System.Runtime.InteropServices.__vtable_IInspectable*);
global::Windows.UI.Xaml.IDataTemplate__Impl.Vtbl** unsafe_returnValue__retval = default(global::Windows.UI.Xaml.IDataTemplate__Impl.Vtbl**);
global::Windows.UI.Xaml.DataTemplate returnValue__retval = default(global::Windows.UI.Xaml.DataTemplate);
int unsafe___return__;
try
{
// Marshalling
unsafe_item = (global::System.Runtime.InteropServices.__vtable_IInspectable*)global::System.Runtime.InteropServices.McgMarshal.ObjectToIInspectable(item);
unsafe_returnValue__retval = null;
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.UI.Xaml.Controls.IDataTemplateSelectorOverrides2).TypeHandle,
global::Windows.UI.Xaml.Controls.IDataTemplateSelectorOverrides2__Impl.Vtbl.idx_SelectTemplateForItemCore,
unsafe_item,
&(unsafe_returnValue__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
returnValue__retval = (global::Windows.UI.Xaml.DataTemplate)global::System.Runtime.InteropServices.McgModuleManager.ComInterfaceToObject(
((global::System.IntPtr)unsafe_returnValue__retval),
typeof(global::Windows.UI.Xaml.DataTemplate).TypeHandle
);
// Return
return returnValue__retval;
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_item)));
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_returnValue__retval)));
}
}
}
// DispatchClass for 'Windows.UI.Xaml.Controls.IDataTemplateSelectorOverrides2'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.IDataTemplateSelectorOverrides2))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.UI.Xaml.Controls.IDataTemplateSelectorOverrides2
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
global::Windows.UI.Xaml.DataTemplate global::Windows.UI.Xaml.Controls.IDataTemplateSelectorOverrides2.SelectTemplateCore(object item)
{
global::Windows.UI.Xaml.DataTemplate __retVal = global::Windows.UI.Xaml.Controls.IDataTemplateSelectorOverrides2__Impl.StubClass.SelectTemplateCore(
this,
item
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.UI.Xaml.Controls.IDataTemplateSelectorOverrides2'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.IDataTemplateSelectorOverrides2))]
public unsafe partial struct Vtbl
{
internal const int idx_SelectTemplateForItemCore = 6;
}
}
// Windows.UI.Xaml.Controls.IContentControl2
public unsafe static class IContentControl2__Impl
{
// v-table for 'Windows.UI.Xaml.Controls.IContentControl2'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.IContentControl2))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Xaml.Controls.IButtonFactory
public unsafe static class IButtonFactory__Impl
{
// StubClass for 'Windows.UI.Xaml.Controls.IButtonFactory'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.IntPtr CreateInstance(
global::System.__ComObject __this,
global::System.IntPtr outer,
out global::System.IntPtr inner)
{
global::System.IntPtr __ret = global::McgInterop.ForwardComSharedStubs.Func_IntPtr__out_IntPtr__IntPtr__<global::Windows.UI.Xaml.Controls.IButtonFactory>(
__this,
outer,
out inner,
global::Windows.UI.Xaml.Controls.IButtonFactory__Impl.Vtbl.idx_CreateInstance
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
}
// DispatchClass for 'Windows.UI.Xaml.Controls.IButtonFactory'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.IButtonFactory))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.UI.Xaml.Controls.IButtonFactory
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
global::System.IntPtr global::Windows.UI.Xaml.Controls.IButtonFactory.CreateInstance(
global::System.IntPtr outer,
out global::System.IntPtr inner)
{
global::System.IntPtr __retVal = global::Windows.UI.Xaml.Controls.IButtonFactory__Impl.StubClass.CreateInstance(
this,
outer,
out inner
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.UI.Xaml.Controls.IButtonFactory'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.IButtonFactory))]
public unsafe partial struct Vtbl
{
internal const int idx_CreateInstance = 6;
}
}
// Windows.UI.Xaml.Controls.IButton
public unsafe static class IButton__Impl
{
// v-table for 'Windows.UI.Xaml.Controls.IButton'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.IButton))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Xaml.Controls.IButtonWithFlyout
public unsafe static class IButtonWithFlyout__Impl
{
// v-table for 'Windows.UI.Xaml.Controls.IButtonWithFlyout'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.IButtonWithFlyout))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Xaml.Controls.ITextBlock
public unsafe static class ITextBlock__Impl
{
// StubClass for 'Windows.UI.Xaml.Controls.ITextBlock'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static double get_FontSize(global::System.__ComObject __this)
{
double __ret = global::McgInterop.ForwardComSharedStubs.Func_double__<global::Windows.UI.Xaml.Controls.ITextBlock>(
__this,
global::Windows.UI.Xaml.Controls.ITextBlock__Impl.Vtbl.idx_get_FontSize
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void put_FontSize(
global::System.__ComObject __this,
double value)
{
global::McgInterop.ForwardComSharedStubs.Proc_double__<global::Windows.UI.Xaml.Controls.ITextBlock>(
__this,
value,
global::Windows.UI.Xaml.Controls.ITextBlock__Impl.Vtbl.idx_put_FontSize
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.Media.FontFamily get_FontFamily(global::System.__ComObject __this)
{
global::Windows.UI.Xaml.Media.FontFamily __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.UI.Xaml.Controls.ITextBlock, global::Windows.UI.Xaml.Media.FontFamily>(
__this,
global::Windows.UI.Xaml.Controls.ITextBlock__Impl.Vtbl.idx_get_FontFamily
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void put_FontFamily(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Media.FontFamily value)
{
global::McgInterop.ForwardComSharedStubs.Proc_TArg0__<global::Windows.UI.Xaml.Controls.ITextBlock, global::Windows.UI.Xaml.Media.FontFamily>(
__this,
value,
global::Windows.UI.Xaml.Controls.ITextBlock__Impl.Vtbl.idx_put_FontFamily
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// Signature, Windows.UI.Xaml.Controls.ITextBlock.get_FontWeight, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableStructMarshaller] Windows_UI_Text_FontWeight__Windows_UI_Text__FontWeight,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Text.FontWeight get_FontWeight(global::System.__ComObject __this)
{
// Setup
global::Windows.UI.Text.FontWeight unsafe_value__retval;
global::Windows.UI.Text.FontWeight value__retval;
int unsafe___return__;
// Marshalling
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.UI.Xaml.Controls.ITextBlock).TypeHandle,
global::Windows.UI.Xaml.Controls.ITextBlock__Impl.Vtbl.idx_get_FontWeight,
&(unsafe_value__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
value__retval = unsafe_value__retval;
// Return
return value__retval;
}
// Signature, Windows.UI.Xaml.Controls.ITextBlock.put_FontWeight, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.BlittableStructMarshaller] Windows_UI_Text_FontWeight__Windows_UI_Text__FontWeight,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void put_FontWeight(
global::System.__ComObject __this,
global::Windows.UI.Text.FontWeight value)
{
// Setup
int unsafe___return__;
// Marshalling
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.UI.Xaml.Controls.ITextBlock).TypeHandle,
global::Windows.UI.Xaml.Controls.ITextBlock__Impl.Vtbl.idx_put_FontWeight,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
// Return
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.Media.Brush get_Foreground(global::System.__ComObject __this)
{
global::Windows.UI.Xaml.Media.Brush __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.UI.Xaml.Controls.ITextBlock, global::Windows.UI.Xaml.Media.Brush>(
__this,
global::Windows.UI.Xaml.Controls.ITextBlock__Impl.Vtbl.idx_get_Foreground
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void put_Foreground(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Media.Brush value)
{
global::McgInterop.ForwardComSharedStubs.Proc_TArg0__<global::Windows.UI.Xaml.Controls.ITextBlock, global::Windows.UI.Xaml.Media.Brush>(
__this,
value,
global::Windows.UI.Xaml.Controls.ITextBlock__Impl.Vtbl.idx_put_Foreground
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.TextWrapping get_TextWrapping(global::System.__ComObject __this)
{
global::Windows.UI.Xaml.TextWrapping __ret = global::McgInterop.ForwardComSharedStubs.Func_UI_Xaml_TextWrapping__<global::Windows.UI.Xaml.Controls.ITextBlock>(
__this,
global::Windows.UI.Xaml.Controls.ITextBlock__Impl.Vtbl.idx_get_TextWrapping
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void put_TextWrapping(
global::System.__ComObject __this,
global::Windows.UI.Xaml.TextWrapping value)
{
global::McgInterop.ForwardComSharedStubs.Proc_int<global::Windows.UI.Xaml.Controls.ITextBlock>(
__this,
((int)value),
global::Windows.UI.Xaml.Controls.ITextBlock__Impl.Vtbl.idx_put_TextWrapping
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static string get_Text(global::System.__ComObject __this)
{
string __ret = global::McgInterop.ForwardComSharedStubs.Func_string__<global::Windows.UI.Xaml.Controls.ITextBlock>(
__this,
global::Windows.UI.Xaml.Controls.ITextBlock__Impl.Vtbl.idx_get_Text
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void put_Text(
global::System.__ComObject __this,
string value)
{
global::McgInterop.ForwardComSharedStubs.Proc_string__<global::Windows.UI.Xaml.Controls.ITextBlock>(
__this,
value,
global::Windows.UI.Xaml.Controls.ITextBlock__Impl.Vtbl.idx_put_Text
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.Documents.InlineCollection get_Inlines(global::System.__ComObject __this)
{
global::Windows.UI.Xaml.Documents.InlineCollection __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.UI.Xaml.Controls.ITextBlock, global::Windows.UI.Xaml.Documents.InlineCollection>(
__this,
global::Windows.UI.Xaml.Controls.ITextBlock__Impl.Vtbl.idx_get_Inlines
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken add_SelectionChanged(
global::System.__ComObject __this,
global::Windows.UI.Xaml.RoutedEventHandler value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __ret = global::McgInterop.ForwardComSharedStubs.Func_UI_Xaml_RoutedEventHandler___WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.Controls.ITextBlock>(
__this,
value,
global::Windows.UI.Xaml.Controls.ITextBlock__Impl.Vtbl.idx_add_SelectionChanged
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void remove_SelectionChanged(
global::System.__ComObject __this,
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::McgInterop.ForwardComSharedStubs.Proc__WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.Controls.ITextBlock>(
__this,
token,
global::Windows.UI.Xaml.Controls.ITextBlock__Impl.Vtbl.idx_remove_SelectionChanged
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken add_ContextMenuOpening(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Controls.ContextMenuOpeningEventHandler value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __ret = global::McgInterop.ForwardComSharedStubs.Func_UI_Xaml_Controls_ContextMenuOpeningEventHandler___WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.Controls.ITextBlock>(
__this,
value,
global::Windows.UI.Xaml.Controls.ITextBlock__Impl.Vtbl.idx_add_ContextMenuOpening
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void remove_ContextMenuOpening(
global::System.__ComObject __this,
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::McgInterop.ForwardComSharedStubs.Proc__WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.Controls.ITextBlock>(
__this,
token,
global::Windows.UI.Xaml.Controls.ITextBlock__Impl.Vtbl.idx_remove_ContextMenuOpening
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// DispatchClass for 'Windows.UI.Xaml.Controls.ITextBlock'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.ITextBlock))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.UI.Xaml.Controls.ITextBlock
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.UI.Xaml.Controls.ITextBlock.FontSize")]
double global::Windows.UI.Xaml.Controls.ITextBlock.get_FontSize()
{
double __retVal = global::Windows.UI.Xaml.Controls.ITextBlock__Impl.StubClass.get_FontSize(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertySet, "Windows.UI.Xaml.Controls.ITextBlock.FontSize")]
void global::Windows.UI.Xaml.Controls.ITextBlock.put_FontSize(double value)
{
global::Windows.UI.Xaml.Controls.ITextBlock__Impl.StubClass.put_FontSize(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.UI.Xaml.Controls.ITextBlock.FontFamily")]
global::Windows.UI.Xaml.Media.FontFamily global::Windows.UI.Xaml.Controls.ITextBlock.get_FontFamily()
{
global::Windows.UI.Xaml.Media.FontFamily __retVal = global::Windows.UI.Xaml.Controls.ITextBlock__Impl.StubClass.get_FontFamily(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertySet, "Windows.UI.Xaml.Controls.ITextBlock.FontFamily")]
void global::Windows.UI.Xaml.Controls.ITextBlock.put_FontFamily(global::Windows.UI.Xaml.Media.FontFamily value)
{
global::Windows.UI.Xaml.Controls.ITextBlock__Impl.StubClass.put_FontFamily(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.UI.Xaml.Controls.ITextBlock.FontWeight")]
global::Windows.UI.Text.FontWeight global::Windows.UI.Xaml.Controls.ITextBlock.get_FontWeight()
{
global::Windows.UI.Text.FontWeight __retVal = global::Windows.UI.Xaml.Controls.ITextBlock__Impl.StubClass.get_FontWeight(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertySet, "Windows.UI.Xaml.Controls.ITextBlock.FontWeight")]
void global::Windows.UI.Xaml.Controls.ITextBlock.put_FontWeight(global::Windows.UI.Text.FontWeight value)
{
global::Windows.UI.Xaml.Controls.ITextBlock__Impl.StubClass.put_FontWeight(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.UI.Xaml.Controls.ITextBlock.Foreground")]
global::Windows.UI.Xaml.Media.Brush global::Windows.UI.Xaml.Controls.ITextBlock.get_Foreground()
{
global::Windows.UI.Xaml.Media.Brush __retVal = global::Windows.UI.Xaml.Controls.ITextBlock__Impl.StubClass.get_Foreground(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertySet, "Windows.UI.Xaml.Controls.ITextBlock.Foreground")]
void global::Windows.UI.Xaml.Controls.ITextBlock.put_Foreground(global::Windows.UI.Xaml.Media.Brush value)
{
global::Windows.UI.Xaml.Controls.ITextBlock__Impl.StubClass.put_Foreground(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.UI.Xaml.Controls.ITextBlock.TextWrapping")]
global::Windows.UI.Xaml.TextWrapping global::Windows.UI.Xaml.Controls.ITextBlock.get_TextWrapping()
{
global::Windows.UI.Xaml.TextWrapping __retVal = global::Windows.UI.Xaml.Controls.ITextBlock__Impl.StubClass.get_TextWrapping(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertySet, "Windows.UI.Xaml.Controls.ITextBlock.TextWrapping")]
void global::Windows.UI.Xaml.Controls.ITextBlock.put_TextWrapping(global::Windows.UI.Xaml.TextWrapping value)
{
global::Windows.UI.Xaml.Controls.ITextBlock__Impl.StubClass.put_TextWrapping(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.UI.Xaml.Controls.ITextBlock.Text")]
string global::Windows.UI.Xaml.Controls.ITextBlock.get_Text()
{
string __retVal = global::Windows.UI.Xaml.Controls.ITextBlock__Impl.StubClass.get_Text(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertySet, "Windows.UI.Xaml.Controls.ITextBlock.Text")]
void global::Windows.UI.Xaml.Controls.ITextBlock.put_Text(string value)
{
global::Windows.UI.Xaml.Controls.ITextBlock__Impl.StubClass.put_Text(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.UI.Xaml.Controls.ITextBlock.Inlines")]
global::Windows.UI.Xaml.Documents.InlineCollection global::Windows.UI.Xaml.Controls.ITextBlock.get_Inlines()
{
global::Windows.UI.Xaml.Documents.InlineCollection __retVal = global::Windows.UI.Xaml.Controls.ITextBlock__Impl.StubClass.get_Inlines(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventAdd, "Windows.UI.Xaml.Controls.ITextBlock.SelectionChanged")]
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken global::Windows.UI.Xaml.Controls.ITextBlock.add_SelectionChanged(global::Windows.UI.Xaml.RoutedEventHandler value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __retVal = global::Windows.UI.Xaml.Controls.ITextBlock__Impl.StubClass.add_SelectionChanged(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventRemove, "Windows.UI.Xaml.Controls.ITextBlock.SelectionChanged")]
void global::Windows.UI.Xaml.Controls.ITextBlock.remove_SelectionChanged(global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::Windows.UI.Xaml.Controls.ITextBlock__Impl.StubClass.remove_SelectionChanged(
this,
token
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventAdd, "Windows.UI.Xaml.Controls.ITextBlock.ContextMenuOpening")]
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken global::Windows.UI.Xaml.Controls.ITextBlock.add_ContextMenuOpening(global::Windows.UI.Xaml.Controls.ContextMenuOpeningEventHandler value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __retVal = global::Windows.UI.Xaml.Controls.ITextBlock__Impl.StubClass.add_ContextMenuOpening(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventRemove, "Windows.UI.Xaml.Controls.ITextBlock.ContextMenuOpening")]
void global::Windows.UI.Xaml.Controls.ITextBlock.remove_ContextMenuOpening(global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::Windows.UI.Xaml.Controls.ITextBlock__Impl.StubClass.remove_ContextMenuOpening(
this,
token
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// v-table for 'Windows.UI.Xaml.Controls.ITextBlock'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.ITextBlock))]
public unsafe partial struct Vtbl
{
internal const int idx_get_FontSize = 6;
internal const int idx_put_FontSize = 7;
internal const int idx_get_FontFamily = 8;
internal const int idx_put_FontFamily = 9;
internal const int idx_get_FontWeight = 10;
internal const int idx_put_FontWeight = 11;
internal const int idx_get_Foreground = 18;
internal const int idx_put_Foreground = 19;
internal const int idx_get_TextWrapping = 20;
internal const int idx_put_TextWrapping = 21;
internal const int idx_get_Text = 26;
internal const int idx_put_Text = 27;
internal const int idx_get_Inlines = 28;
internal const int idx_add_SelectionChanged = 43;
internal const int idx_remove_SelectionChanged = 44;
internal const int idx_add_ContextMenuOpening = 45;
internal const int idx_remove_ContextMenuOpening = 46;
}
}
// Windows.UI.Xaml.Controls.ContextMenuOpeningEventHandler
public unsafe static class ContextMenuOpeningEventHandler__Impl
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void Invoke(
this global::System.__ComObject __this,
object sender,
global::Windows.UI.Xaml.Controls.ContextMenuEventArgs e)
{
global::McgInterop.ForwardComSharedStubs.Proc_object__TArg0__<global::Windows.UI.Xaml.Controls.ContextMenuOpeningEventHandler, global::Windows.UI.Xaml.Controls.ContextMenuEventArgs>(
__this,
sender,
e,
global::Windows.UI.Xaml.Controls.ContextMenuOpeningEventHandler__Impl.Vtbl.idx_Invoke
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// v-table for 'Windows.UI.Xaml.Controls.ContextMenuOpeningEventHandler'
[global::System.Runtime.InteropServices.McgRootsType(typeof(global::Windows.UI.Xaml.Controls.ContextMenuOpeningEventHandler))]
public unsafe partial struct Vtbl
{
global::System.IntPtr pfnQueryInterface;
global::System.IntPtr pfnAddRef;
global::System.IntPtr pfnRelease;
// Windows_UI_Xaml_Controls__ContextMenuOpeningEventHandler
global::System.IntPtr pfnInvoke_Windows_UI_Xaml_Controls__ContextMenuOpeningEventHandler;
internal const int idx_Invoke = 3;
[global::System.Runtime.CompilerServices.InitDataBlob(typeof(global::Windows.UI.Xaml.Controls.ContextMenuOpeningEventHandler__Impl.Vtbl.Windows_UI_Xaml_Controls_ContextMenuOpeningEventHandler__Impl_Vtbl_McgRvaContainer), "RVA_Windows_UI_Xaml_Controls_ContextMenuOpeningEventHandler__Impl_Vtbl_s_theCcwVtable")]
public static global::Windows.UI.Xaml.Controls.ContextMenuOpeningEventHandler__Impl.Vtbl s_theCcwVtable
#if false
= new global::Windows.UI.Xaml.Controls.ContextMenuOpeningEventHandler__Impl.Vtbl() {
pfnQueryInterface = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfQueryInterface>(System.Runtime.InteropServices.__vtable_IUnknown.QueryInterface),
pfnAddRef = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfAddRef>(System.Runtime.InteropServices.__vtable_IUnknown.AddRef),
pfnRelease = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfRelease>(System.Runtime.InteropServices.__vtable_IUnknown.Release),
pfnInvoke_Windows_UI_Xaml_Controls__ContextMenuOpeningEventHandler = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget77>(global::Windows.UI.Xaml.Controls.ContextMenuOpeningEventHandler__Impl.Vtbl.Invoke__STUB),
}
#endif
;
public static global::System.IntPtr pNativeVtable;
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int Invoke__STUB(
global::System.IntPtr pComThis,
global::System.Runtime.InteropServices.__vtable_IInspectable* unsafe_sender,
global::Windows.UI.Xaml.Controls.IContextMenuEventArgs__Impl.Vtbl** unsafe_e)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.UI.Xaml.Controls.ContextMenuOpeningEventHandler>(
__this,
0
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Proc_object__TArg0__<global::Windows.UI.Xaml.Controls.ContextMenuEventArgs>(
__this,
unsafe_sender,
unsafe_e,
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
private static class Windows_UI_Xaml_Controls_ContextMenuOpeningEventHandler__Impl_Vtbl_McgRvaContainer
{
[global::System.Runtime.CompilerServices.MethodAddrFixup(0, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "QueryInterface")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(4, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "AddRef")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(8, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "Release")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(12, typeof(global::Windows.UI.Xaml.Controls.ContextMenuOpeningEventHandler__Impl.Vtbl), "Invoke__STUB")]
[global::System.Runtime.CompilerServices.NonArray]
static readonly byte[] RVA_Windows_UI_Xaml_Controls_ContextMenuOpeningEventHandler__Impl_Vtbl_s_theCcwVtable = new byte[] {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
}
}
}
// Windows.UI.Xaml.Controls.IContextMenuEventArgs
public unsafe static class IContextMenuEventArgs__Impl
{
// v-table for 'Windows.UI.Xaml.Controls.IContextMenuEventArgs'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.IContextMenuEventArgs))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Xaml.Controls.ITextBlock2
public unsafe static class ITextBlock2__Impl
{
// v-table for 'Windows.UI.Xaml.Controls.ITextBlock2'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.ITextBlock2))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Xaml.Controls.ITextBlock3
public unsafe static class ITextBlock3__Impl
{
// v-table for 'Windows.UI.Xaml.Controls.ITextBlock3'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.ITextBlock3))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Xaml.Controls.ITextBlock4
public unsafe static class ITextBlock4__Impl
{
// v-table for 'Windows.UI.Xaml.Controls.ITextBlock4'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.ITextBlock4))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Xaml.Controls.ISliderFactory
public unsafe static class ISliderFactory__Impl
{
// StubClass for 'Windows.UI.Xaml.Controls.ISliderFactory'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.IntPtr CreateInstance(
global::System.__ComObject __this,
global::System.IntPtr outer,
out global::System.IntPtr inner)
{
global::System.IntPtr __ret = global::McgInterop.ForwardComSharedStubs.Func_IntPtr__out_IntPtr__IntPtr__<global::Windows.UI.Xaml.Controls.ISliderFactory>(
__this,
outer,
out inner,
global::Windows.UI.Xaml.Controls.ISliderFactory__Impl.Vtbl.idx_CreateInstance
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
}
// DispatchClass for 'Windows.UI.Xaml.Controls.ISliderFactory'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.ISliderFactory))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.UI.Xaml.Controls.ISliderFactory
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
global::System.IntPtr global::Windows.UI.Xaml.Controls.ISliderFactory.CreateInstance(
global::System.IntPtr outer,
out global::System.IntPtr inner)
{
global::System.IntPtr __retVal = global::Windows.UI.Xaml.Controls.ISliderFactory__Impl.StubClass.CreateInstance(
this,
outer,
out inner
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.UI.Xaml.Controls.ISliderFactory'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.ISliderFactory))]
public unsafe partial struct Vtbl
{
internal const int idx_CreateInstance = 6;
}
}
// Windows.UI.Xaml.Controls.ISlider
public unsafe static class ISlider__Impl
{
// StubClass for 'Windows.UI.Xaml.Controls.ISlider'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static double get_StepFrequency(global::System.__ComObject __this)
{
double __ret = global::McgInterop.ForwardComSharedStubs.Func_double__<global::Windows.UI.Xaml.Controls.ISlider>(
__this,
global::Windows.UI.Xaml.Controls.ISlider__Impl.Vtbl.idx_get_StepFrequency
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void put_StepFrequency(
global::System.__ComObject __this,
double value)
{
global::McgInterop.ForwardComSharedStubs.Proc_double__<global::Windows.UI.Xaml.Controls.ISlider>(
__this,
value,
global::Windows.UI.Xaml.Controls.ISlider__Impl.Vtbl.idx_put_StepFrequency
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// DispatchClass for 'Windows.UI.Xaml.Controls.ISlider'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.ISlider))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.UI.Xaml.Controls.ISlider
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.UI.Xaml.Controls.ISlider.StepFrequency")]
double global::Windows.UI.Xaml.Controls.ISlider.get_StepFrequency()
{
double __retVal = global::Windows.UI.Xaml.Controls.ISlider__Impl.StubClass.get_StepFrequency(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertySet, "Windows.UI.Xaml.Controls.ISlider.StepFrequency")]
void global::Windows.UI.Xaml.Controls.ISlider.put_StepFrequency(double value)
{
global::Windows.UI.Xaml.Controls.ISlider__Impl.StubClass.put_StepFrequency(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// v-table for 'Windows.UI.Xaml.Controls.ISlider'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.ISlider))]
public unsafe partial struct Vtbl
{
internal const int idx_get_StepFrequency = 8;
internal const int idx_put_StepFrequency = 9;
}
}
// Windows.UI.Xaml.Controls.ISlider2
public unsafe static class ISlider2__Impl
{
// v-table for 'Windows.UI.Xaml.Controls.ISlider2'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.ISlider2))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Xaml.Controls.ITextBoxFactory
public unsafe static class ITextBoxFactory__Impl
{
// StubClass for 'Windows.UI.Xaml.Controls.ITextBoxFactory'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.IntPtr CreateInstance(
global::System.__ComObject __this,
global::System.IntPtr outer,
out global::System.IntPtr inner)
{
global::System.IntPtr __ret = global::McgInterop.ForwardComSharedStubs.Func_IntPtr__out_IntPtr__IntPtr__<global::Windows.UI.Xaml.Controls.ITextBoxFactory>(
__this,
outer,
out inner,
global::Windows.UI.Xaml.Controls.ITextBoxFactory__Impl.Vtbl.idx_CreateInstance
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
}
// DispatchClass for 'Windows.UI.Xaml.Controls.ITextBoxFactory'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.ITextBoxFactory))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.UI.Xaml.Controls.ITextBoxFactory
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
global::System.IntPtr global::Windows.UI.Xaml.Controls.ITextBoxFactory.CreateInstance(
global::System.IntPtr outer,
out global::System.IntPtr inner)
{
global::System.IntPtr __retVal = global::Windows.UI.Xaml.Controls.ITextBoxFactory__Impl.StubClass.CreateInstance(
this,
outer,
out inner
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.UI.Xaml.Controls.ITextBoxFactory'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.ITextBoxFactory))]
public unsafe partial struct Vtbl
{
internal const int idx_CreateInstance = 6;
}
}
// Windows.UI.Xaml.Controls.ITextBox
public unsafe static class ITextBox__Impl
{
// StubClass for 'Windows.UI.Xaml.Controls.ITextBox'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static string get_Text(global::System.__ComObject __this)
{
string __ret = global::McgInterop.ForwardComSharedStubs.Func_string__<global::Windows.UI.Xaml.Controls.ITextBox>(
__this,
global::Windows.UI.Xaml.Controls.ITextBox__Impl.Vtbl.idx_get_Text
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void put_Text(
global::System.__ComObject __this,
string value)
{
global::McgInterop.ForwardComSharedStubs.Proc_string__<global::Windows.UI.Xaml.Controls.ITextBox>(
__this,
value,
global::Windows.UI.Xaml.Controls.ITextBox__Impl.Vtbl.idx_put_Text
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.TextWrapping get_TextWrapping(global::System.__ComObject __this)
{
global::Windows.UI.Xaml.TextWrapping __ret = global::McgInterop.ForwardComSharedStubs.Func_UI_Xaml_TextWrapping__<global::Windows.UI.Xaml.Controls.ITextBox>(
__this,
global::Windows.UI.Xaml.Controls.ITextBox__Impl.Vtbl.idx_get_TextWrapping
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void put_TextWrapping(
global::System.__ComObject __this,
global::Windows.UI.Xaml.TextWrapping value)
{
global::McgInterop.ForwardComSharedStubs.Proc_int<global::Windows.UI.Xaml.Controls.ITextBox>(
__this,
((int)value),
global::Windows.UI.Xaml.Controls.ITextBox__Impl.Vtbl.idx_put_TextWrapping
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// Signature, Windows.UI.Xaml.Controls.ITextBox.add_TextChanged, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.WinRTDelegateMarshaller] Windows_UI_Xaml_Controls_TextChangedEventHandler__Windows_UI_Xaml_Controls__TextChangedEventHandler *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] System_Runtime_InteropServices_WindowsRuntime_EventRegistrationToken__Windows_Foundation__EventRegistrationToken,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken add_TextChanged(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Controls.TextChangedEventHandler value)
{
// Setup
global::Windows.UI.Xaml.Controls.TextChangedEventHandler__Impl.Vtbl** unsafe_value = default(global::Windows.UI.Xaml.Controls.TextChangedEventHandler__Impl.Vtbl**);
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken unsafe_token__retval;
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token__retval;
int unsafe___return__;
try
{
// Marshalling
unsafe_value = (global::Windows.UI.Xaml.Controls.TextChangedEventHandler__Impl.Vtbl**)global::System.Runtime.InteropServices.McgModuleManager.DelegateToComInterface(
value,
typeof(global::Windows.UI.Xaml.Controls.TextChangedEventHandler).TypeHandle,
global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget80>(global::Windows.UI.Xaml.Controls.TextChangedEventHandler__Impl.Invoke)
);
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.UI.Xaml.Controls.ITextBox).TypeHandle,
global::Windows.UI.Xaml.Controls.ITextBox__Impl.Vtbl.idx_add_TextChanged,
unsafe_value,
&(unsafe_token__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
token__retval = unsafe_token__retval;
// Return
return token__retval;
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_value)));
}
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void remove_TextChanged(
global::System.__ComObject __this,
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::McgInterop.ForwardComSharedStubs.Proc__WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.Controls.ITextBox>(
__this,
token,
global::Windows.UI.Xaml.Controls.ITextBox__Impl.Vtbl.idx_remove_TextChanged
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken add_SelectionChanged(
global::System.__ComObject __this,
global::Windows.UI.Xaml.RoutedEventHandler value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __ret = global::McgInterop.ForwardComSharedStubs.Func_UI_Xaml_RoutedEventHandler___WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.Controls.ITextBox>(
__this,
value,
global::Windows.UI.Xaml.Controls.ITextBox__Impl.Vtbl.idx_add_SelectionChanged
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void remove_SelectionChanged(
global::System.__ComObject __this,
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::McgInterop.ForwardComSharedStubs.Proc__WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.Controls.ITextBox>(
__this,
token,
global::Windows.UI.Xaml.Controls.ITextBox__Impl.Vtbl.idx_remove_SelectionChanged
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken add_ContextMenuOpening(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Controls.ContextMenuOpeningEventHandler value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __ret = global::McgInterop.ForwardComSharedStubs.Func_UI_Xaml_Controls_ContextMenuOpeningEventHandler___WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.Controls.ITextBox>(
__this,
value,
global::Windows.UI.Xaml.Controls.ITextBox__Impl.Vtbl.idx_add_ContextMenuOpening
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void remove_ContextMenuOpening(
global::System.__ComObject __this,
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::McgInterop.ForwardComSharedStubs.Proc__WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.Controls.ITextBox>(
__this,
token,
global::Windows.UI.Xaml.Controls.ITextBox__Impl.Vtbl.idx_remove_ContextMenuOpening
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// DispatchClass for 'Windows.UI.Xaml.Controls.ITextBox'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.ITextBox))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.UI.Xaml.Controls.ITextBox
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.UI.Xaml.Controls.ITextBox.Text")]
string global::Windows.UI.Xaml.Controls.ITextBox.get_Text()
{
string __retVal = global::Windows.UI.Xaml.Controls.ITextBox__Impl.StubClass.get_Text(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertySet, "Windows.UI.Xaml.Controls.ITextBox.Text")]
void global::Windows.UI.Xaml.Controls.ITextBox.put_Text(string value)
{
global::Windows.UI.Xaml.Controls.ITextBox__Impl.StubClass.put_Text(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.UI.Xaml.Controls.ITextBox.TextWrapping")]
global::Windows.UI.Xaml.TextWrapping global::Windows.UI.Xaml.Controls.ITextBox.get_TextWrapping()
{
global::Windows.UI.Xaml.TextWrapping __retVal = global::Windows.UI.Xaml.Controls.ITextBox__Impl.StubClass.get_TextWrapping(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertySet, "Windows.UI.Xaml.Controls.ITextBox.TextWrapping")]
void global::Windows.UI.Xaml.Controls.ITextBox.put_TextWrapping(global::Windows.UI.Xaml.TextWrapping value)
{
global::Windows.UI.Xaml.Controls.ITextBox__Impl.StubClass.put_TextWrapping(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventAdd, "Windows.UI.Xaml.Controls.ITextBox.TextChanged")]
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken global::Windows.UI.Xaml.Controls.ITextBox.add_TextChanged(global::Windows.UI.Xaml.Controls.TextChangedEventHandler value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __retVal = global::Windows.UI.Xaml.Controls.ITextBox__Impl.StubClass.add_TextChanged(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventRemove, "Windows.UI.Xaml.Controls.ITextBox.TextChanged")]
void global::Windows.UI.Xaml.Controls.ITextBox.remove_TextChanged(global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::Windows.UI.Xaml.Controls.ITextBox__Impl.StubClass.remove_TextChanged(
this,
token
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventAdd, "Windows.UI.Xaml.Controls.ITextBox.SelectionChanged")]
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken global::Windows.UI.Xaml.Controls.ITextBox.add_SelectionChanged(global::Windows.UI.Xaml.RoutedEventHandler value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __retVal = global::Windows.UI.Xaml.Controls.ITextBox__Impl.StubClass.add_SelectionChanged(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventRemove, "Windows.UI.Xaml.Controls.ITextBox.SelectionChanged")]
void global::Windows.UI.Xaml.Controls.ITextBox.remove_SelectionChanged(global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::Windows.UI.Xaml.Controls.ITextBox__Impl.StubClass.remove_SelectionChanged(
this,
token
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventAdd, "Windows.UI.Xaml.Controls.ITextBox.ContextMenuOpening")]
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken global::Windows.UI.Xaml.Controls.ITextBox.add_ContextMenuOpening(global::Windows.UI.Xaml.Controls.ContextMenuOpeningEventHandler value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __retVal = global::Windows.UI.Xaml.Controls.ITextBox__Impl.StubClass.add_ContextMenuOpening(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventRemove, "Windows.UI.Xaml.Controls.ITextBox.ContextMenuOpening")]
void global::Windows.UI.Xaml.Controls.ITextBox.remove_ContextMenuOpening(global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::Windows.UI.Xaml.Controls.ITextBox__Impl.StubClass.remove_ContextMenuOpening(
this,
token
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// v-table for 'Windows.UI.Xaml.Controls.ITextBox'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.ITextBox))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Text = 6;
internal const int idx_put_Text = 7;
internal const int idx_get_TextWrapping = 22;
internal const int idx_put_TextWrapping = 23;
internal const int idx_add_TextChanged = 30;
internal const int idx_remove_TextChanged = 31;
internal const int idx_add_SelectionChanged = 32;
internal const int idx_remove_SelectionChanged = 33;
internal const int idx_add_ContextMenuOpening = 34;
internal const int idx_remove_ContextMenuOpening = 35;
}
}
// Windows.UI.Xaml.Controls.TextChangedEventHandler
public unsafe static class TextChangedEventHandler__Impl
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void Invoke(
this global::System.__ComObject __this,
object sender,
global::Windows.UI.Xaml.Controls.TextChangedEventArgs e)
{
global::McgInterop.ForwardComSharedStubs.Proc_object__TArg0__<global::Windows.UI.Xaml.Controls.TextChangedEventHandler, global::Windows.UI.Xaml.Controls.TextChangedEventArgs>(
__this,
sender,
e,
global::Windows.UI.Xaml.Controls.TextChangedEventHandler__Impl.Vtbl.idx_Invoke
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// v-table for 'Windows.UI.Xaml.Controls.TextChangedEventHandler'
[global::System.Runtime.InteropServices.McgRootsType(typeof(global::Windows.UI.Xaml.Controls.TextChangedEventHandler))]
public unsafe partial struct Vtbl
{
global::System.IntPtr pfnQueryInterface;
global::System.IntPtr pfnAddRef;
global::System.IntPtr pfnRelease;
// Windows_UI_Xaml_Controls__TextChangedEventHandler
global::System.IntPtr pfnInvoke_Windows_UI_Xaml_Controls__TextChangedEventHandler;
internal const int idx_Invoke = 3;
[global::System.Runtime.CompilerServices.InitDataBlob(typeof(global::Windows.UI.Xaml.Controls.TextChangedEventHandler__Impl.Vtbl.Windows_UI_Xaml_Controls_TextChangedEventHandler__Impl_Vtbl_McgRvaContainer), "RVA_Windows_UI_Xaml_Controls_TextChangedEventHandler__Impl_Vtbl_s_theCcwVtable")]
public static global::Windows.UI.Xaml.Controls.TextChangedEventHandler__Impl.Vtbl s_theCcwVtable
#if false
= new global::Windows.UI.Xaml.Controls.TextChangedEventHandler__Impl.Vtbl() {
pfnQueryInterface = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfQueryInterface>(System.Runtime.InteropServices.__vtable_IUnknown.QueryInterface),
pfnAddRef = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfAddRef>(System.Runtime.InteropServices.__vtable_IUnknown.AddRef),
pfnRelease = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfRelease>(System.Runtime.InteropServices.__vtable_IUnknown.Release),
pfnInvoke_Windows_UI_Xaml_Controls__TextChangedEventHandler = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget81>(global::Windows.UI.Xaml.Controls.TextChangedEventHandler__Impl.Vtbl.Invoke__STUB),
}
#endif
;
public static global::System.IntPtr pNativeVtable;
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int Invoke__STUB(
global::System.IntPtr pComThis,
global::System.Runtime.InteropServices.__vtable_IInspectable* unsafe_sender,
global::Windows.UI.Xaml.Controls.ITextChangedEventArgs__Impl.Vtbl** unsafe_e)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.UI.Xaml.Controls.TextChangedEventHandler>(
__this,
0
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Proc_object__TArg0__<global::Windows.UI.Xaml.Controls.TextChangedEventArgs>(
__this,
unsafe_sender,
unsafe_e,
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
private static class Windows_UI_Xaml_Controls_TextChangedEventHandler__Impl_Vtbl_McgRvaContainer
{
[global::System.Runtime.CompilerServices.MethodAddrFixup(0, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "QueryInterface")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(4, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "AddRef")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(8, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "Release")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(12, typeof(global::Windows.UI.Xaml.Controls.TextChangedEventHandler__Impl.Vtbl), "Invoke__STUB")]
[global::System.Runtime.CompilerServices.NonArray]
static readonly byte[] RVA_Windows_UI_Xaml_Controls_TextChangedEventHandler__Impl_Vtbl_s_theCcwVtable = new byte[] {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
}
}
}
// Windows.UI.Xaml.Controls.ITextChangedEventArgs
public unsafe static class ITextChangedEventArgs__Impl
{
// v-table for 'Windows.UI.Xaml.Controls.ITextChangedEventArgs'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.ITextChangedEventArgs))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Xaml.Controls.ITextBox2
public unsafe static class ITextBox2__Impl
{
// StubClass for 'Windows.UI.Xaml.Controls.ITextBox2'
public static partial class StubClass
{
// Signature, Windows.UI.Xaml.Controls.ITextBox2.add_Paste, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.WinRTDelegateMarshaller] Windows_UI_Xaml_Controls_TextControlPasteEventHandler__Windows_UI_Xaml_Controls__TextControlPasteEventHandler *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] System_Runtime_InteropServices_WindowsRuntime_EventRegistrationToken__Windows_Foundation__EventRegistrationToken,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken add_Paste(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Controls.TextControlPasteEventHandler value)
{
// Setup
global::Windows.UI.Xaml.Controls.TextControlPasteEventHandler__Impl.Vtbl** unsafe_value = default(global::Windows.UI.Xaml.Controls.TextControlPasteEventHandler__Impl.Vtbl**);
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken unsafe_token__retval;
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token__retval;
int unsafe___return__;
try
{
// Marshalling
unsafe_value = (global::Windows.UI.Xaml.Controls.TextControlPasteEventHandler__Impl.Vtbl**)global::System.Runtime.InteropServices.McgModuleManager.DelegateToComInterface(
value,
typeof(global::Windows.UI.Xaml.Controls.TextControlPasteEventHandler).TypeHandle,
global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget82>(global::Windows.UI.Xaml.Controls.TextControlPasteEventHandler__Impl.Invoke)
);
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.UI.Xaml.Controls.ITextBox2).TypeHandle,
global::Windows.UI.Xaml.Controls.ITextBox2__Impl.Vtbl.idx_add_Paste,
unsafe_value,
&(unsafe_token__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
token__retval = unsafe_token__retval;
// Return
return token__retval;
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_value)));
}
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void remove_Paste(
global::System.__ComObject __this,
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::McgInterop.ForwardComSharedStubs.Proc__WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.Controls.ITextBox2>(
__this,
token,
global::Windows.UI.Xaml.Controls.ITextBox2__Impl.Vtbl.idx_remove_Paste
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// DispatchClass for 'Windows.UI.Xaml.Controls.ITextBox2'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.ITextBox2))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.UI.Xaml.Controls.ITextBox2
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventAdd, "Windows.UI.Xaml.Controls.ITextBox2.Paste")]
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken global::Windows.UI.Xaml.Controls.ITextBox2.add_Paste(global::Windows.UI.Xaml.Controls.TextControlPasteEventHandler value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __retVal = global::Windows.UI.Xaml.Controls.ITextBox2__Impl.StubClass.add_Paste(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventRemove, "Windows.UI.Xaml.Controls.ITextBox2.Paste")]
void global::Windows.UI.Xaml.Controls.ITextBox2.remove_Paste(global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::Windows.UI.Xaml.Controls.ITextBox2__Impl.StubClass.remove_Paste(
this,
token
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// v-table for 'Windows.UI.Xaml.Controls.ITextBox2'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.ITextBox2))]
public unsafe partial struct Vtbl
{
internal const int idx_add_Paste = 18;
internal const int idx_remove_Paste = 19;
}
}
// Windows.UI.Xaml.Controls.TextControlPasteEventHandler
public unsafe static class TextControlPasteEventHandler__Impl
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void Invoke(
this global::System.__ComObject __this,
object sender,
global::Windows.UI.Xaml.Controls.TextControlPasteEventArgs e)
{
global::McgInterop.ForwardComSharedStubs.Proc_object__TArg0__<global::Windows.UI.Xaml.Controls.TextControlPasteEventHandler, global::Windows.UI.Xaml.Controls.TextControlPasteEventArgs>(
__this,
sender,
e,
global::Windows.UI.Xaml.Controls.TextControlPasteEventHandler__Impl.Vtbl.idx_Invoke
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// v-table for 'Windows.UI.Xaml.Controls.TextControlPasteEventHandler'
[global::System.Runtime.InteropServices.McgRootsType(typeof(global::Windows.UI.Xaml.Controls.TextControlPasteEventHandler))]
public unsafe partial struct Vtbl
{
global::System.IntPtr pfnQueryInterface;
global::System.IntPtr pfnAddRef;
global::System.IntPtr pfnRelease;
// Windows_UI_Xaml_Controls__TextControlPasteEventHandler
global::System.IntPtr pfnInvoke_Windows_UI_Xaml_Controls__TextControlPasteEventHandler;
internal const int idx_Invoke = 3;
[global::System.Runtime.CompilerServices.InitDataBlob(typeof(global::Windows.UI.Xaml.Controls.TextControlPasteEventHandler__Impl.Vtbl.Windows_UI_Xaml_Controls_TextControlPasteEventHandler__Impl_Vtbl_McgRvaContainer), "RVA_Windows_UI_Xaml_Controls_TextControlPasteEventHandler__Impl_Vtbl_s_theCcwVtable")]
public static global::Windows.UI.Xaml.Controls.TextControlPasteEventHandler__Impl.Vtbl s_theCcwVtable
#if false
= new global::Windows.UI.Xaml.Controls.TextControlPasteEventHandler__Impl.Vtbl() {
pfnQueryInterface = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfQueryInterface>(System.Runtime.InteropServices.__vtable_IUnknown.QueryInterface),
pfnAddRef = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfAddRef>(System.Runtime.InteropServices.__vtable_IUnknown.AddRef),
pfnRelease = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfRelease>(System.Runtime.InteropServices.__vtable_IUnknown.Release),
pfnInvoke_Windows_UI_Xaml_Controls__TextControlPasteEventHandler = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget83>(global::Windows.UI.Xaml.Controls.TextControlPasteEventHandler__Impl.Vtbl.Invoke__STUB),
}
#endif
;
public static global::System.IntPtr pNativeVtable;
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int Invoke__STUB(
global::System.IntPtr pComThis,
global::System.Runtime.InteropServices.__vtable_IInspectable* unsafe_sender,
global::Windows.UI.Xaml.Controls.ITextControlPasteEventArgs__Impl.Vtbl** unsafe_e)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.UI.Xaml.Controls.TextControlPasteEventHandler>(
__this,
0
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Proc_object__TArg0__<global::Windows.UI.Xaml.Controls.TextControlPasteEventArgs>(
__this,
unsafe_sender,
unsafe_e,
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
private static class Windows_UI_Xaml_Controls_TextControlPasteEventHandler__Impl_Vtbl_McgRvaContainer
{
[global::System.Runtime.CompilerServices.MethodAddrFixup(0, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "QueryInterface")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(4, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "AddRef")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(8, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "Release")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(12, typeof(global::Windows.UI.Xaml.Controls.TextControlPasteEventHandler__Impl.Vtbl), "Invoke__STUB")]
[global::System.Runtime.CompilerServices.NonArray]
static readonly byte[] RVA_Windows_UI_Xaml_Controls_TextControlPasteEventHandler__Impl_Vtbl_s_theCcwVtable = new byte[] {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
}
}
}
// Windows.UI.Xaml.Controls.ITextControlPasteEventArgs
public unsafe static class ITextControlPasteEventArgs__Impl
{
// v-table for 'Windows.UI.Xaml.Controls.ITextControlPasteEventArgs'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.ITextControlPasteEventArgs))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Xaml.Controls.ITextBox3
public unsafe static class ITextBox3__Impl
{
// StubClass for 'Windows.UI.Xaml.Controls.ITextBox3'
public static partial class StubClass
{
// Signature, Windows.UI.Xaml.Controls.ITextBox3.add_TextCompositionStarted, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.WinRTDelegateMarshaller] Windows_Foundation_TypedEventHandler_2_Windows_UI_Xaml_Controls_TextBox__Windows_UI_Xaml_Controls_TextCompositionStartedEventArgs___Windows_Foundation__TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_TextCompositionStartedEventArgs_V_ *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] System_Runtime_InteropServices_WindowsRuntime_EventRegistrationToken__Windows_Foundation__EventRegistrationToken,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken add_TextCompositionStarted(
global::System.__ComObject __this,
global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.Controls.TextBox, global::Windows.UI.Xaml.Controls.TextCompositionStartedEventArgs> value)
{
// Setup
global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_TextCompositionStartedEventArgs_V___Impl.Vtbl** unsafe_value = default(global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_TextCompositionStartedEventArgs_V___Impl.Vtbl**);
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken unsafe_token__retval;
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token__retval;
int unsafe___return__;
try
{
// Marshalling
unsafe_value = (global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_TextCompositionStartedEventArgs_V___Impl.Vtbl**)global::System.Runtime.InteropServices.McgModuleManager.DelegateToComInterface(
value,
typeof(global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.Controls.TextBox, global::Windows.UI.Xaml.Controls.TextCompositionStartedEventArgs>).TypeHandle,
global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget84>(global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_TextCompositionStartedEventArgs_V___Impl.Invoke)
);
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.UI.Xaml.Controls.ITextBox3).TypeHandle,
global::Windows.UI.Xaml.Controls.ITextBox3__Impl.Vtbl.idx_add_TextCompositionStarted,
unsafe_value,
&(unsafe_token__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
token__retval = unsafe_token__retval;
// Return
return token__retval;
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_value)));
}
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void remove_TextCompositionStarted(
global::System.__ComObject __this,
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::McgInterop.ForwardComSharedStubs.Proc__WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.Controls.ITextBox3>(
__this,
token,
global::Windows.UI.Xaml.Controls.ITextBox3__Impl.Vtbl.idx_remove_TextCompositionStarted
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// Signature, Windows.UI.Xaml.Controls.ITextBox3.add_TextCompositionChanged, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.WinRTDelegateMarshaller] Windows_Foundation_TypedEventHandler_2_Windows_UI_Xaml_Controls_TextBox__Windows_UI_Xaml_Controls_TextCompositionChangedEventArgs___Windows_Foundation__TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_TextCompositionChangedEventArgs_V_ *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] System_Runtime_InteropServices_WindowsRuntime_EventRegistrationToken__Windows_Foundation__EventRegistrationToken,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken add_TextCompositionChanged(
global::System.__ComObject __this,
global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.Controls.TextBox, global::Windows.UI.Xaml.Controls.TextCompositionChangedEventArgs> value)
{
// Setup
global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_TextCompositionChangedEventArgs_V___Impl.Vtbl** unsafe_value = default(global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_TextCompositionChangedEventArgs_V___Impl.Vtbl**);
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken unsafe_token__retval;
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token__retval;
int unsafe___return__;
try
{
// Marshalling
unsafe_value = (global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_TextCompositionChangedEventArgs_V___Impl.Vtbl**)global::System.Runtime.InteropServices.McgModuleManager.DelegateToComInterface(
value,
typeof(global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.Controls.TextBox, global::Windows.UI.Xaml.Controls.TextCompositionChangedEventArgs>).TypeHandle,
global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget85>(global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_TextCompositionChangedEventArgs_V___Impl.Invoke)
);
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.UI.Xaml.Controls.ITextBox3).TypeHandle,
global::Windows.UI.Xaml.Controls.ITextBox3__Impl.Vtbl.idx_add_TextCompositionChanged,
unsafe_value,
&(unsafe_token__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
token__retval = unsafe_token__retval;
// Return
return token__retval;
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_value)));
}
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void remove_TextCompositionChanged(
global::System.__ComObject __this,
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::McgInterop.ForwardComSharedStubs.Proc__WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.Controls.ITextBox3>(
__this,
token,
global::Windows.UI.Xaml.Controls.ITextBox3__Impl.Vtbl.idx_remove_TextCompositionChanged
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// Signature, Windows.UI.Xaml.Controls.ITextBox3.add_TextCompositionEnded, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.WinRTDelegateMarshaller] Windows_Foundation_TypedEventHandler_2_Windows_UI_Xaml_Controls_TextBox__Windows_UI_Xaml_Controls_TextCompositionEndedEventArgs___Windows_Foundation__TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_TextCompositionEndedEventArgs_V_ *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] System_Runtime_InteropServices_WindowsRuntime_EventRegistrationToken__Windows_Foundation__EventRegistrationToken,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken add_TextCompositionEnded(
global::System.__ComObject __this,
global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.Controls.TextBox, global::Windows.UI.Xaml.Controls.TextCompositionEndedEventArgs> value)
{
// Setup
global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_TextCompositionEndedEventArgs_V___Impl.Vtbl** unsafe_value = default(global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_TextCompositionEndedEventArgs_V___Impl.Vtbl**);
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken unsafe_token__retval;
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token__retval;
int unsafe___return__;
try
{
// Marshalling
unsafe_value = (global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_TextCompositionEndedEventArgs_V___Impl.Vtbl**)global::System.Runtime.InteropServices.McgModuleManager.DelegateToComInterface(
value,
typeof(global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.Controls.TextBox, global::Windows.UI.Xaml.Controls.TextCompositionEndedEventArgs>).TypeHandle,
global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget86>(global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_TextCompositionEndedEventArgs_V___Impl.Invoke)
);
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.UI.Xaml.Controls.ITextBox3).TypeHandle,
global::Windows.UI.Xaml.Controls.ITextBox3__Impl.Vtbl.idx_add_TextCompositionEnded,
unsafe_value,
&(unsafe_token__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
token__retval = unsafe_token__retval;
// Return
return token__retval;
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_value)));
}
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void remove_TextCompositionEnded(
global::System.__ComObject __this,
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::McgInterop.ForwardComSharedStubs.Proc__WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.Controls.ITextBox3>(
__this,
token,
global::Windows.UI.Xaml.Controls.ITextBox3__Impl.Vtbl.idx_remove_TextCompositionEnded
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// Signature, Windows.UI.Xaml.Controls.ITextBox3.add_CandidateWindowBoundsChanged, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.WinRTDelegateMarshaller] Windows_Foundation_TypedEventHandler_2_Windows_UI_Xaml_Controls_TextBox__Windows_UI_Xaml_Controls_CandidateWindowBoundsChangedEventArgs___Windows_Foundation__TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_CandidateWindowBoundsChangedEventArgs_V_ *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] System_Runtime_InteropServices_WindowsRuntime_EventRegistrationToken__Windows_Foundation__EventRegistrationToken,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken add_CandidateWindowBoundsChanged(
global::System.__ComObject __this,
global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.Controls.TextBox, global::Windows.UI.Xaml.Controls.CandidateWindowBoundsChangedEventArgs> value)
{
// Setup
global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_CandidateWindowBoundsChangedEventArgs_V___Impl.Vtbl** unsafe_value = default(global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_CandidateWindowBoundsChangedEventArgs_V___Impl.Vtbl**);
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken unsafe_token__retval;
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token__retval;
int unsafe___return__;
try
{
// Marshalling
unsafe_value = (global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_CandidateWindowBoundsChangedEventArgs_V___Impl.Vtbl**)global::System.Runtime.InteropServices.McgModuleManager.DelegateToComInterface(
value,
typeof(global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.Controls.TextBox, global::Windows.UI.Xaml.Controls.CandidateWindowBoundsChangedEventArgs>).TypeHandle,
global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget87>(global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_CandidateWindowBoundsChangedEventArgs_V___Impl.Invoke)
);
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.UI.Xaml.Controls.ITextBox3).TypeHandle,
global::Windows.UI.Xaml.Controls.ITextBox3__Impl.Vtbl.idx_add_CandidateWindowBoundsChanged,
unsafe_value,
&(unsafe_token__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
token__retval = unsafe_token__retval;
// Return
return token__retval;
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_value)));
}
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void remove_CandidateWindowBoundsChanged(
global::System.__ComObject __this,
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::McgInterop.ForwardComSharedStubs.Proc__WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.Controls.ITextBox3>(
__this,
token,
global::Windows.UI.Xaml.Controls.ITextBox3__Impl.Vtbl.idx_remove_CandidateWindowBoundsChanged
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// Signature, Windows.UI.Xaml.Controls.ITextBox3.add_TextChanging, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.WinRTDelegateMarshaller] Windows_Foundation_TypedEventHandler_2_Windows_UI_Xaml_Controls_TextBox__Windows_UI_Xaml_Controls_TextBoxTextChangingEventArgs___Windows_Foundation__TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_TextBoxTextChangingEventArgs_V_ *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] System_Runtime_InteropServices_WindowsRuntime_EventRegistrationToken__Windows_Foundation__EventRegistrationToken,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken add_TextChanging(
global::System.__ComObject __this,
global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.Controls.TextBox, global::Windows.UI.Xaml.Controls.TextBoxTextChangingEventArgs> value)
{
// Setup
global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_TextBoxTextChangingEventArgs_V___Impl.Vtbl** unsafe_value = default(global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_TextBoxTextChangingEventArgs_V___Impl.Vtbl**);
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken unsafe_token__retval;
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token__retval;
int unsafe___return__;
try
{
// Marshalling
unsafe_value = (global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_TextBoxTextChangingEventArgs_V___Impl.Vtbl**)global::System.Runtime.InteropServices.McgModuleManager.DelegateToComInterface(
value,
typeof(global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.Controls.TextBox, global::Windows.UI.Xaml.Controls.TextBoxTextChangingEventArgs>).TypeHandle,
global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget88>(global::Windows.Foundation.TypedEventHandler_A_Windows_UI_Xaml_Controls_TextBox_j_Windows_UI_Xaml_Controls_TextBoxTextChangingEventArgs_V___Impl.Invoke)
);
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.UI.Xaml.Controls.ITextBox3).TypeHandle,
global::Windows.UI.Xaml.Controls.ITextBox3__Impl.Vtbl.idx_add_TextChanging,
unsafe_value,
&(unsafe_token__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
token__retval = unsafe_token__retval;
// Return
return token__retval;
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_value)));
}
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void remove_TextChanging(
global::System.__ComObject __this,
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::McgInterop.ForwardComSharedStubs.Proc__WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.Controls.ITextBox3>(
__this,
token,
global::Windows.UI.Xaml.Controls.ITextBox3__Impl.Vtbl.idx_remove_TextChanging
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// DispatchClass for 'Windows.UI.Xaml.Controls.ITextBox3'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.ITextBox3))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.UI.Xaml.Controls.ITextBox3
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventAdd, "Windows.UI.Xaml.Controls.ITextBox3.TextCompositionStarted")]
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken global::Windows.UI.Xaml.Controls.ITextBox3.add_TextCompositionStarted(global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.Controls.TextBox, global::Windows.UI.Xaml.Controls.TextCompositionStartedEventArgs> value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __retVal = global::Windows.UI.Xaml.Controls.ITextBox3__Impl.StubClass.add_TextCompositionStarted(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventRemove, "Windows.UI.Xaml.Controls.ITextBox3.TextCompositionStarted")]
void global::Windows.UI.Xaml.Controls.ITextBox3.remove_TextCompositionStarted(global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::Windows.UI.Xaml.Controls.ITextBox3__Impl.StubClass.remove_TextCompositionStarted(
this,
token
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventAdd, "Windows.UI.Xaml.Controls.ITextBox3.TextCompositionChanged")]
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken global::Windows.UI.Xaml.Controls.ITextBox3.add_TextCompositionChanged(global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.Controls.TextBox, global::Windows.UI.Xaml.Controls.TextCompositionChangedEventArgs> value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __retVal = global::Windows.UI.Xaml.Controls.ITextBox3__Impl.StubClass.add_TextCompositionChanged(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventRemove, "Windows.UI.Xaml.Controls.ITextBox3.TextCompositionChanged")]
void global::Windows.UI.Xaml.Controls.ITextBox3.remove_TextCompositionChanged(global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::Windows.UI.Xaml.Controls.ITextBox3__Impl.StubClass.remove_TextCompositionChanged(
this,
token
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventAdd, "Windows.UI.Xaml.Controls.ITextBox3.TextCompositionEnded")]
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken global::Windows.UI.Xaml.Controls.ITextBox3.add_TextCompositionEnded(global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.Controls.TextBox, global::Windows.UI.Xaml.Controls.TextCompositionEndedEventArgs> value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __retVal = global::Windows.UI.Xaml.Controls.ITextBox3__Impl.StubClass.add_TextCompositionEnded(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventRemove, "Windows.UI.Xaml.Controls.ITextBox3.TextCompositionEnded")]
void global::Windows.UI.Xaml.Controls.ITextBox3.remove_TextCompositionEnded(global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::Windows.UI.Xaml.Controls.ITextBox3__Impl.StubClass.remove_TextCompositionEnded(
this,
token
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventAdd, "Windows.UI.Xaml.Controls.ITextBox3.CandidateWindowBoundsChanged")]
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken global::Windows.UI.Xaml.Controls.ITextBox3.add_CandidateWindowBoundsChanged(global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.Controls.TextBox, global::Windows.UI.Xaml.Controls.CandidateWindowBoundsChangedEventArgs> value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __retVal = global::Windows.UI.Xaml.Controls.ITextBox3__Impl.StubClass.add_CandidateWindowBoundsChanged(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventRemove, "Windows.UI.Xaml.Controls.ITextBox3.CandidateWindowBoundsChanged")]
void global::Windows.UI.Xaml.Controls.ITextBox3.remove_CandidateWindowBoundsChanged(global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::Windows.UI.Xaml.Controls.ITextBox3__Impl.StubClass.remove_CandidateWindowBoundsChanged(
this,
token
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventAdd, "Windows.UI.Xaml.Controls.ITextBox3.TextChanging")]
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken global::Windows.UI.Xaml.Controls.ITextBox3.add_TextChanging(global::Windows.Foundation.TypedEventHandler<global::Windows.UI.Xaml.Controls.TextBox, global::Windows.UI.Xaml.Controls.TextBoxTextChangingEventArgs> value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __retVal = global::Windows.UI.Xaml.Controls.ITextBox3__Impl.StubClass.add_TextChanging(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventRemove, "Windows.UI.Xaml.Controls.ITextBox3.TextChanging")]
void global::Windows.UI.Xaml.Controls.ITextBox3.remove_TextChanging(global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::Windows.UI.Xaml.Controls.ITextBox3__Impl.StubClass.remove_TextChanging(
this,
token
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// v-table for 'Windows.UI.Xaml.Controls.ITextBox3'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.ITextBox3))]
public unsafe partial struct Vtbl
{
internal const int idx_add_TextCompositionStarted = 6;
internal const int idx_remove_TextCompositionStarted = 7;
internal const int idx_add_TextCompositionChanged = 8;
internal const int idx_remove_TextCompositionChanged = 9;
internal const int idx_add_TextCompositionEnded = 10;
internal const int idx_remove_TextCompositionEnded = 11;
internal const int idx_add_CandidateWindowBoundsChanged = 16;
internal const int idx_remove_CandidateWindowBoundsChanged = 17;
internal const int idx_add_TextChanging = 18;
internal const int idx_remove_TextChanging = 19;
}
}
// Windows.UI.Xaml.Controls.ITextCompositionStartedEventArgs
public unsafe static class ITextCompositionStartedEventArgs__Impl
{
// v-table for 'Windows.UI.Xaml.Controls.ITextCompositionStartedEventArgs'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.ITextCompositionStartedEventArgs))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Xaml.Controls.ITextCompositionChangedEventArgs
public unsafe static class ITextCompositionChangedEventArgs__Impl
{
// v-table for 'Windows.UI.Xaml.Controls.ITextCompositionChangedEventArgs'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.ITextCompositionChangedEventArgs))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Xaml.Controls.ITextCompositionEndedEventArgs
public unsafe static class ITextCompositionEndedEventArgs__Impl
{
// v-table for 'Windows.UI.Xaml.Controls.ITextCompositionEndedEventArgs'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.ITextCompositionEndedEventArgs))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Xaml.Controls.ICandidateWindowBoundsChangedEventArgs
public unsafe static class ICandidateWindowBoundsChangedEventArgs__Impl
{
// v-table for 'Windows.UI.Xaml.Controls.ICandidateWindowBoundsChangedEventArgs'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.ICandidateWindowBoundsChangedEventArgs))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Xaml.Controls.ITextBoxTextChangingEventArgs
public unsafe static class ITextBoxTextChangingEventArgs__Impl
{
// v-table for 'Windows.UI.Xaml.Controls.ITextBoxTextChangingEventArgs'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.ITextBoxTextChangingEventArgs))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Xaml.Controls.ITextBox4
public unsafe static class ITextBox4__Impl
{
// v-table for 'Windows.UI.Xaml.Controls.ITextBox4'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.ITextBox4))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Xaml.Controls.IRadioButtonFactory
public unsafe static class IRadioButtonFactory__Impl
{
// StubClass for 'Windows.UI.Xaml.Controls.IRadioButtonFactory'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.IntPtr CreateInstance(
global::System.__ComObject __this,
global::System.IntPtr outer,
out global::System.IntPtr inner)
{
global::System.IntPtr __ret = global::McgInterop.ForwardComSharedStubs.Func_IntPtr__out_IntPtr__IntPtr__<global::Windows.UI.Xaml.Controls.IRadioButtonFactory>(
__this,
outer,
out inner,
global::Windows.UI.Xaml.Controls.IRadioButtonFactory__Impl.Vtbl.idx_CreateInstance
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
}
// DispatchClass for 'Windows.UI.Xaml.Controls.IRadioButtonFactory'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.IRadioButtonFactory))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.UI.Xaml.Controls.IRadioButtonFactory
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
global::System.IntPtr global::Windows.UI.Xaml.Controls.IRadioButtonFactory.CreateInstance(
global::System.IntPtr outer,
out global::System.IntPtr inner)
{
global::System.IntPtr __retVal = global::Windows.UI.Xaml.Controls.IRadioButtonFactory__Impl.StubClass.CreateInstance(
this,
outer,
out inner
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.UI.Xaml.Controls.IRadioButtonFactory'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.IRadioButtonFactory))]
public unsafe partial struct Vtbl
{
internal const int idx_CreateInstance = 6;
}
}
// Windows.UI.Xaml.Controls.IRadioButton
public unsafe static class IRadioButton__Impl
{
// StubClass for 'Windows.UI.Xaml.Controls.IRadioButton'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static string get_GroupName(global::System.__ComObject __this)
{
string __ret = global::McgInterop.ForwardComSharedStubs.Func_string__<global::Windows.UI.Xaml.Controls.IRadioButton>(
__this,
global::Windows.UI.Xaml.Controls.IRadioButton__Impl.Vtbl.idx_get_GroupName
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void put_GroupName(
global::System.__ComObject __this,
string value)
{
global::McgInterop.ForwardComSharedStubs.Proc_string__<global::Windows.UI.Xaml.Controls.IRadioButton>(
__this,
value,
global::Windows.UI.Xaml.Controls.IRadioButton__Impl.Vtbl.idx_put_GroupName
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// DispatchClass for 'Windows.UI.Xaml.Controls.IRadioButton'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.IRadioButton))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.UI.Xaml.Controls.IRadioButton
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.UI.Xaml.Controls.IRadioButton.GroupName")]
string global::Windows.UI.Xaml.Controls.IRadioButton.get_GroupName()
{
string __retVal = global::Windows.UI.Xaml.Controls.IRadioButton__Impl.StubClass.get_GroupName(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertySet, "Windows.UI.Xaml.Controls.IRadioButton.GroupName")]
void global::Windows.UI.Xaml.Controls.IRadioButton.put_GroupName(string value)
{
global::Windows.UI.Xaml.Controls.IRadioButton__Impl.StubClass.put_GroupName(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// v-table for 'Windows.UI.Xaml.Controls.IRadioButton'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.IRadioButton))]
public unsafe partial struct Vtbl
{
internal const int idx_get_GroupName = 6;
internal const int idx_put_GroupName = 7;
}
}
// Windows.UI.Xaml.Controls.ICheckBoxFactory
public unsafe static class ICheckBoxFactory__Impl
{
// StubClass for 'Windows.UI.Xaml.Controls.ICheckBoxFactory'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.IntPtr CreateInstance(
global::System.__ComObject __this,
global::System.IntPtr outer,
out global::System.IntPtr inner)
{
global::System.IntPtr __ret = global::McgInterop.ForwardComSharedStubs.Func_IntPtr__out_IntPtr__IntPtr__<global::Windows.UI.Xaml.Controls.ICheckBoxFactory>(
__this,
outer,
out inner,
global::Windows.UI.Xaml.Controls.ICheckBoxFactory__Impl.Vtbl.idx_CreateInstance
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
}
// DispatchClass for 'Windows.UI.Xaml.Controls.ICheckBoxFactory'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.ICheckBoxFactory))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.UI.Xaml.Controls.ICheckBoxFactory
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
global::System.IntPtr global::Windows.UI.Xaml.Controls.ICheckBoxFactory.CreateInstance(
global::System.IntPtr outer,
out global::System.IntPtr inner)
{
global::System.IntPtr __retVal = global::Windows.UI.Xaml.Controls.ICheckBoxFactory__Impl.StubClass.CreateInstance(
this,
outer,
out inner
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.UI.Xaml.Controls.ICheckBoxFactory'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.ICheckBoxFactory))]
public unsafe partial struct Vtbl
{
internal const int idx_CreateInstance = 6;
}
}
// Windows.UI.Xaml.Controls.ICheckBox
public unsafe static class ICheckBox__Impl
{
// v-table for 'Windows.UI.Xaml.Controls.ICheckBox'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.ICheckBox))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Xaml.Controls.IDatePickerFactory
public unsafe static class IDatePickerFactory__Impl
{
// StubClass for 'Windows.UI.Xaml.Controls.IDatePickerFactory'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.IntPtr CreateInstance(
global::System.__ComObject __this,
global::System.IntPtr outer,
out global::System.IntPtr inner)
{
global::System.IntPtr __ret = global::McgInterop.ForwardComSharedStubs.Func_IntPtr__out_IntPtr__IntPtr__<global::Windows.UI.Xaml.Controls.IDatePickerFactory>(
__this,
outer,
out inner,
global::Windows.UI.Xaml.Controls.IDatePickerFactory__Impl.Vtbl.idx_CreateInstance
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
}
// DispatchClass for 'Windows.UI.Xaml.Controls.IDatePickerFactory'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.IDatePickerFactory))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.UI.Xaml.Controls.IDatePickerFactory
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
global::System.IntPtr global::Windows.UI.Xaml.Controls.IDatePickerFactory.CreateInstance(
global::System.IntPtr outer,
out global::System.IntPtr inner)
{
global::System.IntPtr __retVal = global::Windows.UI.Xaml.Controls.IDatePickerFactory__Impl.StubClass.CreateInstance(
this,
outer,
out inner
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.UI.Xaml.Controls.IDatePickerFactory'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.IDatePickerFactory))]
public unsafe partial struct Vtbl
{
internal const int idx_CreateInstance = 6;
}
}
// Windows.UI.Xaml.Controls.IDatePicker
public unsafe static class IDatePicker__Impl
{
// StubClass for 'Windows.UI.Xaml.Controls.IDatePicker'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.DateTimeOffset get_Date(global::System.__ComObject __this)
{
global::System.DateTimeOffset __ret = global::McgInterop.ForwardComSharedStubs.Func_DateTimeOffset__<global::Windows.UI.Xaml.Controls.IDatePicker>(
__this,
global::Windows.UI.Xaml.Controls.IDatePicker__Impl.Vtbl.idx_get_Date
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
// Signature, Windows.UI.Xaml.Controls.IDatePicker.add_DateChanged, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.WinRTDelegateMarshaller] System_EventHandler_1_Windows_UI_Xaml_Controls_DatePickerValueChangedEventArgs___Windows_Foundation__EventHandler_A_Windows_UI_Xaml_Controls_DatePickerValueChangedEventArgs_V_ *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] System_Runtime_InteropServices_WindowsRuntime_EventRegistrationToken__Windows_Foundation__EventRegistrationToken,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken add_DateChanged(
global::System.__ComObject __this,
global::System.EventHandler<global::Windows.UI.Xaml.Controls.DatePickerValueChangedEventArgs> value)
{
// Setup
global::System.EventHandler_A_Windows_UI_Xaml_Controls_DatePickerValueChangedEventArgs_V___Impl.Vtbl** unsafe_value = default(global::System.EventHandler_A_Windows_UI_Xaml_Controls_DatePickerValueChangedEventArgs_V___Impl.Vtbl**);
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken unsafe_token__retval;
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token__retval;
int unsafe___return__;
try
{
// Marshalling
unsafe_value = (global::System.EventHandler_A_Windows_UI_Xaml_Controls_DatePickerValueChangedEventArgs_V___Impl.Vtbl**)global::System.Runtime.InteropServices.McgModuleManager.DelegateToComInterface(
value,
typeof(global::System.EventHandler<global::Windows.UI.Xaml.Controls.DatePickerValueChangedEventArgs>).TypeHandle,
global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget94>(global::System.EventHandler_A_Windows_UI_Xaml_Controls_DatePickerValueChangedEventArgs_V___Impl.Invoke)
);
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.UI.Xaml.Controls.IDatePicker).TypeHandle,
global::Windows.UI.Xaml.Controls.IDatePicker__Impl.Vtbl.idx_add_DateChanged,
unsafe_value,
&(unsafe_token__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
token__retval = unsafe_token__retval;
// Return
return token__retval;
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_value)));
}
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void remove_DateChanged(
global::System.__ComObject __this,
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::McgInterop.ForwardComSharedStubs.Proc__WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.Controls.IDatePicker>(
__this,
token,
global::Windows.UI.Xaml.Controls.IDatePicker__Impl.Vtbl.idx_remove_DateChanged
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// DispatchClass for 'Windows.UI.Xaml.Controls.IDatePicker'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.IDatePicker))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.UI.Xaml.Controls.IDatePicker
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.UI.Xaml.Controls.IDatePicker.Date")]
global::System.DateTimeOffset global::Windows.UI.Xaml.Controls.IDatePicker.get_Date()
{
global::System.DateTimeOffset __retVal = global::Windows.UI.Xaml.Controls.IDatePicker__Impl.StubClass.get_Date(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventAdd, "Windows.UI.Xaml.Controls.IDatePicker.DateChanged")]
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken global::Windows.UI.Xaml.Controls.IDatePicker.add_DateChanged(global::System.EventHandler<global::Windows.UI.Xaml.Controls.DatePickerValueChangedEventArgs> value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __retVal = global::Windows.UI.Xaml.Controls.IDatePicker__Impl.StubClass.add_DateChanged(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventRemove, "Windows.UI.Xaml.Controls.IDatePicker.DateChanged")]
void global::Windows.UI.Xaml.Controls.IDatePicker.remove_DateChanged(global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::Windows.UI.Xaml.Controls.IDatePicker__Impl.StubClass.remove_DateChanged(
this,
token
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// v-table for 'Windows.UI.Xaml.Controls.IDatePicker'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.IDatePicker))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Date = 12;
internal const int idx_add_DateChanged = 32;
internal const int idx_remove_DateChanged = 33;
}
}
// Windows.UI.Xaml.Controls.IDatePickerValueChangedEventArgs
public unsafe static class IDatePickerValueChangedEventArgs__Impl
{
// v-table for 'Windows.UI.Xaml.Controls.IDatePickerValueChangedEventArgs'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.IDatePickerValueChangedEventArgs))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Xaml.Controls.IDatePicker2
public unsafe static class IDatePicker2__Impl
{
// v-table for 'Windows.UI.Xaml.Controls.IDatePicker2'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.IDatePicker2))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Xaml.Controls.ITimePickerFactory
public unsafe static class ITimePickerFactory__Impl
{
// StubClass for 'Windows.UI.Xaml.Controls.ITimePickerFactory'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.IntPtr CreateInstance(
global::System.__ComObject __this,
global::System.IntPtr outer,
out global::System.IntPtr inner)
{
global::System.IntPtr __ret = global::McgInterop.ForwardComSharedStubs.Func_IntPtr__out_IntPtr__IntPtr__<global::Windows.UI.Xaml.Controls.ITimePickerFactory>(
__this,
outer,
out inner,
global::Windows.UI.Xaml.Controls.ITimePickerFactory__Impl.Vtbl.idx_CreateInstance
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
}
// DispatchClass for 'Windows.UI.Xaml.Controls.ITimePickerFactory'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.ITimePickerFactory))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.UI.Xaml.Controls.ITimePickerFactory
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
global::System.IntPtr global::Windows.UI.Xaml.Controls.ITimePickerFactory.CreateInstance(
global::System.IntPtr outer,
out global::System.IntPtr inner)
{
global::System.IntPtr __retVal = global::Windows.UI.Xaml.Controls.ITimePickerFactory__Impl.StubClass.CreateInstance(
this,
outer,
out inner
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.UI.Xaml.Controls.ITimePickerFactory'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.ITimePickerFactory))]
public unsafe partial struct Vtbl
{
internal const int idx_CreateInstance = 6;
}
}
// Windows.UI.Xaml.Controls.ITimePicker
public unsafe static class ITimePicker__Impl
{
// StubClass for 'Windows.UI.Xaml.Controls.ITimePicker'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static string get_ClockIdentifier(global::System.__ComObject __this)
{
string __ret = global::McgInterop.ForwardComSharedStubs.Func_string__<global::Windows.UI.Xaml.Controls.ITimePicker>(
__this,
global::Windows.UI.Xaml.Controls.ITimePicker__Impl.Vtbl.idx_get_ClockIdentifier
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void put_ClockIdentifier(
global::System.__ComObject __this,
string value)
{
global::McgInterop.ForwardComSharedStubs.Proc_string__<global::Windows.UI.Xaml.Controls.ITimePicker>(
__this,
value,
global::Windows.UI.Xaml.Controls.ITimePicker__Impl.Vtbl.idx_put_ClockIdentifier
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// Signature, Windows.UI.Xaml.Controls.ITimePicker.get_Time, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] System_TimeSpan__Windows_Foundation__TimeSpan,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.TimeSpan get_Time(global::System.__ComObject __this)
{
// Setup
global::System.TimeSpan unsafe_value__retval;
global::System.TimeSpan value__retval;
int unsafe___return__;
// Marshalling
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.UI.Xaml.Controls.ITimePicker).TypeHandle,
global::Windows.UI.Xaml.Controls.ITimePicker__Impl.Vtbl.idx_get_Time,
&(unsafe_value__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
value__retval = unsafe_value__retval;
// Return
return value__retval;
}
// Signature, Windows.UI.Xaml.Controls.ITimePicker.add_TimeChanged, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.WinRTDelegateMarshaller] System_EventHandler_1_Windows_UI_Xaml_Controls_TimePickerValueChangedEventArgs___Windows_Foundation__EventHandler_A_Windows_UI_Xaml_Controls_TimePickerValueChangedEventArgs_V_ *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] System_Runtime_InteropServices_WindowsRuntime_EventRegistrationToken__Windows_Foundation__EventRegistrationToken,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken add_TimeChanged(
global::System.__ComObject __this,
global::System.EventHandler<global::Windows.UI.Xaml.Controls.TimePickerValueChangedEventArgs> value)
{
// Setup
global::System.EventHandler_A_Windows_UI_Xaml_Controls_TimePickerValueChangedEventArgs_V___Impl.Vtbl** unsafe_value = default(global::System.EventHandler_A_Windows_UI_Xaml_Controls_TimePickerValueChangedEventArgs_V___Impl.Vtbl**);
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken unsafe_token__retval;
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token__retval;
int unsafe___return__;
try
{
// Marshalling
unsafe_value = (global::System.EventHandler_A_Windows_UI_Xaml_Controls_TimePickerValueChangedEventArgs_V___Impl.Vtbl**)global::System.Runtime.InteropServices.McgModuleManager.DelegateToComInterface(
value,
typeof(global::System.EventHandler<global::Windows.UI.Xaml.Controls.TimePickerValueChangedEventArgs>).TypeHandle,
global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget96>(global::System.EventHandler_A_Windows_UI_Xaml_Controls_TimePickerValueChangedEventArgs_V___Impl.Invoke)
);
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.UI.Xaml.Controls.ITimePicker).TypeHandle,
global::Windows.UI.Xaml.Controls.ITimePicker__Impl.Vtbl.idx_add_TimeChanged,
unsafe_value,
&(unsafe_token__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
token__retval = unsafe_token__retval;
// Return
return token__retval;
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_value)));
}
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void remove_TimeChanged(
global::System.__ComObject __this,
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::McgInterop.ForwardComSharedStubs.Proc__WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.Controls.ITimePicker>(
__this,
token,
global::Windows.UI.Xaml.Controls.ITimePicker__Impl.Vtbl.idx_remove_TimeChanged
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// DispatchClass for 'Windows.UI.Xaml.Controls.ITimePicker'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.ITimePicker))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.UI.Xaml.Controls.ITimePicker
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.UI.Xaml.Controls.ITimePicker.ClockIdentifier")]
string global::Windows.UI.Xaml.Controls.ITimePicker.get_ClockIdentifier()
{
string __retVal = global::Windows.UI.Xaml.Controls.ITimePicker__Impl.StubClass.get_ClockIdentifier(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertySet, "Windows.UI.Xaml.Controls.ITimePicker.ClockIdentifier")]
void global::Windows.UI.Xaml.Controls.ITimePicker.put_ClockIdentifier(string value)
{
global::Windows.UI.Xaml.Controls.ITimePicker__Impl.StubClass.put_ClockIdentifier(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.UI.Xaml.Controls.ITimePicker.Time")]
global::System.TimeSpan global::Windows.UI.Xaml.Controls.ITimePicker.get_Time()
{
global::System.TimeSpan __retVal = global::Windows.UI.Xaml.Controls.ITimePicker__Impl.StubClass.get_Time(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventAdd, "Windows.UI.Xaml.Controls.ITimePicker.TimeChanged")]
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken global::Windows.UI.Xaml.Controls.ITimePicker.add_TimeChanged(global::System.EventHandler<global::Windows.UI.Xaml.Controls.TimePickerValueChangedEventArgs> value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __retVal = global::Windows.UI.Xaml.Controls.ITimePicker__Impl.StubClass.add_TimeChanged(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventRemove, "Windows.UI.Xaml.Controls.ITimePicker.TimeChanged")]
void global::Windows.UI.Xaml.Controls.ITimePicker.remove_TimeChanged(global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::Windows.UI.Xaml.Controls.ITimePicker__Impl.StubClass.remove_TimeChanged(
this,
token
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// v-table for 'Windows.UI.Xaml.Controls.ITimePicker'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.ITimePicker))]
public unsafe partial struct Vtbl
{
internal const int idx_get_ClockIdentifier = 10;
internal const int idx_put_ClockIdentifier = 11;
internal const int idx_get_Time = 14;
internal const int idx_add_TimeChanged = 16;
internal const int idx_remove_TimeChanged = 17;
}
}
// Windows.UI.Xaml.Controls.ITimePickerValueChangedEventArgs
public unsafe static class ITimePickerValueChangedEventArgs__Impl
{
// v-table for 'Windows.UI.Xaml.Controls.ITimePickerValueChangedEventArgs'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.ITimePickerValueChangedEventArgs))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Xaml.Controls.ITimePicker2
public unsafe static class ITimePicker2__Impl
{
// v-table for 'Windows.UI.Xaml.Controls.ITimePicker2'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.ITimePicker2))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Xaml.Controls.IFrameFactory
public unsafe static class IFrameFactory__Impl
{
// StubClass for 'Windows.UI.Xaml.Controls.IFrameFactory'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.IntPtr CreateInstance(
global::System.__ComObject __this,
global::System.IntPtr outer,
out global::System.IntPtr inner)
{
global::System.IntPtr __ret = global::McgInterop.ForwardComSharedStubs.Func_IntPtr__out_IntPtr__IntPtr__<global::Windows.UI.Xaml.Controls.IFrameFactory>(
__this,
outer,
out inner,
global::Windows.UI.Xaml.Controls.IFrameFactory__Impl.Vtbl.idx_CreateInstance
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
}
// DispatchClass for 'Windows.UI.Xaml.Controls.IFrameFactory'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.IFrameFactory))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.UI.Xaml.Controls.IFrameFactory
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
global::System.IntPtr global::Windows.UI.Xaml.Controls.IFrameFactory.CreateInstance(
global::System.IntPtr outer,
out global::System.IntPtr inner)
{
global::System.IntPtr __retVal = global::Windows.UI.Xaml.Controls.IFrameFactory__Impl.StubClass.CreateInstance(
this,
outer,
out inner
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.UI.Xaml.Controls.IFrameFactory'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.IFrameFactory))]
public unsafe partial struct Vtbl
{
internal const int idx_CreateInstance = 6;
}
}
// Windows.UI.Xaml.Controls.IFrame
public unsafe static class IFrame__Impl
{
// StubClass for 'Windows.UI.Xaml.Controls.IFrame'
public static partial class StubClass
{
// Signature, Windows.UI.Xaml.Controls.IFrame.add_Navigated, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.WinRTDelegateMarshaller] Windows_UI_Xaml_Navigation_NavigatedEventHandler__Windows_UI_Xaml_Navigation__NavigatedEventHandler *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] System_Runtime_InteropServices_WindowsRuntime_EventRegistrationToken__Windows_Foundation__EventRegistrationToken,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken add_Navigated(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Navigation.NavigatedEventHandler value)
{
// Setup
global::Windows.UI.Xaml.Navigation.NavigatedEventHandler__Impl.Vtbl** unsafe_value = default(global::Windows.UI.Xaml.Navigation.NavigatedEventHandler__Impl.Vtbl**);
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken unsafe_token__retval;
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token__retval;
int unsafe___return__;
try
{
// Marshalling
unsafe_value = (global::Windows.UI.Xaml.Navigation.NavigatedEventHandler__Impl.Vtbl**)global::System.Runtime.InteropServices.McgModuleManager.DelegateToComInterface(
value,
typeof(global::Windows.UI.Xaml.Navigation.NavigatedEventHandler).TypeHandle,
global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget125>(global::Windows.UI.Xaml.Navigation.NavigatedEventHandler__Impl.Invoke)
);
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.UI.Xaml.Controls.IFrame).TypeHandle,
global::Windows.UI.Xaml.Controls.IFrame__Impl.Vtbl.idx_add_Navigated,
unsafe_value,
&(unsafe_token__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
token__retval = unsafe_token__retval;
// Return
return token__retval;
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_value)));
}
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void remove_Navigated(
global::System.__ComObject __this,
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::McgInterop.ForwardComSharedStubs.Proc__WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.Controls.IFrame>(
__this,
token,
global::Windows.UI.Xaml.Controls.IFrame__Impl.Vtbl.idx_remove_Navigated
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// Signature, Windows.UI.Xaml.Controls.IFrame.add_Navigating, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.WinRTDelegateMarshaller] Windows_UI_Xaml_Navigation_NavigatingCancelEventHandler__Windows_UI_Xaml_Navigation__NavigatingCancelEventHandler *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] System_Runtime_InteropServices_WindowsRuntime_EventRegistrationToken__Windows_Foundation__EventRegistrationToken,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken add_Navigating(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Navigation.NavigatingCancelEventHandler value)
{
// Setup
global::Windows.UI.Xaml.Navigation.NavigatingCancelEventHandler__Impl.Vtbl** unsafe_value = default(global::Windows.UI.Xaml.Navigation.NavigatingCancelEventHandler__Impl.Vtbl**);
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken unsafe_token__retval;
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token__retval;
int unsafe___return__;
try
{
// Marshalling
unsafe_value = (global::Windows.UI.Xaml.Navigation.NavigatingCancelEventHandler__Impl.Vtbl**)global::System.Runtime.InteropServices.McgModuleManager.DelegateToComInterface(
value,
typeof(global::Windows.UI.Xaml.Navigation.NavigatingCancelEventHandler).TypeHandle,
global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget126>(global::Windows.UI.Xaml.Navigation.NavigatingCancelEventHandler__Impl.Invoke)
);
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.UI.Xaml.Controls.IFrame).TypeHandle,
global::Windows.UI.Xaml.Controls.IFrame__Impl.Vtbl.idx_add_Navigating,
unsafe_value,
&(unsafe_token__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
token__retval = unsafe_token__retval;
// Return
return token__retval;
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_value)));
}
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void remove_Navigating(
global::System.__ComObject __this,
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::McgInterop.ForwardComSharedStubs.Proc__WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.Controls.IFrame>(
__this,
token,
global::Windows.UI.Xaml.Controls.IFrame__Impl.Vtbl.idx_remove_Navigating
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// Signature, Windows.UI.Xaml.Controls.IFrame.add_NavigationFailed, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.WinRTDelegateMarshaller] Windows_UI_Xaml_Navigation_NavigationFailedEventHandler__Windows_UI_Xaml_Navigation__NavigationFailedEventHandler *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] System_Runtime_InteropServices_WindowsRuntime_EventRegistrationToken__Windows_Foundation__EventRegistrationToken,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken add_NavigationFailed(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Navigation.NavigationFailedEventHandler value)
{
// Setup
global::Windows.UI.Xaml.Navigation.NavigationFailedEventHandler__Impl.Vtbl** unsafe_value = default(global::Windows.UI.Xaml.Navigation.NavigationFailedEventHandler__Impl.Vtbl**);
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken unsafe_token__retval;
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token__retval;
int unsafe___return__;
try
{
// Marshalling
unsafe_value = (global::Windows.UI.Xaml.Navigation.NavigationFailedEventHandler__Impl.Vtbl**)global::System.Runtime.InteropServices.McgModuleManager.DelegateToComInterface(
value,
typeof(global::Windows.UI.Xaml.Navigation.NavigationFailedEventHandler).TypeHandle,
global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget127>(global::Windows.UI.Xaml.Navigation.NavigationFailedEventHandler__Impl.Invoke)
);
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.UI.Xaml.Controls.IFrame).TypeHandle,
global::Windows.UI.Xaml.Controls.IFrame__Impl.Vtbl.idx_add_NavigationFailed,
unsafe_value,
&(unsafe_token__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
token__retval = unsafe_token__retval;
// Return
return token__retval;
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_value)));
}
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void remove_NavigationFailed(
global::System.__ComObject __this,
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::McgInterop.ForwardComSharedStubs.Proc__WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.Controls.IFrame>(
__this,
token,
global::Windows.UI.Xaml.Controls.IFrame__Impl.Vtbl.idx_remove_NavigationFailed
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// Signature, Windows.UI.Xaml.Controls.IFrame.add_NavigationStopped, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.WinRTDelegateMarshaller] Windows_UI_Xaml_Navigation_NavigationStoppedEventHandler__Windows_UI_Xaml_Navigation__NavigationStoppedEventHandler *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] System_Runtime_InteropServices_WindowsRuntime_EventRegistrationToken__Windows_Foundation__EventRegistrationToken,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken add_NavigationStopped(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Navigation.NavigationStoppedEventHandler value)
{
// Setup
global::Windows.UI.Xaml.Navigation.NavigationStoppedEventHandler__Impl.Vtbl** unsafe_value = default(global::Windows.UI.Xaml.Navigation.NavigationStoppedEventHandler__Impl.Vtbl**);
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken unsafe_token__retval;
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token__retval;
int unsafe___return__;
try
{
// Marshalling
unsafe_value = (global::Windows.UI.Xaml.Navigation.NavigationStoppedEventHandler__Impl.Vtbl**)global::System.Runtime.InteropServices.McgModuleManager.DelegateToComInterface(
value,
typeof(global::Windows.UI.Xaml.Navigation.NavigationStoppedEventHandler).TypeHandle,
global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget125>(global::Windows.UI.Xaml.Navigation.NavigationStoppedEventHandler__Impl.Invoke)
);
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.UI.Xaml.Controls.IFrame).TypeHandle,
global::Windows.UI.Xaml.Controls.IFrame__Impl.Vtbl.idx_add_NavigationStopped,
unsafe_value,
&(unsafe_token__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
token__retval = unsafe_token__retval;
// Return
return token__retval;
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_value)));
}
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void remove_NavigationStopped(
global::System.__ComObject __this,
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::McgInterop.ForwardComSharedStubs.Proc__WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.Controls.IFrame>(
__this,
token,
global::Windows.UI.Xaml.Controls.IFrame__Impl.Vtbl.idx_remove_NavigationStopped
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// Signature, Windows.UI.Xaml.Controls.IFrame.Navigate, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.WinRTTypeNameMarshaller] System_Type__Windows_UI_Xaml_Interop__TypeName, [fwd] [in] [Mcg.CodeGen.WinRTInspectableMarshaller] object____mcg_IInspectable, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.CBoolMarshaller] bool__bool,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool Navigate(
global::System.__ComObject __this,
global::System.Type sourcePageType,
object parameter)
{
// Setup
global::System.Type__Impl.UnsafeType unsafe_sourcePageType;
global::System.Runtime.InteropServices.__vtable_IInspectable* unsafe_parameter = default(global::System.Runtime.InteropServices.__vtable_IInspectable*);
bool returnValue__retval;
sbyte unsafe_returnValue__retval;
int unsafe___return__;
try
{
// Marshalling
global::System.Runtime.InteropServices.HSTRING unsafe_sourcePageType__HSTRING__Name;
int unsafe_sourcePageType__int__Kind;
global::System.Runtime.InteropServices.McgMarshal.TypeToTypeName(
sourcePageType,
out unsafe_sourcePageType__HSTRING__Name,
out unsafe_sourcePageType__int__Kind
);
unsafe_sourcePageType.Name = unsafe_sourcePageType__HSTRING__Name;
unsafe_sourcePageType.Kind = (global::Windows.UI.Xaml.Interop.TypeKind)unsafe_sourcePageType__int__Kind;
unsafe_parameter = (global::System.Runtime.InteropServices.__vtable_IInspectable*)global::System.Runtime.InteropServices.McgMarshal.ObjectToIInspectable(parameter);
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.UI.Xaml.Controls.IFrame).TypeHandle,
global::Windows.UI.Xaml.Controls.IFrame__Impl.Vtbl.idx_Navigate,
unsafe_sourcePageType,
unsafe_parameter,
&(unsafe_returnValue__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
returnValue__retval = unsafe_returnValue__retval != 0;
// Return
return returnValue__retval;
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_parameter)));
}
}
}
// DispatchClass for 'Windows.UI.Xaml.Controls.IFrame'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.IFrame))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.UI.Xaml.Controls.IFrame
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventAdd, "Windows.UI.Xaml.Controls.IFrame.Navigated")]
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken global::Windows.UI.Xaml.Controls.IFrame.add_Navigated(global::Windows.UI.Xaml.Navigation.NavigatedEventHandler value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __retVal = global::Windows.UI.Xaml.Controls.IFrame__Impl.StubClass.add_Navigated(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventRemove, "Windows.UI.Xaml.Controls.IFrame.Navigated")]
void global::Windows.UI.Xaml.Controls.IFrame.remove_Navigated(global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::Windows.UI.Xaml.Controls.IFrame__Impl.StubClass.remove_Navigated(
this,
token
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventAdd, "Windows.UI.Xaml.Controls.IFrame.Navigating")]
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken global::Windows.UI.Xaml.Controls.IFrame.add_Navigating(global::Windows.UI.Xaml.Navigation.NavigatingCancelEventHandler value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __retVal = global::Windows.UI.Xaml.Controls.IFrame__Impl.StubClass.add_Navigating(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventRemove, "Windows.UI.Xaml.Controls.IFrame.Navigating")]
void global::Windows.UI.Xaml.Controls.IFrame.remove_Navigating(global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::Windows.UI.Xaml.Controls.IFrame__Impl.StubClass.remove_Navigating(
this,
token
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventAdd, "Windows.UI.Xaml.Controls.IFrame.NavigationFailed")]
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken global::Windows.UI.Xaml.Controls.IFrame.add_NavigationFailed(global::Windows.UI.Xaml.Navigation.NavigationFailedEventHandler value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __retVal = global::Windows.UI.Xaml.Controls.IFrame__Impl.StubClass.add_NavigationFailed(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventRemove, "Windows.UI.Xaml.Controls.IFrame.NavigationFailed")]
void global::Windows.UI.Xaml.Controls.IFrame.remove_NavigationFailed(global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::Windows.UI.Xaml.Controls.IFrame__Impl.StubClass.remove_NavigationFailed(
this,
token
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventAdd, "Windows.UI.Xaml.Controls.IFrame.NavigationStopped")]
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken global::Windows.UI.Xaml.Controls.IFrame.add_NavigationStopped(global::Windows.UI.Xaml.Navigation.NavigationStoppedEventHandler value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __retVal = global::Windows.UI.Xaml.Controls.IFrame__Impl.StubClass.add_NavigationStopped(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventRemove, "Windows.UI.Xaml.Controls.IFrame.NavigationStopped")]
void global::Windows.UI.Xaml.Controls.IFrame.remove_NavigationStopped(global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::Windows.UI.Xaml.Controls.IFrame__Impl.StubClass.remove_NavigationStopped(
this,
token
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
bool global::Windows.UI.Xaml.Controls.IFrame.Navigate(
global::System.Type sourcePageType,
object parameter)
{
bool __retVal = global::Windows.UI.Xaml.Controls.IFrame__Impl.StubClass.Navigate(
this,
sourcePageType,
parameter
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.UI.Xaml.Controls.IFrame'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.IFrame))]
public unsafe partial struct Vtbl
{
internal const int idx_add_Navigated = 14;
internal const int idx_remove_Navigated = 15;
internal const int idx_add_Navigating = 16;
internal const int idx_remove_Navigating = 17;
internal const int idx_add_NavigationFailed = 18;
internal const int idx_remove_NavigationFailed = 19;
internal const int idx_add_NavigationStopped = 20;
internal const int idx_remove_NavigationStopped = 21;
internal const int idx_Navigate = 24;
}
}
// Windows.UI.Xaml.Controls.INavigate
public unsafe static class INavigate__Impl
{
// StubClass for 'Windows.UI.Xaml.Controls.INavigate'
public static partial class StubClass
{
// Signature, Windows.UI.Xaml.Controls.INavigate.Navigate, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.WinRTTypeNameMarshaller] System_Type__Windows_UI_Xaml_Interop__TypeName, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.CBoolMarshaller] bool__bool,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool Navigate(
global::System.__ComObject __this,
global::System.Type sourcePageType)
{
// Setup
global::System.Type__Impl.UnsafeType unsafe_sourcePageType;
bool returnValue__retval;
sbyte unsafe_returnValue__retval;
int unsafe___return__;
// Marshalling
global::System.Runtime.InteropServices.HSTRING unsafe_sourcePageType__HSTRING__Name;
int unsafe_sourcePageType__int__Kind;
global::System.Runtime.InteropServices.McgMarshal.TypeToTypeName(
sourcePageType,
out unsafe_sourcePageType__HSTRING__Name,
out unsafe_sourcePageType__int__Kind
);
unsafe_sourcePageType.Name = unsafe_sourcePageType__HSTRING__Name;
unsafe_sourcePageType.Kind = (global::Windows.UI.Xaml.Interop.TypeKind)unsafe_sourcePageType__int__Kind;
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.UI.Xaml.Controls.INavigate).TypeHandle,
global::Windows.UI.Xaml.Controls.INavigate__Impl.Vtbl.idx_Navigate,
unsafe_sourcePageType,
&(unsafe_returnValue__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
returnValue__retval = unsafe_returnValue__retval != 0;
// Return
return returnValue__retval;
}
}
// DispatchClass for 'Windows.UI.Xaml.Controls.INavigate'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.INavigate))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.UI.Xaml.Controls.INavigate
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
bool global::Windows.UI.Xaml.Controls.INavigate.Navigate(global::System.Type sourcePageType)
{
bool __retVal = global::Windows.UI.Xaml.Controls.INavigate__Impl.StubClass.Navigate(
this,
sourcePageType
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.UI.Xaml.Controls.INavigate'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.INavigate))]
public unsafe partial struct Vtbl
{
internal const int idx_Navigate = 6;
}
}
// Windows.UI.Xaml.Controls.IFrame2
public unsafe static class IFrame2__Impl
{
// v-table for 'Windows.UI.Xaml.Controls.IFrame2'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.IFrame2))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Xaml.Controls.IFrame3
public unsafe static class IFrame3__Impl
{
// v-table for 'Windows.UI.Xaml.Controls.IFrame3'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.IFrame3))]
public unsafe partial struct Vtbl
{
}
}
}
namespace Windows.UI.Xaml.Controls.Primitives
{
// Windows.UI.Xaml.Controls.Primitives.IButtonBase
public unsafe static class IButtonBase__Impl
{
// StubClass for 'Windows.UI.Xaml.Controls.Primitives.IButtonBase'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken add_Click(
global::System.__ComObject __this,
global::Windows.UI.Xaml.RoutedEventHandler value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __ret = global::McgInterop.ForwardComSharedStubs.Func_UI_Xaml_RoutedEventHandler___WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.Controls.Primitives.IButtonBase>(
__this,
value,
global::Windows.UI.Xaml.Controls.Primitives.IButtonBase__Impl.Vtbl.idx_add_Click
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void remove_Click(
global::System.__ComObject __this,
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::McgInterop.ForwardComSharedStubs.Proc__WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.Controls.Primitives.IButtonBase>(
__this,
token,
global::Windows.UI.Xaml.Controls.Primitives.IButtonBase__Impl.Vtbl.idx_remove_Click
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// DispatchClass for 'Windows.UI.Xaml.Controls.Primitives.IButtonBase'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.Primitives.IButtonBase))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.UI.Xaml.Controls.Primitives.IButtonBase
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventAdd, "Windows.UI.Xaml.Controls.Primitives.IButtonBase.Click")]
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken global::Windows.UI.Xaml.Controls.Primitives.IButtonBase.add_Click(global::Windows.UI.Xaml.RoutedEventHandler value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __retVal = global::Windows.UI.Xaml.Controls.Primitives.IButtonBase__Impl.StubClass.add_Click(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventRemove, "Windows.UI.Xaml.Controls.Primitives.IButtonBase.Click")]
void global::Windows.UI.Xaml.Controls.Primitives.IButtonBase.remove_Click(global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::Windows.UI.Xaml.Controls.Primitives.IButtonBase__Impl.StubClass.remove_Click(
this,
token
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// v-table for 'Windows.UI.Xaml.Controls.Primitives.IButtonBase'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.Primitives.IButtonBase))]
public unsafe partial struct Vtbl
{
internal const int idx_add_Click = 14;
internal const int idx_remove_Click = 15;
}
}
// Windows.UI.Xaml.Controls.Primitives.IRangeBase
public unsafe static class IRangeBase__Impl
{
// StubClass for 'Windows.UI.Xaml.Controls.Primitives.IRangeBase'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void put_Minimum(
global::System.__ComObject __this,
double value)
{
global::McgInterop.ForwardComSharedStubs.Proc_double__<global::Windows.UI.Xaml.Controls.Primitives.IRangeBase>(
__this,
value,
global::Windows.UI.Xaml.Controls.Primitives.IRangeBase__Impl.Vtbl.idx_put_Minimum
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static double get_Maximum(global::System.__ComObject __this)
{
double __ret = global::McgInterop.ForwardComSharedStubs.Func_double__<global::Windows.UI.Xaml.Controls.Primitives.IRangeBase>(
__this,
global::Windows.UI.Xaml.Controls.Primitives.IRangeBase__Impl.Vtbl.idx_get_Maximum
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void put_Maximum(
global::System.__ComObject __this,
double value)
{
global::McgInterop.ForwardComSharedStubs.Proc_double__<global::Windows.UI.Xaml.Controls.Primitives.IRangeBase>(
__this,
value,
global::Windows.UI.Xaml.Controls.Primitives.IRangeBase__Impl.Vtbl.idx_put_Maximum
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static double get_SmallChange(global::System.__ComObject __this)
{
double __ret = global::McgInterop.ForwardComSharedStubs.Func_double__<global::Windows.UI.Xaml.Controls.Primitives.IRangeBase>(
__this,
global::Windows.UI.Xaml.Controls.Primitives.IRangeBase__Impl.Vtbl.idx_get_SmallChange
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void put_SmallChange(
global::System.__ComObject __this,
double value)
{
global::McgInterop.ForwardComSharedStubs.Proc_double__<global::Windows.UI.Xaml.Controls.Primitives.IRangeBase>(
__this,
value,
global::Windows.UI.Xaml.Controls.Primitives.IRangeBase__Impl.Vtbl.idx_put_SmallChange
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static double get_LargeChange(global::System.__ComObject __this)
{
double __ret = global::McgInterop.ForwardComSharedStubs.Func_double__<global::Windows.UI.Xaml.Controls.Primitives.IRangeBase>(
__this,
global::Windows.UI.Xaml.Controls.Primitives.IRangeBase__Impl.Vtbl.idx_get_LargeChange
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void put_LargeChange(
global::System.__ComObject __this,
double value)
{
global::McgInterop.ForwardComSharedStubs.Proc_double__<global::Windows.UI.Xaml.Controls.Primitives.IRangeBase>(
__this,
value,
global::Windows.UI.Xaml.Controls.Primitives.IRangeBase__Impl.Vtbl.idx_put_LargeChange
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static double get_Value(global::System.__ComObject __this)
{
double __ret = global::McgInterop.ForwardComSharedStubs.Func_double__<global::Windows.UI.Xaml.Controls.Primitives.IRangeBase>(
__this,
global::Windows.UI.Xaml.Controls.Primitives.IRangeBase__Impl.Vtbl.idx_get_Value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void put_Value(
global::System.__ComObject __this,
double value)
{
global::McgInterop.ForwardComSharedStubs.Proc_double__<global::Windows.UI.Xaml.Controls.Primitives.IRangeBase>(
__this,
value,
global::Windows.UI.Xaml.Controls.Primitives.IRangeBase__Impl.Vtbl.idx_put_Value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// Signature, Windows.UI.Xaml.Controls.Primitives.IRangeBase.add_ValueChanged, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.WinRTDelegateMarshaller] Windows_UI_Xaml_Controls_Primitives_RangeBaseValueChangedEventHandler__Windows_UI_Xaml_Controls_Primitives__RangeBaseValueChangedEventHandler *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] System_Runtime_InteropServices_WindowsRuntime_EventRegistrationToken__Windows_Foundation__EventRegistrationToken,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken add_ValueChanged(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Controls.Primitives.RangeBaseValueChangedEventHandler value)
{
// Setup
global::Windows.UI.Xaml.Controls.Primitives.RangeBaseValueChangedEventHandler__Impl.Vtbl** unsafe_value = default(global::Windows.UI.Xaml.Controls.Primitives.RangeBaseValueChangedEventHandler__Impl.Vtbl**);
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken unsafe_token__retval;
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token__retval;
int unsafe___return__;
try
{
// Marshalling
unsafe_value = (global::Windows.UI.Xaml.Controls.Primitives.RangeBaseValueChangedEventHandler__Impl.Vtbl**)global::System.Runtime.InteropServices.McgModuleManager.DelegateToComInterface(
value,
typeof(global::Windows.UI.Xaml.Controls.Primitives.RangeBaseValueChangedEventHandler).TypeHandle,
global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget78>(global::Windows.UI.Xaml.Controls.Primitives.RangeBaseValueChangedEventHandler__Impl.Invoke)
);
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.UI.Xaml.Controls.Primitives.IRangeBase).TypeHandle,
global::Windows.UI.Xaml.Controls.Primitives.IRangeBase__Impl.Vtbl.idx_add_ValueChanged,
unsafe_value,
&(unsafe_token__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
token__retval = unsafe_token__retval;
// Return
return token__retval;
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_value)));
}
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void remove_ValueChanged(
global::System.__ComObject __this,
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::McgInterop.ForwardComSharedStubs.Proc__WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.Controls.Primitives.IRangeBase>(
__this,
token,
global::Windows.UI.Xaml.Controls.Primitives.IRangeBase__Impl.Vtbl.idx_remove_ValueChanged
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// DispatchClass for 'Windows.UI.Xaml.Controls.Primitives.IRangeBase'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.Primitives.IRangeBase))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.UI.Xaml.Controls.Primitives.IRangeBase
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertySet, "Windows.UI.Xaml.Controls.Primitives.IRangeBase.Minimum")]
void global::Windows.UI.Xaml.Controls.Primitives.IRangeBase.put_Minimum(double value)
{
global::Windows.UI.Xaml.Controls.Primitives.IRangeBase__Impl.StubClass.put_Minimum(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.UI.Xaml.Controls.Primitives.IRangeBase.Maximum")]
double global::Windows.UI.Xaml.Controls.Primitives.IRangeBase.get_Maximum()
{
double __retVal = global::Windows.UI.Xaml.Controls.Primitives.IRangeBase__Impl.StubClass.get_Maximum(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertySet, "Windows.UI.Xaml.Controls.Primitives.IRangeBase.Maximum")]
void global::Windows.UI.Xaml.Controls.Primitives.IRangeBase.put_Maximum(double value)
{
global::Windows.UI.Xaml.Controls.Primitives.IRangeBase__Impl.StubClass.put_Maximum(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.UI.Xaml.Controls.Primitives.IRangeBase.SmallChange")]
double global::Windows.UI.Xaml.Controls.Primitives.IRangeBase.get_SmallChange()
{
double __retVal = global::Windows.UI.Xaml.Controls.Primitives.IRangeBase__Impl.StubClass.get_SmallChange(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertySet, "Windows.UI.Xaml.Controls.Primitives.IRangeBase.SmallChange")]
void global::Windows.UI.Xaml.Controls.Primitives.IRangeBase.put_SmallChange(double value)
{
global::Windows.UI.Xaml.Controls.Primitives.IRangeBase__Impl.StubClass.put_SmallChange(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.UI.Xaml.Controls.Primitives.IRangeBase.LargeChange")]
double global::Windows.UI.Xaml.Controls.Primitives.IRangeBase.get_LargeChange()
{
double __retVal = global::Windows.UI.Xaml.Controls.Primitives.IRangeBase__Impl.StubClass.get_LargeChange(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertySet, "Windows.UI.Xaml.Controls.Primitives.IRangeBase.LargeChange")]
void global::Windows.UI.Xaml.Controls.Primitives.IRangeBase.put_LargeChange(double value)
{
global::Windows.UI.Xaml.Controls.Primitives.IRangeBase__Impl.StubClass.put_LargeChange(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.UI.Xaml.Controls.Primitives.IRangeBase.Value")]
double global::Windows.UI.Xaml.Controls.Primitives.IRangeBase.get_Value()
{
double __retVal = global::Windows.UI.Xaml.Controls.Primitives.IRangeBase__Impl.StubClass.get_Value(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertySet, "Windows.UI.Xaml.Controls.Primitives.IRangeBase.Value")]
void global::Windows.UI.Xaml.Controls.Primitives.IRangeBase.put_Value(double value)
{
global::Windows.UI.Xaml.Controls.Primitives.IRangeBase__Impl.StubClass.put_Value(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventAdd, "Windows.UI.Xaml.Controls.Primitives.IRangeBase.ValueChanged")]
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken global::Windows.UI.Xaml.Controls.Primitives.IRangeBase.add_ValueChanged(global::Windows.UI.Xaml.Controls.Primitives.RangeBaseValueChangedEventHandler value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __retVal = global::Windows.UI.Xaml.Controls.Primitives.IRangeBase__Impl.StubClass.add_ValueChanged(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventRemove, "Windows.UI.Xaml.Controls.Primitives.IRangeBase.ValueChanged")]
void global::Windows.UI.Xaml.Controls.Primitives.IRangeBase.remove_ValueChanged(global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::Windows.UI.Xaml.Controls.Primitives.IRangeBase__Impl.StubClass.remove_ValueChanged(
this,
token
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// v-table for 'Windows.UI.Xaml.Controls.Primitives.IRangeBase'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.Primitives.IRangeBase))]
public unsafe partial struct Vtbl
{
internal const int idx_put_Minimum = 7;
internal const int idx_get_Maximum = 8;
internal const int idx_put_Maximum = 9;
internal const int idx_get_SmallChange = 10;
internal const int idx_put_SmallChange = 11;
internal const int idx_get_LargeChange = 12;
internal const int idx_put_LargeChange = 13;
internal const int idx_get_Value = 14;
internal const int idx_put_Value = 15;
internal const int idx_add_ValueChanged = 16;
internal const int idx_remove_ValueChanged = 17;
}
}
// Windows.UI.Xaml.Controls.Primitives.RangeBaseValueChangedEventHandler
public unsafe static class RangeBaseValueChangedEventHandler__Impl
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void Invoke(
this global::System.__ComObject __this,
object sender,
global::Windows.UI.Xaml.Controls.Primitives.RangeBaseValueChangedEventArgs e)
{
global::McgInterop.ForwardComSharedStubs.Proc_object__TArg0__<global::Windows.UI.Xaml.Controls.Primitives.RangeBaseValueChangedEventHandler, global::Windows.UI.Xaml.Controls.Primitives.RangeBaseValueChangedEventArgs>(
__this,
sender,
e,
global::Windows.UI.Xaml.Controls.Primitives.RangeBaseValueChangedEventHandler__Impl.Vtbl.idx_Invoke
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// v-table for 'Windows.UI.Xaml.Controls.Primitives.RangeBaseValueChangedEventHandler'
[global::System.Runtime.InteropServices.McgRootsType(typeof(global::Windows.UI.Xaml.Controls.Primitives.RangeBaseValueChangedEventHandler))]
public unsafe partial struct Vtbl
{
global::System.IntPtr pfnQueryInterface;
global::System.IntPtr pfnAddRef;
global::System.IntPtr pfnRelease;
// Windows_UI_Xaml_Controls_Primitives__RangeBaseValueChangedEventHandler
global::System.IntPtr pfnInvoke_Windows_UI_Xaml_Controls_Primitives__RangeBaseValueChangedEventHandler;
internal const int idx_Invoke = 3;
[global::System.Runtime.CompilerServices.InitDataBlob(typeof(global::Windows.UI.Xaml.Controls.Primitives.RangeBaseValueChangedEventHandler__Impl.Vtbl.Windows_UI_Xaml_Controls_Primitives_RangeBaseValueChangedEventHandler__Impl_Vtbl_McgRvaContainer), "RVA_Windows_UI_Xaml_Controls_Primitives_RangeBaseValueChangedEventHandler__Impl_Vtbl_s_theCcwVtable")]
public static global::Windows.UI.Xaml.Controls.Primitives.RangeBaseValueChangedEventHandler__Impl.Vtbl s_theCcwVtable
#if false
= new global::Windows.UI.Xaml.Controls.Primitives.RangeBaseValueChangedEventHandler__Impl.Vtbl() {
pfnQueryInterface = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfQueryInterface>(System.Runtime.InteropServices.__vtable_IUnknown.QueryInterface),
pfnAddRef = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfAddRef>(System.Runtime.InteropServices.__vtable_IUnknown.AddRef),
pfnRelease = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfRelease>(System.Runtime.InteropServices.__vtable_IUnknown.Release),
pfnInvoke_Windows_UI_Xaml_Controls_Primitives__RangeBaseValueChangedEventHandler = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget79>(global::Windows.UI.Xaml.Controls.Primitives.RangeBaseValueChangedEventHandler__Impl.Vtbl.Invoke__STUB),
}
#endif
;
public static global::System.IntPtr pNativeVtable;
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int Invoke__STUB(
global::System.IntPtr pComThis,
global::System.Runtime.InteropServices.__vtable_IInspectable* unsafe_sender,
global::Windows.UI.Xaml.Controls.Primitives.IRangeBaseValueChangedEventArgs__Impl.Vtbl** unsafe_e)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.UI.Xaml.Controls.Primitives.RangeBaseValueChangedEventHandler>(
__this,
0
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Proc_object__TArg0__<global::Windows.UI.Xaml.Controls.Primitives.RangeBaseValueChangedEventArgs>(
__this,
unsafe_sender,
unsafe_e,
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
private static class Windows_UI_Xaml_Controls_Primitives_RangeBaseValueChangedEventHandler__Impl_Vtbl_McgRvaContainer
{
[global::System.Runtime.CompilerServices.MethodAddrFixup(0, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "QueryInterface")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(4, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "AddRef")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(8, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "Release")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(12, typeof(global::Windows.UI.Xaml.Controls.Primitives.RangeBaseValueChangedEventHandler__Impl.Vtbl), "Invoke__STUB")]
[global::System.Runtime.CompilerServices.NonArray]
static readonly byte[] RVA_Windows_UI_Xaml_Controls_Primitives_RangeBaseValueChangedEventHandler__Impl_Vtbl_s_theCcwVtable = new byte[] {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
}
}
}
// Windows.UI.Xaml.Controls.Primitives.IRangeBaseValueChangedEventArgs
public unsafe static class IRangeBaseValueChangedEventArgs__Impl
{
// v-table for 'Windows.UI.Xaml.Controls.Primitives.IRangeBaseValueChangedEventArgs'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.Primitives.IRangeBaseValueChangedEventArgs))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Xaml.Controls.Primitives.IRangeBaseOverrides
public unsafe static class IRangeBaseOverrides__Impl
{
// StubClass for 'Windows.UI.Xaml.Controls.Primitives.IRangeBaseOverrides'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void OnMinimumChanged(
global::System.__ComObject __this,
double oldMinimum,
double newMinimum)
{
global::McgInterop.ForwardComSharedStubs.Proc_double__double__<global::Windows.UI.Xaml.Controls.Primitives.IRangeBaseOverrides>(
__this,
oldMinimum,
newMinimum,
global::Windows.UI.Xaml.Controls.Primitives.IRangeBaseOverrides__Impl.Vtbl.idx_OnMinimumChanged
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void OnMaximumChanged(
global::System.__ComObject __this,
double oldMaximum,
double newMaximum)
{
global::McgInterop.ForwardComSharedStubs.Proc_double__double__<global::Windows.UI.Xaml.Controls.Primitives.IRangeBaseOverrides>(
__this,
oldMaximum,
newMaximum,
global::Windows.UI.Xaml.Controls.Primitives.IRangeBaseOverrides__Impl.Vtbl.idx_OnMaximumChanged
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void OnValueChanged(
global::System.__ComObject __this,
double oldValue,
double newValue)
{
global::McgInterop.ForwardComSharedStubs.Proc_double__double__<global::Windows.UI.Xaml.Controls.Primitives.IRangeBaseOverrides>(
__this,
oldValue,
newValue,
global::Windows.UI.Xaml.Controls.Primitives.IRangeBaseOverrides__Impl.Vtbl.idx_OnValueChanged
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// DispatchClass for 'Windows.UI.Xaml.Controls.Primitives.IRangeBaseOverrides'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.Primitives.IRangeBaseOverrides))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.UI.Xaml.Controls.Primitives.IRangeBaseOverrides
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.UI.Xaml.Controls.Primitives.IRangeBaseOverrides.OnMinimumChanged(
double oldMinimum,
double newMinimum)
{
global::Windows.UI.Xaml.Controls.Primitives.IRangeBaseOverrides__Impl.StubClass.OnMinimumChanged(
this,
oldMinimum,
newMinimum
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.UI.Xaml.Controls.Primitives.IRangeBaseOverrides.OnMaximumChanged(
double oldMaximum,
double newMaximum)
{
global::Windows.UI.Xaml.Controls.Primitives.IRangeBaseOverrides__Impl.StubClass.OnMaximumChanged(
this,
oldMaximum,
newMaximum
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.UI.Xaml.Controls.Primitives.IRangeBaseOverrides.OnValueChanged(
double oldValue,
double newValue)
{
global::Windows.UI.Xaml.Controls.Primitives.IRangeBaseOverrides__Impl.StubClass.OnValueChanged(
this,
oldValue,
newValue
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// v-table for 'Windows.UI.Xaml.Controls.Primitives.IRangeBaseOverrides'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.Primitives.IRangeBaseOverrides))]
public unsafe partial struct Vtbl
{
internal const int idx_OnMinimumChanged = 6;
internal const int idx_OnMaximumChanged = 7;
internal const int idx_OnValueChanged = 8;
}
}
// Windows.UI.Xaml.Controls.Primitives.IToggleButton
public unsafe static class IToggleButton__Impl
{
// StubClass for 'Windows.UI.Xaml.Controls.Primitives.IToggleButton'
public static partial class StubClass
{
// Signature, Windows.UI.Xaml.Controls.Primitives.IToggleButton.get_IsChecked, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.WinRTReferenceMarshaller] System_Nullable_1_bool___Windows_Foundation__IReference_A_bool_V_ *,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Nullable<bool> get_IsChecked(global::System.__ComObject __this)
{
// Setup
global::System.Nullable_A_bool_V___Impl.Vtbl** unsafe_value__retval = default(global::System.Nullable_A_bool_V___Impl.Vtbl**);
global::System.Nullable<bool> value__retval = default(global::System.Nullable<bool>);
int unsafe___return__;
try
{
// Marshalling
unsafe_value__retval = null;
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.UI.Xaml.Controls.Primitives.IToggleButton).TypeHandle,
global::Windows.UI.Xaml.Controls.Primitives.IToggleButton__Impl.Vtbl.idx_get_IsChecked,
&(unsafe_value__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
if (unsafe_value__retval != null)
value__retval = (bool)global::System.Runtime.InteropServices.McgModuleManager.UnboxIfBoxed(
global::System.Runtime.InteropServices.McgModuleManager.ComInterfaceToObject_NoUnboxing(
((global::System.IntPtr)unsafe_value__retval),
typeof(global::Windows.Foundation.IReference<bool>).TypeHandle
),
"Windows.Foundation.IReference`1<Boolean>"
);
else
value__retval = null;
// Return
return value__retval;
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_value__retval)));
}
}
// Signature, Windows.UI.Xaml.Controls.Primitives.IToggleButton.put_IsChecked, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.WinRTReferenceMarshaller] System_Nullable_1_bool___Windows_Foundation__IReference_A_bool_V_ *,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void put_IsChecked(
global::System.__ComObject __this,
global::System.Nullable<bool> value)
{
// Setup
global::System.Nullable_A_bool_V___Impl.Vtbl** unsafe_value = default(global::System.Nullable_A_bool_V___Impl.Vtbl**);
int unsafe___return__;
try
{
// Marshalling
if (value.HasValue)
{
global::System.Runtime.InteropServices.WindowsRuntime.ReferenceImpl<bool> unsafe_value_Wrapper = new global::System.Runtime.InteropServices.WindowsRuntime.ReferenceImpl<bool>(value.Value, 11);
unsafe_value = (global::System.Nullable_A_bool_V___Impl.Vtbl**)global::System.Runtime.InteropServices.McgModuleManager.ManagedObjectToComInterface(
unsafe_value_Wrapper,
typeof(global::Windows.Foundation.IReference<bool>).TypeHandle
);
}
else
unsafe_value = null;
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.UI.Xaml.Controls.Primitives.IToggleButton).TypeHandle,
global::Windows.UI.Xaml.Controls.Primitives.IToggleButton__Impl.Vtbl.idx_put_IsChecked,
unsafe_value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
// Return
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_value)));
}
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken add_Checked(
global::System.__ComObject __this,
global::Windows.UI.Xaml.RoutedEventHandler value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __ret = global::McgInterop.ForwardComSharedStubs.Func_UI_Xaml_RoutedEventHandler___WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.Controls.Primitives.IToggleButton>(
__this,
value,
global::Windows.UI.Xaml.Controls.Primitives.IToggleButton__Impl.Vtbl.idx_add_Checked
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void remove_Checked(
global::System.__ComObject __this,
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::McgInterop.ForwardComSharedStubs.Proc__WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.Controls.Primitives.IToggleButton>(
__this,
token,
global::Windows.UI.Xaml.Controls.Primitives.IToggleButton__Impl.Vtbl.idx_remove_Checked
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken add_Unchecked(
global::System.__ComObject __this,
global::Windows.UI.Xaml.RoutedEventHandler value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __ret = global::McgInterop.ForwardComSharedStubs.Func_UI_Xaml_RoutedEventHandler___WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.Controls.Primitives.IToggleButton>(
__this,
value,
global::Windows.UI.Xaml.Controls.Primitives.IToggleButton__Impl.Vtbl.idx_add_Unchecked
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void remove_Unchecked(
global::System.__ComObject __this,
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::McgInterop.ForwardComSharedStubs.Proc__WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.Controls.Primitives.IToggleButton>(
__this,
token,
global::Windows.UI.Xaml.Controls.Primitives.IToggleButton__Impl.Vtbl.idx_remove_Unchecked
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken add_Indeterminate(
global::System.__ComObject __this,
global::Windows.UI.Xaml.RoutedEventHandler value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __ret = global::McgInterop.ForwardComSharedStubs.Func_UI_Xaml_RoutedEventHandler___WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.Controls.Primitives.IToggleButton>(
__this,
value,
global::Windows.UI.Xaml.Controls.Primitives.IToggleButton__Impl.Vtbl.idx_add_Indeterminate
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void remove_Indeterminate(
global::System.__ComObject __this,
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::McgInterop.ForwardComSharedStubs.Proc__WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.Controls.Primitives.IToggleButton>(
__this,
token,
global::Windows.UI.Xaml.Controls.Primitives.IToggleButton__Impl.Vtbl.idx_remove_Indeterminate
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// DispatchClass for 'Windows.UI.Xaml.Controls.Primitives.IToggleButton'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.Primitives.IToggleButton))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.UI.Xaml.Controls.Primitives.IToggleButton
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.UI.Xaml.Controls.Primitives.IToggleButton.IsChecked")]
global::System.Nullable<bool> global::Windows.UI.Xaml.Controls.Primitives.IToggleButton.get_IsChecked()
{
global::System.Nullable<bool> __retVal = global::Windows.UI.Xaml.Controls.Primitives.IToggleButton__Impl.StubClass.get_IsChecked(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertySet, "Windows.UI.Xaml.Controls.Primitives.IToggleButton.IsChecked")]
void global::Windows.UI.Xaml.Controls.Primitives.IToggleButton.put_IsChecked(global::System.Nullable<bool> value)
{
global::Windows.UI.Xaml.Controls.Primitives.IToggleButton__Impl.StubClass.put_IsChecked(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventAdd, "Windows.UI.Xaml.Controls.Primitives.IToggleButton.Checked")]
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken global::Windows.UI.Xaml.Controls.Primitives.IToggleButton.add_Checked(global::Windows.UI.Xaml.RoutedEventHandler value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __retVal = global::Windows.UI.Xaml.Controls.Primitives.IToggleButton__Impl.StubClass.add_Checked(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventRemove, "Windows.UI.Xaml.Controls.Primitives.IToggleButton.Checked")]
void global::Windows.UI.Xaml.Controls.Primitives.IToggleButton.remove_Checked(global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::Windows.UI.Xaml.Controls.Primitives.IToggleButton__Impl.StubClass.remove_Checked(
this,
token
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventAdd, "Windows.UI.Xaml.Controls.Primitives.IToggleButton.Unchecked")]
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken global::Windows.UI.Xaml.Controls.Primitives.IToggleButton.add_Unchecked(global::Windows.UI.Xaml.RoutedEventHandler value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __retVal = global::Windows.UI.Xaml.Controls.Primitives.IToggleButton__Impl.StubClass.add_Unchecked(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventRemove, "Windows.UI.Xaml.Controls.Primitives.IToggleButton.Unchecked")]
void global::Windows.UI.Xaml.Controls.Primitives.IToggleButton.remove_Unchecked(global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::Windows.UI.Xaml.Controls.Primitives.IToggleButton__Impl.StubClass.remove_Unchecked(
this,
token
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventAdd, "Windows.UI.Xaml.Controls.Primitives.IToggleButton.Indeterminate")]
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken global::Windows.UI.Xaml.Controls.Primitives.IToggleButton.add_Indeterminate(global::Windows.UI.Xaml.RoutedEventHandler value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __retVal = global::Windows.UI.Xaml.Controls.Primitives.IToggleButton__Impl.StubClass.add_Indeterminate(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventRemove, "Windows.UI.Xaml.Controls.Primitives.IToggleButton.Indeterminate")]
void global::Windows.UI.Xaml.Controls.Primitives.IToggleButton.remove_Indeterminate(global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::Windows.UI.Xaml.Controls.Primitives.IToggleButton__Impl.StubClass.remove_Indeterminate(
this,
token
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// v-table for 'Windows.UI.Xaml.Controls.Primitives.IToggleButton'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.Primitives.IToggleButton))]
public unsafe partial struct Vtbl
{
internal const int idx_get_IsChecked = 6;
internal const int idx_put_IsChecked = 7;
internal const int idx_add_Checked = 10;
internal const int idx_remove_Checked = 11;
internal const int idx_add_Unchecked = 12;
internal const int idx_remove_Unchecked = 13;
internal const int idx_add_Indeterminate = 14;
internal const int idx_remove_Indeterminate = 15;
}
}
// Windows.UI.Xaml.Controls.Primitives.IToggleButtonOverrides
public unsafe static class IToggleButtonOverrides__Impl
{
// StubClass for 'Windows.UI.Xaml.Controls.Primitives.IToggleButtonOverrides'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void OnToggle(global::System.__ComObject __this)
{
global::McgInterop.ForwardComSharedStubs.Proc_<global::Windows.UI.Xaml.Controls.Primitives.IToggleButtonOverrides>(
__this,
global::Windows.UI.Xaml.Controls.Primitives.IToggleButtonOverrides__Impl.Vtbl.idx_OnToggle
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// DispatchClass for 'Windows.UI.Xaml.Controls.Primitives.IToggleButtonOverrides'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.Primitives.IToggleButtonOverrides))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.UI.Xaml.Controls.Primitives.IToggleButtonOverrides
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.UI.Xaml.Controls.Primitives.IToggleButtonOverrides.OnToggle()
{
global::Windows.UI.Xaml.Controls.Primitives.IToggleButtonOverrides__Impl.StubClass.OnToggle(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// v-table for 'Windows.UI.Xaml.Controls.Primitives.IToggleButtonOverrides'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Controls.Primitives.IToggleButtonOverrides))]
public unsafe partial struct Vtbl
{
internal const int idx_OnToggle = 6;
}
}
}
namespace Windows.UI.Xaml.Data
{
// Windows.UI.Xaml.Data.IValueConverter
public unsafe static class IValueConverter__Impl
{
// StubClass for 'Windows.UI.Xaml.Data.IValueConverter'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static object Convert(
global::System.__ComObject __this,
object value,
global::System.Type targetType,
object parameter,
string language)
{
object __ret = global::McgInterop.ForwardComSharedStubs.Func_object__Type__object__string__object__<global::Windows.UI.Xaml.Data.IValueConverter>(
__this,
value,
targetType,
parameter,
language,
global::Windows.UI.Xaml.Data.IValueConverter__Impl.Vtbl.idx_Convert
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static object ConvertBack(
global::System.__ComObject __this,
object value,
global::System.Type targetType,
object parameter,
string language)
{
object __ret = global::McgInterop.ForwardComSharedStubs.Func_object__Type__object__string__object__<global::Windows.UI.Xaml.Data.IValueConverter>(
__this,
value,
targetType,
parameter,
language,
global::Windows.UI.Xaml.Data.IValueConverter__Impl.Vtbl.idx_ConvertBack
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
}
// DispatchClass for 'Windows.UI.Xaml.Data.IValueConverter'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Data.IValueConverter))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.UI.Xaml.Data.IValueConverter
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
object global::Windows.UI.Xaml.Data.IValueConverter.Convert(
object value,
global::System.Type targetType,
object parameter,
string language)
{
object __retVal = global::Windows.UI.Xaml.Data.IValueConverter__Impl.StubClass.Convert(
this,
value,
targetType,
parameter,
language
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
object global::Windows.UI.Xaml.Data.IValueConverter.ConvertBack(
object value,
global::System.Type targetType,
object parameter,
string language)
{
object __retVal = global::Windows.UI.Xaml.Data.IValueConverter__Impl.StubClass.ConvertBack(
this,
value,
targetType,
parameter,
language
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.UI.Xaml.Data.IValueConverter'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Data.IValueConverter))]
[global::System.Runtime.InteropServices.McgRootsType(typeof(global::Windows.UI.Xaml.Data.IValueConverter))]
public unsafe partial struct Vtbl
{
global::System.IntPtr pfnQueryInterface;
global::System.IntPtr pfnAddRef;
global::System.IntPtr pfnRelease;
global::System.IntPtr pfnGetIids;
global::System.IntPtr pfnGetRuntimeClassName;
global::System.IntPtr pfnGetTrustLevel;
// Windows_UI_Xaml_Data__IValueConverter
global::System.IntPtr pfnConvert_Windows_UI_Xaml_Data__IValueConverter;
global::System.IntPtr pfnConvertBack_Windows_UI_Xaml_Data__IValueConverter;
internal const int idx_Convert = 6;
internal const int idx_ConvertBack = 7;
[global::System.Runtime.CompilerServices.InitDataBlob(typeof(global::Windows.UI.Xaml.Data.IValueConverter__Impl.Vtbl.Windows_UI_Xaml_Data_IValueConverter__Impl_Vtbl_McgRvaContainer), "RVA_Windows_UI_Xaml_Data_IValueConverter__Impl_Vtbl_s_theCcwVtable")]
public static global::Windows.UI.Xaml.Data.IValueConverter__Impl.Vtbl s_theCcwVtable
#if false
= new global::Windows.UI.Xaml.Data.IValueConverter__Impl.Vtbl() {
pfnQueryInterface = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfQueryInterface>(System.Runtime.InteropServices.__vtable_IUnknown.QueryInterface),
pfnAddRef = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfAddRef>(System.Runtime.InteropServices.__vtable_IUnknown.AddRef),
pfnRelease = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfRelease>(System.Runtime.InteropServices.__vtable_IUnknown.Release),
pfnGetIids = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget0>(System.Runtime.InteropServices.__vtable_IInspectable.GetIIDs),
pfnGetRuntimeClassName = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget1>(System.Runtime.InteropServices.__vtable_IInspectable.GetRuntimeClassName),
pfnGetTrustLevel = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget1>(System.Runtime.InteropServices.__vtable_IInspectable.GetTrustLevel),
pfnConvert_Windows_UI_Xaml_Data__IValueConverter = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget3>(global::Windows.UI.Xaml.Data.IValueConverter__Impl.Vtbl.Convert__STUB),
pfnConvertBack_Windows_UI_Xaml_Data__IValueConverter = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget3>(global::Windows.UI.Xaml.Data.IValueConverter__Impl.Vtbl.ConvertBack__STUB),
}
#endif
;
public static global::System.IntPtr pNativeVtable;
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int Convert__STUB(
global::System.IntPtr pComThis,
global::System.Runtime.InteropServices.__vtable_IInspectable* unsafe_value,
global::System.Type__Impl.UnsafeType unsafe_targetType,
global::System.Runtime.InteropServices.__vtable_IInspectable* unsafe_parameter,
global::System.Runtime.InteropServices.HSTRING unsafe_language,
global::System.Runtime.InteropServices.__vtable_IInspectable** unsafe_returnValue__retval)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.UI.Xaml.Data.IValueConverter>(
__this,
0
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Func_object__Type__object__string__object__(
__this,
unsafe_value,
unsafe_targetType,
unsafe_parameter,
unsafe_language,
unsafe_returnValue__retval,
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int ConvertBack__STUB(
global::System.IntPtr pComThis,
global::System.Runtime.InteropServices.__vtable_IInspectable* unsafe_value,
global::System.Type__Impl.UnsafeType unsafe_targetType,
global::System.Runtime.InteropServices.__vtable_IInspectable* unsafe_parameter,
global::System.Runtime.InteropServices.HSTRING unsafe_language,
global::System.Runtime.InteropServices.__vtable_IInspectable** unsafe_returnValue__retval)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.UI.Xaml.Data.IValueConverter>(
__this,
1
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Func_object__Type__object__string__object__(
__this,
unsafe_value,
unsafe_targetType,
unsafe_parameter,
unsafe_language,
unsafe_returnValue__retval,
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
private static class Windows_UI_Xaml_Data_IValueConverter__Impl_Vtbl_McgRvaContainer
{
[global::System.Runtime.CompilerServices.MethodAddrFixup(0, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "QueryInterface")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(4, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "AddRef")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(8, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "Release")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(12, typeof(global::System.Runtime.InteropServices.__vtable_IInspectable), "GetIIDs")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(16, typeof(global::System.Runtime.InteropServices.__vtable_IInspectable), "GetRuntimeClassName")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(20, typeof(global::System.Runtime.InteropServices.__vtable_IInspectable), "GetTrustLevel")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(24, typeof(global::Windows.UI.Xaml.Data.IValueConverter__Impl.Vtbl), "Convert__STUB")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(28, typeof(global::Windows.UI.Xaml.Data.IValueConverter__Impl.Vtbl), "ConvertBack__STUB")]
[global::System.Runtime.CompilerServices.NonArray]
static readonly byte[] RVA_Windows_UI_Xaml_Data_IValueConverter__Impl_Vtbl_s_theCcwVtable = new byte[] {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
}
}
}
}
namespace Windows.UI.Xaml.Documents
{
// Windows.UI.Xaml.Documents.ITextElement
public unsafe static class ITextElement__Impl
{
// v-table for 'Windows.UI.Xaml.Documents.ITextElement'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Documents.ITextElement))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Xaml.Documents.ITextElementOverrides
public unsafe static class ITextElementOverrides__Impl
{
// StubClass for 'Windows.UI.Xaml.Documents.ITextElementOverrides'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void OnDisconnectVisualChildren(global::System.__ComObject __this)
{
global::McgInterop.ForwardComSharedStubs.Proc_<global::Windows.UI.Xaml.Documents.ITextElementOverrides>(
__this,
global::Windows.UI.Xaml.Documents.ITextElementOverrides__Impl.Vtbl.idx_OnDisconnectVisualChildren
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// DispatchClass for 'Windows.UI.Xaml.Documents.ITextElementOverrides'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Documents.ITextElementOverrides))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.UI.Xaml.Documents.ITextElementOverrides
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.UI.Xaml.Documents.ITextElementOverrides.OnDisconnectVisualChildren()
{
global::Windows.UI.Xaml.Documents.ITextElementOverrides__Impl.StubClass.OnDisconnectVisualChildren(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// v-table for 'Windows.UI.Xaml.Documents.ITextElementOverrides'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Documents.ITextElementOverrides))]
public unsafe partial struct Vtbl
{
internal const int idx_OnDisconnectVisualChildren = 6;
}
}
// Windows.UI.Xaml.Documents.ITextElement2
public unsafe static class ITextElement2__Impl
{
// v-table for 'Windows.UI.Xaml.Documents.ITextElement2'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Documents.ITextElement2))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Xaml.Documents.ITextElement3
public unsafe static class ITextElement3__Impl
{
// v-table for 'Windows.UI.Xaml.Documents.ITextElement3'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Documents.ITextElement3))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Xaml.Documents.IInline
public unsafe static class IInline__Impl
{
// v-table for 'Windows.UI.Xaml.Documents.IInline'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Documents.IInline))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Xaml.Documents.IRun
public unsafe static class IRun__Impl
{
// StubClass for 'Windows.UI.Xaml.Documents.IRun'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static string get_Text(global::System.__ComObject __this)
{
string __ret = global::McgInterop.ForwardComSharedStubs.Func_string__<global::Windows.UI.Xaml.Documents.IRun>(
__this,
global::Windows.UI.Xaml.Documents.IRun__Impl.Vtbl.idx_get_Text
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void put_Text(
global::System.__ComObject __this,
string value)
{
global::McgInterop.ForwardComSharedStubs.Proc_string__<global::Windows.UI.Xaml.Documents.IRun>(
__this,
value,
global::Windows.UI.Xaml.Documents.IRun__Impl.Vtbl.idx_put_Text
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// DispatchClass for 'Windows.UI.Xaml.Documents.IRun'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Documents.IRun))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.UI.Xaml.Documents.IRun
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.UI.Xaml.Documents.IRun.Text")]
string global::Windows.UI.Xaml.Documents.IRun.get_Text()
{
string __retVal = global::Windows.UI.Xaml.Documents.IRun__Impl.StubClass.get_Text(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertySet, "Windows.UI.Xaml.Documents.IRun.Text")]
void global::Windows.UI.Xaml.Documents.IRun.put_Text(string value)
{
global::Windows.UI.Xaml.Documents.IRun__Impl.StubClass.put_Text(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// v-table for 'Windows.UI.Xaml.Documents.IRun'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Documents.IRun))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Text = 6;
internal const int idx_put_Text = 7;
}
}
// Windows.UI.Xaml.Documents.ILineBreak
public unsafe static class ILineBreak__Impl
{
// v-table for 'Windows.UI.Xaml.Documents.ILineBreak'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Documents.ILineBreak))]
public unsafe partial struct Vtbl
{
}
}
}
namespace Windows.UI.Xaml.Input
{
// Windows.UI.Xaml.Input.KeyEventHandler
public unsafe static class KeyEventHandler__Impl
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void Invoke(
this global::System.__ComObject __this,
object sender,
global::Windows.UI.Xaml.Input.KeyRoutedEventArgs e)
{
global::McgInterop.ForwardComSharedStubs.Proc_object__TArg0__<global::Windows.UI.Xaml.Input.KeyEventHandler, global::Windows.UI.Xaml.Input.KeyRoutedEventArgs>(
__this,
sender,
e,
global::Windows.UI.Xaml.Input.KeyEventHandler__Impl.Vtbl.idx_Invoke
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// v-table for 'Windows.UI.Xaml.Input.KeyEventHandler'
[global::System.Runtime.InteropServices.McgRootsType(typeof(global::Windows.UI.Xaml.Input.KeyEventHandler))]
public unsafe partial struct Vtbl
{
global::System.IntPtr pfnQueryInterface;
global::System.IntPtr pfnAddRef;
global::System.IntPtr pfnRelease;
// Windows_UI_Xaml_Input__KeyEventHandler
global::System.IntPtr pfnInvoke_Windows_UI_Xaml_Input__KeyEventHandler;
internal const int idx_Invoke = 3;
[global::System.Runtime.CompilerServices.InitDataBlob(typeof(global::Windows.UI.Xaml.Input.KeyEventHandler__Impl.Vtbl.Windows_UI_Xaml_Input_KeyEventHandler__Impl_Vtbl_McgRvaContainer), "RVA_Windows_UI_Xaml_Input_KeyEventHandler__Impl_Vtbl_s_theCcwVtable")]
public static global::Windows.UI.Xaml.Input.KeyEventHandler__Impl.Vtbl s_theCcwVtable
#if false
= new global::Windows.UI.Xaml.Input.KeyEventHandler__Impl.Vtbl() {
pfnQueryInterface = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfQueryInterface>(System.Runtime.InteropServices.__vtable_IUnknown.QueryInterface),
pfnAddRef = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfAddRef>(System.Runtime.InteropServices.__vtable_IUnknown.AddRef),
pfnRelease = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfRelease>(System.Runtime.InteropServices.__vtable_IUnknown.Release),
pfnInvoke_Windows_UI_Xaml_Input__KeyEventHandler = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget37>(global::Windows.UI.Xaml.Input.KeyEventHandler__Impl.Vtbl.Invoke__STUB),
}
#endif
;
public static global::System.IntPtr pNativeVtable;
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int Invoke__STUB(
global::System.IntPtr pComThis,
global::System.Runtime.InteropServices.__vtable_IInspectable* unsafe_sender,
global::Windows.UI.Xaml.Input.IKeyRoutedEventArgs__Impl.Vtbl** unsafe_e)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.UI.Xaml.Input.KeyEventHandler>(
__this,
0
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Proc_object__TArg0__<global::Windows.UI.Xaml.Input.KeyRoutedEventArgs>(
__this,
unsafe_sender,
unsafe_e,
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
private static class Windows_UI_Xaml_Input_KeyEventHandler__Impl_Vtbl_McgRvaContainer
{
[global::System.Runtime.CompilerServices.MethodAddrFixup(0, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "QueryInterface")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(4, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "AddRef")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(8, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "Release")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(12, typeof(global::Windows.UI.Xaml.Input.KeyEventHandler__Impl.Vtbl), "Invoke__STUB")]
[global::System.Runtime.CompilerServices.NonArray]
static readonly byte[] RVA_Windows_UI_Xaml_Input_KeyEventHandler__Impl_Vtbl_s_theCcwVtable = new byte[] {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
}
}
}
// Windows.UI.Xaml.Input.IKeyRoutedEventArgs
public unsafe static class IKeyRoutedEventArgs__Impl
{
// v-table for 'Windows.UI.Xaml.Input.IKeyRoutedEventArgs'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Input.IKeyRoutedEventArgs))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Xaml.Input.IKeyRoutedEventArgs2
public unsafe static class IKeyRoutedEventArgs2__Impl
{
// v-table for 'Windows.UI.Xaml.Input.IKeyRoutedEventArgs2'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Input.IKeyRoutedEventArgs2))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Xaml.Input.IKeyRoutedEventArgs3
public unsafe static class IKeyRoutedEventArgs3__Impl
{
// v-table for 'Windows.UI.Xaml.Input.IKeyRoutedEventArgs3'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Input.IKeyRoutedEventArgs3))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Xaml.Input.PointerEventHandler
public unsafe static class PointerEventHandler__Impl
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void Invoke(
this global::System.__ComObject __this,
object sender,
global::Windows.UI.Xaml.Input.PointerRoutedEventArgs e)
{
global::McgInterop.ForwardComSharedStubs.Proc_object__TArg0__<global::Windows.UI.Xaml.Input.PointerEventHandler, global::Windows.UI.Xaml.Input.PointerRoutedEventArgs>(
__this,
sender,
e,
global::Windows.UI.Xaml.Input.PointerEventHandler__Impl.Vtbl.idx_Invoke
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// v-table for 'Windows.UI.Xaml.Input.PointerEventHandler'
[global::System.Runtime.InteropServices.McgRootsType(typeof(global::Windows.UI.Xaml.Input.PointerEventHandler))]
public unsafe partial struct Vtbl
{
global::System.IntPtr pfnQueryInterface;
global::System.IntPtr pfnAddRef;
global::System.IntPtr pfnRelease;
// Windows_UI_Xaml_Input__PointerEventHandler
global::System.IntPtr pfnInvoke_Windows_UI_Xaml_Input__PointerEventHandler;
internal const int idx_Invoke = 3;
[global::System.Runtime.CompilerServices.InitDataBlob(typeof(global::Windows.UI.Xaml.Input.PointerEventHandler__Impl.Vtbl.Windows_UI_Xaml_Input_PointerEventHandler__Impl_Vtbl_McgRvaContainer), "RVA_Windows_UI_Xaml_Input_PointerEventHandler__Impl_Vtbl_s_theCcwVtable")]
public static global::Windows.UI.Xaml.Input.PointerEventHandler__Impl.Vtbl s_theCcwVtable
#if false
= new global::Windows.UI.Xaml.Input.PointerEventHandler__Impl.Vtbl() {
pfnQueryInterface = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfQueryInterface>(System.Runtime.InteropServices.__vtable_IUnknown.QueryInterface),
pfnAddRef = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfAddRef>(System.Runtime.InteropServices.__vtable_IUnknown.AddRef),
pfnRelease = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfRelease>(System.Runtime.InteropServices.__vtable_IUnknown.Release),
pfnInvoke_Windows_UI_Xaml_Input__PointerEventHandler = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget40>(global::Windows.UI.Xaml.Input.PointerEventHandler__Impl.Vtbl.Invoke__STUB),
}
#endif
;
public static global::System.IntPtr pNativeVtable;
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int Invoke__STUB(
global::System.IntPtr pComThis,
global::System.Runtime.InteropServices.__vtable_IInspectable* unsafe_sender,
global::Windows.UI.Xaml.Input.IPointerRoutedEventArgs__Impl.Vtbl** unsafe_e)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.UI.Xaml.Input.PointerEventHandler>(
__this,
0
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Proc_object__TArg0__<global::Windows.UI.Xaml.Input.PointerRoutedEventArgs>(
__this,
unsafe_sender,
unsafe_e,
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
private static class Windows_UI_Xaml_Input_PointerEventHandler__Impl_Vtbl_McgRvaContainer
{
[global::System.Runtime.CompilerServices.MethodAddrFixup(0, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "QueryInterface")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(4, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "AddRef")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(8, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "Release")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(12, typeof(global::Windows.UI.Xaml.Input.PointerEventHandler__Impl.Vtbl), "Invoke__STUB")]
[global::System.Runtime.CompilerServices.NonArray]
static readonly byte[] RVA_Windows_UI_Xaml_Input_PointerEventHandler__Impl_Vtbl_s_theCcwVtable = new byte[] {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
}
}
}
// Windows.UI.Xaml.Input.IPointerRoutedEventArgs
public unsafe static class IPointerRoutedEventArgs__Impl
{
// v-table for 'Windows.UI.Xaml.Input.IPointerRoutedEventArgs'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Input.IPointerRoutedEventArgs))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Xaml.Input.TappedEventHandler
public unsafe static class TappedEventHandler__Impl
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void Invoke(
this global::System.__ComObject __this,
object sender,
global::Windows.UI.Xaml.Input.TappedRoutedEventArgs e)
{
global::McgInterop.ForwardComSharedStubs.Proc_object__TArg0__<global::Windows.UI.Xaml.Input.TappedEventHandler, global::Windows.UI.Xaml.Input.TappedRoutedEventArgs>(
__this,
sender,
e,
global::Windows.UI.Xaml.Input.TappedEventHandler__Impl.Vtbl.idx_Invoke
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// v-table for 'Windows.UI.Xaml.Input.TappedEventHandler'
[global::System.Runtime.InteropServices.McgRootsType(typeof(global::Windows.UI.Xaml.Input.TappedEventHandler))]
public unsafe partial struct Vtbl
{
global::System.IntPtr pfnQueryInterface;
global::System.IntPtr pfnAddRef;
global::System.IntPtr pfnRelease;
// Windows_UI_Xaml_Input__TappedEventHandler
global::System.IntPtr pfnInvoke_Windows_UI_Xaml_Input__TappedEventHandler;
internal const int idx_Invoke = 3;
[global::System.Runtime.CompilerServices.InitDataBlob(typeof(global::Windows.UI.Xaml.Input.TappedEventHandler__Impl.Vtbl.Windows_UI_Xaml_Input_TappedEventHandler__Impl_Vtbl_McgRvaContainer), "RVA_Windows_UI_Xaml_Input_TappedEventHandler__Impl_Vtbl_s_theCcwVtable")]
public static global::Windows.UI.Xaml.Input.TappedEventHandler__Impl.Vtbl s_theCcwVtable
#if false
= new global::Windows.UI.Xaml.Input.TappedEventHandler__Impl.Vtbl() {
pfnQueryInterface = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfQueryInterface>(System.Runtime.InteropServices.__vtable_IUnknown.QueryInterface),
pfnAddRef = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfAddRef>(System.Runtime.InteropServices.__vtable_IUnknown.AddRef),
pfnRelease = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfRelease>(System.Runtime.InteropServices.__vtable_IUnknown.Release),
pfnInvoke_Windows_UI_Xaml_Input__TappedEventHandler = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget41>(global::Windows.UI.Xaml.Input.TappedEventHandler__Impl.Vtbl.Invoke__STUB),
}
#endif
;
public static global::System.IntPtr pNativeVtable;
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int Invoke__STUB(
global::System.IntPtr pComThis,
global::System.Runtime.InteropServices.__vtable_IInspectable* unsafe_sender,
global::Windows.UI.Xaml.Input.ITappedRoutedEventArgs__Impl.Vtbl** unsafe_e)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.UI.Xaml.Input.TappedEventHandler>(
__this,
0
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Proc_object__TArg0__<global::Windows.UI.Xaml.Input.TappedRoutedEventArgs>(
__this,
unsafe_sender,
unsafe_e,
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
private static class Windows_UI_Xaml_Input_TappedEventHandler__Impl_Vtbl_McgRvaContainer
{
[global::System.Runtime.CompilerServices.MethodAddrFixup(0, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "QueryInterface")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(4, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "AddRef")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(8, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "Release")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(12, typeof(global::Windows.UI.Xaml.Input.TappedEventHandler__Impl.Vtbl), "Invoke__STUB")]
[global::System.Runtime.CompilerServices.NonArray]
static readonly byte[] RVA_Windows_UI_Xaml_Input_TappedEventHandler__Impl_Vtbl_s_theCcwVtable = new byte[] {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
}
}
}
// Windows.UI.Xaml.Input.ITappedRoutedEventArgs
public unsafe static class ITappedRoutedEventArgs__Impl
{
// v-table for 'Windows.UI.Xaml.Input.ITappedRoutedEventArgs'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Input.ITappedRoutedEventArgs))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Xaml.Input.DoubleTappedEventHandler
public unsafe static class DoubleTappedEventHandler__Impl
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void Invoke(
this global::System.__ComObject __this,
object sender,
global::Windows.UI.Xaml.Input.DoubleTappedRoutedEventArgs e)
{
global::McgInterop.ForwardComSharedStubs.Proc_object__TArg0__<global::Windows.UI.Xaml.Input.DoubleTappedEventHandler, global::Windows.UI.Xaml.Input.DoubleTappedRoutedEventArgs>(
__this,
sender,
e,
global::Windows.UI.Xaml.Input.DoubleTappedEventHandler__Impl.Vtbl.idx_Invoke
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// v-table for 'Windows.UI.Xaml.Input.DoubleTappedEventHandler'
[global::System.Runtime.InteropServices.McgRootsType(typeof(global::Windows.UI.Xaml.Input.DoubleTappedEventHandler))]
public unsafe partial struct Vtbl
{
global::System.IntPtr pfnQueryInterface;
global::System.IntPtr pfnAddRef;
global::System.IntPtr pfnRelease;
// Windows_UI_Xaml_Input__DoubleTappedEventHandler
global::System.IntPtr pfnInvoke_Windows_UI_Xaml_Input__DoubleTappedEventHandler;
internal const int idx_Invoke = 3;
[global::System.Runtime.CompilerServices.InitDataBlob(typeof(global::Windows.UI.Xaml.Input.DoubleTappedEventHandler__Impl.Vtbl.Windows_UI_Xaml_Input_DoubleTappedEventHandler__Impl_Vtbl_McgRvaContainer), "RVA_Windows_UI_Xaml_Input_DoubleTappedEventHandler__Impl_Vtbl_s_theCcwVtable")]
public static global::Windows.UI.Xaml.Input.DoubleTappedEventHandler__Impl.Vtbl s_theCcwVtable
#if false
= new global::Windows.UI.Xaml.Input.DoubleTappedEventHandler__Impl.Vtbl() {
pfnQueryInterface = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfQueryInterface>(System.Runtime.InteropServices.__vtable_IUnknown.QueryInterface),
pfnAddRef = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfAddRef>(System.Runtime.InteropServices.__vtable_IUnknown.AddRef),
pfnRelease = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfRelease>(System.Runtime.InteropServices.__vtable_IUnknown.Release),
pfnInvoke_Windows_UI_Xaml_Input__DoubleTappedEventHandler = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget42>(global::Windows.UI.Xaml.Input.DoubleTappedEventHandler__Impl.Vtbl.Invoke__STUB),
}
#endif
;
public static global::System.IntPtr pNativeVtable;
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int Invoke__STUB(
global::System.IntPtr pComThis,
global::System.Runtime.InteropServices.__vtable_IInspectable* unsafe_sender,
global::Windows.UI.Xaml.Input.IDoubleTappedRoutedEventArgs__Impl.Vtbl** unsafe_e)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.UI.Xaml.Input.DoubleTappedEventHandler>(
__this,
0
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Proc_object__TArg0__<global::Windows.UI.Xaml.Input.DoubleTappedRoutedEventArgs>(
__this,
unsafe_sender,
unsafe_e,
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
private static class Windows_UI_Xaml_Input_DoubleTappedEventHandler__Impl_Vtbl_McgRvaContainer
{
[global::System.Runtime.CompilerServices.MethodAddrFixup(0, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "QueryInterface")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(4, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "AddRef")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(8, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "Release")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(12, typeof(global::Windows.UI.Xaml.Input.DoubleTappedEventHandler__Impl.Vtbl), "Invoke__STUB")]
[global::System.Runtime.CompilerServices.NonArray]
static readonly byte[] RVA_Windows_UI_Xaml_Input_DoubleTappedEventHandler__Impl_Vtbl_s_theCcwVtable = new byte[] {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
}
}
}
// Windows.UI.Xaml.Input.IDoubleTappedRoutedEventArgs
public unsafe static class IDoubleTappedRoutedEventArgs__Impl
{
// v-table for 'Windows.UI.Xaml.Input.IDoubleTappedRoutedEventArgs'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Input.IDoubleTappedRoutedEventArgs))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Xaml.Input.HoldingEventHandler
public unsafe static class HoldingEventHandler__Impl
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void Invoke(
this global::System.__ComObject __this,
object sender,
global::Windows.UI.Xaml.Input.HoldingRoutedEventArgs e)
{
global::McgInterop.ForwardComSharedStubs.Proc_object__TArg0__<global::Windows.UI.Xaml.Input.HoldingEventHandler, global::Windows.UI.Xaml.Input.HoldingRoutedEventArgs>(
__this,
sender,
e,
global::Windows.UI.Xaml.Input.HoldingEventHandler__Impl.Vtbl.idx_Invoke
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// v-table for 'Windows.UI.Xaml.Input.HoldingEventHandler'
[global::System.Runtime.InteropServices.McgRootsType(typeof(global::Windows.UI.Xaml.Input.HoldingEventHandler))]
public unsafe partial struct Vtbl
{
global::System.IntPtr pfnQueryInterface;
global::System.IntPtr pfnAddRef;
global::System.IntPtr pfnRelease;
// Windows_UI_Xaml_Input__HoldingEventHandler
global::System.IntPtr pfnInvoke_Windows_UI_Xaml_Input__HoldingEventHandler;
internal const int idx_Invoke = 3;
[global::System.Runtime.CompilerServices.InitDataBlob(typeof(global::Windows.UI.Xaml.Input.HoldingEventHandler__Impl.Vtbl.Windows_UI_Xaml_Input_HoldingEventHandler__Impl_Vtbl_McgRvaContainer), "RVA_Windows_UI_Xaml_Input_HoldingEventHandler__Impl_Vtbl_s_theCcwVtable")]
public static global::Windows.UI.Xaml.Input.HoldingEventHandler__Impl.Vtbl s_theCcwVtable
#if false
= new global::Windows.UI.Xaml.Input.HoldingEventHandler__Impl.Vtbl() {
pfnQueryInterface = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfQueryInterface>(System.Runtime.InteropServices.__vtable_IUnknown.QueryInterface),
pfnAddRef = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfAddRef>(System.Runtime.InteropServices.__vtable_IUnknown.AddRef),
pfnRelease = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfRelease>(System.Runtime.InteropServices.__vtable_IUnknown.Release),
pfnInvoke_Windows_UI_Xaml_Input__HoldingEventHandler = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget43>(global::Windows.UI.Xaml.Input.HoldingEventHandler__Impl.Vtbl.Invoke__STUB),
}
#endif
;
public static global::System.IntPtr pNativeVtable;
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int Invoke__STUB(
global::System.IntPtr pComThis,
global::System.Runtime.InteropServices.__vtable_IInspectable* unsafe_sender,
global::Windows.UI.Xaml.Input.IHoldingRoutedEventArgs__Impl.Vtbl** unsafe_e)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.UI.Xaml.Input.HoldingEventHandler>(
__this,
0
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Proc_object__TArg0__<global::Windows.UI.Xaml.Input.HoldingRoutedEventArgs>(
__this,
unsafe_sender,
unsafe_e,
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
private static class Windows_UI_Xaml_Input_HoldingEventHandler__Impl_Vtbl_McgRvaContainer
{
[global::System.Runtime.CompilerServices.MethodAddrFixup(0, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "QueryInterface")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(4, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "AddRef")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(8, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "Release")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(12, typeof(global::Windows.UI.Xaml.Input.HoldingEventHandler__Impl.Vtbl), "Invoke__STUB")]
[global::System.Runtime.CompilerServices.NonArray]
static readonly byte[] RVA_Windows_UI_Xaml_Input_HoldingEventHandler__Impl_Vtbl_s_theCcwVtable = new byte[] {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
}
}
}
// Windows.UI.Xaml.Input.IHoldingRoutedEventArgs
public unsafe static class IHoldingRoutedEventArgs__Impl
{
// v-table for 'Windows.UI.Xaml.Input.IHoldingRoutedEventArgs'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Input.IHoldingRoutedEventArgs))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Xaml.Input.RightTappedEventHandler
public unsafe static class RightTappedEventHandler__Impl
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void Invoke(
this global::System.__ComObject __this,
object sender,
global::Windows.UI.Xaml.Input.RightTappedRoutedEventArgs e)
{
global::McgInterop.ForwardComSharedStubs.Proc_object__TArg0__<global::Windows.UI.Xaml.Input.RightTappedEventHandler, global::Windows.UI.Xaml.Input.RightTappedRoutedEventArgs>(
__this,
sender,
e,
global::Windows.UI.Xaml.Input.RightTappedEventHandler__Impl.Vtbl.idx_Invoke
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// v-table for 'Windows.UI.Xaml.Input.RightTappedEventHandler'
[global::System.Runtime.InteropServices.McgRootsType(typeof(global::Windows.UI.Xaml.Input.RightTappedEventHandler))]
public unsafe partial struct Vtbl
{
global::System.IntPtr pfnQueryInterface;
global::System.IntPtr pfnAddRef;
global::System.IntPtr pfnRelease;
// Windows_UI_Xaml_Input__RightTappedEventHandler
global::System.IntPtr pfnInvoke_Windows_UI_Xaml_Input__RightTappedEventHandler;
internal const int idx_Invoke = 3;
[global::System.Runtime.CompilerServices.InitDataBlob(typeof(global::Windows.UI.Xaml.Input.RightTappedEventHandler__Impl.Vtbl.Windows_UI_Xaml_Input_RightTappedEventHandler__Impl_Vtbl_McgRvaContainer), "RVA_Windows_UI_Xaml_Input_RightTappedEventHandler__Impl_Vtbl_s_theCcwVtable")]
public static global::Windows.UI.Xaml.Input.RightTappedEventHandler__Impl.Vtbl s_theCcwVtable
#if false
= new global::Windows.UI.Xaml.Input.RightTappedEventHandler__Impl.Vtbl() {
pfnQueryInterface = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfQueryInterface>(System.Runtime.InteropServices.__vtable_IUnknown.QueryInterface),
pfnAddRef = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfAddRef>(System.Runtime.InteropServices.__vtable_IUnknown.AddRef),
pfnRelease = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfRelease>(System.Runtime.InteropServices.__vtable_IUnknown.Release),
pfnInvoke_Windows_UI_Xaml_Input__RightTappedEventHandler = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget44>(global::Windows.UI.Xaml.Input.RightTappedEventHandler__Impl.Vtbl.Invoke__STUB),
}
#endif
;
public static global::System.IntPtr pNativeVtable;
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int Invoke__STUB(
global::System.IntPtr pComThis,
global::System.Runtime.InteropServices.__vtable_IInspectable* unsafe_sender,
global::Windows.UI.Xaml.Input.IRightTappedRoutedEventArgs__Impl.Vtbl** unsafe_e)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.UI.Xaml.Input.RightTappedEventHandler>(
__this,
0
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Proc_object__TArg0__<global::Windows.UI.Xaml.Input.RightTappedRoutedEventArgs>(
__this,
unsafe_sender,
unsafe_e,
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
private static class Windows_UI_Xaml_Input_RightTappedEventHandler__Impl_Vtbl_McgRvaContainer
{
[global::System.Runtime.CompilerServices.MethodAddrFixup(0, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "QueryInterface")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(4, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "AddRef")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(8, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "Release")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(12, typeof(global::Windows.UI.Xaml.Input.RightTappedEventHandler__Impl.Vtbl), "Invoke__STUB")]
[global::System.Runtime.CompilerServices.NonArray]
static readonly byte[] RVA_Windows_UI_Xaml_Input_RightTappedEventHandler__Impl_Vtbl_s_theCcwVtable = new byte[] {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
}
}
}
// Windows.UI.Xaml.Input.IRightTappedRoutedEventArgs
public unsafe static class IRightTappedRoutedEventArgs__Impl
{
// v-table for 'Windows.UI.Xaml.Input.IRightTappedRoutedEventArgs'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Input.IRightTappedRoutedEventArgs))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Xaml.Input.ManipulationStartingEventHandler
public unsafe static class ManipulationStartingEventHandler__Impl
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void Invoke(
this global::System.__ComObject __this,
object sender,
global::Windows.UI.Xaml.Input.ManipulationStartingRoutedEventArgs e)
{
global::McgInterop.ForwardComSharedStubs.Proc_object__TArg0__<global::Windows.UI.Xaml.Input.ManipulationStartingEventHandler, global::Windows.UI.Xaml.Input.ManipulationStartingRoutedEventArgs>(
__this,
sender,
e,
global::Windows.UI.Xaml.Input.ManipulationStartingEventHandler__Impl.Vtbl.idx_Invoke
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// v-table for 'Windows.UI.Xaml.Input.ManipulationStartingEventHandler'
[global::System.Runtime.InteropServices.McgRootsType(typeof(global::Windows.UI.Xaml.Input.ManipulationStartingEventHandler))]
public unsafe partial struct Vtbl
{
global::System.IntPtr pfnQueryInterface;
global::System.IntPtr pfnAddRef;
global::System.IntPtr pfnRelease;
// Windows_UI_Xaml_Input__ManipulationStartingEventHandler
global::System.IntPtr pfnInvoke_Windows_UI_Xaml_Input__ManipulationStartingEventHandler;
internal const int idx_Invoke = 3;
[global::System.Runtime.CompilerServices.InitDataBlob(typeof(global::Windows.UI.Xaml.Input.ManipulationStartingEventHandler__Impl.Vtbl.Windows_UI_Xaml_Input_ManipulationStartingEventHandler__Impl_Vtbl_McgRvaContainer), "RVA_Windows_UI_Xaml_Input_ManipulationStartingEventHandler__Impl_Vtbl_s_theCcwVtable")]
public static global::Windows.UI.Xaml.Input.ManipulationStartingEventHandler__Impl.Vtbl s_theCcwVtable
#if false
= new global::Windows.UI.Xaml.Input.ManipulationStartingEventHandler__Impl.Vtbl() {
pfnQueryInterface = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfQueryInterface>(System.Runtime.InteropServices.__vtable_IUnknown.QueryInterface),
pfnAddRef = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfAddRef>(System.Runtime.InteropServices.__vtable_IUnknown.AddRef),
pfnRelease = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfRelease>(System.Runtime.InteropServices.__vtable_IUnknown.Release),
pfnInvoke_Windows_UI_Xaml_Input__ManipulationStartingEventHandler = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget45>(global::Windows.UI.Xaml.Input.ManipulationStartingEventHandler__Impl.Vtbl.Invoke__STUB),
}
#endif
;
public static global::System.IntPtr pNativeVtable;
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int Invoke__STUB(
global::System.IntPtr pComThis,
global::System.Runtime.InteropServices.__vtable_IInspectable* unsafe_sender,
global::Windows.UI.Xaml.Input.IManipulationStartingRoutedEventArgs__Impl.Vtbl** unsafe_e)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.UI.Xaml.Input.ManipulationStartingEventHandler>(
__this,
0
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Proc_object__TArg0__<global::Windows.UI.Xaml.Input.ManipulationStartingRoutedEventArgs>(
__this,
unsafe_sender,
unsafe_e,
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
private static class Windows_UI_Xaml_Input_ManipulationStartingEventHandler__Impl_Vtbl_McgRvaContainer
{
[global::System.Runtime.CompilerServices.MethodAddrFixup(0, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "QueryInterface")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(4, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "AddRef")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(8, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "Release")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(12, typeof(global::Windows.UI.Xaml.Input.ManipulationStartingEventHandler__Impl.Vtbl), "Invoke__STUB")]
[global::System.Runtime.CompilerServices.NonArray]
static readonly byte[] RVA_Windows_UI_Xaml_Input_ManipulationStartingEventHandler__Impl_Vtbl_s_theCcwVtable = new byte[] {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
}
}
}
// Windows.UI.Xaml.Input.IManipulationStartingRoutedEventArgs
public unsafe static class IManipulationStartingRoutedEventArgs__Impl
{
// v-table for 'Windows.UI.Xaml.Input.IManipulationStartingRoutedEventArgs'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Input.IManipulationStartingRoutedEventArgs))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Xaml.Input.ManipulationInertiaStartingEventHandler
public unsafe static class ManipulationInertiaStartingEventHandler__Impl
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void Invoke(
this global::System.__ComObject __this,
object sender,
global::Windows.UI.Xaml.Input.ManipulationInertiaStartingRoutedEventArgs e)
{
global::McgInterop.ForwardComSharedStubs.Proc_object__TArg0__<global::Windows.UI.Xaml.Input.ManipulationInertiaStartingEventHandler, global::Windows.UI.Xaml.Input.ManipulationInertiaStartingRoutedEventArgs>(
__this,
sender,
e,
global::Windows.UI.Xaml.Input.ManipulationInertiaStartingEventHandler__Impl.Vtbl.idx_Invoke
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// v-table for 'Windows.UI.Xaml.Input.ManipulationInertiaStartingEventHandler'
[global::System.Runtime.InteropServices.McgRootsType(typeof(global::Windows.UI.Xaml.Input.ManipulationInertiaStartingEventHandler))]
public unsafe partial struct Vtbl
{
global::System.IntPtr pfnQueryInterface;
global::System.IntPtr pfnAddRef;
global::System.IntPtr pfnRelease;
// Windows_UI_Xaml_Input__ManipulationInertiaStartingEventHandler
global::System.IntPtr pfnInvoke_Windows_UI_Xaml_Input__ManipulationInertiaStartingEventHandler;
internal const int idx_Invoke = 3;
[global::System.Runtime.CompilerServices.InitDataBlob(typeof(global::Windows.UI.Xaml.Input.ManipulationInertiaStartingEventHandler__Impl.Vtbl.Windows_UI_Xaml_Input_ManipulationInertiaStartingEventHandler__Impl_Vtbl_McgRvaContainer), "RVA_Windows_UI_Xaml_Input_ManipulationInertiaStartingEventHandler__Impl_Vtbl_s_theCcwVtable")]
public static global::Windows.UI.Xaml.Input.ManipulationInertiaStartingEventHandler__Impl.Vtbl s_theCcwVtable
#if false
= new global::Windows.UI.Xaml.Input.ManipulationInertiaStartingEventHandler__Impl.Vtbl() {
pfnQueryInterface = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfQueryInterface>(System.Runtime.InteropServices.__vtable_IUnknown.QueryInterface),
pfnAddRef = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfAddRef>(System.Runtime.InteropServices.__vtable_IUnknown.AddRef),
pfnRelease = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfRelease>(System.Runtime.InteropServices.__vtable_IUnknown.Release),
pfnInvoke_Windows_UI_Xaml_Input__ManipulationInertiaStartingEventHandler = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget46>(global::Windows.UI.Xaml.Input.ManipulationInertiaStartingEventHandler__Impl.Vtbl.Invoke__STUB),
}
#endif
;
public static global::System.IntPtr pNativeVtable;
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int Invoke__STUB(
global::System.IntPtr pComThis,
global::System.Runtime.InteropServices.__vtable_IInspectable* unsafe_sender,
global::Windows.UI.Xaml.Input.IManipulationInertiaStartingRoutedEventArgs__Impl.Vtbl** unsafe_e)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.UI.Xaml.Input.ManipulationInertiaStartingEventHandler>(
__this,
0
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Proc_object__TArg0__<global::Windows.UI.Xaml.Input.ManipulationInertiaStartingRoutedEventArgs>(
__this,
unsafe_sender,
unsafe_e,
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
private static class Windows_UI_Xaml_Input_ManipulationInertiaStartingEventHandler__Impl_Vtbl_McgRvaContainer
{
[global::System.Runtime.CompilerServices.MethodAddrFixup(0, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "QueryInterface")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(4, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "AddRef")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(8, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "Release")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(12, typeof(global::Windows.UI.Xaml.Input.ManipulationInertiaStartingEventHandler__Impl.Vtbl), "Invoke__STUB")]
[global::System.Runtime.CompilerServices.NonArray]
static readonly byte[] RVA_Windows_UI_Xaml_Input_ManipulationInertiaStartingEventHandler__Impl_Vtbl_s_theCcwVtable = new byte[] {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
}
}
}
// Windows.UI.Xaml.Input.IManipulationInertiaStartingRoutedEventArgs
public unsafe static class IManipulationInertiaStartingRoutedEventArgs__Impl
{
// v-table for 'Windows.UI.Xaml.Input.IManipulationInertiaStartingRoutedEventArgs'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Input.IManipulationInertiaStartingRoutedEventArgs))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Xaml.Input.ManipulationStartedEventHandler
public unsafe static class ManipulationStartedEventHandler__Impl
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void Invoke(
this global::System.__ComObject __this,
object sender,
global::Windows.UI.Xaml.Input.ManipulationStartedRoutedEventArgs e)
{
global::McgInterop.ForwardComSharedStubs.Proc_object__TArg0__<global::Windows.UI.Xaml.Input.ManipulationStartedEventHandler, global::Windows.UI.Xaml.Input.ManipulationStartedRoutedEventArgs>(
__this,
sender,
e,
global::Windows.UI.Xaml.Input.ManipulationStartedEventHandler__Impl.Vtbl.idx_Invoke
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// v-table for 'Windows.UI.Xaml.Input.ManipulationStartedEventHandler'
[global::System.Runtime.InteropServices.McgRootsType(typeof(global::Windows.UI.Xaml.Input.ManipulationStartedEventHandler))]
public unsafe partial struct Vtbl
{
global::System.IntPtr pfnQueryInterface;
global::System.IntPtr pfnAddRef;
global::System.IntPtr pfnRelease;
// Windows_UI_Xaml_Input__ManipulationStartedEventHandler
global::System.IntPtr pfnInvoke_Windows_UI_Xaml_Input__ManipulationStartedEventHandler;
internal const int idx_Invoke = 3;
[global::System.Runtime.CompilerServices.InitDataBlob(typeof(global::Windows.UI.Xaml.Input.ManipulationStartedEventHandler__Impl.Vtbl.Windows_UI_Xaml_Input_ManipulationStartedEventHandler__Impl_Vtbl_McgRvaContainer), "RVA_Windows_UI_Xaml_Input_ManipulationStartedEventHandler__Impl_Vtbl_s_theCcwVtable")]
public static global::Windows.UI.Xaml.Input.ManipulationStartedEventHandler__Impl.Vtbl s_theCcwVtable
#if false
= new global::Windows.UI.Xaml.Input.ManipulationStartedEventHandler__Impl.Vtbl() {
pfnQueryInterface = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfQueryInterface>(System.Runtime.InteropServices.__vtable_IUnknown.QueryInterface),
pfnAddRef = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfAddRef>(System.Runtime.InteropServices.__vtable_IUnknown.AddRef),
pfnRelease = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfRelease>(System.Runtime.InteropServices.__vtable_IUnknown.Release),
pfnInvoke_Windows_UI_Xaml_Input__ManipulationStartedEventHandler = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget47>(global::Windows.UI.Xaml.Input.ManipulationStartedEventHandler__Impl.Vtbl.Invoke__STUB),
}
#endif
;
public static global::System.IntPtr pNativeVtable;
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int Invoke__STUB(
global::System.IntPtr pComThis,
global::System.Runtime.InteropServices.__vtable_IInspectable* unsafe_sender,
global::Windows.UI.Xaml.Input.IManipulationStartedRoutedEventArgs__Impl.Vtbl** unsafe_e)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.UI.Xaml.Input.ManipulationStartedEventHandler>(
__this,
0
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Proc_object__TArg0__<global::Windows.UI.Xaml.Input.ManipulationStartedRoutedEventArgs>(
__this,
unsafe_sender,
unsafe_e,
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
private static class Windows_UI_Xaml_Input_ManipulationStartedEventHandler__Impl_Vtbl_McgRvaContainer
{
[global::System.Runtime.CompilerServices.MethodAddrFixup(0, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "QueryInterface")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(4, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "AddRef")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(8, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "Release")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(12, typeof(global::Windows.UI.Xaml.Input.ManipulationStartedEventHandler__Impl.Vtbl), "Invoke__STUB")]
[global::System.Runtime.CompilerServices.NonArray]
static readonly byte[] RVA_Windows_UI_Xaml_Input_ManipulationStartedEventHandler__Impl_Vtbl_s_theCcwVtable = new byte[] {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
}
}
}
// Windows.UI.Xaml.Input.IManipulationStartedRoutedEventArgs
public unsafe static class IManipulationStartedRoutedEventArgs__Impl
{
// v-table for 'Windows.UI.Xaml.Input.IManipulationStartedRoutedEventArgs'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Input.IManipulationStartedRoutedEventArgs))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Xaml.Input.ManipulationDeltaEventHandler
public unsafe static class ManipulationDeltaEventHandler__Impl
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void Invoke(
this global::System.__ComObject __this,
object sender,
global::Windows.UI.Xaml.Input.ManipulationDeltaRoutedEventArgs e)
{
global::McgInterop.ForwardComSharedStubs.Proc_object__TArg0__<global::Windows.UI.Xaml.Input.ManipulationDeltaEventHandler, global::Windows.UI.Xaml.Input.ManipulationDeltaRoutedEventArgs>(
__this,
sender,
e,
global::Windows.UI.Xaml.Input.ManipulationDeltaEventHandler__Impl.Vtbl.idx_Invoke
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// v-table for 'Windows.UI.Xaml.Input.ManipulationDeltaEventHandler'
[global::System.Runtime.InteropServices.McgRootsType(typeof(global::Windows.UI.Xaml.Input.ManipulationDeltaEventHandler))]
public unsafe partial struct Vtbl
{
global::System.IntPtr pfnQueryInterface;
global::System.IntPtr pfnAddRef;
global::System.IntPtr pfnRelease;
// Windows_UI_Xaml_Input__ManipulationDeltaEventHandler
global::System.IntPtr pfnInvoke_Windows_UI_Xaml_Input__ManipulationDeltaEventHandler;
internal const int idx_Invoke = 3;
[global::System.Runtime.CompilerServices.InitDataBlob(typeof(global::Windows.UI.Xaml.Input.ManipulationDeltaEventHandler__Impl.Vtbl.Windows_UI_Xaml_Input_ManipulationDeltaEventHandler__Impl_Vtbl_McgRvaContainer), "RVA_Windows_UI_Xaml_Input_ManipulationDeltaEventHandler__Impl_Vtbl_s_theCcwVtable")]
public static global::Windows.UI.Xaml.Input.ManipulationDeltaEventHandler__Impl.Vtbl s_theCcwVtable
#if false
= new global::Windows.UI.Xaml.Input.ManipulationDeltaEventHandler__Impl.Vtbl() {
pfnQueryInterface = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfQueryInterface>(System.Runtime.InteropServices.__vtable_IUnknown.QueryInterface),
pfnAddRef = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfAddRef>(System.Runtime.InteropServices.__vtable_IUnknown.AddRef),
pfnRelease = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfRelease>(System.Runtime.InteropServices.__vtable_IUnknown.Release),
pfnInvoke_Windows_UI_Xaml_Input__ManipulationDeltaEventHandler = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget48>(global::Windows.UI.Xaml.Input.ManipulationDeltaEventHandler__Impl.Vtbl.Invoke__STUB),
}
#endif
;
public static global::System.IntPtr pNativeVtable;
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int Invoke__STUB(
global::System.IntPtr pComThis,
global::System.Runtime.InteropServices.__vtable_IInspectable* unsafe_sender,
global::Windows.UI.Xaml.Input.IManipulationDeltaRoutedEventArgs__Impl.Vtbl** unsafe_e)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.UI.Xaml.Input.ManipulationDeltaEventHandler>(
__this,
0
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Proc_object__TArg0__<global::Windows.UI.Xaml.Input.ManipulationDeltaRoutedEventArgs>(
__this,
unsafe_sender,
unsafe_e,
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
private static class Windows_UI_Xaml_Input_ManipulationDeltaEventHandler__Impl_Vtbl_McgRvaContainer
{
[global::System.Runtime.CompilerServices.MethodAddrFixup(0, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "QueryInterface")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(4, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "AddRef")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(8, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "Release")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(12, typeof(global::Windows.UI.Xaml.Input.ManipulationDeltaEventHandler__Impl.Vtbl), "Invoke__STUB")]
[global::System.Runtime.CompilerServices.NonArray]
static readonly byte[] RVA_Windows_UI_Xaml_Input_ManipulationDeltaEventHandler__Impl_Vtbl_s_theCcwVtable = new byte[] {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
}
}
}
// Windows.UI.Xaml.Input.IManipulationDeltaRoutedEventArgs
public unsafe static class IManipulationDeltaRoutedEventArgs__Impl
{
// v-table for 'Windows.UI.Xaml.Input.IManipulationDeltaRoutedEventArgs'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Input.IManipulationDeltaRoutedEventArgs))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Xaml.Input.ManipulationCompletedEventHandler
public unsafe static class ManipulationCompletedEventHandler__Impl
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void Invoke(
this global::System.__ComObject __this,
object sender,
global::Windows.UI.Xaml.Input.ManipulationCompletedRoutedEventArgs e)
{
global::McgInterop.ForwardComSharedStubs.Proc_object__TArg0__<global::Windows.UI.Xaml.Input.ManipulationCompletedEventHandler, global::Windows.UI.Xaml.Input.ManipulationCompletedRoutedEventArgs>(
__this,
sender,
e,
global::Windows.UI.Xaml.Input.ManipulationCompletedEventHandler__Impl.Vtbl.idx_Invoke
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// v-table for 'Windows.UI.Xaml.Input.ManipulationCompletedEventHandler'
[global::System.Runtime.InteropServices.McgRootsType(typeof(global::Windows.UI.Xaml.Input.ManipulationCompletedEventHandler))]
public unsafe partial struct Vtbl
{
global::System.IntPtr pfnQueryInterface;
global::System.IntPtr pfnAddRef;
global::System.IntPtr pfnRelease;
// Windows_UI_Xaml_Input__ManipulationCompletedEventHandler
global::System.IntPtr pfnInvoke_Windows_UI_Xaml_Input__ManipulationCompletedEventHandler;
internal const int idx_Invoke = 3;
[global::System.Runtime.CompilerServices.InitDataBlob(typeof(global::Windows.UI.Xaml.Input.ManipulationCompletedEventHandler__Impl.Vtbl.Windows_UI_Xaml_Input_ManipulationCompletedEventHandler__Impl_Vtbl_McgRvaContainer), "RVA_Windows_UI_Xaml_Input_ManipulationCompletedEventHandler__Impl_Vtbl_s_theCcwVtable")]
public static global::Windows.UI.Xaml.Input.ManipulationCompletedEventHandler__Impl.Vtbl s_theCcwVtable
#if false
= new global::Windows.UI.Xaml.Input.ManipulationCompletedEventHandler__Impl.Vtbl() {
pfnQueryInterface = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfQueryInterface>(System.Runtime.InteropServices.__vtable_IUnknown.QueryInterface),
pfnAddRef = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfAddRef>(System.Runtime.InteropServices.__vtable_IUnknown.AddRef),
pfnRelease = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfRelease>(System.Runtime.InteropServices.__vtable_IUnknown.Release),
pfnInvoke_Windows_UI_Xaml_Input__ManipulationCompletedEventHandler = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget49>(global::Windows.UI.Xaml.Input.ManipulationCompletedEventHandler__Impl.Vtbl.Invoke__STUB),
}
#endif
;
public static global::System.IntPtr pNativeVtable;
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int Invoke__STUB(
global::System.IntPtr pComThis,
global::System.Runtime.InteropServices.__vtable_IInspectable* unsafe_sender,
global::Windows.UI.Xaml.Input.IManipulationCompletedRoutedEventArgs__Impl.Vtbl** unsafe_e)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.UI.Xaml.Input.ManipulationCompletedEventHandler>(
__this,
0
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Proc_object__TArg0__<global::Windows.UI.Xaml.Input.ManipulationCompletedRoutedEventArgs>(
__this,
unsafe_sender,
unsafe_e,
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
private static class Windows_UI_Xaml_Input_ManipulationCompletedEventHandler__Impl_Vtbl_McgRvaContainer
{
[global::System.Runtime.CompilerServices.MethodAddrFixup(0, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "QueryInterface")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(4, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "AddRef")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(8, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "Release")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(12, typeof(global::Windows.UI.Xaml.Input.ManipulationCompletedEventHandler__Impl.Vtbl), "Invoke__STUB")]
[global::System.Runtime.CompilerServices.NonArray]
static readonly byte[] RVA_Windows_UI_Xaml_Input_ManipulationCompletedEventHandler__Impl_Vtbl_s_theCcwVtable = new byte[] {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
}
}
}
// Windows.UI.Xaml.Input.IManipulationCompletedRoutedEventArgs
public unsafe static class IManipulationCompletedRoutedEventArgs__Impl
{
// v-table for 'Windows.UI.Xaml.Input.IManipulationCompletedRoutedEventArgs'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Input.IManipulationCompletedRoutedEventArgs))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Xaml.Input.IContextRequestedEventArgs
public unsafe static class IContextRequestedEventArgs__Impl
{
// v-table for 'Windows.UI.Xaml.Input.IContextRequestedEventArgs'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Input.IContextRequestedEventArgs))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Xaml.Input.IAccessKeyDisplayRequestedEventArgs
public unsafe static class IAccessKeyDisplayRequestedEventArgs__Impl
{
// v-table for 'Windows.UI.Xaml.Input.IAccessKeyDisplayRequestedEventArgs'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Input.IAccessKeyDisplayRequestedEventArgs))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Xaml.Input.IAccessKeyDisplayDismissedEventArgs
public unsafe static class IAccessKeyDisplayDismissedEventArgs__Impl
{
// v-table for 'Windows.UI.Xaml.Input.IAccessKeyDisplayDismissedEventArgs'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Input.IAccessKeyDisplayDismissedEventArgs))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Xaml.Input.IAccessKeyInvokedEventArgs
public unsafe static class IAccessKeyInvokedEventArgs__Impl
{
// v-table for 'Windows.UI.Xaml.Input.IAccessKeyInvokedEventArgs'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Input.IAccessKeyInvokedEventArgs))]
public unsafe partial struct Vtbl
{
}
}
}
namespace Windows.UI.Xaml.Markup
{
// Windows.UI.Xaml.Markup.IComponentConnector
public unsafe static class IComponentConnector__Impl
{
// v-table for 'Windows.UI.Xaml.Markup.IComponentConnector'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Markup.IComponentConnector))]
[global::System.Runtime.InteropServices.McgRootsType(typeof(global::Windows.UI.Xaml.Markup.IComponentConnector))]
public unsafe partial struct Vtbl
{
global::System.IntPtr pfnQueryInterface;
global::System.IntPtr pfnAddRef;
global::System.IntPtr pfnRelease;
global::System.IntPtr pfnGetIids;
global::System.IntPtr pfnGetRuntimeClassName;
global::System.IntPtr pfnGetTrustLevel;
// Windows_UI_Xaml_Markup__IComponentConnector
global::System.IntPtr pfnConnect_Windows_UI_Xaml_Markup__IComponentConnector;
internal const int idx_Connect = 6;
[global::System.Runtime.CompilerServices.InitDataBlob(typeof(global::Windows.UI.Xaml.Markup.IComponentConnector__Impl.Vtbl.Windows_UI_Xaml_Markup_IComponentConnector__Impl_Vtbl_McgRvaContainer), "RVA_Windows_UI_Xaml_Markup_IComponentConnector__Impl_Vtbl_s_theCcwVtable")]
public static global::Windows.UI.Xaml.Markup.IComponentConnector__Impl.Vtbl s_theCcwVtable
#if false
= new global::Windows.UI.Xaml.Markup.IComponentConnector__Impl.Vtbl() {
pfnQueryInterface = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfQueryInterface>(System.Runtime.InteropServices.__vtable_IUnknown.QueryInterface),
pfnAddRef = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfAddRef>(System.Runtime.InteropServices.__vtable_IUnknown.AddRef),
pfnRelease = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfRelease>(System.Runtime.InteropServices.__vtable_IUnknown.Release),
pfnGetIids = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget0>(System.Runtime.InteropServices.__vtable_IInspectable.GetIIDs),
pfnGetRuntimeClassName = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget1>(System.Runtime.InteropServices.__vtable_IInspectable.GetRuntimeClassName),
pfnGetTrustLevel = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget1>(System.Runtime.InteropServices.__vtable_IInspectable.GetTrustLevel),
pfnConnect_Windows_UI_Xaml_Markup__IComponentConnector = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget100>(global::Windows.UI.Xaml.Markup.IComponentConnector__Impl.Vtbl.Connect__STUB),
}
#endif
;
public static global::System.IntPtr pNativeVtable;
// Signature, Windows.UI.Xaml.Markup.IComponentConnector.Connect, [rev] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [rev] [in] [Mcg.CodeGen.BlittableValueMarshaller] int__int, [rev] [in] [Mcg.CodeGen.WinRTInspectableMarshaller] object____mcg_IInspectable,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int Connect__STUB(
global::System.IntPtr pComThis,
int unsafe_connectionId,
global::System.Runtime.InteropServices.__vtable_IInspectable* unsafe_target)
{
// Setup
object target = default(object);
try
{
// Marshalling
target = global::System.Runtime.InteropServices.McgMarshal.IInspectableToObject(((global::System.IntPtr)unsafe_target));
// Call to managed method
global::System.Runtime.InteropServices.McgMarshal.FastCast<global::Windows.UI.Xaml.Markup.IComponentConnector>(global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis)).Connect(
unsafe_connectionId,
target
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
// Return
return global::McgInterop.Helpers.S_OK;
}
catch (global::System.Exception hrExcep)
{
// ExceptionReturn
return global::System.Runtime.InteropServices.McgMarshal.GetHRForExceptionWinRT(hrExcep);
}
}
private static class Windows_UI_Xaml_Markup_IComponentConnector__Impl_Vtbl_McgRvaContainer
{
[global::System.Runtime.CompilerServices.MethodAddrFixup(0, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "QueryInterface")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(4, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "AddRef")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(8, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "Release")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(12, typeof(global::System.Runtime.InteropServices.__vtable_IInspectable), "GetIIDs")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(16, typeof(global::System.Runtime.InteropServices.__vtable_IInspectable), "GetRuntimeClassName")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(20, typeof(global::System.Runtime.InteropServices.__vtable_IInspectable), "GetTrustLevel")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(24, typeof(global::Windows.UI.Xaml.Markup.IComponentConnector__Impl.Vtbl), "Connect__STUB")]
[global::System.Runtime.CompilerServices.NonArray]
static readonly byte[] RVA_Windows_UI_Xaml_Markup_IComponentConnector__Impl_Vtbl_s_theCcwVtable = new byte[] {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
}
}
}
// Windows.UI.Xaml.Markup.IComponentConnector2
public unsafe static class IComponentConnector2__Impl
{
// v-table for 'Windows.UI.Xaml.Markup.IComponentConnector2'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Markup.IComponentConnector2))]
[global::System.Runtime.InteropServices.McgRootsType(typeof(global::Windows.UI.Xaml.Markup.IComponentConnector2))]
public unsafe partial struct Vtbl
{
global::System.IntPtr pfnQueryInterface;
global::System.IntPtr pfnAddRef;
global::System.IntPtr pfnRelease;
global::System.IntPtr pfnGetIids;
global::System.IntPtr pfnGetRuntimeClassName;
global::System.IntPtr pfnGetTrustLevel;
// Windows_UI_Xaml_Markup__IComponentConnector2
global::System.IntPtr pfnGetBindingConnector_Windows_UI_Xaml_Markup__IComponentConnector2;
internal const int idx_GetBindingConnector = 6;
[global::System.Runtime.CompilerServices.InitDataBlob(typeof(global::Windows.UI.Xaml.Markup.IComponentConnector2__Impl.Vtbl.Windows_UI_Xaml_Markup_IComponentConnector2__Impl_Vtbl_McgRvaContainer), "RVA_Windows_UI_Xaml_Markup_IComponentConnector2__Impl_Vtbl_s_theCcwVtable")]
public static global::Windows.UI.Xaml.Markup.IComponentConnector2__Impl.Vtbl s_theCcwVtable
#if false
= new global::Windows.UI.Xaml.Markup.IComponentConnector2__Impl.Vtbl() {
pfnQueryInterface = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfQueryInterface>(System.Runtime.InteropServices.__vtable_IUnknown.QueryInterface),
pfnAddRef = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfAddRef>(System.Runtime.InteropServices.__vtable_IUnknown.AddRef),
pfnRelease = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfRelease>(System.Runtime.InteropServices.__vtable_IUnknown.Release),
pfnGetIids = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget0>(System.Runtime.InteropServices.__vtable_IInspectable.GetIIDs),
pfnGetRuntimeClassName = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget1>(System.Runtime.InteropServices.__vtable_IInspectable.GetRuntimeClassName),
pfnGetTrustLevel = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget1>(System.Runtime.InteropServices.__vtable_IInspectable.GetTrustLevel),
pfnGetBindingConnector_Windows_UI_Xaml_Markup__IComponentConnector2 = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget101>(global::Windows.UI.Xaml.Markup.IComponentConnector2__Impl.Vtbl.GetBindingConnector__STUB),
}
#endif
;
public static global::System.IntPtr pNativeVtable;
// Signature, Windows.UI.Xaml.Markup.IComponentConnector2.GetBindingConnector, [rev] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [rev] [in] [Mcg.CodeGen.BlittableValueMarshaller] int__int, [rev] [in] [Mcg.CodeGen.WinRTInspectableMarshaller] object____mcg_IInspectable, [rev] [out] [retval] [nativebyref] [Mcg.CodeGen.ComInterfaceMarshaller] Windows_UI_Xaml_Markup_IComponentConnector__Windows_UI_Xaml_Markup__IComponentConnector *,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int GetBindingConnector__STUB(
global::System.IntPtr pComThis,
int unsafe_connectionId,
global::System.Runtime.InteropServices.__vtable_IInspectable* unsafe_target,
global::Windows.UI.Xaml.Markup.IComponentConnector__Impl.Vtbl*** unsafe_returnValue__retval)
{
// Setup
object target = default(object);
if (unsafe_returnValue__retval != null)
(*(unsafe_returnValue__retval)) = null;
global::Windows.UI.Xaml.Markup.IComponentConnector returnValue__retval = default(global::Windows.UI.Xaml.Markup.IComponentConnector);
try
{
// Marshalling
target = global::System.Runtime.InteropServices.McgMarshal.IInspectableToObject(((global::System.IntPtr)unsafe_target));
// Call to managed method
returnValue__retval = global::System.Runtime.InteropServices.McgMarshal.FastCast<global::Windows.UI.Xaml.Markup.IComponentConnector2>(global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis)).GetBindingConnector(
unsafe_connectionId,
target
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
if (unsafe_returnValue__retval != null)
(*(unsafe_returnValue__retval)) = (global::Windows.UI.Xaml.Markup.IComponentConnector__Impl.Vtbl**)global::System.Runtime.InteropServices.McgModuleManager.ObjectToComInterface(
returnValue__retval,
typeof(global::Windows.UI.Xaml.Markup.IComponentConnector).TypeHandle
);
// Return
return global::McgInterop.Helpers.S_OK;
}
catch (global::System.Exception hrExcep)
{
// ExceptionCleanup
if (unsafe_returnValue__retval != null)
{
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)(*(unsafe_returnValue__retval)))));
(*(unsafe_returnValue__retval)) = null;
}
// ExceptionReturn
return global::System.Runtime.InteropServices.McgMarshal.GetHRForExceptionWinRT(hrExcep);
}
}
private static class Windows_UI_Xaml_Markup_IComponentConnector2__Impl_Vtbl_McgRvaContainer
{
[global::System.Runtime.CompilerServices.MethodAddrFixup(0, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "QueryInterface")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(4, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "AddRef")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(8, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "Release")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(12, typeof(global::System.Runtime.InteropServices.__vtable_IInspectable), "GetIIDs")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(16, typeof(global::System.Runtime.InteropServices.__vtable_IInspectable), "GetRuntimeClassName")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(20, typeof(global::System.Runtime.InteropServices.__vtable_IInspectable), "GetTrustLevel")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(24, typeof(global::Windows.UI.Xaml.Markup.IComponentConnector2__Impl.Vtbl), "GetBindingConnector__STUB")]
[global::System.Runtime.CompilerServices.NonArray]
static readonly byte[] RVA_Windows_UI_Xaml_Markup_IComponentConnector2__Impl_Vtbl_s_theCcwVtable = new byte[] {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
}
}
}
// Windows.UI.Xaml.Markup.IXamlMetadataProvider
public unsafe static class IXamlMetadataProvider__Impl
{
// v-table for 'Windows.UI.Xaml.Markup.IXamlMetadataProvider'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Markup.IXamlMetadataProvider))]
[global::System.Runtime.InteropServices.McgRootsType(typeof(global::Windows.UI.Xaml.Markup.IXamlMetadataProvider))]
public unsafe partial struct Vtbl
{
global::System.IntPtr pfnQueryInterface;
global::System.IntPtr pfnAddRef;
global::System.IntPtr pfnRelease;
global::System.IntPtr pfnGetIids;
global::System.IntPtr pfnGetRuntimeClassName;
global::System.IntPtr pfnGetTrustLevel;
// Windows_UI_Xaml_Markup__IXamlMetadataProvider
global::System.IntPtr pfnGetXamlType_Windows_UI_Xaml_Markup__IXamlMetadataProvider;
global::System.IntPtr pfnGetXamlTypeByFullName_Windows_UI_Xaml_Markup__IXamlMetadataProvider;
global::System.IntPtr pfnGetXmlnsDefinitions_Windows_UI_Xaml_Markup__IXamlMetadataProvider;
internal const int idx_GetXamlType = 6;
internal const int idx_GetXamlTypeByFullName = 7;
internal const int idx_GetXmlnsDefinitions = 8;
[global::System.Runtime.CompilerServices.InitDataBlob(typeof(global::Windows.UI.Xaml.Markup.IXamlMetadataProvider__Impl.Vtbl.Windows_UI_Xaml_Markup_IXamlMetadataProvider__Impl_Vtbl_McgRvaContainer), "RVA_Windows_UI_Xaml_Markup_IXamlMetadataProvider__Impl_Vtbl_s_theCcwVtable")]
public static global::Windows.UI.Xaml.Markup.IXamlMetadataProvider__Impl.Vtbl s_theCcwVtable
#if false
= new global::Windows.UI.Xaml.Markup.IXamlMetadataProvider__Impl.Vtbl() {
pfnQueryInterface = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfQueryInterface>(System.Runtime.InteropServices.__vtable_IUnknown.QueryInterface),
pfnAddRef = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfAddRef>(System.Runtime.InteropServices.__vtable_IUnknown.AddRef),
pfnRelease = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfRelease>(System.Runtime.InteropServices.__vtable_IUnknown.Release),
pfnGetIids = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget0>(System.Runtime.InteropServices.__vtable_IInspectable.GetIIDs),
pfnGetRuntimeClassName = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget1>(System.Runtime.InteropServices.__vtable_IInspectable.GetRuntimeClassName),
pfnGetTrustLevel = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget1>(System.Runtime.InteropServices.__vtable_IInspectable.GetTrustLevel),
pfnGetXamlType_Windows_UI_Xaml_Markup__IXamlMetadataProvider = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget102>(global::Windows.UI.Xaml.Markup.IXamlMetadataProvider__Impl.Vtbl.GetXamlType__STUB),
pfnGetXamlTypeByFullName_Windows_UI_Xaml_Markup__IXamlMetadataProvider = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget103>(global::Windows.UI.Xaml.Markup.IXamlMetadataProvider__Impl.Vtbl.GetXamlTypeByFullName__STUB),
pfnGetXmlnsDefinitions_Windows_UI_Xaml_Markup__IXamlMetadataProvider = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget104>(global::Windows.UI.Xaml.Markup.IXamlMetadataProvider__Impl.Vtbl.GetXmlnsDefinitions__STUB),
}
#endif
;
public static global::System.IntPtr pNativeVtable;
// Signature, Windows.UI.Xaml.Markup.IXamlMetadataProvider.GetXamlType, [rev] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [rev] [in] [Mcg.CodeGen.WinRTTypeNameMarshaller] System_Type__Windows_UI_Xaml_Interop__TypeName, [rev] [out] [retval] [nativebyref] [Mcg.CodeGen.ComInterfaceMarshaller] Windows_UI_Xaml_Markup_IXamlType__Windows_UI_Xaml_Markup__IXamlType *,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int GetXamlType__STUB(
global::System.IntPtr pComThis,
global::System.Type__Impl.UnsafeType unsafe_type,
global::Windows.UI.Xaml.Markup.IXamlType__Impl.Vtbl*** unsafe_xamlType__retval)
{
// Setup
global::System.Type type;
if (unsafe_xamlType__retval != null)
(*(unsafe_xamlType__retval)) = null;
global::Windows.UI.Xaml.Markup.IXamlType xamlType__retval = default(global::Windows.UI.Xaml.Markup.IXamlType);
try
{
// Marshalling
type = global::System.Runtime.InteropServices.McgMarshal.TypeNameToType(
unsafe_type.Name,
((int)unsafe_type.Kind)
);
// Call to managed method
xamlType__retval = global::System.Runtime.InteropServices.McgMarshal.FastCast<global::Windows.UI.Xaml.Markup.IXamlMetadataProvider>(global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis)).GetXamlType(type);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
if (unsafe_xamlType__retval != null)
(*(unsafe_xamlType__retval)) = (global::Windows.UI.Xaml.Markup.IXamlType__Impl.Vtbl**)global::System.Runtime.InteropServices.McgModuleManager.ObjectToComInterface(
xamlType__retval,
typeof(global::Windows.UI.Xaml.Markup.IXamlType).TypeHandle
);
// Return
return global::McgInterop.Helpers.S_OK;
}
catch (global::System.Exception hrExcep)
{
// ExceptionCleanup
if (unsafe_xamlType__retval != null)
{
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)(*(unsafe_xamlType__retval)))));
(*(unsafe_xamlType__retval)) = null;
}
// ExceptionReturn
return global::System.Runtime.InteropServices.McgMarshal.GetHRForExceptionWinRT(hrExcep);
}
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int GetXamlTypeByFullName__STUB(
global::System.IntPtr pComThis,
global::System.Runtime.InteropServices.HSTRING unsafe_fullName,
global::Windows.UI.Xaml.Markup.IXamlType__Impl.Vtbl*** unsafe_xamlType__retval)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.UI.Xaml.Markup.IXamlMetadataProvider>(
__this,
1
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Func_string__TResult__<global::Windows.UI.Xaml.Markup.IXamlType>(
__this,
unsafe_fullName,
((void**)unsafe_xamlType__retval),
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
// Signature, Windows.UI.Xaml.Markup.IXamlMetadataProvider.GetXmlnsDefinitions, [rev] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [rev] [out] [retval] [nativebyref] [Mcg.CodeGen.ArrayMarshaller] [hal]rg_Windows_UI_Xaml_Markup_XmlnsDefinition__Windows_UI_Xaml_Markup__XmlnsDefinition *,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int GetXmlnsDefinitions__STUB(
global::System.IntPtr pComThis,
uint* unsafe_definitions__retval_mcgLength,
global::Windows.UI.Xaml.Markup.XmlnsDefinition__Impl.UnsafeType** unsafe_definitions__retval)
{
// Setup
if (unsafe_definitions__retval != null)
(*(unsafe_definitions__retval)) = null;
global::Windows.UI.Xaml.Markup.XmlnsDefinition[] definitions__retval = default(global::Windows.UI.Xaml.Markup.XmlnsDefinition[]);
try
{
// Marshalling
// Call to managed method
definitions__retval = global::System.Runtime.InteropServices.McgMarshal.FastCast<global::Windows.UI.Xaml.Markup.IXamlMetadataProvider>(global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis)).GetXmlnsDefinitions();
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
if (unsafe_definitions__retval != null)
if (definitions__retval == null)
(*(unsafe_definitions__retval)) = null;
else
{
if (definitions__retval != null)
(*(unsafe_definitions__retval_mcgLength)) = (uint)definitions__retval.Length;
if (definitions__retval != null)
(*(unsafe_definitions__retval)) = (global::Windows.UI.Xaml.Markup.XmlnsDefinition__Impl.UnsafeType*)global::McgInterop.McgHelpers.CoTaskMemAllocAndZeroMemory(((global::System.IntPtr)checked((*(unsafe_definitions__retval_mcgLength)) * sizeof(global::Windows.UI.Xaml.Markup.XmlnsDefinition__Impl.UnsafeType))));
if (definitions__retval != null)
for (uint mcgIdx = 0; (mcgIdx < (*(unsafe_definitions__retval_mcgLength))); mcgIdx++)
{
// [rev] [out] [retval] [nativebyref] [optional] [Mcg.CodeGen.StructMarshaller] Windows_UI_Xaml_Markup_XmlnsDefinition__Windows_UI_Xaml_Markup__XmlnsDefinition definitions__retval
global::Windows.UI.Xaml.Markup.XmlnsDefinition__Impl.Marshal__SafeToUnsafe(
ref definitions__retval[mcgIdx],
out (*(unsafe_definitions__retval))[mcgIdx]
);
}
}
// Return
return global::McgInterop.Helpers.S_OK;
}
catch (global::System.Exception hrExcep)
{
// ExceptionCleanup
if (unsafe_definitions__retval != null)
{
if ((*(unsafe_definitions__retval)) != null)
for (uint mcgIdx_1 = 0; (mcgIdx_1 < (*(unsafe_definitions__retval_mcgLength))); mcgIdx_1++)
{
// [fwd] [in] [out] [retval] [nativebyref] [optional] [Mcg.CodeGen.StructMarshaller] Windows_UI_Xaml_Markup_XmlnsDefinition__Windows_UI_Xaml_Markup__XmlnsDefinition definitions__retval
global::Windows.UI.Xaml.Markup.XmlnsDefinition__Impl.Cleanup__Unsafe(ref (*(unsafe_definitions__retval))[mcgIdx_1]);
}
global::System.Runtime.InteropServices.ExternalInterop.SafeCoTaskMemFree((*(unsafe_definitions__retval)));
(*(unsafe_definitions__retval)) = null;
}
// ExceptionReturn
return global::System.Runtime.InteropServices.McgMarshal.GetHRForExceptionWinRT(hrExcep);
}
}
private static class Windows_UI_Xaml_Markup_IXamlMetadataProvider__Impl_Vtbl_McgRvaContainer
{
[global::System.Runtime.CompilerServices.MethodAddrFixup(0, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "QueryInterface")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(4, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "AddRef")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(8, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "Release")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(12, typeof(global::System.Runtime.InteropServices.__vtable_IInspectable), "GetIIDs")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(16, typeof(global::System.Runtime.InteropServices.__vtable_IInspectable), "GetRuntimeClassName")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(20, typeof(global::System.Runtime.InteropServices.__vtable_IInspectable), "GetTrustLevel")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(24, typeof(global::Windows.UI.Xaml.Markup.IXamlMetadataProvider__Impl.Vtbl), "GetXamlType__STUB")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(28, typeof(global::Windows.UI.Xaml.Markup.IXamlMetadataProvider__Impl.Vtbl), "GetXamlTypeByFullName__STUB")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(32, typeof(global::Windows.UI.Xaml.Markup.IXamlMetadataProvider__Impl.Vtbl), "GetXmlnsDefinitions__STUB")]
[global::System.Runtime.CompilerServices.NonArray]
static readonly byte[] RVA_Windows_UI_Xaml_Markup_IXamlMetadataProvider__Impl_Vtbl_s_theCcwVtable = new byte[] {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
}
}
}
// Windows.UI.Xaml.Markup.IXamlType
public unsafe static class IXamlType__Impl
{
// StubClass for 'Windows.UI.Xaml.Markup.IXamlType'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.Markup.IXamlType get_BaseType(global::System.__ComObject __this)
{
global::Windows.UI.Xaml.Markup.IXamlType __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.UI.Xaml.Markup.IXamlType, global::Windows.UI.Xaml.Markup.IXamlType>(
__this,
global::Windows.UI.Xaml.Markup.IXamlType__Impl.Vtbl.idx_get_BaseType
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.Markup.IXamlMember get_ContentProperty(global::System.__ComObject __this)
{
global::Windows.UI.Xaml.Markup.IXamlMember __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.UI.Xaml.Markup.IXamlType, global::Windows.UI.Xaml.Markup.IXamlMember>(
__this,
global::Windows.UI.Xaml.Markup.IXamlType__Impl.Vtbl.idx_get_ContentProperty
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static string get_FullName(global::System.__ComObject __this)
{
string __ret = global::McgInterop.ForwardComSharedStubs.Func_string__<global::Windows.UI.Xaml.Markup.IXamlType>(
__this,
global::Windows.UI.Xaml.Markup.IXamlType__Impl.Vtbl.idx_get_FullName
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool get_IsArray(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.UI.Xaml.Markup.IXamlType>(
__this,
global::Windows.UI.Xaml.Markup.IXamlType__Impl.Vtbl.idx_get_IsArray
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool get_IsCollection(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.UI.Xaml.Markup.IXamlType>(
__this,
global::Windows.UI.Xaml.Markup.IXamlType__Impl.Vtbl.idx_get_IsCollection
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool get_IsConstructible(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.UI.Xaml.Markup.IXamlType>(
__this,
global::Windows.UI.Xaml.Markup.IXamlType__Impl.Vtbl.idx_get_IsConstructible
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool get_IsDictionary(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.UI.Xaml.Markup.IXamlType>(
__this,
global::Windows.UI.Xaml.Markup.IXamlType__Impl.Vtbl.idx_get_IsDictionary
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool get_IsMarkupExtension(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.UI.Xaml.Markup.IXamlType>(
__this,
global::Windows.UI.Xaml.Markup.IXamlType__Impl.Vtbl.idx_get_IsMarkupExtension
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool get_IsBindable(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.UI.Xaml.Markup.IXamlType>(
__this,
global::Windows.UI.Xaml.Markup.IXamlType__Impl.Vtbl.idx_get_IsBindable
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.Markup.IXamlType get_ItemType(global::System.__ComObject __this)
{
global::Windows.UI.Xaml.Markup.IXamlType __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.UI.Xaml.Markup.IXamlType, global::Windows.UI.Xaml.Markup.IXamlType>(
__this,
global::Windows.UI.Xaml.Markup.IXamlType__Impl.Vtbl.idx_get_ItemType
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.Markup.IXamlType get_KeyType(global::System.__ComObject __this)
{
global::Windows.UI.Xaml.Markup.IXamlType __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.UI.Xaml.Markup.IXamlType, global::Windows.UI.Xaml.Markup.IXamlType>(
__this,
global::Windows.UI.Xaml.Markup.IXamlType__Impl.Vtbl.idx_get_KeyType
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Type get_UnderlyingType(global::System.__ComObject __this)
{
global::System.Type __ret = global::McgInterop.ForwardComSharedStubs.Func_Type__<global::Windows.UI.Xaml.Markup.IXamlType>(
__this,
global::Windows.UI.Xaml.Markup.IXamlType__Impl.Vtbl.idx_get_UnderlyingType
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static object ActivateInstance(global::System.__ComObject __this)
{
object __ret = global::McgInterop.ForwardComSharedStubs.Func_object__<global::Windows.UI.Xaml.Markup.IXamlType>(
__this,
global::Windows.UI.Xaml.Markup.IXamlType__Impl.Vtbl.idx_ActivateInstance
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
// Signature, Windows.UI.Xaml.Markup.IXamlType.CreateFromString, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.HSTRINGMarshaller] string__System.Runtime.InteropServices.HSTRING, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.WinRTInspectableMarshaller] object____mcg_IInspectable,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static object CreateFromString(
global::System.__ComObject __this,
string value)
{
// Setup
global::System.Runtime.InteropServices.HSTRING unsafe_value = default(global::System.Runtime.InteropServices.HSTRING);
global::System.Runtime.InteropServices.__vtable_IInspectable* unsafe_instance__retval = default(global::System.Runtime.InteropServices.__vtable_IInspectable*);
object instance__retval = default(object);
int unsafe___return__;
try
{
// Marshalling
fixed (char* pBuffer_value = value)
{
global::System.Runtime.InteropServices.HSTRING_HEADER hstring_header_value;
global::System.Runtime.InteropServices.McgMarshal.StringToHStringReference(pBuffer_value, value, &(hstring_header_value), &(unsafe_value));
unsafe_instance__retval = null;
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.UI.Xaml.Markup.IXamlType).TypeHandle,
global::Windows.UI.Xaml.Markup.IXamlType__Impl.Vtbl.idx_CreateFromString,
unsafe_value,
&(unsafe_instance__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
instance__retval = global::System.Runtime.InteropServices.McgMarshal.IInspectableToObject(((global::System.IntPtr)unsafe_instance__retval));
}
// Return
return instance__retval;
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_instance__retval)));
}
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.Markup.IXamlMember GetMember(
global::System.__ComObject __this,
string name)
{
global::Windows.UI.Xaml.Markup.IXamlMember __ret = global::McgInterop.ForwardComSharedStubs.Func_string__TResult__<global::Windows.UI.Xaml.Markup.IXamlType, global::Windows.UI.Xaml.Markup.IXamlMember>(
__this,
name,
global::Windows.UI.Xaml.Markup.IXamlType__Impl.Vtbl.idx_GetMember
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void AddToVector(
global::System.__ComObject __this,
object instance,
object value)
{
global::McgInterop.ForwardComSharedStubs.Proc_object__object__<global::Windows.UI.Xaml.Markup.IXamlType>(
__this,
instance,
value,
global::Windows.UI.Xaml.Markup.IXamlType__Impl.Vtbl.idx_AddToVector
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// Signature, Windows.UI.Xaml.Markup.IXamlType.AddToMap, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.WinRTInspectableMarshaller] object____mcg_IInspectable, [fwd] [in] [Mcg.CodeGen.WinRTInspectableMarshaller] object____mcg_IInspectable, [fwd] [in] [Mcg.CodeGen.WinRTInspectableMarshaller] object____mcg_IInspectable,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void AddToMap(
global::System.__ComObject __this,
object instance,
object key,
object value)
{
// Setup
global::System.Runtime.InteropServices.__vtable_IInspectable* unsafe_instance = default(global::System.Runtime.InteropServices.__vtable_IInspectable*);
global::System.Runtime.InteropServices.__vtable_IInspectable* unsafe_key = default(global::System.Runtime.InteropServices.__vtable_IInspectable*);
global::System.Runtime.InteropServices.__vtable_IInspectable* unsafe_value = default(global::System.Runtime.InteropServices.__vtable_IInspectable*);
int unsafe___return__;
try
{
// Marshalling
unsafe_instance = (global::System.Runtime.InteropServices.__vtable_IInspectable*)global::System.Runtime.InteropServices.McgMarshal.ObjectToIInspectable(instance);
unsafe_key = (global::System.Runtime.InteropServices.__vtable_IInspectable*)global::System.Runtime.InteropServices.McgMarshal.ObjectToIInspectable(key);
unsafe_value = (global::System.Runtime.InteropServices.__vtable_IInspectable*)global::System.Runtime.InteropServices.McgMarshal.ObjectToIInspectable(value);
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.UI.Xaml.Markup.IXamlType).TypeHandle,
global::Windows.UI.Xaml.Markup.IXamlType__Impl.Vtbl.idx_AddToMap,
unsafe_instance,
unsafe_key,
unsafe_value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
// Return
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_instance)));
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_key)));
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_value)));
}
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void RunInitializer(global::System.__ComObject __this)
{
global::McgInterop.ForwardComSharedStubs.Proc_<global::Windows.UI.Xaml.Markup.IXamlType>(
__this,
global::Windows.UI.Xaml.Markup.IXamlType__Impl.Vtbl.idx_RunInitializer
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// DispatchClass for 'Windows.UI.Xaml.Markup.IXamlType'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Markup.IXamlType))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.UI.Xaml.Markup.IXamlType
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.UI.Xaml.Markup.IXamlType.BaseType")]
global::Windows.UI.Xaml.Markup.IXamlType global::Windows.UI.Xaml.Markup.IXamlType.get_BaseType()
{
global::Windows.UI.Xaml.Markup.IXamlType __retVal = global::Windows.UI.Xaml.Markup.IXamlType__Impl.StubClass.get_BaseType(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.UI.Xaml.Markup.IXamlType.ContentProperty")]
global::Windows.UI.Xaml.Markup.IXamlMember global::Windows.UI.Xaml.Markup.IXamlType.get_ContentProperty()
{
global::Windows.UI.Xaml.Markup.IXamlMember __retVal = global::Windows.UI.Xaml.Markup.IXamlType__Impl.StubClass.get_ContentProperty(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.UI.Xaml.Markup.IXamlType.FullName")]
string global::Windows.UI.Xaml.Markup.IXamlType.get_FullName()
{
string __retVal = global::Windows.UI.Xaml.Markup.IXamlType__Impl.StubClass.get_FullName(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.UI.Xaml.Markup.IXamlType.IsArray")]
bool global::Windows.UI.Xaml.Markup.IXamlType.get_IsArray()
{
bool __retVal = global::Windows.UI.Xaml.Markup.IXamlType__Impl.StubClass.get_IsArray(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.UI.Xaml.Markup.IXamlType.IsCollection")]
bool global::Windows.UI.Xaml.Markup.IXamlType.get_IsCollection()
{
bool __retVal = global::Windows.UI.Xaml.Markup.IXamlType__Impl.StubClass.get_IsCollection(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.UI.Xaml.Markup.IXamlType.IsConstructible")]
bool global::Windows.UI.Xaml.Markup.IXamlType.get_IsConstructible()
{
bool __retVal = global::Windows.UI.Xaml.Markup.IXamlType__Impl.StubClass.get_IsConstructible(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.UI.Xaml.Markup.IXamlType.IsDictionary")]
bool global::Windows.UI.Xaml.Markup.IXamlType.get_IsDictionary()
{
bool __retVal = global::Windows.UI.Xaml.Markup.IXamlType__Impl.StubClass.get_IsDictionary(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.UI.Xaml.Markup.IXamlType.IsMarkupExtension")]
bool global::Windows.UI.Xaml.Markup.IXamlType.get_IsMarkupExtension()
{
bool __retVal = global::Windows.UI.Xaml.Markup.IXamlType__Impl.StubClass.get_IsMarkupExtension(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.UI.Xaml.Markup.IXamlType.IsBindable")]
bool global::Windows.UI.Xaml.Markup.IXamlType.get_IsBindable()
{
bool __retVal = global::Windows.UI.Xaml.Markup.IXamlType__Impl.StubClass.get_IsBindable(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.UI.Xaml.Markup.IXamlType.ItemType")]
global::Windows.UI.Xaml.Markup.IXamlType global::Windows.UI.Xaml.Markup.IXamlType.get_ItemType()
{
global::Windows.UI.Xaml.Markup.IXamlType __retVal = global::Windows.UI.Xaml.Markup.IXamlType__Impl.StubClass.get_ItemType(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.UI.Xaml.Markup.IXamlType.KeyType")]
global::Windows.UI.Xaml.Markup.IXamlType global::Windows.UI.Xaml.Markup.IXamlType.get_KeyType()
{
global::Windows.UI.Xaml.Markup.IXamlType __retVal = global::Windows.UI.Xaml.Markup.IXamlType__Impl.StubClass.get_KeyType(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.UI.Xaml.Markup.IXamlType.UnderlyingType")]
global::System.Type global::Windows.UI.Xaml.Markup.IXamlType.get_UnderlyingType()
{
global::System.Type __retVal = global::Windows.UI.Xaml.Markup.IXamlType__Impl.StubClass.get_UnderlyingType(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
object global::Windows.UI.Xaml.Markup.IXamlType.ActivateInstance()
{
object __retVal = global::Windows.UI.Xaml.Markup.IXamlType__Impl.StubClass.ActivateInstance(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
object global::Windows.UI.Xaml.Markup.IXamlType.CreateFromString(string value)
{
object __retVal = global::Windows.UI.Xaml.Markup.IXamlType__Impl.StubClass.CreateFromString(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
global::Windows.UI.Xaml.Markup.IXamlMember global::Windows.UI.Xaml.Markup.IXamlType.GetMember(string name)
{
global::Windows.UI.Xaml.Markup.IXamlMember __retVal = global::Windows.UI.Xaml.Markup.IXamlType__Impl.StubClass.GetMember(
this,
name
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.UI.Xaml.Markup.IXamlType.AddToVector(
object instance,
object value)
{
global::Windows.UI.Xaml.Markup.IXamlType__Impl.StubClass.AddToVector(
this,
instance,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.UI.Xaml.Markup.IXamlType.AddToMap(
object instance,
object key,
object value)
{
global::Windows.UI.Xaml.Markup.IXamlType__Impl.StubClass.AddToMap(
this,
instance,
key,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.UI.Xaml.Markup.IXamlType.RunInitializer()
{
global::Windows.UI.Xaml.Markup.IXamlType__Impl.StubClass.RunInitializer(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// v-table for 'Windows.UI.Xaml.Markup.IXamlType'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Markup.IXamlType))]
[global::System.Runtime.InteropServices.McgRootsType(typeof(global::Windows.UI.Xaml.Markup.IXamlType))]
public unsafe partial struct Vtbl
{
global::System.IntPtr pfnQueryInterface;
global::System.IntPtr pfnAddRef;
global::System.IntPtr pfnRelease;
global::System.IntPtr pfnGetIids;
global::System.IntPtr pfnGetRuntimeClassName;
global::System.IntPtr pfnGetTrustLevel;
// Windows_UI_Xaml_Markup__IXamlType
global::System.IntPtr pfnget_BaseType_Windows_UI_Xaml_Markup__IXamlType;
global::System.IntPtr pfnget_ContentProperty_Windows_UI_Xaml_Markup__IXamlType;
global::System.IntPtr pfnget_FullName_Windows_UI_Xaml_Markup__IXamlType;
global::System.IntPtr pfnget_IsArray_Windows_UI_Xaml_Markup__IXamlType;
global::System.IntPtr pfnget_IsCollection_Windows_UI_Xaml_Markup__IXamlType;
global::System.IntPtr pfnget_IsConstructible_Windows_UI_Xaml_Markup__IXamlType;
global::System.IntPtr pfnget_IsDictionary_Windows_UI_Xaml_Markup__IXamlType;
global::System.IntPtr pfnget_IsMarkupExtension_Windows_UI_Xaml_Markup__IXamlType;
global::System.IntPtr pfnget_IsBindable_Windows_UI_Xaml_Markup__IXamlType;
global::System.IntPtr pfnget_ItemType_Windows_UI_Xaml_Markup__IXamlType;
global::System.IntPtr pfnget_KeyType_Windows_UI_Xaml_Markup__IXamlType;
global::System.IntPtr pfnget_UnderlyingType_Windows_UI_Xaml_Markup__IXamlType;
global::System.IntPtr pfnActivateInstance_Windows_UI_Xaml_Markup__IXamlType;
global::System.IntPtr pfnCreateFromString_Windows_UI_Xaml_Markup__IXamlType;
global::System.IntPtr pfnGetMember_Windows_UI_Xaml_Markup__IXamlType;
global::System.IntPtr pfnAddToVector_Windows_UI_Xaml_Markup__IXamlType;
global::System.IntPtr pfnAddToMap_Windows_UI_Xaml_Markup__IXamlType;
global::System.IntPtr pfnRunInitializer_Windows_UI_Xaml_Markup__IXamlType;
internal const int idx_get_BaseType = 6;
internal const int idx_get_ContentProperty = 7;
internal const int idx_get_FullName = 8;
internal const int idx_get_IsArray = 9;
internal const int idx_get_IsCollection = 10;
internal const int idx_get_IsConstructible = 11;
internal const int idx_get_IsDictionary = 12;
internal const int idx_get_IsMarkupExtension = 13;
internal const int idx_get_IsBindable = 14;
internal const int idx_get_ItemType = 15;
internal const int idx_get_KeyType = 16;
internal const int idx_get_UnderlyingType = 17;
internal const int idx_ActivateInstance = 18;
internal const int idx_CreateFromString = 19;
internal const int idx_GetMember = 20;
internal const int idx_AddToVector = 21;
internal const int idx_AddToMap = 22;
internal const int idx_RunInitializer = 23;
[global::System.Runtime.CompilerServices.InitDataBlob(typeof(global::Windows.UI.Xaml.Markup.IXamlType__Impl.Vtbl.Windows_UI_Xaml_Markup_IXamlType__Impl_Vtbl_McgRvaContainer), "RVA_Windows_UI_Xaml_Markup_IXamlType__Impl_Vtbl_s_theCcwVtable")]
public static global::Windows.UI.Xaml.Markup.IXamlType__Impl.Vtbl s_theCcwVtable
#if false
= new global::Windows.UI.Xaml.Markup.IXamlType__Impl.Vtbl() {
pfnQueryInterface = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfQueryInterface>(System.Runtime.InteropServices.__vtable_IUnknown.QueryInterface),
pfnAddRef = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfAddRef>(System.Runtime.InteropServices.__vtable_IUnknown.AddRef),
pfnRelease = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfRelease>(System.Runtime.InteropServices.__vtable_IUnknown.Release),
pfnGetIids = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget0>(System.Runtime.InteropServices.__vtable_IInspectable.GetIIDs),
pfnGetRuntimeClassName = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget1>(System.Runtime.InteropServices.__vtable_IInspectable.GetRuntimeClassName),
pfnGetTrustLevel = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget1>(System.Runtime.InteropServices.__vtable_IInspectable.GetTrustLevel),
pfnget_BaseType_Windows_UI_Xaml_Markup__IXamlType = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget105>(global::Windows.UI.Xaml.Markup.IXamlType__Impl.Vtbl.get_BaseType__STUB),
pfnget_ContentProperty_Windows_UI_Xaml_Markup__IXamlType = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget106>(global::Windows.UI.Xaml.Markup.IXamlType__Impl.Vtbl.get_ContentProperty__STUB),
pfnget_FullName_Windows_UI_Xaml_Markup__IXamlType = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget2>(global::Windows.UI.Xaml.Markup.IXamlType__Impl.Vtbl.get_FullName__STUB),
pfnget_IsArray_Windows_UI_Xaml_Markup__IXamlType = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget107>(global::Windows.UI.Xaml.Markup.IXamlType__Impl.Vtbl.get_IsArray__STUB),
pfnget_IsCollection_Windows_UI_Xaml_Markup__IXamlType = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget107>(global::Windows.UI.Xaml.Markup.IXamlType__Impl.Vtbl.get_IsCollection__STUB),
pfnget_IsConstructible_Windows_UI_Xaml_Markup__IXamlType = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget107>(global::Windows.UI.Xaml.Markup.IXamlType__Impl.Vtbl.get_IsConstructible__STUB),
pfnget_IsDictionary_Windows_UI_Xaml_Markup__IXamlType = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget107>(global::Windows.UI.Xaml.Markup.IXamlType__Impl.Vtbl.get_IsDictionary__STUB),
pfnget_IsMarkupExtension_Windows_UI_Xaml_Markup__IXamlType = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget107>(global::Windows.UI.Xaml.Markup.IXamlType__Impl.Vtbl.get_IsMarkupExtension__STUB),
pfnget_IsBindable_Windows_UI_Xaml_Markup__IXamlType = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget107>(global::Windows.UI.Xaml.Markup.IXamlType__Impl.Vtbl.get_IsBindable__STUB),
pfnget_ItemType_Windows_UI_Xaml_Markup__IXamlType = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget105>(global::Windows.UI.Xaml.Markup.IXamlType__Impl.Vtbl.get_ItemType__STUB),
pfnget_KeyType_Windows_UI_Xaml_Markup__IXamlType = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget105>(global::Windows.UI.Xaml.Markup.IXamlType__Impl.Vtbl.get_KeyType__STUB),
pfnget_UnderlyingType_Windows_UI_Xaml_Markup__IXamlType = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget108>(global::Windows.UI.Xaml.Markup.IXamlType__Impl.Vtbl.get_UnderlyingType__STUB),
pfnActivateInstance_Windows_UI_Xaml_Markup__IXamlType = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget109>(global::Windows.UI.Xaml.Markup.IXamlType__Impl.Vtbl.ActivateInstance__STUB),
pfnCreateFromString_Windows_UI_Xaml_Markup__IXamlType = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget110>(global::Windows.UI.Xaml.Markup.IXamlType__Impl.Vtbl.CreateFromString__STUB),
pfnGetMember_Windows_UI_Xaml_Markup__IXamlType = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget111>(global::Windows.UI.Xaml.Markup.IXamlType__Impl.Vtbl.GetMember__STUB),
pfnAddToVector_Windows_UI_Xaml_Markup__IXamlType = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget112>(global::Windows.UI.Xaml.Markup.IXamlType__Impl.Vtbl.AddToVector__STUB),
pfnAddToMap_Windows_UI_Xaml_Markup__IXamlType = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget113>(global::Windows.UI.Xaml.Markup.IXamlType__Impl.Vtbl.AddToMap__STUB),
pfnRunInitializer_Windows_UI_Xaml_Markup__IXamlType = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget114>(global::Windows.UI.Xaml.Markup.IXamlType__Impl.Vtbl.RunInitializer__STUB),
}
#endif
;
public static global::System.IntPtr pNativeVtable;
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int get_BaseType__STUB(
global::System.IntPtr pComThis,
global::Windows.UI.Xaml.Markup.IXamlType__Impl.Vtbl*** unsafe_value__retval)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.UI.Xaml.Markup.IXamlType>(
__this,
0
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Func_TResult__<global::Windows.UI.Xaml.Markup.IXamlType>(
__this,
((void**)unsafe_value__retval),
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int get_ContentProperty__STUB(
global::System.IntPtr pComThis,
global::Windows.UI.Xaml.Markup.IXamlMember__Impl.Vtbl*** unsafe_value__retval)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.UI.Xaml.Markup.IXamlType>(
__this,
1
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Func_TResult__<global::Windows.UI.Xaml.Markup.IXamlMember>(
__this,
((void**)unsafe_value__retval),
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int get_FullName__STUB(
global::System.IntPtr pComThis,
global::System.Runtime.InteropServices.HSTRING* unsafe_value__retval)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.UI.Xaml.Markup.IXamlType>(
__this,
2
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Func_string__(
__this,
unsafe_value__retval,
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int get_IsArray__STUB(
global::System.IntPtr pComThis,
sbyte* unsafe_value__retval)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.UI.Xaml.Markup.IXamlType>(
__this,
3
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Func_bool__(
__this,
unsafe_value__retval,
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int get_IsCollection__STUB(
global::System.IntPtr pComThis,
sbyte* unsafe_value__retval)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.UI.Xaml.Markup.IXamlType>(
__this,
4
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Func_bool__(
__this,
unsafe_value__retval,
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int get_IsConstructible__STUB(
global::System.IntPtr pComThis,
sbyte* unsafe_value__retval)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.UI.Xaml.Markup.IXamlType>(
__this,
5
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Func_bool__(
__this,
unsafe_value__retval,
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int get_IsDictionary__STUB(
global::System.IntPtr pComThis,
sbyte* unsafe_value__retval)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.UI.Xaml.Markup.IXamlType>(
__this,
6
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Func_bool__(
__this,
unsafe_value__retval,
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int get_IsMarkupExtension__STUB(
global::System.IntPtr pComThis,
sbyte* unsafe_value__retval)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.UI.Xaml.Markup.IXamlType>(
__this,
7
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Func_bool__(
__this,
unsafe_value__retval,
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int get_IsBindable__STUB(
global::System.IntPtr pComThis,
sbyte* unsafe_value__retval)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.UI.Xaml.Markup.IXamlType>(
__this,
8
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Func_bool__(
__this,
unsafe_value__retval,
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int get_ItemType__STUB(
global::System.IntPtr pComThis,
global::Windows.UI.Xaml.Markup.IXamlType__Impl.Vtbl*** unsafe_value__retval)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.UI.Xaml.Markup.IXamlType>(
__this,
9
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Func_TResult__<global::Windows.UI.Xaml.Markup.IXamlType>(
__this,
((void**)unsafe_value__retval),
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int get_KeyType__STUB(
global::System.IntPtr pComThis,
global::Windows.UI.Xaml.Markup.IXamlType__Impl.Vtbl*** unsafe_value__retval)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.UI.Xaml.Markup.IXamlType>(
__this,
10
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Func_TResult__<global::Windows.UI.Xaml.Markup.IXamlType>(
__this,
((void**)unsafe_value__retval),
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
// Signature, Windows.UI.Xaml.Markup.IXamlType.get_UnderlyingType, [rev] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [rev] [out] [retval] [nativebyref] [Mcg.CodeGen.WinRTTypeNameMarshaller] System_Type__Windows_UI_Xaml_Interop__TypeName,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int get_UnderlyingType__STUB(
global::System.IntPtr pComThis,
global::System.Type__Impl.UnsafeType* unsafe_value__retval)
{
// Setup
global::System.Type value__retval;
try
{
// Marshalling
// Call to managed method
value__retval = global::System.Runtime.InteropServices.McgMarshal.FastCast<global::Windows.UI.Xaml.Markup.IXamlType>(global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis)).get_UnderlyingType();
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
if (unsafe_value__retval != null)
{
global::System.Runtime.InteropServices.HSTRING unsafe_value__retval__HSTRING__Name;
int unsafe_value__retval__int__Kind;
global::System.Runtime.InteropServices.McgMarshal.TypeToTypeName(
value__retval,
out unsafe_value__retval__HSTRING__Name,
out unsafe_value__retval__int__Kind
);
(*(unsafe_value__retval)).Name = unsafe_value__retval__HSTRING__Name;
(*(unsafe_value__retval)).Kind = (global::Windows.UI.Xaml.Interop.TypeKind)unsafe_value__retval__int__Kind;
}
// Return
return global::McgInterop.Helpers.S_OK;
}
catch (global::System.Exception hrExcep)
{
// ExceptionCleanup
if (unsafe_value__retval != null)
(*(unsafe_value__retval)) = default(global::System.Type__Impl.UnsafeType);
// ExceptionReturn
return global::System.Runtime.InteropServices.McgMarshal.GetHRForExceptionWinRT(hrExcep);
}
}
// Signature, Windows.UI.Xaml.Markup.IXamlType.ActivateInstance, [rev] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [rev] [out] [retval] [nativebyref] [Mcg.CodeGen.WinRTInspectableMarshaller] object____mcg_IInspectable,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int ActivateInstance__STUB(
global::System.IntPtr pComThis,
global::System.Runtime.InteropServices.__vtable_IInspectable** unsafe_instance__retval)
{
// Setup
if (unsafe_instance__retval != null)
(*(unsafe_instance__retval)) = null;
object instance__retval = default(object);
try
{
// Marshalling
// Call to managed method
instance__retval = global::System.Runtime.InteropServices.McgMarshal.FastCast<global::Windows.UI.Xaml.Markup.IXamlType>(global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis)).ActivateInstance();
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
if (unsafe_instance__retval != null)
(*(unsafe_instance__retval)) = (global::System.Runtime.InteropServices.__vtable_IInspectable*)global::System.Runtime.InteropServices.McgMarshal.ObjectToIInspectable(instance__retval);
// Return
return global::McgInterop.Helpers.S_OK;
}
catch (global::System.Exception hrExcep)
{
// ExceptionCleanup
if (unsafe_instance__retval != null)
{
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)(*(unsafe_instance__retval)))));
(*(unsafe_instance__retval)) = null;
}
// ExceptionReturn
return global::System.Runtime.InteropServices.McgMarshal.GetHRForExceptionWinRT(hrExcep);
}
}
// Signature, Windows.UI.Xaml.Markup.IXamlType.CreateFromString, [rev] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [rev] [in] [Mcg.CodeGen.HSTRINGMarshaller] string__System.Runtime.InteropServices.HSTRING, [rev] [out] [retval] [nativebyref] [Mcg.CodeGen.WinRTInspectableMarshaller] object____mcg_IInspectable,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int CreateFromString__STUB(
global::System.IntPtr pComThis,
global::System.Runtime.InteropServices.HSTRING unsafe_value,
global::System.Runtime.InteropServices.__vtable_IInspectable** unsafe_instance__retval)
{
// Setup
string value = default(string);
if (unsafe_instance__retval != null)
(*(unsafe_instance__retval)) = null;
object instance__retval = default(object);
try
{
// Marshalling
value = global::System.Runtime.InteropServices.McgMarshal.HStringToString(unsafe_value);
// Call to managed method
instance__retval = global::System.Runtime.InteropServices.McgMarshal.FastCast<global::Windows.UI.Xaml.Markup.IXamlType>(global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis)).CreateFromString(value);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
if (unsafe_instance__retval != null)
(*(unsafe_instance__retval)) = (global::System.Runtime.InteropServices.__vtable_IInspectable*)global::System.Runtime.InteropServices.McgMarshal.ObjectToIInspectable(instance__retval);
// Return
return global::McgInterop.Helpers.S_OK;
}
catch (global::System.Exception hrExcep)
{
// ExceptionCleanup
if (unsafe_instance__retval != null)
{
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)(*(unsafe_instance__retval)))));
(*(unsafe_instance__retval)) = null;
}
// ExceptionReturn
return global::System.Runtime.InteropServices.McgMarshal.GetHRForExceptionWinRT(hrExcep);
}
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int GetMember__STUB(
global::System.IntPtr pComThis,
global::System.Runtime.InteropServices.HSTRING unsafe_name,
global::Windows.UI.Xaml.Markup.IXamlMember__Impl.Vtbl*** unsafe_xamlMember__retval)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.UI.Xaml.Markup.IXamlType>(
__this,
14
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Func_string__TResult__<global::Windows.UI.Xaml.Markup.IXamlMember>(
__this,
unsafe_name,
((void**)unsafe_xamlMember__retval),
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int AddToVector__STUB(
global::System.IntPtr pComThis,
global::System.Runtime.InteropServices.__vtable_IInspectable* unsafe_instance,
global::System.Runtime.InteropServices.__vtable_IInspectable* unsafe_value)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.UI.Xaml.Markup.IXamlType>(
__this,
15
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Proc_object__object__(
__this,
unsafe_instance,
unsafe_value,
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
// Signature, Windows.UI.Xaml.Markup.IXamlType.AddToMap, [rev] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [rev] [in] [Mcg.CodeGen.WinRTInspectableMarshaller] object____mcg_IInspectable, [rev] [in] [Mcg.CodeGen.WinRTInspectableMarshaller] object____mcg_IInspectable, [rev] [in] [Mcg.CodeGen.WinRTInspectableMarshaller] object____mcg_IInspectable,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int AddToMap__STUB(
global::System.IntPtr pComThis,
global::System.Runtime.InteropServices.__vtable_IInspectable* unsafe_instance,
global::System.Runtime.InteropServices.__vtable_IInspectable* unsafe_key,
global::System.Runtime.InteropServices.__vtable_IInspectable* unsafe_value)
{
// Setup
object instance = default(object);
object key = default(object);
object value = default(object);
try
{
// Marshalling
instance = global::System.Runtime.InteropServices.McgMarshal.IInspectableToObject(((global::System.IntPtr)unsafe_instance));
key = global::System.Runtime.InteropServices.McgMarshal.IInspectableToObject(((global::System.IntPtr)unsafe_key));
value = global::System.Runtime.InteropServices.McgMarshal.IInspectableToObject(((global::System.IntPtr)unsafe_value));
// Call to managed method
global::System.Runtime.InteropServices.McgMarshal.FastCast<global::Windows.UI.Xaml.Markup.IXamlType>(global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis)).AddToMap(
instance,
key,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
// Return
return global::McgInterop.Helpers.S_OK;
}
catch (global::System.Exception hrExcep)
{
// ExceptionReturn
return global::System.Runtime.InteropServices.McgMarshal.GetHRForExceptionWinRT(hrExcep);
}
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int RunInitializer__STUB(global::System.IntPtr pComThis)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.UI.Xaml.Markup.IXamlType>(
__this,
17
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Proc_(
__this,
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
private static class Windows_UI_Xaml_Markup_IXamlType__Impl_Vtbl_McgRvaContainer
{
[global::System.Runtime.CompilerServices.MethodAddrFixup(0, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "QueryInterface")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(4, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "AddRef")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(8, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "Release")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(12, typeof(global::System.Runtime.InteropServices.__vtable_IInspectable), "GetIIDs")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(16, typeof(global::System.Runtime.InteropServices.__vtable_IInspectable), "GetRuntimeClassName")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(20, typeof(global::System.Runtime.InteropServices.__vtable_IInspectable), "GetTrustLevel")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(24, typeof(global::Windows.UI.Xaml.Markup.IXamlType__Impl.Vtbl), "get_BaseType__STUB")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(28, typeof(global::Windows.UI.Xaml.Markup.IXamlType__Impl.Vtbl), "get_ContentProperty__STUB")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(32, typeof(global::Windows.UI.Xaml.Markup.IXamlType__Impl.Vtbl), "get_FullName__STUB")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(36, typeof(global::Windows.UI.Xaml.Markup.IXamlType__Impl.Vtbl), "get_IsArray__STUB")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(40, typeof(global::Windows.UI.Xaml.Markup.IXamlType__Impl.Vtbl), "get_IsCollection__STUB")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(44, typeof(global::Windows.UI.Xaml.Markup.IXamlType__Impl.Vtbl), "get_IsConstructible__STUB")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(48, typeof(global::Windows.UI.Xaml.Markup.IXamlType__Impl.Vtbl), "get_IsDictionary__STUB")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(52, typeof(global::Windows.UI.Xaml.Markup.IXamlType__Impl.Vtbl), "get_IsMarkupExtension__STUB")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(56, typeof(global::Windows.UI.Xaml.Markup.IXamlType__Impl.Vtbl), "get_IsBindable__STUB")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(60, typeof(global::Windows.UI.Xaml.Markup.IXamlType__Impl.Vtbl), "get_ItemType__STUB")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(64, typeof(global::Windows.UI.Xaml.Markup.IXamlType__Impl.Vtbl), "get_KeyType__STUB")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(68, typeof(global::Windows.UI.Xaml.Markup.IXamlType__Impl.Vtbl), "get_UnderlyingType__STUB")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(72, typeof(global::Windows.UI.Xaml.Markup.IXamlType__Impl.Vtbl), "ActivateInstance__STUB")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(76, typeof(global::Windows.UI.Xaml.Markup.IXamlType__Impl.Vtbl), "CreateFromString__STUB")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(80, typeof(global::Windows.UI.Xaml.Markup.IXamlType__Impl.Vtbl), "GetMember__STUB")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(84, typeof(global::Windows.UI.Xaml.Markup.IXamlType__Impl.Vtbl), "AddToVector__STUB")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(88, typeof(global::Windows.UI.Xaml.Markup.IXamlType__Impl.Vtbl), "AddToMap__STUB")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(92, typeof(global::Windows.UI.Xaml.Markup.IXamlType__Impl.Vtbl), "RunInitializer__STUB")]
[global::System.Runtime.CompilerServices.NonArray]
static readonly byte[] RVA_Windows_UI_Xaml_Markup_IXamlType__Impl_Vtbl_s_theCcwVtable = new byte[] {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
}
}
}
// Windows.UI.Xaml.Markup.IXamlMember
public unsafe static class IXamlMember__Impl
{
// StubClass for 'Windows.UI.Xaml.Markup.IXamlMember'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool get_IsAttachable(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.UI.Xaml.Markup.IXamlMember>(
__this,
global::Windows.UI.Xaml.Markup.IXamlMember__Impl.Vtbl.idx_get_IsAttachable
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool get_IsDependencyProperty(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.UI.Xaml.Markup.IXamlMember>(
__this,
global::Windows.UI.Xaml.Markup.IXamlMember__Impl.Vtbl.idx_get_IsDependencyProperty
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool get_IsReadOnly(global::System.__ComObject __this)
{
bool __ret = global::McgInterop.ForwardComSharedStubs.Func_bool__<global::Windows.UI.Xaml.Markup.IXamlMember>(
__this,
global::Windows.UI.Xaml.Markup.IXamlMember__Impl.Vtbl.idx_get_IsReadOnly
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static string get_Name(global::System.__ComObject __this)
{
string __ret = global::McgInterop.ForwardComSharedStubs.Func_string__<global::Windows.UI.Xaml.Markup.IXamlMember>(
__this,
global::Windows.UI.Xaml.Markup.IXamlMember__Impl.Vtbl.idx_get_Name
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.Markup.IXamlType get_TargetType(global::System.__ComObject __this)
{
global::Windows.UI.Xaml.Markup.IXamlType __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.UI.Xaml.Markup.IXamlMember, global::Windows.UI.Xaml.Markup.IXamlType>(
__this,
global::Windows.UI.Xaml.Markup.IXamlMember__Impl.Vtbl.idx_get_TargetType
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.Markup.IXamlType get_Type(global::System.__ComObject __this)
{
global::Windows.UI.Xaml.Markup.IXamlType __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.UI.Xaml.Markup.IXamlMember, global::Windows.UI.Xaml.Markup.IXamlType>(
__this,
global::Windows.UI.Xaml.Markup.IXamlMember__Impl.Vtbl.idx_get_Type
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
// Signature, Windows.UI.Xaml.Markup.IXamlMember.GetValue, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.WinRTInspectableMarshaller] object____mcg_IInspectable, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.WinRTInspectableMarshaller] object____mcg_IInspectable,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static object GetValue(
global::System.__ComObject __this,
object instance)
{
// Setup
global::System.Runtime.InteropServices.__vtable_IInspectable* unsafe_instance = default(global::System.Runtime.InteropServices.__vtable_IInspectable*);
global::System.Runtime.InteropServices.__vtable_IInspectable* unsafe_value__retval = default(global::System.Runtime.InteropServices.__vtable_IInspectable*);
object value__retval = default(object);
int unsafe___return__;
try
{
// Marshalling
unsafe_instance = (global::System.Runtime.InteropServices.__vtable_IInspectable*)global::System.Runtime.InteropServices.McgMarshal.ObjectToIInspectable(instance);
unsafe_value__retval = null;
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.UI.Xaml.Markup.IXamlMember).TypeHandle,
global::Windows.UI.Xaml.Markup.IXamlMember__Impl.Vtbl.idx_GetValue,
unsafe_instance,
&(unsafe_value__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
value__retval = global::System.Runtime.InteropServices.McgMarshal.IInspectableToObject(((global::System.IntPtr)unsafe_value__retval));
// Return
return value__retval;
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_instance)));
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_value__retval)));
}
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void SetValue(
global::System.__ComObject __this,
object instance,
object value)
{
global::McgInterop.ForwardComSharedStubs.Proc_object__object__<global::Windows.UI.Xaml.Markup.IXamlMember>(
__this,
instance,
value,
global::Windows.UI.Xaml.Markup.IXamlMember__Impl.Vtbl.idx_SetValue
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// DispatchClass for 'Windows.UI.Xaml.Markup.IXamlMember'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Markup.IXamlMember))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.UI.Xaml.Markup.IXamlMember
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.UI.Xaml.Markup.IXamlMember.IsAttachable")]
bool global::Windows.UI.Xaml.Markup.IXamlMember.get_IsAttachable()
{
bool __retVal = global::Windows.UI.Xaml.Markup.IXamlMember__Impl.StubClass.get_IsAttachable(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.UI.Xaml.Markup.IXamlMember.IsDependencyProperty")]
bool global::Windows.UI.Xaml.Markup.IXamlMember.get_IsDependencyProperty()
{
bool __retVal = global::Windows.UI.Xaml.Markup.IXamlMember__Impl.StubClass.get_IsDependencyProperty(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.UI.Xaml.Markup.IXamlMember.IsReadOnly")]
bool global::Windows.UI.Xaml.Markup.IXamlMember.get_IsReadOnly()
{
bool __retVal = global::Windows.UI.Xaml.Markup.IXamlMember__Impl.StubClass.get_IsReadOnly(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.UI.Xaml.Markup.IXamlMember.Name")]
string global::Windows.UI.Xaml.Markup.IXamlMember.get_Name()
{
string __retVal = global::Windows.UI.Xaml.Markup.IXamlMember__Impl.StubClass.get_Name(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.UI.Xaml.Markup.IXamlMember.TargetType")]
global::Windows.UI.Xaml.Markup.IXamlType global::Windows.UI.Xaml.Markup.IXamlMember.get_TargetType()
{
global::Windows.UI.Xaml.Markup.IXamlType __retVal = global::Windows.UI.Xaml.Markup.IXamlMember__Impl.StubClass.get_TargetType(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.UI.Xaml.Markup.IXamlMember.Type")]
global::Windows.UI.Xaml.Markup.IXamlType global::Windows.UI.Xaml.Markup.IXamlMember.get_Type()
{
global::Windows.UI.Xaml.Markup.IXamlType __retVal = global::Windows.UI.Xaml.Markup.IXamlMember__Impl.StubClass.get_Type(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
object global::Windows.UI.Xaml.Markup.IXamlMember.GetValue(object instance)
{
object __retVal = global::Windows.UI.Xaml.Markup.IXamlMember__Impl.StubClass.GetValue(
this,
instance
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
void global::Windows.UI.Xaml.Markup.IXamlMember.SetValue(
object instance,
object value)
{
global::Windows.UI.Xaml.Markup.IXamlMember__Impl.StubClass.SetValue(
this,
instance,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// v-table for 'Windows.UI.Xaml.Markup.IXamlMember'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Markup.IXamlMember))]
[global::System.Runtime.InteropServices.McgRootsType(typeof(global::Windows.UI.Xaml.Markup.IXamlMember))]
public unsafe partial struct Vtbl
{
global::System.IntPtr pfnQueryInterface;
global::System.IntPtr pfnAddRef;
global::System.IntPtr pfnRelease;
global::System.IntPtr pfnGetIids;
global::System.IntPtr pfnGetRuntimeClassName;
global::System.IntPtr pfnGetTrustLevel;
// Windows_UI_Xaml_Markup__IXamlMember
global::System.IntPtr pfnget_IsAttachable_Windows_UI_Xaml_Markup__IXamlMember;
global::System.IntPtr pfnget_IsDependencyProperty_Windows_UI_Xaml_Markup__IXamlMember;
global::System.IntPtr pfnget_IsReadOnly_Windows_UI_Xaml_Markup__IXamlMember;
global::System.IntPtr pfnget_Name_Windows_UI_Xaml_Markup__IXamlMember;
global::System.IntPtr pfnget_TargetType_Windows_UI_Xaml_Markup__IXamlMember;
global::System.IntPtr pfnget_Type_Windows_UI_Xaml_Markup__IXamlMember;
global::System.IntPtr pfnGetValue_Windows_UI_Xaml_Markup__IXamlMember;
global::System.IntPtr pfnSetValue_Windows_UI_Xaml_Markup__IXamlMember;
internal const int idx_get_IsAttachable = 6;
internal const int idx_get_IsDependencyProperty = 7;
internal const int idx_get_IsReadOnly = 8;
internal const int idx_get_Name = 9;
internal const int idx_get_TargetType = 10;
internal const int idx_get_Type = 11;
internal const int idx_GetValue = 12;
internal const int idx_SetValue = 13;
[global::System.Runtime.CompilerServices.InitDataBlob(typeof(global::Windows.UI.Xaml.Markup.IXamlMember__Impl.Vtbl.Windows_UI_Xaml_Markup_IXamlMember__Impl_Vtbl_McgRvaContainer), "RVA_Windows_UI_Xaml_Markup_IXamlMember__Impl_Vtbl_s_theCcwVtable")]
public static global::Windows.UI.Xaml.Markup.IXamlMember__Impl.Vtbl s_theCcwVtable
#if false
= new global::Windows.UI.Xaml.Markup.IXamlMember__Impl.Vtbl() {
pfnQueryInterface = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfQueryInterface>(System.Runtime.InteropServices.__vtable_IUnknown.QueryInterface),
pfnAddRef = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfAddRef>(System.Runtime.InteropServices.__vtable_IUnknown.AddRef),
pfnRelease = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfRelease>(System.Runtime.InteropServices.__vtable_IUnknown.Release),
pfnGetIids = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget0>(System.Runtime.InteropServices.__vtable_IInspectable.GetIIDs),
pfnGetRuntimeClassName = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget1>(System.Runtime.InteropServices.__vtable_IInspectable.GetRuntimeClassName),
pfnGetTrustLevel = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget1>(System.Runtime.InteropServices.__vtable_IInspectable.GetTrustLevel),
pfnget_IsAttachable_Windows_UI_Xaml_Markup__IXamlMember = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget107>(global::Windows.UI.Xaml.Markup.IXamlMember__Impl.Vtbl.get_IsAttachable__STUB),
pfnget_IsDependencyProperty_Windows_UI_Xaml_Markup__IXamlMember = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget107>(global::Windows.UI.Xaml.Markup.IXamlMember__Impl.Vtbl.get_IsDependencyProperty__STUB),
pfnget_IsReadOnly_Windows_UI_Xaml_Markup__IXamlMember = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget107>(global::Windows.UI.Xaml.Markup.IXamlMember__Impl.Vtbl.get_IsReadOnly__STUB),
pfnget_Name_Windows_UI_Xaml_Markup__IXamlMember = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget2>(global::Windows.UI.Xaml.Markup.IXamlMember__Impl.Vtbl.get_Name__STUB),
pfnget_TargetType_Windows_UI_Xaml_Markup__IXamlMember = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget105>(global::Windows.UI.Xaml.Markup.IXamlMember__Impl.Vtbl.get_TargetType__STUB),
pfnget_Type_Windows_UI_Xaml_Markup__IXamlMember = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget105>(global::Windows.UI.Xaml.Markup.IXamlMember__Impl.Vtbl.get_Type__STUB),
pfnGetValue_Windows_UI_Xaml_Markup__IXamlMember = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget115>(global::Windows.UI.Xaml.Markup.IXamlMember__Impl.Vtbl.GetValue__STUB),
pfnSetValue_Windows_UI_Xaml_Markup__IXamlMember = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget112>(global::Windows.UI.Xaml.Markup.IXamlMember__Impl.Vtbl.SetValue__STUB),
}
#endif
;
public static global::System.IntPtr pNativeVtable;
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int get_IsAttachable__STUB(
global::System.IntPtr pComThis,
sbyte* unsafe_value__retval)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.UI.Xaml.Markup.IXamlMember>(
__this,
0
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Func_bool__(
__this,
unsafe_value__retval,
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int get_IsDependencyProperty__STUB(
global::System.IntPtr pComThis,
sbyte* unsafe_value__retval)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.UI.Xaml.Markup.IXamlMember>(
__this,
1
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Func_bool__(
__this,
unsafe_value__retval,
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int get_IsReadOnly__STUB(
global::System.IntPtr pComThis,
sbyte* unsafe_value__retval)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.UI.Xaml.Markup.IXamlMember>(
__this,
2
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Func_bool__(
__this,
unsafe_value__retval,
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int get_Name__STUB(
global::System.IntPtr pComThis,
global::System.Runtime.InteropServices.HSTRING* unsafe_value__retval)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.UI.Xaml.Markup.IXamlMember>(
__this,
3
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Func_string__(
__this,
unsafe_value__retval,
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int get_TargetType__STUB(
global::System.IntPtr pComThis,
global::Windows.UI.Xaml.Markup.IXamlType__Impl.Vtbl*** unsafe_value__retval)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.UI.Xaml.Markup.IXamlMember>(
__this,
4
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Func_TResult__<global::Windows.UI.Xaml.Markup.IXamlType>(
__this,
((void**)unsafe_value__retval),
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int get_Type__STUB(
global::System.IntPtr pComThis,
global::Windows.UI.Xaml.Markup.IXamlType__Impl.Vtbl*** unsafe_value__retval)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.UI.Xaml.Markup.IXamlMember>(
__this,
5
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Func_TResult__<global::Windows.UI.Xaml.Markup.IXamlType>(
__this,
((void**)unsafe_value__retval),
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
// Signature, Windows.UI.Xaml.Markup.IXamlMember.GetValue, [rev] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [rev] [in] [Mcg.CodeGen.WinRTInspectableMarshaller] object____mcg_IInspectable, [rev] [out] [retval] [nativebyref] [Mcg.CodeGen.WinRTInspectableMarshaller] object____mcg_IInspectable,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int GetValue__STUB(
global::System.IntPtr pComThis,
global::System.Runtime.InteropServices.__vtable_IInspectable* unsafe_instance,
global::System.Runtime.InteropServices.__vtable_IInspectable** unsafe_value__retval)
{
// Setup
object instance = default(object);
if (unsafe_value__retval != null)
(*(unsafe_value__retval)) = null;
object value__retval = default(object);
try
{
// Marshalling
instance = global::System.Runtime.InteropServices.McgMarshal.IInspectableToObject(((global::System.IntPtr)unsafe_instance));
// Call to managed method
value__retval = global::System.Runtime.InteropServices.McgMarshal.FastCast<global::Windows.UI.Xaml.Markup.IXamlMember>(global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis)).GetValue(instance);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
if (unsafe_value__retval != null)
(*(unsafe_value__retval)) = (global::System.Runtime.InteropServices.__vtable_IInspectable*)global::System.Runtime.InteropServices.McgMarshal.ObjectToIInspectable(value__retval);
// Return
return global::McgInterop.Helpers.S_OK;
}
catch (global::System.Exception hrExcep)
{
// ExceptionCleanup
if (unsafe_value__retval != null)
{
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)(*(unsafe_value__retval)))));
(*(unsafe_value__retval)) = null;
}
// ExceptionReturn
return global::System.Runtime.InteropServices.McgMarshal.GetHRForExceptionWinRT(hrExcep);
}
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int SetValue__STUB(
global::System.IntPtr pComThis,
global::System.Runtime.InteropServices.__vtable_IInspectable* unsafe_instance,
global::System.Runtime.InteropServices.__vtable_IInspectable* unsafe_value)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.UI.Xaml.Markup.IXamlMember>(
__this,
7
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Proc_object__object__(
__this,
unsafe_instance,
unsafe_value,
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
private static class Windows_UI_Xaml_Markup_IXamlMember__Impl_Vtbl_McgRvaContainer
{
[global::System.Runtime.CompilerServices.MethodAddrFixup(0, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "QueryInterface")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(4, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "AddRef")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(8, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "Release")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(12, typeof(global::System.Runtime.InteropServices.__vtable_IInspectable), "GetIIDs")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(16, typeof(global::System.Runtime.InteropServices.__vtable_IInspectable), "GetRuntimeClassName")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(20, typeof(global::System.Runtime.InteropServices.__vtable_IInspectable), "GetTrustLevel")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(24, typeof(global::Windows.UI.Xaml.Markup.IXamlMember__Impl.Vtbl), "get_IsAttachable__STUB")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(28, typeof(global::Windows.UI.Xaml.Markup.IXamlMember__Impl.Vtbl), "get_IsDependencyProperty__STUB")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(32, typeof(global::Windows.UI.Xaml.Markup.IXamlMember__Impl.Vtbl), "get_IsReadOnly__STUB")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(36, typeof(global::Windows.UI.Xaml.Markup.IXamlMember__Impl.Vtbl), "get_Name__STUB")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(40, typeof(global::Windows.UI.Xaml.Markup.IXamlMember__Impl.Vtbl), "get_TargetType__STUB")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(44, typeof(global::Windows.UI.Xaml.Markup.IXamlMember__Impl.Vtbl), "get_Type__STUB")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(48, typeof(global::Windows.UI.Xaml.Markup.IXamlMember__Impl.Vtbl), "GetValue__STUB")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(52, typeof(global::Windows.UI.Xaml.Markup.IXamlMember__Impl.Vtbl), "SetValue__STUB")]
[global::System.Runtime.CompilerServices.NonArray]
static readonly byte[] RVA_Windows_UI_Xaml_Markup_IXamlMember__Impl_Vtbl_s_theCcwVtable = new byte[] {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0};
}
}
}
// Windows.UI.Xaml.Markup.XmlnsDefinition
public unsafe static class XmlnsDefinition__Impl
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static int Marshal__SafeToUnsafe(
ref global::Windows.UI.Xaml.Markup.XmlnsDefinition safeSource,
out global::Windows.UI.Xaml.Markup.XmlnsDefinition__Impl.UnsafeType unsafeDest)
{
// [fwd] [in] [optional] [Mcg.CodeGen.HSTRINGMarshaller] string__System.Runtime.InteropServices.HSTRING safeSource
unsafeDest.XmlNamespace = global::System.Runtime.InteropServices.McgMarshal.StringToHStringForField(safeSource.XmlNamespace);
// [fwd] [in] [optional] [Mcg.CodeGen.HSTRINGMarshaller] string__System.Runtime.InteropServices.HSTRING safeSource
unsafeDest.Namespace = global::System.Runtime.InteropServices.McgMarshal.StringToHStringForField(safeSource.Namespace);
return 0;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static int Marshal__UnsafeToSafe(
ref global::Windows.UI.Xaml.Markup.XmlnsDefinition__Impl.UnsafeType unsafeSource,
out global::Windows.UI.Xaml.Markup.XmlnsDefinition safeDest)
{
// [rev] [in] [optional] [Mcg.CodeGen.HSTRINGMarshaller] string__System.Runtime.InteropServices.HSTRING safeDest
safeDest.XmlNamespace = global::System.Runtime.InteropServices.McgMarshal.HStringToString(unsafeSource.XmlNamespace);
// [rev] [in] [optional] [Mcg.CodeGen.HSTRINGMarshaller] string__System.Runtime.InteropServices.HSTRING safeDest
safeDest.Namespace = global::System.Runtime.InteropServices.McgMarshal.HStringToString(unsafeSource.Namespace);
return 0;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void Cleanup__Unsafe(ref global::Windows.UI.Xaml.Markup.XmlnsDefinition__Impl.UnsafeType unsafeStruct)
{
global::System.Runtime.InteropServices.McgMarshal.FreeHString(unsafeStruct.XmlNamespace.handle);
global::System.Runtime.InteropServices.McgMarshal.FreeHString(unsafeStruct.Namespace.handle);
}
public unsafe struct UnsafeType
{
public global::System.Runtime.InteropServices.HSTRING XmlNamespace;
public global::System.Runtime.InteropServices.HSTRING Namespace;
}
}
}
namespace Windows.UI.Xaml.Media
{
// Windows.UI.Xaml.Media.IGeneralTransform
public unsafe static class IGeneralTransform__Impl
{
// v-table for 'Windows.UI.Xaml.Media.IGeneralTransform'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Media.IGeneralTransform))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Xaml.Media.IGeneralTransformOverrides
public unsafe static class IGeneralTransformOverrides__Impl
{
// StubClass for 'Windows.UI.Xaml.Media.IGeneralTransformOverrides'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.Media.GeneralTransform get_InverseCore(global::System.__ComObject __this)
{
global::Windows.UI.Xaml.Media.GeneralTransform __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.UI.Xaml.Media.IGeneralTransformOverrides, global::Windows.UI.Xaml.Media.GeneralTransform>(
__this,
global::Windows.UI.Xaml.Media.IGeneralTransformOverrides__Impl.Vtbl.idx_get_InverseCore
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
// Signature, Windows.UI.Xaml.Media.IGeneralTransformOverrides.TryTransformCore, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.BlittableValueMarshaller] Windows_Foundation_Point__Windows_Foundation__Point, [fwd] [out] [managedbyref] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] Windows_Foundation_Point__Windows_Foundation__Point, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.CBoolMarshaller] bool__bool,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static bool TryTransformCore(
global::System.__ComObject __this,
global::Windows.Foundation.Point inPoint,
out global::Windows.Foundation.Point outPoint)
{
// Setup
global::Windows.Foundation.Point unsafe_outPoint;
bool returnValue__retval;
sbyte unsafe_returnValue__retval;
int unsafe___return__;
// Marshalling
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.UI.Xaml.Media.IGeneralTransformOverrides).TypeHandle,
global::Windows.UI.Xaml.Media.IGeneralTransformOverrides__Impl.Vtbl.idx_TryTransformCore,
inPoint,
&(unsafe_outPoint),
&(unsafe_returnValue__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
returnValue__retval = unsafe_returnValue__retval != 0;
outPoint = unsafe_outPoint;
// Return
return returnValue__retval;
}
// Signature, Windows.UI.Xaml.Media.IGeneralTransformOverrides.TransformBoundsCore, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.BlittableValueMarshaller] Windows_Foundation_Rect__Windows_Foundation__Rect, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] Windows_Foundation_Rect__Windows_Foundation__Rect,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.Foundation.Rect TransformBoundsCore(
global::System.__ComObject __this,
global::Windows.Foundation.Rect rect)
{
// Setup
global::Windows.Foundation.Rect unsafe_returnValue__retval;
global::Windows.Foundation.Rect returnValue__retval;
int unsafe___return__;
// Marshalling
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.UI.Xaml.Media.IGeneralTransformOverrides).TypeHandle,
global::Windows.UI.Xaml.Media.IGeneralTransformOverrides__Impl.Vtbl.idx_TransformBoundsCore,
rect,
&(unsafe_returnValue__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
returnValue__retval = unsafe_returnValue__retval;
// Return
return returnValue__retval;
}
}
// DispatchClass for 'Windows.UI.Xaml.Media.IGeneralTransformOverrides'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Media.IGeneralTransformOverrides))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.UI.Xaml.Media.IGeneralTransformOverrides
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.UI.Xaml.Media.IGeneralTransformOverrides.InverseCore")]
global::Windows.UI.Xaml.Media.GeneralTransform global::Windows.UI.Xaml.Media.IGeneralTransformOverrides.get_InverseCore()
{
global::Windows.UI.Xaml.Media.GeneralTransform __retVal = global::Windows.UI.Xaml.Media.IGeneralTransformOverrides__Impl.StubClass.get_InverseCore(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
bool global::Windows.UI.Xaml.Media.IGeneralTransformOverrides.TryTransformCore(
global::Windows.Foundation.Point inPoint,
out global::Windows.Foundation.Point outPoint)
{
bool __retVal = global::Windows.UI.Xaml.Media.IGeneralTransformOverrides__Impl.StubClass.TryTransformCore(
this,
inPoint,
out outPoint
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
global::Windows.Foundation.Rect global::Windows.UI.Xaml.Media.IGeneralTransformOverrides.TransformBoundsCore(global::Windows.Foundation.Rect rect)
{
global::Windows.Foundation.Rect __retVal = global::Windows.UI.Xaml.Media.IGeneralTransformOverrides__Impl.StubClass.TransformBoundsCore(
this,
rect
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.UI.Xaml.Media.IGeneralTransformOverrides'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Media.IGeneralTransformOverrides))]
public unsafe partial struct Vtbl
{
internal const int idx_get_InverseCore = 6;
internal const int idx_TryTransformCore = 7;
internal const int idx_TransformBoundsCore = 8;
}
}
// Windows.UI.Xaml.Media.ITransform
public unsafe static class ITransform__Impl
{
// v-table for 'Windows.UI.Xaml.Media.ITransform'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Media.ITransform))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Xaml.Media.IFontFamily
public unsafe static class IFontFamily__Impl
{
// v-table for 'Windows.UI.Xaml.Media.IFontFamily'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Media.IFontFamily))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Xaml.Media.IBrush
public unsafe static class IBrush__Impl
{
// v-table for 'Windows.UI.Xaml.Media.IBrush'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Media.IBrush))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Xaml.Media.ICompositeTransform
public unsafe static class ICompositeTransform__Impl
{
// StubClass for 'Windows.UI.Xaml.Media.ICompositeTransform'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static double get_Rotation(global::System.__ComObject __this)
{
double __ret = global::McgInterop.ForwardComSharedStubs.Func_double__<global::Windows.UI.Xaml.Media.ICompositeTransform>(
__this,
global::Windows.UI.Xaml.Media.ICompositeTransform__Impl.Vtbl.idx_get_Rotation
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void put_Rotation(
global::System.__ComObject __this,
double value)
{
global::McgInterop.ForwardComSharedStubs.Proc_double__<global::Windows.UI.Xaml.Media.ICompositeTransform>(
__this,
value,
global::Windows.UI.Xaml.Media.ICompositeTransform__Impl.Vtbl.idx_put_Rotation
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// DispatchClass for 'Windows.UI.Xaml.Media.ICompositeTransform'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Media.ICompositeTransform))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.UI.Xaml.Media.ICompositeTransform
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.UI.Xaml.Media.ICompositeTransform.Rotation")]
double global::Windows.UI.Xaml.Media.ICompositeTransform.get_Rotation()
{
double __retVal = global::Windows.UI.Xaml.Media.ICompositeTransform__Impl.StubClass.get_Rotation(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertySet, "Windows.UI.Xaml.Media.ICompositeTransform.Rotation")]
void global::Windows.UI.Xaml.Media.ICompositeTransform.put_Rotation(double value)
{
global::Windows.UI.Xaml.Media.ICompositeTransform__Impl.StubClass.put_Rotation(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// v-table for 'Windows.UI.Xaml.Media.ICompositeTransform'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Media.ICompositeTransform))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Rotation = 18;
internal const int idx_put_Rotation = 19;
}
}
// Windows.UI.Xaml.Media.ITileBrush
public unsafe static class ITileBrush__Impl
{
// StubClass for 'Windows.UI.Xaml.Media.ITileBrush'
public static partial class StubClass
{
// Signature, Windows.UI.Xaml.Media.ITileBrush.get_Stretch, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.EnumMarshaller] Windows_UI_Xaml_Media_Stretch__Windows_UI_Xaml_Media__Stretch,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.Media.Stretch get_Stretch(global::System.__ComObject __this)
{
// Setup
global::Windows.UI.Xaml.Media.Stretch unsafe_value__retval;
global::Windows.UI.Xaml.Media.Stretch value__retval;
int unsafe___return__;
// Marshalling
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.UI.Xaml.Media.ITileBrush).TypeHandle,
global::Windows.UI.Xaml.Media.ITileBrush__Impl.Vtbl.idx_get_Stretch,
&(unsafe_value__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
value__retval = unsafe_value__retval;
// Return
return value__retval;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void put_Stretch(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Media.Stretch value)
{
global::McgInterop.ForwardComSharedStubs.Proc_int<global::Windows.UI.Xaml.Media.ITileBrush>(
__this,
((int)value),
global::Windows.UI.Xaml.Media.ITileBrush__Impl.Vtbl.idx_put_Stretch
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// DispatchClass for 'Windows.UI.Xaml.Media.ITileBrush'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Media.ITileBrush))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.UI.Xaml.Media.ITileBrush
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.UI.Xaml.Media.ITileBrush.Stretch")]
global::Windows.UI.Xaml.Media.Stretch global::Windows.UI.Xaml.Media.ITileBrush.get_Stretch()
{
global::Windows.UI.Xaml.Media.Stretch __retVal = global::Windows.UI.Xaml.Media.ITileBrush__Impl.StubClass.get_Stretch(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertySet, "Windows.UI.Xaml.Media.ITileBrush.Stretch")]
void global::Windows.UI.Xaml.Media.ITileBrush.put_Stretch(global::Windows.UI.Xaml.Media.Stretch value)
{
global::Windows.UI.Xaml.Media.ITileBrush__Impl.StubClass.put_Stretch(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// v-table for 'Windows.UI.Xaml.Media.ITileBrush'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Media.ITileBrush))]
public unsafe partial struct Vtbl
{
internal const int idx_get_Stretch = 10;
internal const int idx_put_Stretch = 11;
}
}
// Windows.UI.Xaml.Media.IImageSource
public unsafe static class IImageSource__Impl
{
// v-table for 'Windows.UI.Xaml.Media.IImageSource'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Media.IImageSource))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Xaml.Media.IImageBrush
public unsafe static class IImageBrush__Impl
{
// StubClass for 'Windows.UI.Xaml.Media.IImageBrush'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::Windows.UI.Xaml.Media.ImageSource get_ImageSource(global::System.__ComObject __this)
{
global::Windows.UI.Xaml.Media.ImageSource __ret = global::McgInterop.ForwardComSharedStubs.Func_TResult__<global::Windows.UI.Xaml.Media.IImageBrush, global::Windows.UI.Xaml.Media.ImageSource>(
__this,
global::Windows.UI.Xaml.Media.IImageBrush__Impl.Vtbl.idx_get_ImageSource
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void put_ImageSource(
global::System.__ComObject __this,
global::Windows.UI.Xaml.Media.ImageSource value)
{
global::McgInterop.ForwardComSharedStubs.Proc_TArg0__<global::Windows.UI.Xaml.Media.IImageBrush, global::Windows.UI.Xaml.Media.ImageSource>(
__this,
value,
global::Windows.UI.Xaml.Media.IImageBrush__Impl.Vtbl.idx_put_ImageSource
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// Signature, Windows.UI.Xaml.Media.IImageBrush.add_ImageFailed, [fwd] [return] [Mcg.CodeGen.ComHRESULTReturnMarshaller] void__int, [fwd] [in] [Mcg.CodeGen.WinRTDelegateMarshaller] Windows_UI_Xaml_ExceptionRoutedEventHandler__Windows_UI_Xaml__ExceptionRoutedEventHandler *, [fwd] [out] [retval] [nativebyref] [Mcg.CodeGen.BlittableValueMarshaller] System_Runtime_InteropServices_WindowsRuntime_EventRegistrationToken__Windows_Foundation__EventRegistrationToken,
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken add_ImageFailed(
global::System.__ComObject __this,
global::Windows.UI.Xaml.ExceptionRoutedEventHandler value)
{
// Setup
global::Windows.UI.Xaml.ExceptionRoutedEventHandler__Impl.Vtbl** unsafe_value = default(global::Windows.UI.Xaml.ExceptionRoutedEventHandler__Impl.Vtbl**);
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken unsafe_token__retval;
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token__retval;
int unsafe___return__;
try
{
// Marshalling
unsafe_value = (global::Windows.UI.Xaml.ExceptionRoutedEventHandler__Impl.Vtbl**)global::System.Runtime.InteropServices.McgModuleManager.DelegateToComInterface(
value,
typeof(global::Windows.UI.Xaml.ExceptionRoutedEventHandler).TypeHandle,
global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget98>(global::Windows.UI.Xaml.ExceptionRoutedEventHandler__Impl.Invoke)
);
// Call to native method
unsafe___return__ = global::McgInterop.ComCallHelpers.ComCall__HRESULT(
__this,
typeof(global::Windows.UI.Xaml.Media.IImageBrush).TypeHandle,
global::Windows.UI.Xaml.Media.IImageBrush__Impl.Vtbl.idx_add_ImageFailed,
unsafe_value,
&(unsafe_token__retval)
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
token__retval = unsafe_token__retval;
// Return
return token__retval;
}
finally
{
// Cleanup
global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_value)));
}
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void remove_ImageFailed(
global::System.__ComObject __this,
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::McgInterop.ForwardComSharedStubs.Proc__WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.Media.IImageBrush>(
__this,
token,
global::Windows.UI.Xaml.Media.IImageBrush__Impl.Vtbl.idx_remove_ImageFailed
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken add_ImageOpened(
global::System.__ComObject __this,
global::Windows.UI.Xaml.RoutedEventHandler value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __ret = global::McgInterop.ForwardComSharedStubs.Func_UI_Xaml_RoutedEventHandler___WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.Media.IImageBrush>(
__this,
value,
global::Windows.UI.Xaml.Media.IImageBrush__Impl.Vtbl.idx_add_ImageOpened
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void remove_ImageOpened(
global::System.__ComObject __this,
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::McgInterop.ForwardComSharedStubs.Proc__WindowsRuntime_EventRegistrationToken__<global::Windows.UI.Xaml.Media.IImageBrush>(
__this,
token,
global::Windows.UI.Xaml.Media.IImageBrush__Impl.Vtbl.idx_remove_ImageOpened
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// DispatchClass for 'Windows.UI.Xaml.Media.IImageBrush'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Media.IImageBrush))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.UI.Xaml.Media.IImageBrush
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.UI.Xaml.Media.IImageBrush.ImageSource")]
global::Windows.UI.Xaml.Media.ImageSource global::Windows.UI.Xaml.Media.IImageBrush.get_ImageSource()
{
global::Windows.UI.Xaml.Media.ImageSource __retVal = global::Windows.UI.Xaml.Media.IImageBrush__Impl.StubClass.get_ImageSource(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertySet, "Windows.UI.Xaml.Media.IImageBrush.ImageSource")]
void global::Windows.UI.Xaml.Media.IImageBrush.put_ImageSource(global::Windows.UI.Xaml.Media.ImageSource value)
{
global::Windows.UI.Xaml.Media.IImageBrush__Impl.StubClass.put_ImageSource(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventAdd, "Windows.UI.Xaml.Media.IImageBrush.ImageFailed")]
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken global::Windows.UI.Xaml.Media.IImageBrush.add_ImageFailed(global::Windows.UI.Xaml.ExceptionRoutedEventHandler value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __retVal = global::Windows.UI.Xaml.Media.IImageBrush__Impl.StubClass.add_ImageFailed(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventRemove, "Windows.UI.Xaml.Media.IImageBrush.ImageFailed")]
void global::Windows.UI.Xaml.Media.IImageBrush.remove_ImageFailed(global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::Windows.UI.Xaml.Media.IImageBrush__Impl.StubClass.remove_ImageFailed(
this,
token
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventAdd, "Windows.UI.Xaml.Media.IImageBrush.ImageOpened")]
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken global::Windows.UI.Xaml.Media.IImageBrush.add_ImageOpened(global::Windows.UI.Xaml.RoutedEventHandler value)
{
global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken __retVal = global::Windows.UI.Xaml.Media.IImageBrush__Impl.StubClass.add_ImageOpened(
this,
value
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.EventRemove, "Windows.UI.Xaml.Media.IImageBrush.ImageOpened")]
void global::Windows.UI.Xaml.Media.IImageBrush.remove_ImageOpened(global::System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken token)
{
global::Windows.UI.Xaml.Media.IImageBrush__Impl.StubClass.remove_ImageOpened(
this,
token
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
}
// v-table for 'Windows.UI.Xaml.Media.IImageBrush'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Media.IImageBrush))]
public unsafe partial struct Vtbl
{
internal const int idx_get_ImageSource = 6;
internal const int idx_put_ImageSource = 7;
internal const int idx_add_ImageFailed = 8;
internal const int idx_remove_ImageFailed = 9;
internal const int idx_add_ImageOpened = 10;
internal const int idx_remove_ImageOpened = 11;
}
}
}
namespace Windows.UI.Xaml.Navigation
{
// Windows.UI.Xaml.Navigation.INavigationEventArgs
public unsafe static class INavigationEventArgs__Impl
{
// v-table for 'Windows.UI.Xaml.Navigation.INavigationEventArgs'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Navigation.INavigationEventArgs))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Xaml.Navigation.INavigationEventArgs2
public unsafe static class INavigationEventArgs2__Impl
{
// v-table for 'Windows.UI.Xaml.Navigation.INavigationEventArgs2'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Navigation.INavigationEventArgs2))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Xaml.Navigation.INavigatingCancelEventArgs
public unsafe static class INavigatingCancelEventArgs__Impl
{
// v-table for 'Windows.UI.Xaml.Navigation.INavigatingCancelEventArgs'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Navigation.INavigatingCancelEventArgs))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Xaml.Navigation.INavigatingCancelEventArgs2
public unsafe static class INavigatingCancelEventArgs2__Impl
{
// v-table for 'Windows.UI.Xaml.Navigation.INavigatingCancelEventArgs2'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Navigation.INavigatingCancelEventArgs2))]
public unsafe partial struct Vtbl
{
}
}
// Windows.UI.Xaml.Navigation.INavigationFailedEventArgs
public unsafe static class INavigationFailedEventArgs__Impl
{
// StubClass for 'Windows.UI.Xaml.Navigation.INavigationFailedEventArgs'
public static partial class StubClass
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static global::System.Type get_SourcePageType(global::System.__ComObject __this)
{
global::System.Type __ret = global::McgInterop.ForwardComSharedStubs.Func_Type__<global::Windows.UI.Xaml.Navigation.INavigationFailedEventArgs>(
__this,
global::Windows.UI.Xaml.Navigation.INavigationFailedEventArgs__Impl.Vtbl.idx_get_SourcePageType
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
}
// DispatchClass for 'Windows.UI.Xaml.Navigation.INavigationFailedEventArgs'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Navigation.INavigationFailedEventArgs))]
public abstract partial class DispatchClass : global::System.__ComObject, global::Windows.UI.Xaml.Navigation.INavigationFailedEventArgs
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.McgAccessor(global::System.Runtime.InteropServices.McgAccessorKind.PropertyGet, "Windows.UI.Xaml.Navigation.INavigationFailedEventArgs.SourcePageType")]
global::System.Type global::Windows.UI.Xaml.Navigation.INavigationFailedEventArgs.get_SourcePageType()
{
global::System.Type __retVal = global::Windows.UI.Xaml.Navigation.INavigationFailedEventArgs__Impl.StubClass.get_SourcePageType(this);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __retVal;
}
}
// v-table for 'Windows.UI.Xaml.Navigation.INavigationFailedEventArgs'
[global::System.Runtime.CompilerServices.DependencyReductionConditionallyDependent(typeof(global::Windows.UI.Xaml.Navigation.INavigationFailedEventArgs))]
public unsafe partial struct Vtbl
{
internal const int idx_get_SourcePageType = 9;
}
}
// Windows.UI.Xaml.Navigation.NavigatedEventHandler
public unsafe static class NavigatedEventHandler__Impl
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void Invoke(
this global::System.__ComObject __this,
object sender,
global::Windows.UI.Xaml.Navigation.NavigationEventArgs e)
{
global::McgInterop.ForwardComSharedStubs.Proc_object__TArg0__<global::Windows.UI.Xaml.Navigation.NavigatedEventHandler, global::Windows.UI.Xaml.Navigation.NavigationEventArgs>(
__this,
sender,
e,
global::Windows.UI.Xaml.Navigation.NavigatedEventHandler__Impl.Vtbl.idx_Invoke
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// v-table for 'Windows.UI.Xaml.Navigation.NavigatedEventHandler'
[global::System.Runtime.InteropServices.McgRootsType(typeof(global::Windows.UI.Xaml.Navigation.NavigatedEventHandler))]
public unsafe partial struct Vtbl
{
global::System.IntPtr pfnQueryInterface;
global::System.IntPtr pfnAddRef;
global::System.IntPtr pfnRelease;
// Windows_UI_Xaml_Navigation__NavigatedEventHandler
global::System.IntPtr pfnInvoke_Windows_UI_Xaml_Navigation__NavigatedEventHandler;
internal const int idx_Invoke = 3;
[global::System.Runtime.CompilerServices.InitDataBlob(typeof(global::Windows.UI.Xaml.Navigation.NavigatedEventHandler__Impl.Vtbl.Windows_UI_Xaml_Navigation_NavigatedEventHandler__Impl_Vtbl_McgRvaContainer), "RVA_Windows_UI_Xaml_Navigation_NavigatedEventHandler__Impl_Vtbl_s_theCcwVtable")]
public static global::Windows.UI.Xaml.Navigation.NavigatedEventHandler__Impl.Vtbl s_theCcwVtable
#if false
= new global::Windows.UI.Xaml.Navigation.NavigatedEventHandler__Impl.Vtbl() {
pfnQueryInterface = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfQueryInterface>(System.Runtime.InteropServices.__vtable_IUnknown.QueryInterface),
pfnAddRef = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfAddRef>(System.Runtime.InteropServices.__vtable_IUnknown.AddRef),
pfnRelease = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfRelease>(System.Runtime.InteropServices.__vtable_IUnknown.Release),
pfnInvoke_Windows_UI_Xaml_Navigation__NavigatedEventHandler = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget128>(global::Windows.UI.Xaml.Navigation.NavigatedEventHandler__Impl.Vtbl.Invoke__STUB),
}
#endif
;
public static global::System.IntPtr pNativeVtable;
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int Invoke__STUB(
global::System.IntPtr pComThis,
global::System.Runtime.InteropServices.__vtable_IInspectable* unsafe_sender,
global::Windows.UI.Xaml.Navigation.INavigationEventArgs__Impl.Vtbl** unsafe_e)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.UI.Xaml.Navigation.NavigatedEventHandler>(
__this,
0
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Proc_object__TArg0__<global::Windows.UI.Xaml.Navigation.NavigationEventArgs>(
__this,
unsafe_sender,
unsafe_e,
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
private static class Windows_UI_Xaml_Navigation_NavigatedEventHandler__Impl_Vtbl_McgRvaContainer
{
[global::System.Runtime.CompilerServices.MethodAddrFixup(0, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "QueryInterface")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(4, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "AddRef")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(8, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "Release")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(12, typeof(global::Windows.UI.Xaml.Navigation.NavigatedEventHandler__Impl.Vtbl), "Invoke__STUB")]
[global::System.Runtime.CompilerServices.NonArray]
static readonly byte[] RVA_Windows_UI_Xaml_Navigation_NavigatedEventHandler__Impl_Vtbl_s_theCcwVtable = new byte[] {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
}
}
}
// Windows.UI.Xaml.Navigation.NavigatingCancelEventHandler
public unsafe static class NavigatingCancelEventHandler__Impl
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void Invoke(
this global::System.__ComObject __this,
object sender,
global::Windows.UI.Xaml.Navigation.NavigatingCancelEventArgs e)
{
global::McgInterop.ForwardComSharedStubs.Proc_object__TArg0__<global::Windows.UI.Xaml.Navigation.NavigatingCancelEventHandler, global::Windows.UI.Xaml.Navigation.NavigatingCancelEventArgs>(
__this,
sender,
e,
global::Windows.UI.Xaml.Navigation.NavigatingCancelEventHandler__Impl.Vtbl.idx_Invoke
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// v-table for 'Windows.UI.Xaml.Navigation.NavigatingCancelEventHandler'
[global::System.Runtime.InteropServices.McgRootsType(typeof(global::Windows.UI.Xaml.Navigation.NavigatingCancelEventHandler))]
public unsafe partial struct Vtbl
{
global::System.IntPtr pfnQueryInterface;
global::System.IntPtr pfnAddRef;
global::System.IntPtr pfnRelease;
// Windows_UI_Xaml_Navigation__NavigatingCancelEventHandler
global::System.IntPtr pfnInvoke_Windows_UI_Xaml_Navigation__NavigatingCancelEventHandler;
internal const int idx_Invoke = 3;
[global::System.Runtime.CompilerServices.InitDataBlob(typeof(global::Windows.UI.Xaml.Navigation.NavigatingCancelEventHandler__Impl.Vtbl.Windows_UI_Xaml_Navigation_NavigatingCancelEventHandler__Impl_Vtbl_McgRvaContainer), "RVA_Windows_UI_Xaml_Navigation_NavigatingCancelEventHandler__Impl_Vtbl_s_theCcwVtable")]
public static global::Windows.UI.Xaml.Navigation.NavigatingCancelEventHandler__Impl.Vtbl s_theCcwVtable
#if false
= new global::Windows.UI.Xaml.Navigation.NavigatingCancelEventHandler__Impl.Vtbl() {
pfnQueryInterface = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfQueryInterface>(System.Runtime.InteropServices.__vtable_IUnknown.QueryInterface),
pfnAddRef = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfAddRef>(System.Runtime.InteropServices.__vtable_IUnknown.AddRef),
pfnRelease = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfRelease>(System.Runtime.InteropServices.__vtable_IUnknown.Release),
pfnInvoke_Windows_UI_Xaml_Navigation__NavigatingCancelEventHandler = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget129>(global::Windows.UI.Xaml.Navigation.NavigatingCancelEventHandler__Impl.Vtbl.Invoke__STUB),
}
#endif
;
public static global::System.IntPtr pNativeVtable;
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int Invoke__STUB(
global::System.IntPtr pComThis,
global::System.Runtime.InteropServices.__vtable_IInspectable* unsafe_sender,
global::Windows.UI.Xaml.Navigation.INavigatingCancelEventArgs__Impl.Vtbl** unsafe_e)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.UI.Xaml.Navigation.NavigatingCancelEventHandler>(
__this,
0
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Proc_object__TArg0__<global::Windows.UI.Xaml.Navigation.NavigatingCancelEventArgs>(
__this,
unsafe_sender,
unsafe_e,
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
private static class Windows_UI_Xaml_Navigation_NavigatingCancelEventHandler__Impl_Vtbl_McgRvaContainer
{
[global::System.Runtime.CompilerServices.MethodAddrFixup(0, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "QueryInterface")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(4, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "AddRef")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(8, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "Release")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(12, typeof(global::Windows.UI.Xaml.Navigation.NavigatingCancelEventHandler__Impl.Vtbl), "Invoke__STUB")]
[global::System.Runtime.CompilerServices.NonArray]
static readonly byte[] RVA_Windows_UI_Xaml_Navigation_NavigatingCancelEventHandler__Impl_Vtbl_s_theCcwVtable = new byte[] {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
}
}
}
// Windows.UI.Xaml.Navigation.NavigationFailedEventHandler
public unsafe static class NavigationFailedEventHandler__Impl
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void Invoke(
this global::System.__ComObject __this,
object sender,
global::Windows.UI.Xaml.Navigation.NavigationFailedEventArgs e)
{
global::McgInterop.ForwardComSharedStubs.Proc_object__TArg0__<global::Windows.UI.Xaml.Navigation.NavigationFailedEventHandler, global::Windows.UI.Xaml.Navigation.NavigationFailedEventArgs>(
__this,
sender,
e,
global::Windows.UI.Xaml.Navigation.NavigationFailedEventHandler__Impl.Vtbl.idx_Invoke
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// v-table for 'Windows.UI.Xaml.Navigation.NavigationFailedEventHandler'
[global::System.Runtime.InteropServices.McgRootsType(typeof(global::Windows.UI.Xaml.Navigation.NavigationFailedEventHandler))]
public unsafe partial struct Vtbl
{
global::System.IntPtr pfnQueryInterface;
global::System.IntPtr pfnAddRef;
global::System.IntPtr pfnRelease;
// Windows_UI_Xaml_Navigation__NavigationFailedEventHandler
global::System.IntPtr pfnInvoke_Windows_UI_Xaml_Navigation__NavigationFailedEventHandler;
internal const int idx_Invoke = 3;
[global::System.Runtime.CompilerServices.InitDataBlob(typeof(global::Windows.UI.Xaml.Navigation.NavigationFailedEventHandler__Impl.Vtbl.Windows_UI_Xaml_Navigation_NavigationFailedEventHandler__Impl_Vtbl_McgRvaContainer), "RVA_Windows_UI_Xaml_Navigation_NavigationFailedEventHandler__Impl_Vtbl_s_theCcwVtable")]
public static global::Windows.UI.Xaml.Navigation.NavigationFailedEventHandler__Impl.Vtbl s_theCcwVtable
#if false
= new global::Windows.UI.Xaml.Navigation.NavigationFailedEventHandler__Impl.Vtbl() {
pfnQueryInterface = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfQueryInterface>(System.Runtime.InteropServices.__vtable_IUnknown.QueryInterface),
pfnAddRef = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfAddRef>(System.Runtime.InteropServices.__vtable_IUnknown.AddRef),
pfnRelease = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfRelease>(System.Runtime.InteropServices.__vtable_IUnknown.Release),
pfnInvoke_Windows_UI_Xaml_Navigation__NavigationFailedEventHandler = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget130>(global::Windows.UI.Xaml.Navigation.NavigationFailedEventHandler__Impl.Vtbl.Invoke__STUB),
}
#endif
;
public static global::System.IntPtr pNativeVtable;
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int Invoke__STUB(
global::System.IntPtr pComThis,
global::System.Runtime.InteropServices.__vtable_IInspectable* unsafe_sender,
global::Windows.UI.Xaml.Navigation.INavigationFailedEventArgs__Impl.Vtbl** unsafe_e)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.UI.Xaml.Navigation.NavigationFailedEventHandler>(
__this,
0
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Proc_object__TArg0__<global::Windows.UI.Xaml.Navigation.NavigationFailedEventArgs>(
__this,
unsafe_sender,
unsafe_e,
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
private static class Windows_UI_Xaml_Navigation_NavigationFailedEventHandler__Impl_Vtbl_McgRvaContainer
{
[global::System.Runtime.CompilerServices.MethodAddrFixup(0, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "QueryInterface")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(4, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "AddRef")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(8, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "Release")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(12, typeof(global::Windows.UI.Xaml.Navigation.NavigationFailedEventHandler__Impl.Vtbl), "Invoke__STUB")]
[global::System.Runtime.CompilerServices.NonArray]
static readonly byte[] RVA_Windows_UI_Xaml_Navigation_NavigationFailedEventHandler__Impl_Vtbl_s_theCcwVtable = new byte[] {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
}
}
}
// Windows.UI.Xaml.Navigation.NavigationStoppedEventHandler
public unsafe static class NavigationStoppedEventHandler__Impl
{
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
public static void Invoke(
this global::System.__ComObject __this,
object sender,
global::Windows.UI.Xaml.Navigation.NavigationEventArgs e)
{
global::McgInterop.ForwardComSharedStubs.Proc_object__TArg0__<global::Windows.UI.Xaml.Navigation.NavigationStoppedEventHandler, global::Windows.UI.Xaml.Navigation.NavigationEventArgs>(
__this,
sender,
e,
global::Windows.UI.Xaml.Navigation.NavigationStoppedEventHandler__Impl.Vtbl.idx_Invoke
);
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
}
// v-table for 'Windows.UI.Xaml.Navigation.NavigationStoppedEventHandler'
[global::System.Runtime.InteropServices.McgRootsType(typeof(global::Windows.UI.Xaml.Navigation.NavigationStoppedEventHandler))]
public unsafe partial struct Vtbl
{
global::System.IntPtr pfnQueryInterface;
global::System.IntPtr pfnAddRef;
global::System.IntPtr pfnRelease;
// Windows_UI_Xaml_Navigation__NavigationStoppedEventHandler
global::System.IntPtr pfnInvoke_Windows_UI_Xaml_Navigation__NavigationStoppedEventHandler;
internal const int idx_Invoke = 3;
[global::System.Runtime.CompilerServices.InitDataBlob(typeof(global::Windows.UI.Xaml.Navigation.NavigationStoppedEventHandler__Impl.Vtbl.Windows_UI_Xaml_Navigation_NavigationStoppedEventHandler__Impl_Vtbl_McgRvaContainer), "RVA_Windows_UI_Xaml_Navigation_NavigationStoppedEventHandler__Impl_Vtbl_s_theCcwVtable")]
public static global::Windows.UI.Xaml.Navigation.NavigationStoppedEventHandler__Impl.Vtbl s_theCcwVtable
#if false
= new global::Windows.UI.Xaml.Navigation.NavigationStoppedEventHandler__Impl.Vtbl() {
pfnQueryInterface = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfQueryInterface>(System.Runtime.InteropServices.__vtable_IUnknown.QueryInterface),
pfnAddRef = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfAddRef>(System.Runtime.InteropServices.__vtable_IUnknown.AddRef),
pfnRelease = global::McgInterop.Intrinsics.AddrOf<global::System.Runtime.InteropServices.AddrOfRelease>(System.Runtime.InteropServices.__vtable_IUnknown.Release),
pfnInvoke_Windows_UI_Xaml_Navigation__NavigationStoppedEventHandler = global::McgInterop.Intrinsics.AddrOf<global::McgInterop.AddrOfIntrinsics.AddrOfTarget128>(global::Windows.UI.Xaml.Navigation.NavigationStoppedEventHandler__Impl.Vtbl.Invoke__STUB),
}
#endif
;
public static global::System.IntPtr pNativeVtable;
[global::System.Runtime.InteropServices.McgGeneratedMarshallingCode]
[global::System.Runtime.InteropServices.NativeCallable]
static int Invoke__STUB(
global::System.IntPtr pComThis,
global::System.Runtime.InteropServices.__vtable_IInspectable* unsafe_sender,
global::Windows.UI.Xaml.Navigation.INavigationEventArgs__Impl.Vtbl** unsafe_e)
{
object __this = global::System.Runtime.InteropServices.McgMarshal.ThisPointerToTargetObject(pComThis);
global::System.IntPtr __methodPtr = global::McgInterop.Intrinsics.VirtualAddrOf<global::Windows.UI.Xaml.Navigation.NavigationStoppedEventHandler>(
__this,
0
);
int __ret = ((int)global::McgInterop.ReverseComSharedStubs.Proc_object__TArg0__<global::Windows.UI.Xaml.Navigation.NavigationEventArgs>(
__this,
unsafe_sender,
unsafe_e,
__methodPtr
));
global::System.Runtime.InteropServices.DebugAnnotations.PreviousCallContainsUserCode();
return __ret;
}
private static class Windows_UI_Xaml_Navigation_NavigationStoppedEventHandler__Impl_Vtbl_McgRvaContainer
{
[global::System.Runtime.CompilerServices.MethodAddrFixup(0, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "QueryInterface")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(4, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "AddRef")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(8, typeof(global::System.Runtime.InteropServices.__vtable_IUnknown), "Release")]
[global::System.Runtime.CompilerServices.MethodAddrFixup(12, typeof(global::Windows.UI.Xaml.Navigation.NavigationStoppedEventHandler__Impl.Vtbl), "Invoke__STUB")]
[global::System.Runtime.CompilerServices.NonArray]
static readonly byte[] RVA_Windows_UI_Xaml_Navigation_NavigationStoppedEventHandler__Impl_Vtbl_s_theCcwVtable = new byte[] {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
}
}
}
}
// Interop_mincore_CPINFOEXW__System_Text_Encoding_CodePages
public unsafe static class Interop_mincore_CPINFOEXW__System_Text_Encoding_CodePages__Impl
{
}
// Interop_mincore_CPINFOEXW__DefaultChar_e__FixedBuffer__System_Text_Encoding_CodePages
public unsafe static class Interop_mincore_CPINFOEXW__DefaultChar_e__FixedBuffer__System_Text_Encoding_CodePages__Impl
{
}
// Interop_mincore_CPINFOEXW__LeadByte_e__FixedBuffer__System_Text_Encoding_CodePages
public unsafe static class Interop_mincore_CPINFOEXW__LeadByte_e__FixedBuffer__System_Text_Encoding_CodePages__Impl
{
}
// Interop_mincore_CPINFOEXW__CodePageName_e__FixedBuffer__System_Text_Encoding_CodePages
public unsafe static class Interop_mincore_CPINFOEXW__CodePageName_e__FixedBuffer__System_Text_Encoding_CodePages__Impl
{
}
| 0bad70b5fd679e490e0bf713f2aacd71e320a9c7 | [
"Markdown",
"C#"
] | 17 | C# | abelectronicsuk/ABElectronics_Win10IOT_Libraries | 0c5e758ff752e7ad355cbc966a2194b6015fb2d5 | df2429b48c94fea482fa2ba5f0c0884b6272e1c7 | |
refs/heads/main | <file_sep>from selenium import webdriver
# github change
# git change
chrome_driver_path = r"C:\Users\Francis\Desktop\chromedriver_win32\chromedriver.exe"
driver_long_lower_shadow = webdriver.Chrome(chrome_driver_path)
driver_hammer = webdriver.Chrome(chrome_driver_path)
driver_dragon = webdriver.Chrome(chrome_driver_path)
driver_white = webdriver.Chrome(chrome_driver_path)
driver_long_lower_shadow.get("https://finviz.com/screener.ashx?v=211&f=cap_smallover,fa_salesqoq_o5,sh_curvol_o50,sh_instown_o10,sh_price_o15,ta_candlestick_lls,ta_highlow52w_b0to10h,ta_sma200_sb50,ta_sma50_pa&ft=3")
driver_hammer.get("https://finviz.com/screener.ashx?v=211&f=cap_smallover,fa_salesqoq_o5,sh_curvol_o50,sh_instown_o10,sh_price_o15,ta_candlestick_h,ta_highlow52w_b0to10h,ta_sma200_sb50,ta_sma50_pa&ft=3")
driver_dragon.get("https://finviz.com/screener.ashx?v=211&f=cap_smallover,fa_salesqoq_o5,sh_curvol_o50,sh_instown_o10,sh_price_o15,ta_candlestick_dd,ta_highlow52w_b0to10h,ta_sma200_sb50,ta_sma50_pa&ft=3")
driver_white.get("https://finviz.com/screener.ashx?v=211&f=cap_smallover,fa_salesqoq_o5,sh_curvol_o50,sh_instown_o10,sh_price_o15,ta_candlestick_mw,ta_highlow52w_b0to10h,ta_sma200_sb50,ta_sma50_pa&ft=3")
| 4bf6f6a87fb6d1b2ae0400ac4e25db55e1aa5fa8 | [
"Python"
] | 1 | Python | franciskoinno/stock_scanner | 32d000ebd407e7d1b9c9f1b661a3537731996500 | f518c933e6218f54367928695c98686417ee22ca | |
refs/heads/master | <file_sep>using System;
namespace Macaria.Core.Exceptions
{
public class DomainException: Exception
{
public int Code { get; set; } = 0;
}
}
<file_sep>using Macaria.Core.Interfaces;
using Macaria.Infrastructure.Data;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
namespace Macaria.Infrastructure.Extensions
{
public static class ServiceCollectionExtensions
{
public static IServiceCollection AddDataStore(this IServiceCollection services,
string connectionString)
{
services.AddScoped<IAppDbContext, AppDbContext>();
services.AddDbContext<AppDbContext>(options =>
{
options
.UseLoggerFactory(AppDbContext.ConsoleLoggerFactory)
.UseSqlServer(connectionString, b=> b.MigrationsAssembly("Macaria.Infrastructure"));
});
return services;
}
}
}
<file_sep># Api Code Organization<file_sep># Introduction to MediatR and CQRS | 72a26f19ffb9922da005ff91212d1de1c74521ff | [
"Markdown",
"C#"
] | 4 | C# | lucvo/Full-Stack-Web-Application-Development-with-ASP.NET-Core-2.0-and-Angular | 0c878664a82b3251c562544413253e67b38fbdb0 | dd2f8b42bdf5aa042f01ed687d9e010e3223dea9 | |
refs/heads/master | <repo_name>thetangram/composer<file_sep>/CONTRIBUTING.md
Contributing to The Tangram Composer
====================================
(Based on https://github.com/atom/atom/blob/master/CONTRIBUTING.md)
Code of Conduct
---------------
This project and everyone participating in it is governed by [The Tangram Code of Conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please report unacceptable behavior to [<EMAIL>](mailto:<EMAIL>).
How can I contribute
--------------------
### Reporting bugs
### Suggesting Enhancements
### Writting documentation and Translations
Styleguides
-----------
### Git Commit Messages
Please follow the recomendations from [how to Write a Git Commit Message](https://chris.beams.io/posts/git-commit/) document.
### Go Styleguide
### Documentation Styleguide
<file_sep>/README.md
[](https://travis-ci.org/thetangram/composer)
[](https://godoc.org/github.com/thetangram/composer)
[](https://opensource.org/licenses/MIT)
[](https://goreportcard.com/report/thetangram/composer)
The Tangram Composer
====================
The Tangram Composer is a server/edge side HTML composition service. Its main goal is solving the microservices frontend issue faced when you build a distributed microservices system, each microservice with it's own lifecycle and rollout. In this scenario it's usual to build the user interface as a monolith (aka. BFF), aggregator of microservices data. This model creates user interface-microservices one to one dependencies, so in a lot of cases the rollout of each piece is bound, then the service autonomy is harder and going to continous deployment can be compromissed.
### Features
- Compose HTML based on HTML components/microservices
- 100% stateless service.
- Can be deplloyed as stand alone service or in a serverless architecture.
- Request headers and cookies passthrough to components.
- Request headers and cookies filtering to components.
- Component response headers merging.
- Component meta information, scripts and stylesheets merging.
- Concurrent composition.
- Stand alone and container based artifacts.
- ... TBD
### Documentation
You can find all the project documentation in [the documentation folder](./docs). We recommend you to start reading the [project description](./docs/description.md) and the [glossary](./docs/glossary.md).
### About the name
[From Wikipedia](https://en.wikipedia.org/wiki/Tangram) *The tangram (Chinese: 七巧板; pinyin: qīqiǎobǎn; literally: "seven boards of skill") is a dissection puzzle consisting of seven flat shapes, called tans, which are put together to form shapes. The objective of the puzzle is to form a specific shape (given only an outline or silhouette) using all seven pieces, which may not overlap.*
Getting Started
---------------
### Requisites
In order to build The Tangram Composer you need [Go](https://golang.org), [Make](https://www.gnu.org/software/make/), [Dep](https://github.com/golang/dep), [Docker](https://www.docker.com/) and [zip](). The complete list of tools:
- **[Go](https://golang.org) 1.9+**, as programming language.
- **[Make](https://www.gnu.org/software/make/)**, as build automation tool.
- **[Dep](https://github.com/golang/dep)**, as dependency management tool.
- **[Docker](https://www.docker.com/) 17.09+**, to build container.
- **Zip**, to package *AWS Lambda deployment*.
### Project structure
This project follows the [Standard Go Project Layout](https://github.com/golang-standards/project-layout).
### Building
This project uses `make` as build automation tool. The `Makefile` **rules** are:
- **`clean`**, to remove all binaries from `dist/` directory.
- **`compile`** (default rule), to complile the code.
- **`run`**, to compile and run the standalone version.
- **`test`**, to run the test and code coverage.
- **`build`**, to compile and genrate the final binary artifacts. THis artifacts are full-independent binary files, and also ave some optimizations.
- **`package`**, to generate the **docker image** (installed in the local repository) and the **AWS Lamdba** package.
Other projects like this
------------------------
This is not the one and only composition solution. We have a lot of friends out there, giving us a lot of inspiration. Take a look on them.
- [Compoxure](https://github.com/tes/compoxure) is a composition middleware that acts as a proxy replacement for ESI os SSI for backend services and compose fragments from microservices into the response
- [Skipper](https://github.com/zalando/skipper) is the Zalando's HTTP router and reverse proxy for service composition.
- [Convergent UI](https://github.com/acesinc/convergent-ui) is a special Zuul Filter that aims to provide a solution to the Distributed Composition problem faced when building a GUI within a Micro Services Architecture.
<file_sep>/Gopkg.toml
[[dependencies]]
branch = "master"
name = "github.com/aws/aws-lambda-go"
[[dependencies]]
branch = "master"
name = "github.com/gorilla/mux"
<file_sep>/cmd/lambda/main.go
package main
import (
"fmt"
"log"
"time"
"github.com/aws/aws-lambda-go/events"
"github.com/aws/aws-lambda-go/lambda"
)
// Application build details
var (
version = "development"
build = "undefined"
buildDate = "undefined"
)
func main() {
fmt.Println("The Tangram Composer Lambda launcher")
log.Printf("\tversion: %s\n", version)
log.Printf("\tbuild: %s\n", build)
log.Printf("\tbuild date: %s\n", buildDate)
log.Printf("\tstartup date: %s\n", time.Now().Format(time.RFC3339))
lambda.Start(Handler)
}
// Handler is your Lambda function handler
// It uses Amazon API Gateway request/responses provided by the aws-lambda-go/events package,
// However you could use other event sources (S3, Kinesis etc), or JSON-decoded primitive types such as 'string'.
func Handler(request events.APIGatewayProxyRequest) (events.APIGatewayProxyResponse, error) {
// stdout and stderr are sent to AWS CloudWatch Logs
log.Printf("Processing Lambdevents.APIGatewayProxyResponsea request %s\n", request.RequestContext.RequestID)
return events.APIGatewayProxyResponse{
Body: "Not implemented yet",
StatusCode: 200,
}, nil
}
<file_sep>/Makefile
version=$(shell cat VERSION)
build=$(shell git rev-parse --short HEAD)
build-date=$(shell date --rfc-3339=seconds)
build-target-dir=dist
docker-image=jomoespe/tangram
compile:
@go build ./...
run:
@go run cmd/tangramd/main.go
test:
@echo "Testing..."
@go test -cover ./...
clean:
@echo "Cleaning..."
@rm --force --recursive dist
build: clean test
@echo "Building Tangramd service..."
@CGO_ENABLED=0 GOOS=linux go build -a \
-installsuffix cgo \
-ldflags "-s -w \
-X 'main.version=$(version)' \
-X 'main.build=$(build)' \
-X 'main.buildDate=$(build-date)'" \
-o $(build-target-dir)/tangramd \
cmd/tangramd/main.go
@echo "Building Tangramd AWS Lambda..."
@go build -o $(build-target-dir)/tangram-aws cmd/lambda/main.go
package: build
@echo "Packaging Docker container..."
@docker build --rm \
--build-arg version=$(version) \
--file build/package/Dockerfile \
--tag "$(docker-image):$(version)" .
@docker tag "$(docker-image):$(version)" "$(docker-image):latest"
@echo "Packaging AWS Lamdba function..."
@zip -r -q $(build-target-dir)/deployment.zip $(build-target-dir)/tangram-aws config/
<file_sep>/cmd/tangramd/main.go
package main
import (
"context"
"fmt"
"log"
"net/http"
"os"
"os/signal"
"syscall"
"time"
"github.com/gorilla/mux"
)
type apiServer struct {
server *http.Server
}
// Application exit status codes
const (
successExitStatus = 0
errorStartingHTTPServer = 1
errorLoadingConfig = 2
errorStopintServerStatusCode = 3
)
// Configuration values
const (
defaultAddress = ":2018"
defaultShutdownTimeout = 2 * time.Millisecond
defaultHTTPReadTimeout = 500 * time.Millisecond
defaultHTTPWriteTimeout = 500 * time.Second
)
// Application build details
var (
version = "development"
build = "undefined"
buildDate = "undefined"
)
func main() {
log.Println("The Tangram Composer")
log.Printf("\tversion: %s\n", version)
log.Printf("\tbuild: %s\n", build)
log.Printf("\tbuild date: %s\n", buildDate)
log.Printf("\tstartup date: %s\n", time.Now().Format(time.RFC3339))
apiserver := apiServer{}
apiserver.startHTTPServer()
apiserver.waitAndShutdown(defaultShutdownTimeout)
}
func (s *apiServer) startHTTPServer() {
// configure HTTP server, register application status entrypoints and routes
r := mux.NewRouter()
s.server = &http.Server{
Handler: r,
Addr: defaultAddress,
ReadTimeout: defaultHTTPReadTimeout,
WriteTimeout: defaultHTTPWriteTimeout,
}
r.HandleFunc("/healthy", healthyHandler).Methods("GET")
r.HandleFunc("/", handler).Methods("GET")
go func() {
log.Printf("Listening on %s\n", defaultAddress)
if err := s.server.ListenAndServe(); err != nil {
log.Printf("Cannot start HTTP server. Error: %s", err)
os.Exit(errorStartingHTTPServer)
}
}()
}
func (s *apiServer) waitAndShutdown(timeout time.Duration) {
// deal with Ctrl+C (SIGTERM) and graceful shutdown
stop := make(chan os.Signal, 1)
signal.Notify(stop, os.Interrupt, syscall.SIGTERM)
<-stop
ctx, cancel := context.WithTimeout(context.Background(), timeout)
defer cancel()
log.Printf("Shutting down, with a timeout of %s...\n", timeout)
if err := s.server.Shutdown(ctx); err != nil {
log.Printf("Error stopping http server. Error: %v\n", err)
os.Exit(errorStopintServerStatusCode)
}
log.Println("The Tangram Composer stoped")
os.Exit(successExitStatus)
}
func handler(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusOK)
fmt.Fprint(w, "Not implemented yet")
}
func healthyHandler(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusOK)
fmt.Fprint(w, "OK")
}
<file_sep>/docs/description.md
The Tangram Composition Description
===================================
The Tangram Composer is a server/edge side HTML composition service. It tries to solve the microservices frontend problem faced when you build a microservices distributed system, each microservice with it's own lifecycle and rollout. In this scenario it's usual to build the user system's user interface as a monolith, aggregator of microservices data. This model creates user interface-microservices one to one dependencies, so in a lot os cases the rollout of each piece is bound, then the service autonomy is harder and going to continous deployment is compromissed.
## TBD & Ideas
> The Tangram Composer is a solution to the Distributed Composition problem faced when building a GUI within a Micro Services Architecture.
> Tangram is an HTTP router and reverse proxy working as edge-side/server-side HTML composition service. Is designed to work as stateless service.
> An edge-side microfrontends composition solution.
> [MDN - Using data attributes](https://developer.mozilla.org/en-US/docs/Learn/HTML/Howto/Use_data_attributes)
> [Unidirectional User Interface Architectures](http://staltz.com/unidirectional-user-interface-architectures.html) | d206c847892a8c7d91f7750dbcf95e8b8cb52351 | [
"Markdown",
"TOML",
"Go",
"Makefile"
] | 7 | Markdown | thetangram/composer | 3975f01c705adfb26b2bbbf8912a862d725edf97 | 7692911994e080325a2a9d06061fa38ea44e3a21 | |
refs/heads/master | <file_sep>import React from 'react'
export const Page404 = ({id}) => {
return (
<>Page not found.</>
)
}<file_sep>import React, {useEffect, useState} from 'react'
import {Button, Card, Form, Input, notification, Popover} from "antd";
import { FileSearchOutlined, EditOutlined, DownloadOutlined, DeleteOutlined } from '@ant-design/icons';
import API from "../../services/api";
export const RemDisplay = (props) => {
const [rem, setRem] = useState('')
const [pres, setPres] = useState('')
function moreInfo() {
return(
<>
<b>Date:</b> {pres.date}<br/>
<b>Keywords:</b> {pres.keywords}<br/>
<b>Authors:</b> {pres.authors}<br/>
<b>Session:</b> {pres.session}<br/>
</>
)
}
function download() {
API.get(`/abstracts/${pres.filename}`,{responseType: 'arraybuffer'})
.then(response => {
const url = window.URL.createObjectURL(new Blob([response.data]));
const link = document.createElement('a');
link.href = url;
link.setAttribute('download',`${pres.filename.split('/')[1]}`);
document.body.appendChild(link);
link.click();
window.URL.revokeObjectURL(url);
})
.catch(errInfo => {
notification['error']({
message: 'Error!',
description: 'File has not been found!'
})
});
}
function remNoteEdit() {
return <>
<Form name="basic" onFinish={remPut} style={{width: 300}}>
<Form.Item label="Note" name="note">
<Input placeholder="..."/>
</Form.Item>
<Form.Item>
<Button type="primary" htmlType="submit">
Submit
</Button>
</Form.Item>
</Form>
</>
}
function remPut(attr) {
API.put(`/reminders/${rem.id}`,{ "presentationId": `${pres.id}`, "notes": attr.note,
"enabled": true }, {headers:{Authorization:`Bearer ${props.token}`}})
.then(response=>{
notification.open({
message: 'Saved',
description: 'Note edited!',
duration: 3,
});
setRem({"id": rem.id, "presentationId": rem.presentationId, "notes": attr.note, "enabled": true})
})
.catch(err=>{
notification['error']({
message: 'Error!',
description: 'Edit error!'
})
})
}
function remDelete() {
API.delete(`/reminders/${rem.id}`, {headers:{Authorization:`Bearer ${props.token}`}})
.then(response=>{
notification.open({
message: 'Deleted',
description: 'Reminder deleted!',
duration: 3,
});
window.location.reload();
})
.catch(err=>{
notification['error']({
message: 'Error!',
description: 'Delete error!'
})
})
}
useEffect( () => {
API.get(`/reminders/${props.remId}`, {headers:{Authorization:`Bearer ${props.token}`}})
.then(response => {
console.log('Reminder claimed.');
setRem(response.data);
})
.catch(errInfo => {
console.log('Reminder error: ', errInfo)
});
API.get(`/presentations/${props.presId}`, {headers:{Authorization:`Bearer ${props.token}`}})
.then(response => {
console.log('Presentation claimed.');
setPres(response.data);
})
.catch(errInfo => {
console.log('Presentation error: ', errInfo)
});
}, //eslint-disable-next-line
[]);
return (
<Card title={pres.title} actions={[
<Popover title={pres.title} content={moreInfo(pres)} trigger="click">
<FileSearchOutlined key="moreInfo" />
</Popover>,
<Popover title="Edit Note" content={remNoteEdit()} trigger="click">
<EditOutlined key="edit" />
</Popover>,
<DownloadOutlined key="download" onClick={()=>download()} />,
<DeleteOutlined key="delete" onClick={()=>remDelete()} />
]}>
<h3>
<b>Starts at:</b> {pres.date}<br/>
<b>Notes:</b> {rem.notes}<br/>
</h3>
</Card>
)
};<file_sep>import React, {useEffect, useState} from 'react'
import Cookies from "js-cookie";
import API from "../../services/api";
import {Col, Row} from "antd";
import {RemDisplay} from "./RemDisplay";
export const Reminder = () => {
const [logged, setLogged] = useState(false);
const [reminders, setReminders] = useState([]);
const token=Cookies.get('token')
useEffect( () => {
if(token != null) {
setLogged(true);
API.get('/reminders', {headers:{Authorization:`Bearer ${token}`}})
.then(response => {
console.log('Reminders claimed.');
setReminders(response.data);
})
.catch(errInfo => {
console.log('Reminders error: ', errInfo)
});
}
}, //eslint-disable-next-line
[]);
if(logged)
return (
<div className="site-card-border-less-wrapper">
<Row>
{reminders.map(rem =>
<Col span={6} key={rem.id}>
<div className="card-content">
<RemDisplay presId={rem.presentationId} remId={rem.id} token={token}/>
</div>
</Col>
)}
</Row>
</div>
);
else
return (
<>The user is not logged.</>
);
};<file_sep>import React from 'react'
import {Collapse, Divider, Tabs} from 'antd';
import {Presentation} from "./Presentation";
import {Session} from "./Session";
import {Room} from "./Room";
const {Panel} = Collapse;
export const Home = () => {
const { TabPane } = Tabs;
return (
<>
<Collapse>
<Panel header='Sessions' key='1'>
<Session/>
</Panel>
<Panel header='Rooms' key='2'>
<Room/>
</Panel>
</Collapse>
<Divider/>
<Tabs defaultActiveKey="1">
<TabPane tab="Monday" key="1">
<Presentation date='2019-09-02'/>
</TabPane>
<TabPane tab="Tuesday" key="2">
<Presentation date='2019-09-03'/>
</TabPane>
<TabPane tab="Wednesday" key="3">
<Presentation date='2019-09-04'/>
</TabPane>
<TabPane tab="Thursday" key="4">
<Presentation date='2019-09-05'/>
</TabPane>
<TabPane tab="Friday" key="5">
<Presentation date='2019-09-06'/>
</TabPane>
</Tabs>
</>
)
};<file_sep>import React, {useEffect} from 'react'
import API from "../../services/api";
import Cookies from "js-cookie";
export const RemPost = (props) => {
const token=Cookies.get('token')
useEffect( () => {
if(token != null) {
API.post(`/reminders`, {
"presenationId": props.presId,
"notes": '',
"enabled": true
},
{headers: {Authorization: `Bearer ${token}`}})
.then(response => {
console.log('Reminder posted.');
})
.catch(errInfo => {
console.log('Reminder post error: ', errInfo)
});
}
}, //eslint-disable-next-line
[]);
return (
<></>
)
};<file_sep>import React from 'react'
import API from "../../services/api";
import {Button, Form, Input, notification} from "antd";
import {Link, useHistory} from "react-router-dom";
const layout = {
labelCol: {
span: 2,
},
wrapperCol: {
span: 6,
},
};
const tailLayout = {
wrapperCol: {
offset: 2,
span: 6,
},
};
export const Register = () => {
const history = useHistory();
const onFinish = (values) => {
API.post('/users', {email: values.email, password: values.password})
.then(response => {
console.log('success')
console.log('id:', response.id)
notification['success']({
message: 'Login has been registered.'
})
history.push('/user')
})
.catch(errInfo => {
notification['error']({
message: 'Register error!',
description: 'Wrong input data.'
})
})
};
const onFinishFailed = errorInfo => {
console.log('Failed:', errorInfo);
};
return (
<Form
{...layout}
name="basic"
onFinish={onFinish}
onFinishFailed={onFinishFailed}
>
<Form.Item
label="Email"
name="email"
rules={[
{
required: true,
message: 'Please input your email!',
},
]}
>
<Input placeholder="<EMAIL>"/>
</Form.Item>
<Form.Item
label="Password"
name="password"
rules={[
{
required: true,
message: 'Please input your password!',
},
]}
>
<Input.Password type='password' placeholder='<PASSWORD>' />
</Form.Item>
<Form.Item {...tailLayout}>
<Button type="primary" htmlType="submit">
Register
</Button>
<p> <br/> Already have an account? <Link to="/login">Sign in</Link>!</p>
</Form.Item>
</Form>
);
}<file_sep>import React from 'react'
import {Card, Popover, notification, Form, Input, Button} from "antd";
import { FileSearchOutlined, BellOutlined, DownloadOutlined } from '@ant-design/icons';
import Cookies from "js-cookie";
import API from "../../services/api";
export const PresDisplay = (props) => {
const token=Cookies.get('token');
function moreInfo() {
return(
<>
<b>Starts at:</b> {props.date.substr(11, 5)}<br/>
<b>Date:</b> {props.date.substr(0, 10)}<br/>
<b>Keywords:</b> {props.keywords.join(', ')}<br/>
<b>Authors:</b> {props.authors.join(', ')}<br/>
<b>Session:</b> {props.session}<br/>
</>
)
}
function remPost(attr) {
console.log(props.id)
API.post(`/reminders`,
{ "presentationId": props.id,
"notes": attr.note,
"enabled": true},
{headers: {Authorization: `Bearer ${token}`}})
.then(response => {
console.log('Reminder posted.');
notification.open({
message: 'Saved!',
description: 'Reminder has been added to your list.',
duration: 3,
})
})
.catch(errInfo => {
console.log('Reminder post error: ', errInfo)
});
}
function remNoteEnter() {
if(token != null) {
return <>
<Form name="basic" onFinish={remPost} style={{width: 300}}>
<Form.Item label="Note" name="note">
<Input placeholder="..."/>
</Form.Item>
<Form.Item>
<Button type="primary" htmlType="submit">
Submit
</Button>
</Form.Item>
</Form>
</>
}
else {
return <>
The user is not logged.
</>
}
}
function download() {
API.get(`/abstracts/${props.filename}`,{responseType: 'arraybuffer'})
.then(response => {
const url = window.URL.createObjectURL(new Blob([response.data]));
const link = document.createElement('a');
link.href = url;
link.setAttribute('download',`${props.filename.split('/')[1]}`);
document.body.appendChild(link);
link.click();
window.URL.revokeObjectURL(url);
})
.catch(errInfo => {
notification['error']({
message: 'Error!',
description: 'File has not been found!'
})
});
}
return (
<Card title={props.title} actions={[
<Popover title={props.title} content={moreInfo()} trigger="click">
<FileSearchOutlined key="moreInfo" />
</Popover>,
<Popover title="Add reminder" content={remNoteEnter()} trigger="click">
<BellOutlined key="remind" />
</Popover>,
<DownloadOutlined key="download" onClick={()=>download()} />,
]}>
<h3><b>Starts at:</b> {props.date.substr(11, 5)}</h3>
</Card>
)
}; | 16c5c06be4832349bba948256ba2e37c8335e10d | [
"JavaScript"
] | 7 | JavaScript | Blumbix/ConferenceSchedule | bae261e4cdd24b8705e9f99ecbc0b17613302a60 | 5ebeec34d7daa90500d3ec20728ed3b9f1b2b940 | |
refs/heads/master | <file_sep># frozen_string_literal: true
require_relative 'spec_helper'
require 'sass_spec'
def create_options_yaml(folder, dictionary)
FileUtils.mkdir_p("tests/metadata/#{folder}")
File.write("tests/metadata/#{folder}/options.yml", dictionary.to_yaml)
end
def cleanup(folder)
FileUtils.remove_dir("tests/metadata/#{folder}")
end
describe SassSpec::TestCaseMetadata do
context 'should ignore impl when given ignore_for' do
before { create_options_yaml('ignore', ignore_for: ['dart_sass']) }
after { cleanup('ignore') }
subject { SassSpec::TestCaseMetadata.new(SassSpec::Directory.new('tests/metadata/ignore')).ignore_for?('dart_sass') }
it { is_expected.to be true }
end
context 'should ignore impl when given only_on' do
before { create_options_yaml('only_on', only_on: ['dart_sass']) }
after { cleanup('only_on') }
subject { SassSpec::TestCaseMetadata.new(SassSpec::Directory.new('tests/metadata/only_on')).ignore_for?('libsass') }
it { is_expected.to be true }
end
context 'should have precision' do
before { create_options_yaml('precision', precision: 10) }
after { cleanup('precision') }
subject { SassSpec::TestCaseMetadata.new(SassSpec::Directory.new('tests/metadata/precision')).precision }
it { is_expected.to eq 10 }
end
context 'should have todos for an impl' do
before { create_options_yaml('todo', todo: ['sass/libsass#2342']) }
after { cleanup('todo') }
subject { SassSpec::TestCaseMetadata.new(SassSpec::Directory.new('tests/metadata/todo')).todo?('libsass') }
it { is_expected.to be true }
end
context 'should have warning todos for an impl' do
before { create_options_yaml('warning', warning_todo: ['sass/libsass#2342']) }
after { cleanup('warning') }
subject { SassSpec::TestCaseMetadata.new(SassSpec::Directory.new('tests/metadata/warning')).warning_todo?('libsass') }
it { is_expected.to be true }
end
end
<file_sep>require 'fileutils'
require 'hrx'
require 'pathname'
require_relative 'util'
# A directory that may represent either a physical directory on disk or a
# directory within an HRX::Archive.
class SassSpec::Directory
# A cache of parsed HRX files, indexed by their corresponding directory paths.
def self._hrx_cache
@hrx_cache ||= {}
end
# The directory's path, possibly including components within an HRX file.
attr_reader :path
# Returns whether this is a virtual HRX directory.
def hrx?
!!@archive
end
# Creates a Directory from a `path`, which may go into an HRX file. For
# example, if `path` is `path/to/archive/subdir` and `path/to/archive.hrx`
# exists, this will load `subdir` from within `path/to/archive.hrx`.
def initialize(path)
@path = Pathname.new(path)
@path = @path.relative_path_from(Pathname.new(Dir.pwd)) if Pathname.new(path).absolute?
# Always use forward slashes on Windows, because HRX requires them.
@path = Pathname.new(@path.to_s.gsub(/\\/, '/')) if Gem.win_platform?
raise ArgumentError.new("#{@path} must be relative.") if @path.absolute?
return if Dir.exist?(@path)
SassSpec::Util.each_directory(@path).with_index do |dir, i|
archive_path = dir + ".hrx"
if self.class._hrx_cache[dir] || File.exist?(archive_path)
@parent_archive_path = archive_path
@parent_archive = self.class._hrx_cache[dir] ||= HRX::Archive.load(archive_path)
@path_in_parent = @path.each_filename.drop(i + 1).join("/")
@archive =
if @path_in_parent.empty?
@parent_archive
else
@parent_archive.child_archive(@path_in_parent)
end
return
end
end
raise "#{path} doesn't exist"
end
# Returns the parent as a SassSpec::Directory, or `nil` if this is the root
# spec directory.
def parent
dirname = File.dirname(@path)
dirname == "." ? nil : SassSpec::Directory.new(dirname)
end
# Returns a list of all paths in this directory that match `pattern`, relative
# to the directory root.
#
# This includes files within HRX files in this directory.
def glob(pattern)
if hrx?
@archive.glob(pattern).select {|e| e.is_a?(HRX::File)}.map(&:path)
else
recursive = pattern.include?("**")
physical_pattern = recursive ? "{#{pattern},**/*.hrx}" : pattern
Dir.glob(File.join(@path, physical_pattern), File::FNM_EXTGLOB).flat_map do |path|
relative = Pathname.new(path).relative_path_from(@path).to_s
next relative unless recursive && path.end_with?(".hrx")
dir = path[0...-".hrx".length]
relative_dir = relative[0...-".hrx".length]
archive = self.class._hrx_cache[dir] ||= HRX::Archive.load(path)
archive.glob(pattern).map {|inner| "#{relative_dir}/#{inner.path}"}
end
end
end
# Returns whether a file exists at `path` within this directory.
def file?(path)
if hrx?
@archive[path].is_a?(HRX::File)
else
File.exist?(File.join(@path, path))
end
end
# Reads the file at `path` within this directory.
def read(path)
return @archive.read(path) if hrx?
File.read(File.join(@path, path), binmode: true, encoding: "ASCII-8BIT")
end
# Writes `contents` to `path` within this directory.
def write(path, contents)
if hrx?
@archive.write(path, contents, comment: :copy)
_write!
else
File.write(File.join(@path, path), contents, binmode: true)
end
end
# Deletes the file at `path` within this directory.
#
# If `if_exists` is `true`, don't throw an error if the file doesn't exist.
def delete(path, if_exists: false)
return if if_exists && !file?(path)
if hrx?
@archive.delete(path)
_write!
else
File.unlink(File.join(@path, path))
end
end
# Renames the file at `old` to `new`.
def rename(old, new)
if hrx?
unless old_file = @archive[old]
raise "#@path/old doesn't exist"
end
@archive.add(HRX::File.new(new, old_file.contents, comment: old_file.comment),
after: old_file)
@archive.delete(old)
_write!
else
File.rename(File.join(@path, old), File.join(@path, new))
end
end
# Deletes this directory and everything it contains.
def delete_dir!
if hrx?
if @parent_archive.equal?(@archive)
_delete_parent!
else
@parent_archive.delete(@path_in_parent, recursive: true)
if @parent_archive.entries.empty?
_delete_parent!
else
_write!
end
end
else
FileUtils.rm_rf(@path)
end
end
# If this directory refers to an HRX file, runs a block with the archive's
# directory and all its contents physically present on the filesystem next to
# the archive.
#
# If this is a normal directory, runs the block with the filesystem as-is.
def with_real_files
return yield unless @archive
files = @archive.entries.select {|entry| entry.is_a?(HRX::File)}.to_a
if parent.hrx? && files.any? {|file| _reaches_out?(file)}
return parent.with_real_files {yield}
end
outermost_new_dir = SassSpec::Util.each_directory(@path).find {|dir| !Dir.exist?(dir)}
files.each do |file|
path = File.join(@path, file.path)
FileUtils.mkdir_p(File.dirname(path))
File.write(path, file.content)
end
yield
ensure
FileUtils.rm_rf(outermost_new_dir) if outermost_new_dir
end
# Returns an HRX representation of this directory.
def to_hrx
archive = HRX::Archive.new
glob("**/*").each do |path|
archive << HRX::File.new("#{self.path}/#{path}", read(path))
end
archive.to_hrx
end
def inspect
"#<SassSpec::Directory:#{@path}>"
end
def to_s
@path.to_s
end
private
# Returns whether `file` contains enough `../` references to reach outside
# this directory.
def _reaches_out?(file)
depth = file.path.count("/")
file.content.scan(%r{(?:\.\./)+}).any? {|match| match.count("/") > depth}
end
# Writes `@parent_archive` to disk.
def _write!
@parent_archive.write!(@parent_archive_path)
end
# Deletes `@parent_archive` from disk and from the archive cache.
def _delete_parent!
File.unlink(@parent_archive_path)
self.class._hrx_cache.delete(@parent_archive_path.sub(/\.hrx$/, ''))
end
end
<file_sep># frozen_string_literal: true
require 'rspec'
require 'aruba/rspec'
# Given the output of sass-spec,
# return the number of tests in
# each state (success, failed, etc)
def test_results(output)
results = {}
matches = output.match(
/(?<runs>\d+) runs, (?<assertions>\d+) assertions, (?<failures>\d+) failures, (?<errors>\d+) errors, (?<skips>\d+) skips/
)
matches.names.each { |k, v| results[k.to_sym] = matches[k].to_i }
results
end
# Gives a command string that Aruba should run for a unit test.
# This command calls sass-spec using the sass stub.
# It takes in the name of a fixture folder and an array of additional flags.
def run_sass(fixture_folder, additional_flags = [])
run_command(["#{Dir.pwd}/sass-spec.rb #{additional_flags.join(' ')}",
"--command '#{Dir.pwd}/tests/sass_stub'",
"#{Dir.pwd}/tests/fixtures/#{fixture_folder}"].join(' '))
end
<file_sep>source 'https://rubygems.org'
gem "minitest", "~> 5.8"
gem "command_line_reporter", '~> 3.0'
gem "ruby-terminfo", '~> 0.1.1'
gem "diffy", '~> 3.1'
gem "hrx", '~> 1.0'
gem 'rspec'
gem 'aruba'
| 3775a85e8e8841aa000d62ade3bcfdf3a2c7883d | [
"Ruby"
] | 4 | Ruby | anthonyfok/sass-spec | 38e2d4ba071db1a5e385cd4fe94cd5b09f99a5d0 | 81445c8d86323bbadf17a6850a3bf13354938fca | |
refs/heads/main | <file_sep>[env:MetroWiFi]
platform = espressif8266
board = esp12e
framework = arduino
board_build.ldscript = eagle.flash.4m1m.ld
board_build.filesystem = littlefs
upload_flags =
--auth=veneno
--spiffs
upload_protocol = espota
upload_port = 192.168.4.1<file_sep>#include <Arduino.h>
#include <ESP8266WiFi.h>
#include <ESP8266mDNS.h>
#include <WiFiUdp.h>
#include <ArduinoOTA.h>
#include <PubSubClient.h>
#include <ESPAsyncWebServer.h>
#include <ESPAsyncTCP.h>
#include <ArduinoJson.h>
#include <DNSServer.h>
#include <string.h>
#include <LittleFS.h>
#define pin_rst 4
#define pin_pwr 5
#define pin_dbg 13
#define pin_read 14 //Botón para realizar una lectura del metro y en boot del módulo RESET de las CFG
#define CONFIGFILE "/config.json"
#define SALVAM "/salva.json"
//ID dispositivo
const char *device_name = "METRO";
bool rst_sistema, leerMetro, spiffsActive = false;
const int mqtt_port = 1883;
int estado;
long ask_sta;
String ID, Kwh, Invert, ask_mqtt;
const char *ota_password = "<PASSWORD>";
const char *ota_hash = "F81F10E631F3C519D5A44D8DA976FB67";
String cliente_id();
void modo_sta();
void modo_ap();
void mqtt_connection();
void reconnect();
void ask();
void Tx_0();
void Tx_CmdLeer();
void Tx_ACK();
void Tx(byte *sec, byte n);
struct Config
{
int modo;
int rst;
String ssid;
String passwd;
int delay_ap;
String mqtt_svr;
String mqtt_user;
String mqtt_pass;
String mqtt_topic;
String mqtt_ask;
float read_i;
};
struct SalvaMetro
{
String mID;
String mKwh;
String mInvert;
};
Config config;
SalvaMetro salva;
AsyncWebSocket ws("/ws");
AsyncEventSource events("/events");
DNSServer dns_server;
AsyncWebServer server(80);
WiFiClient espClient;
PubSubClient clientM(espClient);
void loadConfiguration(const char *filename, Config &config)
{
File file = LittleFS.open(CONFIGFILE, "r");
if (!file)
{
//Serial.println("Failed to open config file for reading");
return;
}
StaticJsonDocument<512> doc;
DeserializationError error = deserializeJson(doc, file);
if (error)
{
//Serial.println("Failed to read file, using default configuration");
}
config.modo = doc["modo"] | 0;
config.rst = doc["rst"] | 0;
config.ssid = doc["ssid"].as<String>();
config.passwd = doc["passwd"].as<String>();
config.delay_ap = doc["delay_ap"] | 30;
config.mqtt_svr = doc["mqtt_svr"].as<String>();
config.mqtt_user = doc["mqtt_user"].as<String>();
config.mqtt_pass = doc["mqtt_pass"].as<String>();
config.mqtt_topic = doc["mqtt_topic"].as<String>();
config.mqtt_ask = doc["mqtt_ask"].as<String>();
config.read_i = doc["read_i"] | 0.2;
file.close();
}
void saveConfiguration(const char *filename, const Config &config)
{
File file = LittleFS.open(CONFIGFILE, "w");
StaticJsonDocument<512> doc;
doc["modo"] = config.modo;
doc["rst"] = config.rst;
doc["ssid"] = config.ssid;
doc["passwd"] = <PASSWORD>;
doc["delay_ap"] = config.delay_ap;
doc["mqtt_svr"] = config.mqtt_svr;
doc["mqtt_user"] = config.mqtt_user;
doc["mqtt_pass"] = config.mqtt_pass;
doc["mqtt_topic"] = config.mqtt_topic;
doc["mqtt_ask"] = config.mqtt_ask;
doc["read_i"] = config.read_i;
if (serializeJson(doc, file) == 0)
{
//Serial.println(F("Failed to write to file"));
}
file.close();
}
void loadMetro(const char *filename, SalvaMetro &salva)
{
File file = LittleFS.open(SALVAM, "r");
if (!file)
{
//Serial.println("Failed to open config file for reading");
return;
}
StaticJsonDocument<256> doc;
DeserializationError error = deserializeJson(doc, file);
if (error)
{
//Serial.println("Failed to read file, using default configuration");
}
salva.mID = doc["mID"].as<String>();
salva.mKwh = doc["mKwh"].as<String>();
salva.mInvert = doc["mInvert"].as<String>();
file.close();
}
void saveMetro(const char *filename, SalvaMetro &salva)
{
File file = LittleFS.open(SALVAM, "w");
if (!file)
{
//Serial.println("Failed to open config file for reading");
return;
}
StaticJsonDocument<256> doc;
doc["mID"] = salva.mID;
doc["mKwh"] = salva.mKwh;
doc["mInvert"] = salva.mInvert;
if (serializeJson(doc, file) == 0)
{
//Serial.println(F("Failed to write to file"));
}
file.close();
}
String processor(const String &var)
{
if (var == "MODO")
{
String result = String(config.modo);
return result;
}
else if (var == "MODOAP")
{
if (config.modo == 0)
{
return "selected";
}
else
{
return "";
}
}
else if (var == "MODOSTA")
{
if (config.modo == 1)
{
return "selected";
}
else
{
return "";
}
}
if (var == "RST")
{
String result = String(config.rst);
return result;
}
else if (var == "RSTON")
{
if (config.rst == 0)
{
return "checked";
}
else
{
return "";
}
}
else if (var == "RSTOFF")
{
if (config.rst == 1)
{
return "checked";
}
else
{
return "";
}
}
else if (var == "SSID")
{
return config.ssid;
}
else if (var == "PASSWD")
{
return config.passwd;
}
else if (var == "DELAY_AP")
{
String result = String(config.delay_ap);
return result;
}
else if (var == "MQTT_SVR")
{
String result = String(config.mqtt_svr);
return result;
}
else if (var == "MQTT_USER")
{
String result = String(config.mqtt_user);
return result;
}
else if (var == "MQTT_PASS")
{
String result = String(config.mqtt_pass);
return result;
}
else if (var == "MQTT_TOPIC")
{
String result = String(config.mqtt_topic);
return result;
}
else if (var == "MQTT_ASK")
{
String result = String(config.mqtt_ask);
return result;
}
else if (var == "READ_I")
{
String result = String(config.read_i);
return result;
}
else if (var == "MID")
{
String result = cliente_id();
return result;
}
else if (var == "ID")
{
String result = ID;
return result;
}
else if (var == "Kwh")
{
String result = Kwh;
return result;
}
else if (var == "Invert")
{
String result = Invert;
return result;
}
else if (var == "RSSI")
{
String result = String(WiFi.RSSI());
return result;
}
return String();
}
//Configuraciones WiFi
void modo_sta()
{
WiFi.hostname(cliente_id());
WiFi.mode(WIFI_STA);
WiFi.begin(config.ssid, config.passwd);
int count = 0;
while (WiFi.status() != WL_CONNECTED)
{
count = count + 1;
delay(300);
if (count >= config.delay_ap)
{
count = 0;
estado = 0;
modo_ap();
break;
}
}
}
void modo_ap()
{
WiFi.mode(WIFI_AP);
WiFi.hostname(cliente_id());
WiFi.softAP(cliente_id(), config.passwd, 11, false, 1);
IPAddress ap_ip = {192, 168, 4, 1};
IPAddress subnet = {255, 255, 255, 0};
WiFi.softAPConfig(ap_ip, ap_ip, subnet);
}
//Obtener ID_Chip
String cliente_id()
{
String temp_x = device_name;
temp_x += '_';
temp_x += String(ESP.getChipId());
char temp_y[temp_x.length()];
temp_x.toCharArray(temp_y, temp_x.length());
return temp_y;
}
//Reconectar MQTT
void mqtt_connection()
{
if (!clientM.connected())
{
reconnect();
}
clientM.loop();
}
void reconnect()
{
int count = 0;
while (!clientM.connected())
{
count = count + 1;
if (count >= 50)
{
estado = 2;
break;
}
if (clientM.connect(device_name, config.mqtt_user.c_str(), config.mqtt_pass.c_str()))
{
clientM.subscribe(config.mqtt_ask.c_str());
}
else
{
delay(200);
}
}
}
void callback(char *topic, byte *payload, unsigned int length)
{
payload[length] = '\0';
ask_mqtt = (char *)payload;
}
//Resetear sistema
void resetsis()
{
if (rst_sistema)
{
digitalWrite(pin_pwr, LOW);
digitalWrite(pin_dbg, LOW);
delay(2000);
for (int i = 0; i < 10; i++)
{
digitalWrite(pin_dbg, !digitalRead(pin_dbg));
delay(200);
}
digitalWrite(pin_rst, HIGH);
}
}
class CaptiveRequestHandler : public AsyncWebHandler
{
public:
CaptiveRequestHandler() {}
virtual ~CaptiveRequestHandler() {}
bool canHandle(AsyncWebServerRequest *request)
{
//request->addInterestingHeader("ANY");
return true;
}
void handleRequest(AsyncWebServerRequest *request)
{
request->send(LittleFS, "/index.html", String(), false, processor);
}
};
void setup()
{
rst_sistema = false;
leerMetro = false;
pinMode(pin_read, INPUT);
pinMode(pin_dbg, OUTPUT);
pinMode(pin_pwr, OUTPUT);
pinMode(pin_rst, OUTPUT);
digitalWrite(pin_dbg, LOW);
digitalWrite(pin_rst, LOW);
digitalWrite(pin_pwr, HIGH);
digitalWrite(pin_dbg, HIGH);
Serial.begin(1200, SERIAL_7E1);
Serial1.begin(76923, SERIAL_6N1); //Configuración UART1 (TX1 --> GPIO2)
if (LittleFS.begin())
{
spiffsActive = true;
loadConfiguration(CONFIGFILE, config);
loadMetro(SALVAM, salva);
}
else
{
//Serial.println("Unable to activate SPIFFS");
}
delay(3000);
if (digitalRead(pin_read) && config.rst == 0)
{ //Reset por defecto
digitalWrite(pin_pwr, LOW);
digitalWrite(pin_dbg, HIGH);
config.modo = 0;
config.rst = 0;
config.ssid = "METRO";
config.passwd = "<PASSWORD>";
config.delay_ap = 30;
config.mqtt_svr = "";
config.mqtt_user = "";
config.mqtt_pass = "";
config.mqtt_topic = "";
config.mqtt_ask = "";
config.read_i = 0.2;
saveConfiguration(CONFIGFILE, config);
salva.mID = "0000";
salva.mKwh = "0000";
salva.mInvert = "0000";
saveMetro(SALVAM, salva);
delay(2000);
rst_sistema = true;
}
//Chekar en que modo cargar la WiFi
estado = config.modo;
if (estado == 0)
{
modo_ap();
}
if (estado == 1 || estado == 2)
{
modo_sta();
}
clientM.setServer(config.mqtt_svr.c_str(), mqtt_port);
clientM.setCallback(callback);
server.on("/", HTTP_GET, [](AsyncWebServerRequest *request) {
request->send(LittleFS, "/index.html", String(), false, processor);
});
server.on("/ask_env", HTTP_GET, [](AsyncWebServerRequest *request) {
ask_mqtt = "ask";
request->redirect("/");
});
server.on("/set_config", HTTP_GET, [](AsyncWebServerRequest *request) {
int config_changed = 0;
if (request->hasParam("modo"))
{
String p = request->getParam("modo")->value();
int modo = p.toInt();
config.modo = modo;
config_changed = 1;
}
if (request->hasParam("rst"))
{
String p = request->getParam("rst")->value();
int rst = p.toInt();
config.rst = rst;
config_changed = 1;
}
if (request->hasParam("ssid"))
{
String p = request->getParam("ssid")->value();
config.ssid = p;
config_changed = 1;
}
if (request->hasParam("passwd"))
{
String p = request->getParam("passwd")->value();
config.passwd = p;
config_changed = 1;
}
if (request->hasParam("delay_ap"))
{
String p = request->getParam("delay_ap")->value();
int delay_ap = p.toInt();
config.delay_ap = delay_ap;
config_changed = 1;
}
if (request->hasParam("mqtt_svr"))
{
String p = request->getParam("mqtt_svr")->value();
config.mqtt_svr = p;
config_changed = 1;
}
if (request->hasParam("mqtt_user"))
{
String p = request->getParam("mqtt_user")->value();
config.mqtt_user = p;
config_changed = 1;
}
if (request->hasParam("mqtt_pass"))
{
String p = request->getParam("mqtt_pass")->value();
config.mqtt_pass = p;
config_changed = 1;
}
if (request->hasParam("mqtt_topic"))
{
String p = request->getParam("mqtt_topic")->value();
config.mqtt_topic = p;
config_changed = 1;
}
if (request->hasParam("mqtt_ask"))
{
String p = request->getParam("mqtt_ask")->value();
config.mqtt_ask = p;
config_changed = 1;
}
if (request->hasParam("read_i"))
{
String p = request->getParam("read_i")->value();
float read_i = p.toFloat();
config.read_i = read_i;
config_changed = 1;
}
if (config_changed == 1)
{
//Serial.println("Config cambiada, guardando");
saveConfiguration(CONFIGFILE, config);
//Serial.println("Config guardada, redireccionando");
rst_sistema = true;
request->redirect("/");
}
request->send(LittleFS, "/set_config.html", String(), false, processor);
});
server.begin();
ArduinoOTA.setPassword(ota_password);
ArduinoOTA.setPasswordHash(ota_hash);
ArduinoOTA.setHostname("METRO");
ArduinoOTA.begin();
dns_server.start(53, "*", WiFi.softAPIP());
server.addHandler(new CaptiveRequestHandler()).setFilter(ON_AP_FILTER);
server.addHandler(&ws);
digitalWrite(pin_pwr, LOW);
digitalWrite(pin_dbg, LOW);
ID = salva.mID;
Kwh = salva.mKwh;
Invert = salva.mInvert;
}
void loop()
{
ArduinoOTA.handle();
resetsis();
dns_server.processNextRequest();
/*Modo Punto de Acceso
Módulo funciona como Hotspot.
Se pueden ver las lecturas del metro:
-APK Kilowatt
-Interfaz WEB
*/
if (estado == 0)
{
digitalWrite(pin_pwr, HIGH);
digitalWrite(pin_dbg, LOW);
if (WiFi.softAPgetStationNum() >= 1)
{
if (millis() - ask_sta > config.read_i * 3.6e+6 || digitalRead(pin_read) || ask_mqtt == "ask")
{
leerMetro = true;
while (leerMetro)
{
ask();
if (!leerMetro)
{
ask_mqtt = "";
ask_sta = millis();
break;
}
}
}
}
}
/*Modo cliente A
Módulo conectado a una red WiFi Local con Broker MQTT.
Se pueden ver las lecturas del metro:
-APK Kilowatt (Pendiente)
-Interfaz WEB
-MQTT
*/
if (estado == 1)
{
digitalWrite(pin_pwr, LOW);
digitalWrite(pin_dbg, HIGH);
mqtt_connection();
if ((millis() - ask_sta > config.read_i * 3.6e+6) || digitalRead(pin_read) || ask_mqtt == "ask")
{
leerMetro = true;
while (leerMetro)
{
ask();
if (!leerMetro)
{
mqtt_connection();
StaticJsonDocument<256> doc;
doc["mid"] = cliente_id();
doc["id"] = ID;
doc["kwh"] = Kwh;
doc["invert"] = Invert;
doc["rssi"] = String(WiFi.RSSI());
//Creamos un String para rellenarlo con el JSON
char buffer[256];
//Serializamos el JSON como String
serializeJson(doc, buffer);
//Publicamos el JSON
clientM.publish(String(config.mqtt_topic).c_str(), buffer, true);
ask_mqtt = "";
ask_sta = millis();
break;
}
}
}
}
/*Modo cliente B
Módulo conectado a una red WiFi Local sin Broker MQTT.
Se pueden ver las lecturas del metro:
-APK Kilowatt (Pendiente)
-Interfaz WEB
*/
if (estado == 2)
{
digitalWrite(pin_pwr, LOW);
analogWrite(pin_dbg, 90);
if (millis() - ask_sta > config.read_i * 3.6e+6 || digitalRead(!pin_read) || ask_mqtt == "ask")
{
leerMetro = true;
while (leerMetro)
{
ask();
if (!leerMetro)
{
ask_mqtt = "";
ask_sta = millis();
break;
}
}
}
}
}
void ask()
{
//char ACK[] = {0x06, 0x30, 0x32, 0x30, 0x0d, 0x0a};
boolean found = false;
String tmp_ID = "";
String tmp_Kwh = "";
String tmp_Invert = "";
Serial.flush();
//------------------------------------------
Tx_CmdLeer(); //Serial.println("/?!");
//------------------------------------------
String line = Serial.readStringUntil('\n');
while (line && line.length() > 0)
{
resetsis();
if (line.equals("/ZTY2ZT\r"))
found = true;
line = Serial.readStringUntil('\n');
}
if (found)
{
Serial.flush();
//-------------------------------------------
Tx_ACK(); //Serial.write(ACK, 6);
//-------------------------------------------
line = Serial.readStringUntil('\n');
while (line && line.length() > 0)
{
int start = line.indexOf("96.1.0(");
if (start != -1)
{
start += 7;
int end = line.indexOf(")", start);
if (end != -1 && end - start == 12)
{
tmp_ID = line.substring(start, end);
}
}
else
{
int start = line.indexOf("1.8.0(");
if (start != -1)
{
start += 6;
int end = line.indexOf("*kWh)", start);
if (end != -1 && end - start == 9)
{
tmp_Kwh = line.substring(start, end);
}
}
else
{
int start = line.indexOf("2.8.0(");
if (start != -1)
{
start += 6;
int end = line.indexOf("*kWh)", start);
if (end != -1 && end - start == 9)
{
tmp_Invert = line.substring(start, end);
}
}
}
}
line = Serial.readStringUntil('\n');
}
if (tmp_ID.length() > 0 && tmp_Kwh.length() > 0 && tmp_Invert.length() > 0)
{
ID = tmp_ID;
Kwh = tmp_Kwh;
Invert = tmp_Invert;
salva.mID = ID;
salva.mKwh = Kwh;
salva.mInvert = Invert;
saveMetro(SALVAM, salva);
leerMetro = false;
}
}
}
void Tx_0()
{
byte ir38[] = {0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15};
Serial1.write(ir38, 8);
Serial1.flush();
}
//
void Tx_CmdLeer()
{ //Ya incluye el bit de paridad
byte sec1[] = {0xAF, 0x3F, 0x21, 0x8D, 0x0A};
Tx(sec1, 5);
}
//
void Tx_ACK()
{ //Ya incluye el bit de paridad
byte sec2[] = {0x06, 0x30, 0xB2, 0x30, 0x8D, 0x0A};
Tx(sec2, 6);
}
//
void Tx(byte *sec, byte n)
{
for (byte j = 0; j < n; j++)
{
Tx_0(); //StartBit del byte
for (byte i = 0; i < 8; i++)
{ // Cada bit del byte
if (bitRead(*sec, i))
delayMicroseconds(832);
else
Tx_0();
}
delayMicroseconds(832); //StopBit del byte
sec++; //Próximo byte
}
}<file_sep>**Mainboard MetroWiFI(wip)**
[:parking:re release](https://github.com/arduCuba/MetroWiFi/releases/tag/Beta_4)


| 97f7c20c6394b6f6bb3c31a1a4d982523c72662b | [
"Markdown",
"C++",
"INI"
] | 3 | INI | arduCuba/MetroWiFi | fcfa4613b1b1b7c7a09d81f907899ad3cb96b7dc | d028dadb8a5b5835f15f852444d957ca6bf0a127 | |
refs/heads/master | <file_sep>import {Runtime, Inspector, Library} from "./gradient/runtime.js";
import notebook from "./gradient/gradient.3.2.js";
const renders = {
"gradient": "#gradient",
};
const runtime = new Runtime(Object.assign(new Library)).module(notebook, name => {
const selector = renders[name];
if (selector) { // key exists
return new Inspector(document.querySelector(selector));
} else {
return true;
}
});
var scrollTop = 0;
var gradientHeight;
var windowWidth;
var gradientOverlay = document.getElementById('gradient-overlay');
var initParallax = function () {
if (!gradientOverlay) return;
setInitialValues();
updateStyle();
window.addEventListener('scroll', throttleScroll, false);
window.addEventListener('resize', throttleResize, false);
};
var setInitialValues = function () {
gradientHeight = gradientOverlay.offsetHeight;
};
var updateScrollValues = function () {
scrollTop = window.pageYOffset;
updateStyle();
};
var updateStyle = function () {
gradientOverlay.style.opacity = Math.min((scrollTop/gradientHeight*0.5), 0.5);
};
var eventTimeout;
var throttleResize = function () { // throttle to 15fps
if (!eventTimeout) {
eventTimeout = setTimeout(function () {
eventTimeout = null;
handleResize();
}, 66);
}
};
var throttleScroll = function () { // throttle to 15fps
if (!eventTimeout) {
eventTimeout = setTimeout(function () {
eventTimeout = null;
handleScroll();
}, 16);
}
};
var handleResize = function () {
setInitialValues();
updateScrollValues();
};
var handleScroll = function () {
updateScrollValues();
};
// init
document.addEventListener('DOMContentLoaded', function () {
initParallax();
});
<file_sep># escartem.github.io
This is my website. That's all.
| 29a439ed432cf1e1685e18f9515acc8510350ebe | [
"JavaScript",
"Markdown"
] | 2 | JavaScript | Escartem/escartem.github.io | 2994cd15a38b18708c494aab93a6bb95cd5defac | 116640a12f05288dc2f05dfb5d425b0bd13871bd | |
refs/heads/master | <file_sep>v0.1.12
- Avoid bundling PIXI and slugid
v0.1.7
- Configurable x field in options.xPosField
- Configurable y field in options.yPosField
- Configurable label field in options.labelField
v0.1.0
- First working version
<file_sep>import register from 'higlass-register';
import LabelledPointTrack from './LabelledPointTrack';
register({
name: 'LabelledPointTrack',
track: LabelledPointTrack,
config: LabelledPointTrack.config,
});
export default LabelledPointTrack;
<file_sep># Labelled Points Track for HiGlass
> Explore datasets containing millions of points with labels in HiGlass
[](http://higlass.io)
[](https://travis-ci.org/pkerpedjiev/higlass-labelled-points-track)

**Note**: This is the source code for the labelled points track only! You might want to check out the following repositories as well:
- HiGlass labelled points track (this repository): https://github.com/higlass/higlass-labelled-points-tracks
- HiGlass viewer: https://github.com/higlass/higlass
- HiGlass server: https://github.com/higlass/higlass-server
- HiGlass docker: https://github.com/higlass/higlass-docker
## Installation
```
npm install higlass-labelled-points-track
```
## Usage
To try this track out, head over to https://github.com/pkerpedjiev/million-primes
and start a server using the provided notebook.
1. Make sure you load this track prior to `hglib.js`. For example:
```
<script src="higlass-labelled-points-track.js"></script>
<script src="hglib.js"></script>
<script>
...
</script>
```
2. Now, configure the track in your view config and be happy!
```
{
...
{
server: 'http://localhost:8001/api/v1',
tilesetUid: 'blah',
type: 'labelled-points-track',
options: {
labelField: 'label',
xPosField: 'x',
yPosField: 'y'
},
},
...
}
```
Take a look at [`src/index.html`](src/index.html) for an example.
## Development
### Installation
```bash
$ git clone https://github.com/pkerpedjiev/labelled-points-track && higlass-labelled-points-track
$ npm install
```
### Commands
**Developmental server**: `npm start`
**Production build**: `npm run build`
| 4df872230d80c6f6be76617821c521871f2421f5 | [
"Markdown",
"JavaScript"
] | 3 | Markdown | higlass/higlass-labelled-points-track | 6d7e6aa5f564130a92aa820d4465385d13af2a19 | 27c670b207494cabd1c7e8947a5ba65f22372b6e | |
refs/heads/master | <file_sep>/*
* Paint ;D
*/
package whiteboardapplication;
import whiteboarddrawtools.*;
import whiteboardtools.*;
import javax.swing.*;
import whiteboardcontrols.*;
import java.awt.*;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
import java.io.*;
import java.util.Scanner;
public class PaintApplication extends JFrame
{
public ObjectOutputStream output;
public ObjectInputStream input;
public DrawPanel drawPanel;
protected PaintMenuBar menuBar;
protected ColorPicker colorPicker;
public PaintToolPanel paintTools;
public PaintApplication()
{
setSize(1000, 800);
setTitle("Whiteboard Client");
drawPanel = new DrawPanel();
menuBar = new PaintMenuBar();
colorPicker = new ColorPicker();
paintTools = new PaintToolPanel(new PencilToolPanel(Tool.PENCIL, 1));
GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(paintTools, javax.swing.GroupLayout.DEFAULT_SIZE, 200, javax.swing.GroupLayout.DEFAULT_SIZE)
.addComponent(colorPicker, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(drawPanel)
));
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(drawPanel)
.addGroup(layout.createSequentialGroup()
.addComponent(paintTools, javax.swing.GroupLayout.DEFAULT_SIZE, 640, javax.swing.GroupLayout.DEFAULT_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 100, Short.MAX_VALUE))
.addComponent(colorPicker, javax.swing.GroupLayout.PREFERRED_SIZE, 115, javax.swing.GroupLayout.PREFERRED_SIZE)))
);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setVisible(true);
synchronizeStartingColor();
}
@Override
public void addNotify() {
super.addNotify();
requestFocus();
}
public void synchronizeStartingColor()
{
colorPicker.currentClrPanel.setBackground(Color.black);
colorPicker.color = colorPicker.currentClrPanel.getBackground();
drawPanel.tool.setColor(colorPicker.currentClrPanel.getBackground());
drawPanel.setBrushColor(colorPicker.color);
}
public File getFileName()
{
JFileChooser fileChooser = new JFileChooser();
fileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
fileChooser.setCurrentDirectory(new File("/Users/Dhruv/Desktop"));
int result = fileChooser.showOpenDialog(this);
File fileName = fileChooser.getSelectedFile();
return fileName;
}
public void writeSketchToFile(File fileName)
{
try
{
for (int i=0; i<drawPanel.elements.size(); i++)
{
PaintElement elem = (PaintElement) drawPanel.elements.get(i);
output.writeObject(elem);
}
}
catch ( IOException exception )
{
System.err.println("Error writing to file.");
return;
}
}
public void loadElementsFromFile()
{
try
{
drawPanel.elements.clear();
while(true)
{
drawPanel.elements.add(input.readObject());
}
}
catch (IOException exception)
{
return;
}
catch (ClassNotFoundException classNotFoundException)
{
System.err.println("Unable to create object.");
}
}
public void loadFile(File fileName)
{
try
{
input = new ObjectInputStream(new FileInputStream(fileName));
}
catch(IOException ioException)
{
System.err.println("Error loading file: "+fileName);
return;
}
}
public void openFile(File fileName)
{
try
{
output = new ObjectOutputStream(new FileOutputStream(fileName));
}
catch(IOException ioException)
{
System.err.println("Error loading file: "+fileName);
return;
}
}
public void saveFile()
{
try
{
JFileChooser chooseDirec = new JFileChooser();
chooseDirec.setFileSelectionMode(JFileChooser.FILES_ONLY);
chooseDirec.showSaveDialog(Client.paint);
File file = chooseDirec.getSelectedFile();
file = new File(file+".png");
BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(file));
bufferedWriter.close();
openFile(file);
writeSketchToFile(file);
closeFile();
}
catch (IOException exception)
{
System.err.println("Error saving to new file.");
}
}
public void closeFile()
{
try
{
if (output != null)
output.close();
}
catch (IOException exception)
{
System.err.println("Error closing file");
System.exit(1);
}
}
}
| 110790c2117660e96f2a5cbd9a00cb0711d5c071 | [
"Java"
] | 1 | Java | SiddharthMalhotra/Shared-Whiteboard | ddbfdaf0ba9170fc58cfaf1bfdf689f72c90379e | 927b94b0bf873b896affbb6442d81361e45be2f8 | |
refs/heads/master | <repo_name>javadev/jsf-jdbc-sample-application<file_sep>/README.md
jsf-jdbc-sample-application
===========================
JSF 2 + jdbc sample application
<file_sep>/src/main/java/QBank/DAL/DataModel/AccountStatement.java
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package QBank.DAL.DataModel;
/**
*
* @author GilC
*/
public class AccountStatement {
private String Description;
private int Factor;
public AccountStatement()
{
}
public AccountStatement(String desc, int fac)
{
setDescription(desc);
setFactor(fac);
}
/**
* @return the Description
*/
public String getDescription() {
return Description;
}
/**
* @param Description the Description to set
*/
public void setDescription(String Description) {
this.Description = Description;
}
/**
* @return the Factor
*/
public int getFactor() {
return Factor;
}
/**
* @param Factor the Factor to set
*/
public void setFactor(int Factor) {
this.Factor = Factor;
}
}
<file_sep>/src/main/java/QBank/BL/AccountDetailsBean.java
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package QBank.BL;
import QBank.DAL.AccessMethods;
import QBank.DAL.DataModel.*;
import java.io.IOException;
import java.io.Serializable;
import java.sql.SQLException;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.HashSet;
import javax.enterprise.context.SessionScoped;
import javax.faces.context.FacesContext;
import javax.inject.Named;
import javax.servlet.ServletContext;
import java.util.List;
import java.util.Random;
/**
*
* @author GilC
*/
@Named
@SessionScoped
public class AccountDetailsBean implements Serializable
{
final int NUM_OF_DAYS = 7;
final int MAX_TRANS_COUNT = 3;
final int MAX_TRANS_AMOUNT = 2000;
final int MIN_TRANS_AMOUNT = 100;
ServletContext servletContext = (ServletContext) FacesContext.getCurrentInstance().getExternalContext().getContext();
private String AccountNum;
private String Owner;
private AccountData CurrentAccountData;
public void initAccountData()
throws IOException, SQLException
{
int intAccountNum = 0;
String query = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get("accountnum");
try
{
intAccountNum = Integer.parseInt(query);
}
catch (Exception ex)
{
FacesContext.getCurrentInstance().getExternalContext().redirect("./index.xhtml");
}
Account accountDetails = AccessMethods.GetAccountDetails(query);
if (accountDetails == null)
{
FacesContext.getCurrentInstance().getExternalContext().redirect("./index.xhtml");
}
setCurrentAccountData(GetFakeAccountData(intAccountNum));
setAccountNum(Integer.toString(intAccountNum));
setOwner(accountDetails.getName());
/*
foreach (GridViewRow curr in grvData.Rows)
{
if (int.Parse(curr.Cells[3].Text) > 0)
{
curr.Cells[3].CssClass = "PositiveBalance";
}
else
{
curr.Cells[3].CssClass = "NegativeBalance";
}
}*/
}
/**
* @return the CurrentAccountData
*/
public AccountData getCurrentAccountData() {
return CurrentAccountData;
}
/**
* @param CurrentAccountData the CurrentAccountData to set
*/
private void setCurrentAccountData(AccountData CurrentAccountData) {
this.CurrentAccountData = CurrentAccountData;
}
/**
* @return the NumOfDays
*/
public int getNumOfDays() {
return NUM_OF_DAYS;
}
/**
* @return the AccountNum
*/
public String getAccountNum() {
return AccountNum;
}
/**
* @param AccountNum the AccountNum to set
*/
public void setAccountNum(String AccountNum) {
this.AccountNum = AccountNum;
}
/**
* @return the Owner
*/
public String getOwner() {
return Owner;
}
/**
* @param Owner the Owner to set
*/
public void setOwner(String Owner) {
this.Owner = Owner;
}
public void setContextVariable(String Name, Object Value)
{
servletContext.setAttribute(Name, Value);
}
public Object getContextVariable(String Name)
{
return servletContext.getAttribute(Name);
}
protected AccountData GetFakeAccountData(int intAccountNum)
{
if (getContextVariable("Accounts") == null)
{
setContextVariable("Accounts", new ArrayList<AccountData>());
}
for (AccountData curr : (List<AccountData>)getContextVariable("Accounts"))
{
if (curr.getAccountNum() == intAccountNum)
{
return curr;
}
}
List<AccountData> temp = (List<AccountData>)getContextVariable("Accounts");
AccountData newcurr = new AccountData();
newcurr.setAccountNum(intAccountNum);
newcurr.setData(GenerateFakeAccountData(intAccountNum, NUM_OF_DAYS));
temp.add(newcurr);
setContextVariable("Accounts", temp);
return newcurr;
}
private String CurrentDateAddDays(int daysToAdd)
{
try
{
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Calendar c = Calendar.getInstance();
c.setTime(sdf.parse(new Date().toString()));
c.add(Calendar.DATE, daysToAdd); // number of days to add
return sdf.format(c.getTime());
}
catch (ParseException ex)
{
return new Date().toString();
}
}
private ArrayList<AccountDataRow> GenerateFakeAccountData(int intAccountNum, int intNumOfDays)
{
Random rand = new Random();
ArrayList<AccountStatement> tabAccountStatementDemo = new ArrayList<>();
tabAccountStatementDemo.add(new AccountStatement("INSTITUTION CREDIT", 1));
tabAccountStatementDemo.add(new AccountStatement("SAVE A-C CHARGE", -1));
tabAccountStatementDemo.add(new AccountStatement("STANDING ORDER", -1));
tabAccountStatementDemo.add(new AccountStatement("CREDITING OF BANKS", -1));
tabAccountStatementDemo.add(new AccountStatement("MASTERCARD CORPORATE", -1));
tabAccountStatementDemo.add(new AccountStatement("INTERNATIONAL VISA", -1));
tabAccountStatementDemo.add(new AccountStatement("ATM WITHDRAW", -1));
tabAccountStatementDemo.add(new AccountStatement("ATM WITHDRAW", -1));
tabAccountStatementDemo.add(new AccountStatement("ATM WITHDRAW", -1));
tabAccountStatementDemo.add(new AccountStatement("ATM WITHDRAW", -1));
tabAccountStatementDemo.add(new AccountStatement("LOANS", -1));
tabAccountStatementDemo.add(new AccountStatement("SALARY", 1));
tabAccountStatementDemo.add(new AccountStatement("STOCK REVENIEWS", 1));
tabAccountStatementDemo.add(new AccountStatement("CASH DEPOSIT", 1));
tabAccountStatementDemo.add(new AccountStatement("CASH DEPOSIT", 1));
tabAccountStatementDemo.add(new AccountStatement("CASH DEPOSIT", 1));
tabAccountStatementDemo.add(new AccountStatement("DIRECT DEBIT", -1));
tabAccountStatementDemo.add(new AccountStatement("CHECK DEPOSIT", 1));
tabAccountStatementDemo.add(new AccountStatement("CHECK WITHDRAW", -1));
tabAccountStatementDemo.add(new AccountStatement("MORTAGE PAYMENT", -1));
ArrayList<AccountDataRow> ret = new ArrayList<>();
int intBalance = rand.nextInt(10000) - 5000;
int intTransNum = rand.nextInt(100000);
for (int i = 0; i < intNumOfDays; i++)
{
int intTransCount = rand.nextInt(MAX_TRANS_COUNT);
for (int j = 0; j < intTransCount; j++)
{
int k = rand.nextInt(tabAccountStatementDemo.size() - 1);
int creditdebit = tabAccountStatementDemo.get(k).getFactor() * (rand.nextInt(MAX_TRANS_AMOUNT - MIN_TRANS_AMOUNT) + MIN_TRANS_AMOUNT);
intBalance = intBalance + creditdebit;
ret.add(new AccountDataRow(CurrentDateAddDays(intNumOfDays * (-1) + i),
tabAccountStatementDemo.get(k).getDescription(),
creditdebit,
intBalance,
Integer.toString(intTransNum++)));
}
}
return ret;
}
}<file_sep>/src/main/java/QBank/DAL/DataModel/Account.java
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package QBank.DAL.DataModel;
/**
*
* @author GilC
*/
public class Account {
private String AccountNumber = "";
private String Password = "";
private String Name = "";
public Account(String strAccountNumber, String strPassword, String strName)
{
AccountNumber = strAccountNumber;
Password = <PASSWORD>;
Name = strName;
}
/**
* @return the AccountNumber
*/
public String getAccountNumber() {
return AccountNumber;
}
/**
* @param AccountNumber the AccountNumber to set
*/
public void setAccountNumber(String AccountNumber) {
this.AccountNumber = AccountNumber;
}
/**
* @return the Password
*/
public String getPassword() {
return Password;
}
/**
* @param Password the Password to set
*/
public void setPassword(String Password) {
this.Password = Password;
}
/**
* @return the Name
*/
public String getName() {
return Name;
}
/**
* @param Name the Name to set
*/
public void setName(String Name) {
this.Name = Name;
}
}
<file_sep>/src/main/webapp/accountdetails.xhtml
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core">
<h:body>
<ui:composition template="./commonLayout.xhtml">
<ui:define name="content">
<f:event listener="#{accountDetailsBean.initAccountData()}" type="preRenderView" />
Account number: #{accountDetailsBean.accountNum}<br />Owner: #{accountDetailsBean.owner}<br />
<b><Last #{accountDetailsBean.numOfDays} days></b> <a href="">Last 30 days</a> <a href="">Last 60 days</a>
<h:dataTable value="#{accountDetailsBean.currentAccountData.data}" var="o" class="accountDetailsTable" border="1">
<h:column>
<!-- column header -->
<f:facet name="header">Transaction date</f:facet>
<!-- row record -->
#{o.date.toString()}
</h:column>
<h:column>
<!-- column header -->
<f:facet name="header">Transaction description</f:facet>
<!-- row record -->
#{o.description}
</h:column>
<h:column>
<!-- column header -->
<f:facet name="header">Credit/Debit</f:facet>
<!-- row record -->
#{o.creditDebit}
</h:column>
<h:column>
<!-- column header -->
<f:facet name="header">Balance</f:facet>
<!-- row record -->
<span class="#{0 gt o.balance ? 'NegativeBalance' : 'PositiveBalance'}">#{o.balance}</span>
</h:column>
<h:column>
<!-- column header -->
<f:facet name="header">Transaction No.</f:facet>
<!-- row record -->
#{o.transactionNumber}
</h:column>
</h:dataTable>
</ui:define>
</ui:composition>
</h:body>
</html>
<file_sep>/src/main/java/QBank/DAL/DataModel/AccountData.java
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package QBank.DAL.DataModel;
import java.util.List;
/**
*
* @author GilC
*/
public class AccountData
{
private int AccountNum;
private List<AccountDataRow> Data;
/**
* @return the AccountNum
*/
public int getAccountNum() {
return AccountNum;
}
/**
* @param AccountNum the AccountNum to set
*/
public void setAccountNum(int AccountNum) {
this.AccountNum = AccountNum;
}
/**
* @return the Data
*/
public List<AccountDataRow> getData() {
return Data;
}
/**
* @param Data the Data to set
*/
public void setData(List<AccountDataRow> Data) {
this.Data = Data;
}
}
<file_sep>/src/main/java/QBank/BL/SearcherBean.java
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package QBank.BL;
import java.io.Serializable;
import java.util.Random;
import javax.enterprise.context.SessionScoped;
import javax.inject.Named;
import QBank.DAL.DataModel.*;
import QBank.DAL.*;
import java.io.IOException;
import java.sql.SQLException;
import java.util.List;
import javax.faces.context.FacesContext;
@Named
@SessionScoped
public class SearcherBean implements Serializable {
private String strSearch = "";
private List<SiteSearch> arrResults = null;
public SearcherBean() {}
public String getUserSearch()
{
return strSearch;
}
public void setUserSearch(String user_search)
throws SQLException
{
strSearch = user_search;
setResults(AccessMethods.SearchSite(strSearch));
}
/**
* @return the arrResults
*/
public List<SiteSearch> getResults() {
return arrResults;
}
/**
* @param arrResults the arrResults to set
*/
private void setResults(List<SiteSearch> arrResults) {
this.arrResults = arrResults;
}
public void redirectToSearch() throws IOException
{
FacesContext.getCurrentInstance().getExternalContext().redirect("./searchresults.xhtml?search=" + this.getUserSearch());
}
public void initSearch()
throws SQLException
{
String query = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get("search");
if (query != null && !query.equals(""))
{
setUserSearch(query);
}
}
}
<file_sep>/src/main/webapp/about.xhtml
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets">
<h:body>
<ui:composition template="./commonLayout.xhtml">
<ui:define name="content">
<h2>
About
</h2>
<p>
Q.Bank has a 150 year history in South Africa and started building a franchise in the Rest of Africa in the early 1990s. We currently operate in 18 countries on the African continent, including South Africa, as well as in other selected emerging markets.
Our strategy is to build the leading African financial services organisation using all our competitive advantages to the full. We will focus on delivering superior sustainable shareholder value by serving the needs of our customers through first-class, on-the-ground, operations in chosen countries in Africa. We will also connect other selected emerging markets to Africa and to each other, applying our sector expertise, particularly in natural resources, globally. Our key differentiator is people who are passionate about our strategy wherever in the world they are based.
We organise ourselves as three business units but present ourselves as one. Our three main pillars of business are Personal and Business Banking, Corporate and Investment Banking, and Wealth – Liberty.
Q.Bank Group is listed on the JSE Limited, share code SBK, and the Namibian Stock Exchange, share code SNB. Normalised headline earnings for 2012 were R15 billion ($1.8 billion), total assets were over R1 557 billion (approximately $184 billion) and we employed approximately 49 000 people (including Liberty) across all geographies. Q.Bank’s market capitalisation at 31 December 2012 was R191 billion (approximately $23 billion). Q.Bank has 1 248 branches, including loan centres, and 8 464 ATMs.
</p>
</ui:define>
</ui:composition>
</h:body>
</html>
<file_sep>/src/main/java/QBank/DAL/DataModel/CreditCard.java
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package QBank.DAL.DataModel;
import java.util.*;
/**
*
* @author GilC
*/
public class CreditCard {
private String CC = "";
private String FirstName = "";
private String LastName = "";
private Date ValidTill = null;
public CreditCard(String strFirstName, String strLastName, String strCC, Date dateValidTill)
{
FirstName = strFirstName;
LastName = strLastName;
CC = strCC;
ValidTill = dateValidTill;
}
/**
* @return the CC
*/
public String getCC() {
return CC;
}
/**
* @param CC the CC to set
*/
public void setCC(String CC) {
this.CC = CC;
}
/**
* @return the FirstName
*/
public String getFirstName() {
return FirstName;
}
/**
* @param FirstName the FirstName to set
*/
public void setFirstName(String FirstName) {
this.FirstName = FirstName;
}
/**
* @return the LastName
*/
public String getLastName() {
return LastName;
}
/**
* @param LastName the LastName to set
*/
public void setLastName(String LastName) {
this.LastName = LastName;
}
/**
* @return the ValidTill
*/
public Date getValidTill() {
return ValidTill;
}
/**
* @param ValidTill the ValidTill to set
*/
public void setValidTill(Date ValidTill) {
this.ValidTill = ValidTill;
}
}
| cd643fb4bb156bafd370c613e6372b68f6f02706 | [
"Markdown",
"Java",
"HTML"
] | 9 | Markdown | javadev/jsf-jdbc-sample-application | 20b1ad14d8786e53dab22d5029998648d101ab9a | 539206514f59def94215f0296da7397885cf4b5d | |
refs/heads/master | <file_sep>/* Testing Code */
#include <limits.h>
#include <math.h>
/* Routines used by floation point test code */
/* Convert from bit level representation to floating point number */
float u2f(unsigned u) {
union {
unsigned u;
float f;
} a;
a.u = u;
return a.f;
}
/* Convert from floating point number to bit-level representation */
unsigned f2u(float f) {
union {
unsigned u;
float f;
} a;
a.f = f;
return a.u;
}
//1
int test_bitNor(int x, int y)
{
return ~(x|y);
}
int test_isTmin(int x) {
return x == 0x80000000;
}
//2
int test_allOddBits(int x) {
int i;
for (i = 1; i < 32; i+=2)
if ((x & (1<<i)) == 0)
return 0;
return 1;
}
int test_negate(int x) {
return -x;
}
//3
int test_conditional(int x, int y, int z)
{
return x?y:z;
}
int test_multFiveEighths(int x)
{
return (x*5)/8;
}
//4
int test_logicalNeg(int x)
{
return !x;
}
//float
unsigned test_floatNegate(unsigned uf) {
float f = u2f(uf);
float nf = -f;
if (isnan(f))
return uf;
else
return f2u(nf);
}
int test_floatIsEqual(unsigned uf, unsigned ug) {
float f = u2f(uf);
float g = u2f(ug);
return f == g;
}
unsigned test_floatScale2(unsigned uf) {
float f = u2f(uf);
float tf = 2*f;
if (isnan(f))
return uf;
else
return f2u(tf);
}
int test_floatFloat2Int(unsigned uf) {
float f = u2f(uf);
int x = (int) f;
return x;
}
<file_sep>//1
int bitNor(int, int);
int test_bitNor(int, int);
int isTmin(int);
int test_isTmin(int);
//2
int allOddBits();
int test_allOddBits();
int negate(int);
int test_negate(int);
//3
int conditional(int, int, int);
int test_conditional(int, int, int);
int multFiveEighths(int);
int test_multFiveEighths(int);
//4
int logicalNeg(int);
int test_logicalNeg(int);
//float
unsigned floatNegate(unsigned);
unsigned test_floatNegate(unsigned);
int floatIsEqual(unsigned, unsigned);
int test_floatIsEqual(unsigned, unsigned);
unsigned floatScale2(unsigned);
unsigned test_floatScale2(unsigned);
int floatFloat2Int(unsigned);
int test_floatFloat2Int(unsigned);
<file_sep>/*
* CS:APP Data Lab
*
* <NAME>
* USERID: mib222
* bits.c - Source file with your solutions to the Lab.
* This is the file you will hand in to your instructor.
*
* WARNING: Do not include the <stdio.h> header; it confuses the dlc
* compiler. You can still use printf for debugging without including
* <stdio.h>, although you might get a compiler warning. In general,
* it's not good practice to ignore compiler warnings, but in this
* case it's OK.
*/
#if 0
/*
* Instructions to Students:
*
* STEP 1: Read the following instructions carefully.
*/
You will provide your solution to the Data Lab by
editing the collection of functions in this source file.
INTEGER CODING RULES:
Replace the "return" statement in each function with one
or more lines of C code that implements the function. Your code
must conform to the following style:
int Funct(arg1, arg2, ...) {
/* brief description of how your implementation works */
int var1 = Expr1;
...
int varM = ExprM;
varJ = ExprJ;
...
varN = ExprN;
return ExprR;
}
Each "Expr" is an expression using ONLY the following:
1. Integer constants 0 through 255 (0xFF), inclusive. You are
not allowed to use big constants such as 0xffffffff.
2. Function arguments and local variables (no global variables).
3. Unary integer operations ! ~
4. Binary integer operations & ^ | + << >>
Some of the problems restrict the set of allowed operators even further.
Each "Expr" may consist of multiple operators. You are not restricted to
one operator per line.
You are expressly forbidden to:
1. Use any control constructs such as if, do, while, for, switch, etc.
2. Define or use any macros.
3. Define any additional functions in this file.
4. Call any functions.
5. Use any other operations, such as &&, ||, -, or ?:
6. Use any form of casting.
7. Use any data type other than int. This implies that you
cannot use arrays, structs, or unions.
You may assume that your machine:
1. Uses 2s complement, 32-bit representations of integers.
2. Performs right shifts arithmetically.
3. Has unpredictable behavior when shifting if the shift amount
is less than 0 or greater than 31.
EXAMPLES OF ACCEPTABLE CODING STYLE:
/*
* pow2plus1 - returns 2^x + 1, where 0 <= x <= 31
*/
int pow2plus1(int x) {
/* exploit ability of shifts to compute powers of 2 */
return (1 << x) + 1;
}
/*
* pow2plus4 - returns 2^x + 4, where 0 <= x <= 31
*/
int pow2plus4(int x) {
/* exploit ability of shifts to compute powers of 2 */
int result = (1 << x);
result += 4;
return result;
}
FLOATING POINT CODING RULES
For the problems that require you to implement floating-point operations,
the coding rules are less strict. You are allowed to use looping and
conditional control. You are allowed to use both ints and unsigneds.
You can use arbitrary integer and unsigned constants. You can use any arithmetic,
logical, or comparison operations on int or unsigned data.
You are expressly forbidden to:
1. Define or use any macros.
2. Define any additional functions in this file.
3. Call any functions.
4. Use any form of casting.
5. Use any data type other than int or unsigned. This means that you
cannot use arrays, structs, or unions.
6. Use any floating point data types, operations, or constants.
NOTES:
1. Use the dlc (data lab checker) compiler (described in the handout) to
check the legality of your solutions.
2. Each function has a maximum number of operations (integer, logical,
or comparison) that you are allowed to use for your implementation
of the function. The max operator count is checked by dlc.
Note that assignment ('=') is not counted; you may use as many of
these as you want without penalty.
3. Use the btest test harness to check your functions for correctness.
4. Use the BDD checker to formally verify your functions
5. The maximum number of ops for each function is given in the
header comment for each function. If there are any inconsistencies
between the maximum ops in the writeup and in this file, consider
this file the authoritative source.
/*
* STEP 2: Modify the following functions according the coding rules.
*
* IMPORTANT. TO AVOID GRADING SURPRISES:
* 1. Use the dlc compiler to check that your solutions conform
* to the coding rules.
* 2. Use the BDD checker to formally verify that your solutions produce
* the correct answers.
*/
#endif
//1
/*
* bitNor - ~(x|y) using only ~ and &
* Example: bitNor(0x6, 0x5) = 0xFFFFFFF8
* Legal ops: ~ &
* Max ops: 8
* Rating: 1
*/
int bitNor(int x, int y) { //param: x, y (int)
int result;
result = ((~x) & (~y)); //demorgans law of ~(x|y)
return result; //return result
}
/*
* isTmin - returns 1 if x is the minimum, two's complement number,
* and 0 otherwise
* Legal ops: ! ~ & ^ | +
* Max ops: 10
* Rating: 1
*/
int isTmin(int x) { //param: x (int)
int boolean;
int y;
y = !x; //find the logical negation of the argument to check if it's zero
boolean = !(x+x); //logical negation of their sum to check if it is Tmin
boolean = ~(boolean & y) & ~((~boolean) & (~y)); //0 if is not Tmin or 1 is
return boolean;
}
//2
/*
* allOddBits - return 1 if all odd-numbered bits in word set to 1
* where bits are numbered from 0 (least significant) to 31 (most significant)
* Examples allOddBits(0xFFFFFFFD) = 0, allOddBits(0xAAAAAAAA) = 1
* Legal ops: ! ~ & ^ | + << >>
* Max ops: 12
* Rating: 2
*/
int allOddBits(int x) { //param: x (int)
int shift;
int check;
shift= 0xAA; //8 bits with all 1 bits on odd position
shift = shift | shift << 8; //bitor with another allOddbits of 16 bits
shift = shift | shift << 16; //24 bits
shift = shift | shift << 24; //finally 32 bits
check = !(~(~shift|~x) ^ shift); //bitAnd with shift itself and then find their difference, return 0 if there is a difference or 1 if there is not
return check;
}
/*
* negate - return -x
* Example: negate(1) = -1.
* Legal ops: ! ~ & ^ | + << >>
* Max ops: 5
* Rating: 2
*/
int negate(int x) { //param: x (int)
int negateValue = (~x) + 1; //its the same as -x
return negateValue; //return
}
//3
/*
* conditional - same as x ? y : z
* Example: conditional(2,4,5) = 4
* Legal ops: ! ~ & ^ | + << >>
* Max ops: 16
* Rating: 3
*/
int conditional(int x, int y, int z) { //param: x, y, z (int)
int first;
int second;
int third;
first = (0xFF | (0xFF << 8) | (0xFF << 16) | (0xFF << 24)) + !x; //creating 64 bits all 1s and adding with negate
second = ~(first|(~z)); //bitAnd of first and int z
third = second | (~(~first|~y)); //for the third one, to check if there is an int in x
return third; //return
}
/*
* multFiveEighths - multiplies by 5/8 rounding toward 0.
* Should exactly duplicate effect of C expression (x*5/8),
* including overflow behavior.
* Examples: multFiveEighths(77) = 48
* multFiveEighths(-22) = -13
* multFiveEighths(1073741824) = 13421728 (overflow)
* Legal ops: ! ~ & ^ | + << >>
* Max ops: 12
* Rating: 3
*/
int multFiveEighths(int x) { //param: x (int)
int firstNum;
int final;
firstNum = (x << 2) + x; //multiply by 5
final = (firstNum + (~(~(firstNum >> 31) | ~(7)))) >> 3; //divide by 8 and round toward 0
return final; //return
}
//4
/*
* logicalNeg - implement the ! operator, using all of
* the legal operators except !
* Examples: logicalNeg(3) = 0, logicalNeg(0) = 1
* Legal ops: ~ & ^ | + << >>
* Max ops: 12
* Rating: 4
*/
int logicalNeg(int x) { //param: x (int)
int result;
int shifter;
int adder;
adder = ~x + 1; //find the negate of x
shifter = ((x | adder) >> 31); //to check if it is 0 or not
result = shifter + 0x01; //add one
return result;
}
//float
/*
* floatNegate - Return bit-level equivalent of expression -f for
* floating point argument f.
* Both the argument and result are passed as unsigned int's, but
* they are to be interpreted as the bit-level representations of
* single-precision floating point values.
* When argument is NaN, return argument.
* Legal ops: Any integer/unsigned operations incl. ||, &&. also if, while
* Max ops: 10
* Rating: 2
*/
unsigned floatNegate(unsigned uf) { //param: uf (unsigned)
unsigned result;
unsigned Nan = (0xFF) << 23; //to check if the exponent is all one's
int x = (Nan & uf); //to check if their exponent is all one's
int y = uf & ((0x00000010 << 19) + 0xFFFFFFFF); //to check if they have have at least 1 in their fraction
if ((x == Nan) && (uf & y)) { //Nan value
result = uf; //argument
}
else{
result = uf ^ (0x00000008 << 28); //do the float negation
}
return result; //return
}
/*
* floatIsEqual - Compute f == g for floating point arguments f and g.
* Both the arguments are passed as unsigned int's, but
* they are to be interpreted as the bit-level representations of
* single-precision floating point values.
* If either argument is NaN, return 0.
* +0 and -0 are considered equal.
* Legal ops: Any integer/unsigned operations incl. ||, &&. also if, while
* Max ops: 25
* Rating: 2
*/
int floatIsEqual(unsigned uf, unsigned ug) { //param: uf, ug (unsigned)
unsigned floatMask = 0xFFFFFFFF + (0x00800000); //for fraction masking
unsigned x = 0x7FFFFFFF & uf; //to check for uf
unsigned y = 0x7FFFFFFF & ug; //to check for ug
if ((((x >> 23) == 0x000000FF) && (~(~floatMask | ~uf) != 0))) { //if they are either Nan or infinity
return 0; //return 0
}
else if (((y >> 23) == 0x000000FF) && (~(~floatMask | ~ug) != 0)){ //for ug the same
return 0; //return 0
}
else if ((x == 0) && (y == 0)) { //if all them is 0 (both +0 and -0)
return 1; //return 1
}
else{
return uf == ug; //otherwise return their equality
}
}
/*
* floatScale2 - Return bit-level equivalent of expression 2*f for
* floating point argument f.
* Both the argument and result are passed as unsigned int's, but
* they are to be interpreted as the bit-level representation of
* single-precision floating point values.
* When argument is NaN, return argument
* Legal ops: Any integer/unsigned operations incl. ||, &&. also if, while
* Max ops: 30
* Rating: 4
*/
unsigned floatScale2(unsigned uf) { //param: uf (int)
unsigned result;
unsigned Nan = ((uf>>23) & 0xFF); //to check for Nan
switch(uf){
case 0x0: //if uf is 0
result = uf; //return 0
break;
case 0x80000000: //if uf -0
result = uf; //return 0
break;
default:
switch(Nan){
case 0xFF: //if it is Nana
result = uf; //return uf
break;
case 0: //no common point with 0xFF (denormalized)
result = ~((~uf | 0x7FFFFFFF) & ~(uf<<1)); //perform operation
break;
default: //else if it is normalized
result = uf + (0x00800000); //perform the double operation
}
}
return result; //return result
}
/*
* floatFloat2Int - Return bit-level equivalent of expression (int) f
* for floating point argument f.
* Argument is passed as unsigned int, but
* it is to be interpreted as the bit-level representation of a
* single-precision floating point value.
* Anything out of range (including NaN and infinity) should return
* 0x80000000u.
* Legal ops: Any integer/unsigned operations incl. ||, &&. also if, while
* Max ops: 30
* Rating: 4
*/
int floatFloat2Int(unsigned uf) { //param: uf (unsigned)
unsigned lastBit;
unsigned first8Bits;
unsigned result;
lastBit = uf >> 31; //to check the sign
first8Bits = (uf >> 23);
first8Bits = first8Bits & 0xFF; //for the Nan part
switch(first8Bits){
case 0x7F800000: //if all exponents is one and at least there is 1 in fraction
return 0x80000000u; //return 0
break;
default:
if(first8Bits < 127 || !first8Bits){ //if the shift is less than bias
return 0x0; //return 0
}
else{
first8Bits = first8Bits - 127; //subtract the bias
if(first8Bits > 30){ //if the number is greater than or equal to 31
return 0x80000000u; //return 0
}
}
}
if(first8Bits <= 22){ //if the result is between 0 and 22
result = ((uf & 0x7FFFFF)) >> (23 - first8Bits); //perform the operation of arthimetic right shfit by the difference between 23 and first8Bits
}
else{
result = (uf & 0x7FFFFF) << (first8Bits - 23); //perform left shift by the difference of first8Bits and 23
}
result = result + (1 << first8Bits); //add one to for the exponent
if (lastBit == 0x01){ //if it is negative
result = ~result + 1; //find the negate
}
return result;
}
<file_sep>#include <stdio.h>
#include <stdlib.h>
#include <limits.h>
#define TMin INT_MIN
#define TMax INT_MAX
#include "btest.h"
#include "bits.h"
test_rec test_set[] = {
//1
{"bitNor", (funct_t) bitNor, (funct_t) test_bitNor, 2, "& ~", 8, 1,
{{TMin, TMax},{TMin,TMax},{TMin,TMax}}},
{"isTmin", (funct_t) isTmin, (funct_t) test_isTmin, 1, "! ~ & ^ | +", 10, 1,
{{TMin, TMax},{TMin,TMax},{TMin,TMax}}},
//2
{"allOddBits", (funct_t) allOddBits, (funct_t) test_allOddBits, 1,
"! ~ & ^ | + << >>", 12, 2,
{{TMin, TMax},{TMin,TMax},{TMin,TMax}}},
{"negate", (funct_t) negate, (funct_t) test_negate, 1,
"! ~ & ^ | + << >>", 5, 2,
{{TMin, TMax},{TMin,TMax},{TMin,TMax}}},
//3
{"conditional", (funct_t) conditional, (funct_t) test_conditional, 3, "! ~ & ^ | << >>", 16, 3,
{{TMin, TMax},{TMin,TMax},{TMin,TMax}}},
{"multFiveEighths", (funct_t) multFiveEighths, (funct_t) test_multFiveEighths, 1,
"! ~ & ^ | + << >>", 12, 3,
{{-(1<<28)-1, (1<<28)-1},{TMin,TMax},{TMin,TMax}}},
//4
{"logicalNeg", (funct_t) logicalNeg, (funct_t) test_logicalNeg, 1,
"~ & ^ | + << >>", 12, 4,
{{TMin, TMax},{TMin,TMax},{TMin,TMax}}},
//float
{"floatNegate", (funct_t) floatNegate, (funct_t) test_floatNegate, 1,
"$", 10, 2,
{{1, 1},{1,1},{1,1}}},
{"floatIsEqual", (funct_t) floatIsEqual, (funct_t) test_floatIsEqual, 2,
"$", 25, 2,
{{1, 1},{1,1},{1,1}}},
{"floatScale2", (funct_t) floatScale2, (funct_t) test_floatScale2, 1,
"$", 30, 4,
{{1, 1},{1,1},{1,1}}},
{"floatFloat2Int", (funct_t) floatFloat2Int, (funct_t) test_floatFloat2Int, 1,
"$", 30, 4,
{{1, 1},{1,1},{1,1}}},
{"", NULL, NULL, 0, "", 0, 0,
{{0, 0},{0,0},{0,0}}}
};
| 45681f73ad9daeab029ce61d0784fcedad4c0cf3 | [
"C"
] | 4 | C | MickiasB12/Computer-Architecture | f5f70161905df0ad2daf4d2ccfc3062b761942a4 | b807392d8a5570268e6c781adcad25aee165f8df | |
refs/heads/main | <file_sep>import { CommandContribution } from "@theia/core";
import { ContainerModule } from "inversify";
import { MyService, MyServicePath } from "../common/protocol";
import { MyserviceCommandContribution } from "./extension.contribution";
import {WebSocketConnectionProvider} from '@theia/core/lib/browser'
export default new ContainerModule(bind => {
//register new widget (literally sidebar button)
// bind(FrontendApplicationContribution).toService(MyserviceCommandContribution)
bind(CommandContribution).to(MyserviceCommandContribution).inSingletonScope()
bind(MyService).toDynamicValue(ctx => {
const Connection = ctx.container.get(WebSocketConnectionProvider)
return Connection.createProxy<MyService>(MyServicePath)
}).inSingletonScope()
})<file_sep>
export const MyServicePath = '/serveices/my-services'
export const MyService = Symbol('MyService')
export interface MyService {
getNameString(name:string) : Promise<string>
//表明的是返回一个promise类型的字符串
}<file_sep>import { inject,injectable } from "inversify";
import { CommandContribution ,CommandRegistry,MessageService,Command} from "@theia/core";
import { MyService } from "../common/protocol"
export const MyExtensionCommand:Command = {
id:"MyExtension.command",
label:"my extension"
}
@injectable()
export class MyserviceCommandContribution implements CommandContribution {
constructor(
@inject(MyService) protected readonly myServiceBackend: MyService,
@inject(MessageService) protected readonly messageService: MessageService
){}
registerCommands(registry:CommandRegistry):void{
registry.registerCommand(MyExtensionCommand,{
execute:() => {
// await this.messageService.info('setting')
//下面这个setting没回来
//前端拿不到后端的东西
console.log("start")
debugger
this.myServiceBackend.getNameString("world")
.then( res => {console.log(res)})
.catch(err => {throw new Error("cuowu")})
}
})
}
} <file_sep>/**
* Generated using theia-extension-generator
*/
import { LabelProviderContribution} from "@theia/core/lib/browser";
import { CommandContribution} from "@theia/core/lib/common";
import { ContainerModule } from "inversify";
import { TheiaExtLabelProviderContribution,TheiaExtensionCommandContribution } from './theia-ext-contribution';
import '../../src/browser/style/example.css';
export default new ContainerModule(bind => {
bind(LabelProviderContribution).to(TheiaExtLabelProviderContribution);
bind(CommandContribution).to(TheiaExtensionCommandContribution);
});
<file_sep>import { ContainerModule } from "inversify";
import { ConnectionHandler,JsonRpcConnectionHandler } from "@theia/core";
import { MyService ,MyServicePath} from "../common/protocol";
import { MyserviceBackend } from "./serviceBackend";
export default new ContainerModule(bind => {
bind(MyserviceBackend).toSelf()
bind(MyService).toService(MyserviceBackend)
bind(ConnectionHandler).toDynamicValue(ctx => new JsonRpcConnectionHandler(MyServicePath,() => ctx.container.get<MyService>(MyService))).inSingletonScope()
})<file_sep>import { injectable } from "inversify";
import { MyService } from '../common/protocol'
@injectable()
export class MyserviceBackend implements MyService {
getNameString(name:string):Promise<string>{
return new Promise<string>(resolve => resolve('Hello' + name))
}
}<file_sep>import { FileStatNode } from "@theia/filesystem/lib/browser/file-tree/file-tree";
import { FileTreeLabelProvider } from "@theia/filesystem/lib/browser/file-tree/file-tree-label-provider";
import { injectable, inject } from "inversify";
import { CommandContribution, CommandRegistry, MessageService } from "@theia/core/lib/common";
/**
* 这个是创建的文件前面的符号表示
*/
@injectable()
export class TheiaExtLabelProviderContribution extends FileTreeLabelProvider {
canHandle(element: object): number {
if (FileStatNode.is(element)) {
let uri = element.uri;
if (uri.path.ext === '.my') {
return super.canHandle(element)+1;
}
}
return 0;
}
getIcon(): string {
return 'fa fa-star-o';
}
getName(fileStatNode: FileStatNode): string {
return super.getName(fileStatNode) + ' (with my label)';
}
}
export const TheiaExtensionCommand = {
id:"HelloWorld.extension",
label:"zhoujing"
}
@injectable()
export class TheiaExtensionCommandContribution implements CommandContribution {
constructor(
@inject(MessageService) private readonly messageservice:MessageService
){}
registerCommands(registry:CommandRegistry): void{
registry.registerCommand(TheiaExtensionCommand ,{
execute:() => this.messageservice.info('大笨猪')
})
}
}<file_sep># theia-Json-rpc
| 4572668f0475a216c5d503c7a46ab2f45ac84887 | [
"Markdown",
"TypeScript"
] | 8 | TypeScript | zhoujingfighting/theia-Json-rpc | 291990147ebcdf44569ac35c798b14422f23baa2 | 2af5a9006a9c6789146022d171ac7c85af02fe3a | |
refs/heads/master | <file_sep>// $(document).ready(function() { /*commented because it was deferred in the htrml script*/
/*set global constants*/
const api_url = 'https://api.themoviedb.org/3/';
const api_key = '<KEY>';
const img_url = 'https://image.tmdb.org/t/p/';
const tvGenresEndpoint = 'genre/tv/list';
const movieGenresEndpoint = 'genre/movie/list';
/*compile template*/
var listTemplateSource = $('#list-template').html();
var listTemplate = Handlebars.compile(listTemplateSource);
var selectTemplateSource = $('#select-template').html();
var selectTemplate = Handlebars.compile(selectTemplateSource);
var paginationTemplateSource = $('#pagination-template').html();
var paginationTemplate = Handlebars.compile(paginationTemplateSource);
/*grab all tv and movie genres and store them for later use*/
var tvGenres = [];
var movieGenres = [];
getTvGenres(tvGenresEndpoint);
getMovieGenres(movieGenresEndpoint);
/* close disclaimer tab*/
$('.disclaimer-close').click(() => $('.disclaimer').hide())
/*searchbar: while typing, start search if the Enter key is pressed*/
$('.searchbar').keypress(function(event) {
if (event.which == 13) {
search();
} else {
$('.searchbar-cross').addClass('active');
}
});
/*searchbar: on click on searchbar cross, hide searchbar*/
$('.searchbar-cross').click(function() {
$('.searchbar').val('');
$('.searchbar').removeClass('active');
$('.searchbar-cross').removeClass('active');
})
/*on click on search icon in header:
* if the input field is displayed, start search
* it it's not, fisplay input field*/
$('.header-right .fa-search').click(function(){
if ($('.searchbar').hasClass('active')) {
$('.header-right .fa-search').click(search);
} else {
$('.searchbar').addClass('active');
$('.searchbar').focus();
}
})
/*menu: on click on tv/movies menu item in header-left, show genres selection dropdown. hide on mouseleave*/
$('.dropdown-hook').click(function() {
$(this).children('.dropdown').toggleClass('active');
}).mouseleave(function() {
$(this).children('.dropdown').removeClass('active');
})
$('.dropdown').mouseleave(function() {
$(this).removeClass('active');
})
/*menu: on click on genres dropdown item, display on page only the cards of matching genre*/
$('.dropdown').on('click', 'li', function() {
$('.item-card').show();
var lookFor = $(this).text();
console.log(lookFor);
$('.item-card').each(function() {
var currentGenres = $(this).find('li[data-info-type="genres"]').text();
console.log(currentGenres);
if (!currentGenres.includes(lookFor)) {
$(this).hide();
}
})
// filterCards(lookFor);
})
/*** //XXX currently failed attempt at putting all this in a function***/
// function filterCards(genre) {
// $('.item-card').each(function() {
// var currentGenres = $(this).find('li[data-info-type="genres"]').text();
// console.log(currentGenres);
//
// })
// }
/*cards: on click on an item-card, show the back of the card. On mouseleave, show the front*/
$('#results-display').on('click', '.item-card', function() {
$(this).find('.item-card-img').removeClass('active');
$(this).find('.item-card-noimg').removeClass('active');
$(this).find('.item-card-title').removeClass('active');
$(this).find('.item-card-info').addClass('active');
}).on('mouseleave', '.item-card', function() {
$(this).find('.item-card-img').addClass('active');
$(this).find('.item-card-noimg').addClass('active');
$(this).find('.item-card-title').addClass('active');
$(this).find('.item-card-info').removeClass('active');
});
/*pagination: when the user picks a page from the pagination select*/
$('.page-select').on('click', 'option', function() {
/*grab current search term from search sentry*/
var currentSearch = $('.searchbar').attr('data-search-sentry');
/*grab the requested page number*/
var requestedPage = $(this).val();
/*reset all the fields affected by a search*/
cleanSlate(currentSearch);
callAjax(currentSearch, 'search/movie', 'movie', requestedPage);
callAjax(currentSearch, 'search/tv', 'series', requestedPage);
});
/* * FUNCTIONS - ORDER OF APPEARANCE * */
/*grab all movie genres from TMD*/
function getMovieGenres(endpoint) {
$.ajax({
'url': api_url + endpoint,
'method': 'get',
'data': {
'api_key': api_key,
},
'success': function(data) {
movieGenres = data.genres;
/*** perché se faccio array.push(data.genres) mi mette dentro ogni singolo oggetto più tutto l'array completo?***/
for (var i = 0; i < movieGenres.length; i++) {
var currentGenre = movieGenres[i].name;
var currentLowGenre = currentGenre.toLowerCase();
var context = {
'genreLow': currentLowGenre,
'genre': currentGenre,
}
var html = selectTemplate(context);
$('.dd-movies').append(html);
}
},
'error': function() {
console.log('ajax error');
},
});
}
/*grab all tv genres from TMD*/
function getTvGenres(endpoint) {
$.ajax({
'url': api_url + endpoint,
'method': 'get',
'data': {
'api_key': api_key,
},
'success': function(data) {
tvGenres = data.genres;
/*get the name of every genre and print it in page*/
for (var i = 0; i < tvGenres.length; i++) {
var currentGenre = tvGenres[i].name;
var currentLowGenre = currentGenre.toLowerCase();
var context = {
'genreLow': currentLowGenre,
'genre': currentGenre,
}
var html = selectTemplate(context);
$('.dd-tv').append(html);
}
},
'error': function() {
console.log('ajax error');
},
});
}
/*SEARCH - start ajax call(s) based on the user's search term*/
function search() {
/*grab user search*/
var userSearch = $('.searchbar').val().trim();
/*if the string isn't empty*/
if (userSearch.length > 1) {
/*reset everything related to the search*/
cleanSlate(userSearch);
/*get results for both movies and tv shows*/
callAjax(userSearch, 'search/movie', 'movie');
callAjax(userSearch, 'search/tv', 'series');
}
};
/*CLEAN-SLATE - reset all the things that get compiled with every search*/
function cleanSlate(currentSearch) {
$('.searchbar').val('');
/*remove any cards already in page*/
$('#results-display .item-card').remove();
/*remove any option from pagination select*/
// $('.header-right option').remove();
$('.pagination-container').removeClass('active');
$('.pagination-container option').remove();
$('#results-display').attr('data-movie-pages', '');
$('#results-display').attr('data-tv-pages', '');
/*remove related search terms*/
$('.results-display-header').removeClass('active');
/*remove warning after empty search*/
$('#error-display').removeClass('active');
/*create sentry for calling ajax to get the following pages*/
$('.searchbar').attr('data-search-sentry', currentSearch);
}
/**CALL-AJAX - call the TMD API via ajax**/
function callAjax(searchString, endPoint, cardType, pageNr) {
$.ajax({
'url': api_url + endPoint,
'method': 'get',
'data': {
'api_key': api_key,
'query': searchString,
'page': pageNr,
},
'success': function(data) {
/*if the search returns anything at all*/
if (data.total_results != 0) {
/*show related terms bar*/
$('.results-display-header').addClass('active');
/*get total number of pages for the current call*/
setupPagination(data.total_pages, cardType, pageNr);
/*handle the info in data.results*/
handleDataResults(data.results, cardType);
/* if the search returns nothing, tell the user*/
} else {
$('#error-display').addClass('active');
}
}, /*if ajax fails to call*/
'error': function() {
alert('Seems like we had a problem retrieving your search.');
}
})/*ajax end*/
}
/*SETUP-PAGINATION - get the total number of pages per media type and compare the respective
* lengths by setting up sentry data attributes, then print the options in page*/
function setupPagination(totalPages, cardType, pageNr = 1) {
/*create sentries for both movies and tv shows with total page nr*/
if (cardType == 'movie') {
$('#results-display').attr('data-movie-pages', totalPages);
} else if (cardType == 'series') {
$('#results-display').attr('data-tv-pages', totalPages);
}
var movieSentry = $('#results-display').attr('data-movie-pages');
var tvSentry = $('#results-display').attr('data-tv-pages');
/*don't act on the first call, where one of the two sentries is still empty*/
if (movieSentry != '' && tvSentry != '') {
/*learn which media type gets more results, then use the bigger number
* to create as many select options*/
if (movieSentry >= tvSentry) {
printPageNrOptions(movieSentry);
} else if (tvSentry > movieSentry) {
printPageNrOptions(tvSentry);
}
}
$('.pagination-container').addClass('active');
$('.page-select').val(pageNr);
}
/*PRINT-PAGE-NR-OPTIONS - generate as many options in the pagination select as needed*/
function printPageNrOptions(howMany) {
for (var i = 1; i <= howMany; i++) {
var context = {
'pageNr': i,
}
var html = paginationTemplate(context);
$('.page-select').append(html);
}
}
/*HANDLE-DATA - cycle every object in the result of your query*/
function handleDataResults(resultsArray, cardType) {
/*for every object returned by the call*/
for (var i = 0; i < resultsArray.length; i++) {
var currentItem = resultsArray[i];
printMovieDetails(currentItem, cardType);
printTalentList(currentItem.id, cardType);
noDuplicateTitle(currentItem);
keepFlagIfAvaliable(currentItem.original_language, currentItem.id);
if (currentItem.vote_average != 0) {
$('.item-card:last-child li[data-info-type="voteNA"]').remove();
fillStars(currentItem.vote_average, currentItem.id);
} else {
$('.item-card:last-child li[data-info-type="vote"]').remove();
}
manageEmptyCards(currentItem.backdrop_path, currentItem.id);
}
};
/*PRINT-MOVIE-DETAILS - grab info on a singe item and print it in the template*/
function printMovieDetails(item, cardType) {
/*grab the current item's poster path and build the complete url*/
var posterTrimmed = item.backdrop_path;
var poster = img_url + 'w300/' + posterTrimmed;
/*grab correct title based on item media type, movie or tv*/
/*if the item is a movie*/
if (item.hasOwnProperty('title')) {
var itemTitle = item.title;
var itemOrigTitle = item.original_title;
/*if the item is a series*/
} else {
var itemTitle = item.name;
var itemOrigTitle = item.original_name;
}
/*grab current item's genre id(s)*/
itemGenreIds = item.genre_ids;
/*convert id(s) into name(s), based on item's media type*/
if (cardType == 'movie') {
var finalGenres = getGenresNames(movieGenres, itemGenreIds)
} else if (cardType = 'series') {
finalGenres = getGenresNames(tvGenres, itemGenreIds)
}
/*populate template*/
var context = {
'title': itemTitle,
'originalTitle': itemOrigTitle,
'language': item.original_language,
'poster': poster,
'synopsis': item.overview,
'cardId': item.id,
'genres': finalGenres,
}
var html = listTemplate(context);
/*print template*/
$('#results-display').append(html);
}
/* GET-GENRES-NAMES - given an item's genre ids, get the corresponding names instead*/
function getGenresNames(mediaGenresArray, itemGenreIds) {
var currentGenres = '';
/*go through the item's genre ids and grab one at a time*/
// debugger;
for (var i = 0; i < itemGenreIds.length; i++) {
var currentGenId = itemGenreIds[i];
/*go through all the genres for that media type, if there's a match, print the name*/
for (var n = 0; n < mediaGenresArray.length; n++) {
if (currentGenId == mediaGenresArray[n].id && i != (itemGenreIds.length - 1)) {
currentGenres += (mediaGenresArray[n].name+ ', ');
} else if (currentGenId == mediaGenresArray[n].id && i == (itemGenreIds.length - 1)) {
currentGenres += mediaGenresArray[n].name;
}
}
}
console.log(currentGenres);
return currentGenres;
}
/* PRINT-TALENT-LIST*/
function printTalentList(itemId, cardType) {
if (cardType == 'series') {
var currentEndPoint = 'tv/' + itemId + '/credits';
} else if (cardType == 'movie') {
var currentEndPoint = 'movie/' + itemId + '/credits';
}
$.ajax({
'url': api_url + currentEndPoint,
'method': 'get',
'data': {
'api_key': api_key,
'query': null,/***will I need this for the genres?***/
},
'success': function(data) {
var talentList = [];
/*go through the whole list of results, if needed*/
for (var i = 0; i < data.cast.length; i++) {
/*grab the name value of the current object*/
var talent = data.cast[i].name;
/*if the list hasn't reached 5 items*/
if (talentList.length < 5) {
/*and if the current name is a valid value*/
if (talent != undefined && talent != null) {
/*add to list of talents*/
talentList.push(' ' + talent);
}
/*if you already have five names, break the cycle*/
} else {
break
}
}
/*print talent list in HTML*/
$('.item-card[data-card-id="' + itemId + '"] li[data-info-type="cast"]').text(talentList);
},
'error': function() {
console.log('ajaxtalent error')
}
})/*ajax end*/
}
/*NO-DUPLICATE-TITLE - if the title and original title are the same, show only the title*/
function noDuplicateTitle(item) {
itemId = item.id;
/*if title and original titles are equal, and neither is undefined*/
if (item.title != undefined && (item.title == item.original_title) || item.name != undefined && (item.name == item.original_name)) {
/*print only one title*/
$('.item-card[data-card-id="' + itemId + '"] li[data-info-type="original-title"]').remove();
}
}
/*KEEP-FLAG-IF-AVAILABLE - if you have a flag icon for the requested language, remove language list item. Otherwise remove flag list item.*/
function keepFlagIfAvaliable(forLanguage, itemId) {
/*list of available flags*/
var availableLanguages = ['ar', 'de', 'en', 'es', 'fr', 'it', 'ja', 'zh'];
/*if you have a flag for the current item's language*/
if (availableLanguages.includes(forLanguage.toString())) {
/*remove the language list item*/
$('.item-card[data-card-id="' + itemId + '"] li[data-info-type="language"]').remove();
/*if you don't have a flag*/
} else {
/*remove the flag list item*/
$('.item-card[data-card-id="' + itemId + '"] li[data-info-type="lang-flag"]').remove();
}
};
/*FILL-STARS - get average vote, fit to scale of 5, fill stars (and halves) in html accordingly*/
function fillStars(voteAverage, itemId) {
var base5Vote = (voteAverage / 2).toString();
base5VoteElements = base5Vote.split('.');
if (base5VoteElements[1] < 10) {
base5VoteElements[1] = base5VoteElements[1] + '0';
}
/*grab the first x empty stars based on starsNr value*/
for (var i = 1; i <= base5VoteElements[0]; i++) {
/*grab all those stars and make them full*/
$('.item-card[data-card-id="' + itemId + '"] li[data-info-type="vote"] i:nth-child('+(i)+')').removeClass('far').addClass('fas');
}
if (base5VoteElements[1] > 50) {
$('.item-card[data-card-id="' + itemId + '"] li[data-info-type="vote"] i:nth-child('+(i)+')').attr('class', '').attr('class', 'fas fa-star-half-alt')
}
}
/*MANAGE-EMPTY-CARDS - if a card's image path isn't present, remove the whole img element*/
function manageEmptyCards(imagePath, itemId) {
if (imagePath === null) {
$('.item-card[data-card-id="' + itemId + '"] img').remove();
/*display warning text*/
$('.item-card[data-card-id="' + itemId + '"] .item-card-noimg').addClass('active');
} else {
$('.item-card[data-card-id="' + itemId + '"] .item-card-noimg').remove();
}
}
//})/*DNT closing doc.ready*/
/* * USELESS KEEPSAKE * */
// function fillStarsOLD(voteAverage) {
// /*make the average vote a rounded number from 1 to 5*/
// var starsNr = Math.round(voteAverage / 2);
// /*grab the first x empty stars based on starsNr value*/
// /*** questa qui sotto la lasciamo a imperitura memoria perché LAMISERIA ma come mi è venuto in mente quella volta di perderci un pomeriggio per una riga che NON SERVIVA***/
// var stars = $('.item-card:last-child li[data-info-type="vote"] i').slice(0, starsNr);
// for (var i = 1; i <= stars.length; i++) {
// /*grab all those stars and make them full*/
// $('.item-card:last-child li[data-info-type="vote"] i:nth-child('+(i)+')').removeClass('far').addClass('fas');
// }
// }
<file_sep>May 22nd, 2020
### Project description:
Final JavaScript-oriented project. Use the The Movie Database API to replicate an approximation of Netflix's search interface.
**Minimum requirements:**
1. Create a searchbar where the user can input the name of a show/movie or part of it.
2. By clicking on the search button, the API is interrogated and returns the following info for all relevant *movies*:
- Title
- Original title
- Language
- Rating
3. Get the numeric value (1 to 10) of the rating and manipulate it so that the rating can be expressed in a scale of 1 to 5 full stars.
4. Replace the language name with the corresponding flag, and manage the case where the current language doesn't have an associated flag.
5. Include a second API call that looks for *TV shows* that answer to the same user search from point 2.
6. Add the shows'/movies' posters to the relative cards.
7. Add a proper header with logo and searchbar.
8. Make the show/movie info into proper cards with the poster image as background.
9. By interacting with a card, the show/movie info is displayed (add the overview to the available info).
**Bonus features:**
- Add to each card the name of the first 5 actors/actresses listed for that movie/show.
- Get the list of genres from the API and make it possible to filter the movies/shows by genre, hiding/showing the relevant cards as different genres get requested.
**Personal improvements:**
- Searchbar animation
- Card animation
- Pressing the enter key starts the search without need of clicking the search button
- When there is text in the searchbar, it can be cleared by pressing the X icon, which also closes the searchbar.
- Added an 'image unavailable' panel for movies/shows that do not have an image attached.
- Added pagination.
- Implemented half-stars to improve the precision of ratings.
### Goals:
Practice dealing with more complex API calls and building a solid structure that can accommodate for what is or isn't returned.
### Libraries:
- jQuery
- Handlebars
| 7206d3e609dcf8baf0dba9bd978d6fe76120621a | [
"JavaScript",
"Markdown"
] | 2 | JavaScript | attraverso/ajax-ex-boolflix | e9a48970372cf816b0e9e08a6c1891dd8c17b426 | 6628e4554a2fab43975baf05547502a62d37b291 | |
refs/heads/main | <file_sep>package com.neosoft.app.employeeportal1.main.exceptionhandling;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;
@RestControllerAdvice
public class GlobalExceptionHandler {
@Autowired
ExceptionResponse response;
@ExceptionHandler(EmployeeNotFoundException.class)
public ExceptionResponse customHandlerException(EmployeeNotFoundException exception) {
System.out.println("Custom Exception Handle");
response.setMessage(exception.getMessage());
response.setStatusCode(HttpStatus.BAD_REQUEST.value());
response.setDescription("Invalid Id User not exist For such id");
response.setStringStatusCode(HttpStatus.BAD_REQUEST.toString());
return response;
}
}<file_sep>package com.neosoft.app.employeeportal1.main.exceptionhandling;
import org.springframework.stereotype.Component;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
@Data
@NoArgsConstructor
@AllArgsConstructor
@Getter
@Setter
@Component
public class ExceptionResponse {
private String message ;
private int statusCode;
private String description;
private String stringStatusCode;
}
<file_sep>package com.neosoft.app.employeeportal1.main.dto;
import lombok.Data;
@Data
public class Response {
private String msg;
}
<file_sep>package com.neosoft.app.employeeportal1.main.repository;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import com.neosoft.app.employeeportal1.main.entity.Employee;
@Repository
public interface IEmployeeRepository extends JpaRepository<Employee, Short>{
Employee findByFirstName(String name);
void save(short id);
}
<file_sep>#Mon Jul 19 17:51:13 IST 2021
org.eclipse.core.runtime=2
org.eclipse.platform=4.19.0.v20210303-1800
<file_sep>package com.neosoft.app.employeeportal1.main;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
@SpringBootTest
class Vehicleservice1ApplicationTests {
@Test
void contextLoads() {
}
}
<file_sep>package com.neosoft.app.employeeportal1.main.utility;
import java.util.Comparator;
import com.neosoft.app.employeeportal1.main.entity.Employee;
public class SortByJoining implements Comparator<Employee>{
@Override
public int compare(Employee o1, Employee o2) {
return o1.getDateOfJoining().compareTo(o2.getDateOfJoining());
}
}
| 757cef0b3c0073fbaffab5a04919a7e65308e4dc | [
"Java",
"INI"
] | 7 | Java | rahuljadhav3626/empoyeeapp-rest | 167476c1bd6e48a1e33bcad9442c081f44ae4414 | 934e597af83470857c2777bff530f42a2939472f | |
refs/heads/master | <file_sep>/*
* GameGlobals.h
*
* Created on: 08-Oct-2014
* Author: woigames
*/
#ifndef GAMEGLOBALS_H_
#define GAMEGLOBALS_H_
#include "cocos2d.h"
#include "Box2D/Box2D.h"
using namespace cocos2d;
using namespace std;
#define SCREEN_SIZE GameGlobals::screen_size_
#define PTM_RATIO 128
#define SCREEN_TO_WORLD(value) (value) / PTM_RATIO
#define WORLD_TO_SCREEN(value) (value) * PTM_RATIO
#define MIN_SHAPE_SIZE 0.1f
#define MAX_SHAPE_SIZE 0.25f
#define NUM_TRAJECTORY_STEPS 60
#define IMPULSE_MAGNITUDE
typedef pair<b2Fixture*, b2Fixture*> fixture_pair;
enum EBodySize
{
E_BODY_SMALL = 0,
E_BODY_MEDIUM,
E_BODY_LARGE,
};
class GameGlobals {
public:
GameGlobals(){};
~GameGlobals(){};
static void Init();
static b2Body* GetBodyForWorld(b2World* world, b2BodyType type, b2Shape::Type shape, EBodySize body_size = E_BODY_MEDIUM);
static b2PolygonShape GetRandomBoxShape(EBodySize body_size = E_BODY_MEDIUM);
static b2CircleShape GetRandomCircleShape();
static void GetTrajectory(b2Vec2 initial_position, b2Vec2 initial_velocity, b2Vec2 gravity, vector<Vec2> &points);
// buoyancy related
static bool Inside(b2Vec2 cp1, b2Vec2 cp2, b2Vec2 p);
static b2Vec2 Intersection(b2Vec2 cp1, b2Vec2 cp2, b2Vec2 s, b2Vec2 e);
static bool FindIntersectionOfFixtures(b2Fixture* fA, b2Fixture* fB, vector<b2Vec2>& output_vertices);
static b2Vec2 ComputeCentroid(vector<b2Vec2> vs, float& area);
static Size screen_size_;
};
#endif /* GAMEGLOBALS_H_ */
<file_sep>#ifndef __HELLOWORLD_SCENE_H__
#define __HELLOWORLD_SCENE_H__
#include "GameGlobals.h"
class HelloWorld : public Layer
{
public:
// there's no 'id' in cpp, so we recommend returning the class instance pointer
static Scene* createScene();
// Here's a difference. Method 'init' in cocos2d-x returns bool, instead of returning 'id' in cocos2d-iphone
virtual bool init();
// a selector callback
void menuCloseCallback(Ref* pSender);
// implement the "static create()" method manually
CREATE_FUNC(HelloWorld);
void CreateBoundary();
void CreateBall();
void GenerateTrajectory(b2Vec2 starting_velocity);
virtual void update(float dt);
virtual bool onTouchBegan(Touch* touch, Event* event);
virtual void onTouchMoved(Touch* touch, Event* event);
virtual void onTouchEnded(Touch* touch, Event* event);
protected:
Rect boundary_rect_;
Vec2 last_touch_;
b2World* world_;
b2Body* ball_body_;
DrawNode* ball_node_;
DrawNode* trajectory_;
b2Vec2 impulse_;
};
#endif // __HELLOWORLD_SCENE_H__
<file_sep>#include "HelloWorldScene.h"
Scene* HelloWorld::createScene()
{
auto scene = Scene::create();
auto layer = HelloWorld::create();
scene->addChild(layer);
return scene;
}
bool HelloWorld::init()
{
if ( !Layer::init() )
{
return false;
}
boundary_rect_ = Rect(50, 50, SCREEN_SIZE.width - 100, SCREEN_SIZE.height - 100);
last_touch_ = Vec2::ZERO;
Vec2 origin = Director::getInstance()->getVisibleOrigin();
auto closeItem = MenuItemImage::create("CloseNormal.png", "CloseSelected.png", CC_CALLBACK_1(HelloWorld::menuCloseCallback, this));
closeItem->setPosition(Vec2(origin.x + SCREEN_SIZE.width - closeItem->getContentSize().width/2, origin.y + closeItem->getContentSize().height/2));
// create menu, it's an autorelease object
auto menu = Menu::create(closeItem, nullptr);
menu->setPosition(Vec2::ZERO);
this->addChild(menu, 1);
b2Vec2 gravity;
gravity.Set(0.0f, -10.0f);
world_ = new b2World(gravity);
trajectory_ = DrawNode::create();
addChild(trajectory_);
CreateBoundary();
CreateBall();
// setTouchEnabled(true);
auto listener = EventListenerTouchOneByOne::create();
listener->onTouchBegan = CC_CALLBACK_2(HelloWorld::onTouchBegan, this);
listener->onTouchMoved = CC_CALLBACK_2(HelloWorld::onTouchMoved, this);
listener->onTouchEnded = CC_CALLBACK_2(HelloWorld::onTouchEnded, this);
_eventDispatcher->addEventListenerWithSceneGraphPriority(listener, this);
scheduleUpdate();
return true;
}
void HelloWorld::CreateBoundary()
{
b2BodyDef groundBodyDef;
groundBodyDef.position.Set(0, 0);
b2Body* groundBody = world_->CreateBody(&groundBodyDef);
// Define the ground box shape.
b2EdgeShape groundBox;
// bottom
groundBox.Set(b2Vec2(boundary_rect_.getMinX()/PTM_RATIO, boundary_rect_.getMinY()/PTM_RATIO), b2Vec2(boundary_rect_.getMaxX()/PTM_RATIO, boundary_rect_.getMinY()/PTM_RATIO));
groundBody->CreateFixture(&groundBox,0);
groundBox.Set(b2Vec2(boundary_rect_.getMinX()/PTM_RATIO, boundary_rect_.getMinY()/PTM_RATIO), b2Vec2(boundary_rect_.getMinX()/PTM_RATIO, boundary_rect_.getMaxY()/PTM_RATIO));
groundBody->CreateFixture(&groundBox,0);
groundBox.Set(b2Vec2(boundary_rect_.getMaxX()/PTM_RATIO, boundary_rect_.getMinY()/PTM_RATIO), b2Vec2(boundary_rect_.getMaxX()/PTM_RATIO, boundary_rect_.getMaxY()/PTM_RATIO));
groundBody->CreateFixture(&groundBox,0);
}
void HelloWorld::CreateBall()
{
// create body
b2BodyDef ball_body_def;
ball_body_def.type = b2_dynamicBody;
ball_body_ = world_->CreateBody(&ball_body_def);
ball_body_->SetTransform(b2Vec2(SCREEN_SIZE.width*0.125f / PTM_RATIO, SCREEN_SIZE.height*0.125f / PTM_RATIO), 0.0f);
b2CircleShape ball_shape;
ball_shape.m_radius = 0.2f;
// create fixture
b2FixtureDef ball_fixture_def;
ball_fixture_def.shape = &ball_shape;
ball_fixture_def.restitution = 0.5f;
ball_body_->CreateFixture(&ball_fixture_def);
ball_node_ = DrawNode::create();
ball_node_->drawDot(CCPointZero, 25, ccc4f(1, 1, 1, 0.5f));
addChild(ball_node_);
}
void HelloWorld::GenerateTrajectory(b2Vec2 starting_velocity)
{
b2Vec2 gravity(0.0f, -10.0f);
vector<Vec2> points;
GameGlobals::GetTrajectory(ball_body_->GetPosition(), starting_velocity, gravity, points);
trajectory_->clear();
for(int i = 0; i < NUM_TRAJECTORY_STEPS; ++i)
trajectory_->drawDot(points[i], 1, ccc4f(1, 1, 1, 1.0f - (float)i/(float)NUM_TRAJECTORY_STEPS));
}
void HelloWorld::update(float dt)
{
world_->Step(dt, 8, 3);
ball_node_->setPosition(ball_body_->GetPosition().x * PTM_RATIO, ball_body_->GetPosition().y * PTM_RATIO);
}
bool HelloWorld::onTouchBegan(Touch* touch, Event* event)
{
impulse_ = b2Vec2(5.0f, 5.0f); //b2Vec2(7.5f, 7.5f);
impulse_.x /= ball_body_->GetMass();
impulse_.y /= ball_body_->GetMass();
GenerateTrajectory(impulse_);
last_touch_ = touch->getLocationInView();
return true;
}
void HelloWorld::onTouchMoved(Touch* touch, Event* event)
{
Vec2 curr_touch = touch->getLocationInView();
float angle = CC_DEGREES_TO_RADIANS( (last_touch_.x - curr_touch.x) / 5 );
b2Vec2 modified_impulse(impulse_.x * cosf(angle) - impulse_.y * sinf(angle), impulse_.x * sinf(angle) + impulse_.y * cosf(angle));
impulse_ = modified_impulse;
GenerateTrajectory(impulse_);
last_touch_.set(curr_touch);
}
void HelloWorld::onTouchEnded(Touch* touch, Event* event)
{
ball_body_->ApplyLinearImpulse(impulse_, ball_body_->GetWorldCenter(), true);
impulse_ = b2Vec2_zero;
last_touch_.set(Vec2::ZERO);
trajectory_->clear();
}
void HelloWorld::menuCloseCallback(Ref* pSender)
{
Director::getInstance()->replaceScene(HelloWorld::createScene());
}
<file_sep>/*
* BuoyancyTest.h
*
* Created on: 08-Oct-2014
* Author: woigames
*/
#ifndef BUOYANCYTEST_H_
#define BUOYANCYTEST_H_
#include "GameGlobals.h"
class GLESDebugDraw;
class BuoyancyTest : public Layer, public b2ContactListener {
public:
virtual ~BuoyancyTest();
static Scene* createScene();
virtual bool init();
virtual void draw(Renderer *renderer, const Mat4 &transform, uint32_t flags) override;
void onDraw(const Mat4 &transform, uint32_t flags);
virtual void update(float dt);
virtual void BeginContact(b2Contact* contact);
virtual void EndContact(b2Contact* contact);
virtual bool onTouchBegan(Touch* touch, Event* event);
virtual void onTouchMoved(Touch* touch, Event* event);
virtual void onTouchEnded(Touch* touch, Event* event);
void CreateBuoyancyTest();
void CreateFluid();
void CreateTestBodies();
void CreateBodyWithJoints();
// void AddDynamicBody(Vec2 position, EBodySize size);
// void AddStaticBody(Vec2 position, EBodySize size);
void UpdateBuoyancy();
void ApplyBuoyancyForce(b2Fixture* fixture_a, b2Fixture* fixture_b, float area, b2Vec2 centroid);
void ApplyDrag(b2Fixture* fixture_a, b2Fixture* fixture_b, float area, b2Vec2 centroid);
void UpdateTrajectory();
CREATE_FUNC(BuoyancyTest);
void menuCloseCallback(Ref* pSender);
private:
b2Vec2 gravity_;
b2World* world_;
b2Body* base_;
b2Body* fluid_;
set<fixture_pair> fixture_pairs_;
b2Body* player_body_;
DrawNode* trajectory_;
b2Vec2 impulse_;
Vec2 last_touch_;
GLESDebugDraw* debug_draw_;
CustomCommand custom_command_;
};
#endif /* BUOYANCYTEST_H_ */
<file_sep>/*
* BuoyancyTest.cpp
*
* Created on: 08-Oct-2014
* Author: woigames
*/
#include "BuoyancyTest.h"
#include "GLES-Render.h"
BuoyancyTest::~BuoyancyTest() {
// TODO Auto-generated destructor stub
}
Scene* BuoyancyTest::createScene()
{
auto scene = Scene::create();
auto layer = BuoyancyTest::create();
scene->addChild(layer);
return scene;
}
bool BuoyancyTest::init()
{
if(!Layer::init())
return false;
gravity_ = b2Vec2_zero;
world_ = nullptr;
base_ = nullptr;
fluid_ = nullptr;
fixture_pairs_.clear();
player_body_ = nullptr;
trajectory_ = nullptr;
impulse_ = b2Vec2_zero;
last_touch_ = Vec2::ZERO;
debug_draw_ = NULL;
auto closeItem = MenuItemImage::create("CloseNormal.png", "CloseSelected.png", CC_CALLBACK_1(BuoyancyTest::menuCloseCallback, this));
closeItem->setPosition(Vec2(SCREEN_SIZE.width - closeItem->getContentSize().width/2, closeItem->getContentSize().height/2));
auto menu = Menu::create(closeItem, nullptr);
menu->setPosition(Vec2::ZERO);
this->addChild(menu, 1);
CreateBuoyancyTest();
auto listener = EventListenerTouchOneByOne::create();
listener->onTouchBegan = CC_CALLBACK_2(BuoyancyTest::onTouchBegan, this);
listener->onTouchMoved = CC_CALLBACK_2(BuoyancyTest::onTouchMoved, this);
listener->onTouchEnded = CC_CALLBACK_2(BuoyancyTest::onTouchEnded, this);
_eventDispatcher->addEventListenerWithSceneGraphPriority(listener, this);
scheduleUpdate();
return true;
}
void BuoyancyTest::CreateBuoyancyTest()
{
gravity_.Set(0.0f, -9.8f);
world_ = new b2World(gravity_);
world_->SetContactListener(this);
CreateFluid();
CreateTestBodies();
trajectory_ = DrawNode::create();
addChild(trajectory_);
// create debug draw
debug_draw_ = new GLESDebugDraw(PTM_RATIO);
uint32 flags = 0;
flags += b2Draw::e_shapeBit;
flags += b2Draw::e_jointBit;
debug_draw_->SetFlags(flags);
world_->SetDebugDraw(debug_draw_);
}
void BuoyancyTest::CreateFluid()
{
// create base
b2BodyDef base_body_def;
base_body_def.type = b2_staticBody;
base_ = world_->CreateBody(&base_body_def);
b2ChainShape base_shape;
b2Vec2 vertices[4] = { b2Vec2(0, SCREEN_TO_WORLD(SCREEN_SIZE.height/3)), b2Vec2(0, 0), b2Vec2(SCREEN_TO_WORLD(SCREEN_SIZE.width), 0), b2Vec2(SCREEN_TO_WORLD(SCREEN_SIZE.width), SCREEN_TO_WORLD(SCREEN_SIZE.height/3)) };
base_shape.CreateChain(vertices, 4);
base_->CreateFixture(&base_shape, 0);
// create fluid
b2BodyDef fluid_body_def;
fluid_body_def.type = b2_staticBody;
fluid_ = world_->CreateBody(&fluid_body_def);
b2PolygonShape fluid_shape;
fluid_shape.SetAsBox( SCREEN_TO_WORLD(SCREEN_SIZE.width/2), SCREEN_TO_WORLD(SCREEN_SIZE.height/6), b2Vec2(SCREEN_TO_WORLD(SCREEN_SIZE.width/2), SCREEN_TO_WORLD(SCREEN_SIZE.height/6)), 0 );
b2FixtureDef fluid_fixture_def;
fluid_fixture_def.shape = &fluid_shape;
fluid_fixture_def.isSensor = true;
fluid_fixture_def.density = 1.5f;
fluid_->CreateFixture(&fluid_fixture_def);
}
void BuoyancyTest::CreateTestBodies()
{
// create a base for player
b2Body* test_body = GameGlobals::GetBodyForWorld(world_, b2_staticBody, b2Shape::e_polygon, E_BODY_MEDIUM);
test_body->SetTransform( b2Vec2( SCREEN_TO_WORLD(SCREEN_SIZE.width * 0.5f), SCREEN_TO_WORLD(SCREEN_SIZE.height * 0.3f) ), 0 );
test_body->GetFixtureList()->SetFriction(1.0f);
// create player
b2BodyDef ball_body_def;
ball_body_def.type = b2_dynamicBody;
player_body_ = world_->CreateBody(&ball_body_def);
player_body_->SetTransform(b2Vec2(SCREEN_SIZE.width * 0.5f / PTM_RATIO, SCREEN_SIZE.height * 0.5f / PTM_RATIO), 0.0f);
player_body_->SetFixedRotation(false);
b2CircleShape ball_shape;
ball_shape.m_radius = 0.2f;
// b2PolygonShape ball_shape;
// ball_shape.SetAsBox(0.2f, 0.2f);
b2FixtureDef ball_fixture_def;
ball_fixture_def.friction = 1.0f;
ball_fixture_def.shape = &ball_shape;
player_body_->CreateFixture(&ball_fixture_def);
CreateBodyWithJoints();
}
void BuoyancyTest::CreateBodyWithJoints()
{
// create the floating body
b2Vec2 position;
position.Set(SCREEN_TO_WORLD(SCREEN_SIZE.width * 0.8f), SCREEN_TO_WORLD(SCREEN_SIZE.height * 0.3f));
b2Body* test_body = GameGlobals::GetBodyForWorld(world_, b2_dynamicBody, b2Shape::e_polygon, E_BODY_LARGE);
test_body->SetTransform(position, 0);
test_body->ApplyTorque(100.0f, true);
// create two revolute joints to anchor the floating body
b2DistanceJointDef distance_joint_def;
b2Vec2 base_anchor;
b2Vec2 body_anchor;
base_anchor.Set(SCREEN_TO_WORLD(SCREEN_SIZE.width * 0.65f), 0.0f);
body_anchor.Set(SCREEN_TO_WORLD(SCREEN_SIZE.width * 0.75f), SCREEN_TO_WORLD(SCREEN_SIZE.height * 0.2f));
distance_joint_def.Initialize(base_, test_body, base_anchor, body_anchor);
world_->CreateJoint(&distance_joint_def);
base_anchor.Set(SCREEN_TO_WORLD(SCREEN_SIZE.width * 0.95f), 0.0f);
body_anchor.Set(SCREEN_TO_WORLD(SCREEN_SIZE.width * 0.85f), SCREEN_TO_WORLD(SCREEN_SIZE.height * 0.2f));
distance_joint_def.Initialize(base_, test_body, base_anchor, body_anchor);
world_->CreateJoint(&distance_joint_def);
}
void BuoyancyTest::update(float dt)
{
world_->Step(dt, 8, 3);
UpdateBuoyancy();
}
void BuoyancyTest::BeginContact(b2Contact* contact)
{
b2Fixture* fixture_a = contact->GetFixtureA();
b2Fixture* fixture_b = contact->GetFixtureB();
if(fixture_a->IsSensor() && fixture_b->GetBody()->GetType() == b2_dynamicBody)
fixture_pairs_.insert(make_pair(fixture_a, fixture_b));
else if(fixture_b->IsSensor() && fixture_a->GetBody()->GetType() == b2_dynamicBody)
fixture_pairs_.insert(make_pair(fixture_b, fixture_a));
else
{
if( (fixture_a->GetBody() == player_body_ && fixture_b->GetBody()->GetType() == b2_dynamicBody) ||
(fixture_b->GetBody() == player_body_ && fixture_a->GetBody()->GetType() == b2_dynamicBody) )
player_body_->SetLinearVelocity(b2Vec2_zero);
}
}
void BuoyancyTest::EndContact(b2Contact* contact)
{
b2Fixture* fixture_a = contact->GetFixtureA();
b2Fixture* fixture_b = contact->GetFixtureB();
if(fixture_a->IsSensor() && fixture_b->GetBody()->GetType() == b2_dynamicBody)
fixture_pairs_.erase(make_pair(fixture_a, fixture_b));
else if(fixture_b->IsSensor() && fixture_a->GetBody()->GetType() == b2_dynamicBody)
fixture_pairs_.erase(make_pair(fixture_b, fixture_a));
}
void BuoyancyTest::UpdateBuoyancy()
{
set<fixture_pair>::iterator it = fixture_pairs_.begin();
set<fixture_pair>::iterator end = fixture_pairs_.end();
while (it != end) {
//fixtureA is the fluid
b2Fixture* fixture_a = it->first;
b2Fixture* fixture_b = it->second;
float density = fixture_a->GetDensity();
vector<b2Vec2> intersectionPoints;
if (GameGlobals::FindIntersectionOfFixtures(fixture_a, fixture_b, intersectionPoints)) {
//find centroid
float area = 0;
b2Vec2 centroid = GameGlobals::ComputeCentroid(intersectionPoints, area);
ApplyBuoyancyForce(fixture_a, fixture_b, area, centroid);
ApplyDrag(fixture_a, fixture_b, area, centroid);
}
++it;
}
}
void BuoyancyTest::ApplyBuoyancyForce(b2Fixture* fixture_a, b2Fixture* fixture_b, float area, b2Vec2 centroid)
{
float displacedMass = fixture_a->GetDensity() * area;
b2Vec2 buoyancyForce = displacedMass * -gravity_;
fixture_b->GetBody()->ApplyForce(buoyancyForce, centroid, true);
}
void BuoyancyTest::ApplyDrag(b2Fixture* fixture_a, b2Fixture* fixture_b, float area, b2Vec2 centroid)
{
b2Vec2 relative_velocity = fixture_b->GetBody()->GetLinearVelocityFromWorldPoint(centroid) - fixture_a->GetBody()->GetLinearVelocityFromWorldPoint(centroid);
float relative_velocity_mag = relative_velocity.Normalize();
// apply linear drag
float drag_mag = fixture_a->GetDensity() * relative_velocity_mag * relative_velocity_mag;
b2Vec2 drag_force = drag_mag * -relative_velocity;
fixture_b->GetBody()->ApplyForce(drag_force, centroid, true);
// apply angular drag
// float angular_drag = area * -fixture_b->GetBody()->GetAngularVelocity();
// fixture_b->GetBody()->ApplyTorque(angular_drag, true);
}
void BuoyancyTest::UpdateTrajectory()
{
vector<Vec2> points;
GameGlobals::GetTrajectory(player_body_->GetPosition(), impulse_, gravity_, points);
trajectory_->clear();
for(int i = 0; i < NUM_TRAJECTORY_STEPS; ++i)
trajectory_->drawDot(points[i], 1, ccc4f(1, 1, 1, 1.0f - (float)i/(float)NUM_TRAJECTORY_STEPS));
}
bool BuoyancyTest::onTouchBegan(Touch* touch, Event* event)
{
impulse_ = b2Vec2(5.0f, 5.0f);
impulse_.x /= player_body_->GetMass();
impulse_.y /= player_body_->GetMass();
UpdateTrajectory();
last_touch_ = touch->getLocation();
return true;
}
void BuoyancyTest::onTouchMoved(Touch* touch, Event* event)
{
Vec2 curr_touch = touch->getLocation();
float angle = CC_DEGREES_TO_RADIANS( (last_touch_.x - curr_touch.x) / 5 );
b2Vec2 modified_impulse(impulse_.x * cosf(angle) - impulse_.y * sinf(angle), impulse_.x * sinf(angle) + impulse_.y * cosf(angle));
impulse_ = modified_impulse;
UpdateTrajectory();
last_touch_.set(curr_touch);
}
void BuoyancyTest::onTouchEnded(Touch* touch, Event* event)
{
player_body_->ApplyLinearImpulse(impulse_, player_body_->GetWorldCenter(), true);
impulse_ = b2Vec2_zero;
last_touch_.set(Vec2::ZERO);
trajectory_->clear();
}
void BuoyancyTest::draw(Renderer *renderer, const Mat4 &transform, uint32_t flags)
{
Layer::draw(renderer, transform, flags);
custom_command_.init(_globalZOrder);
custom_command_.func = CC_CALLBACK_0(BuoyancyTest::onDraw, this, transform, flags);
renderer->addCommand(&custom_command_);
}
void BuoyancyTest::onDraw(const Mat4 &transform, uint32_t flags)
{
Director* director = Director::getInstance();
CCASSERT(nullptr != director, "Director is null when seting matrix stack");
director->pushMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW);
director->loadMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW, transform);
GL::enableVertexAttribs( cocos2d::GL::VERTEX_ATTRIB_FLAG_POSITION );
world_->DrawDebugData();
CHECK_GL_ERROR_DEBUG();
director->popMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW);
}
void BuoyancyTest::menuCloseCallback(Ref* pSender)
{
Director::getInstance()->replaceScene(BuoyancyTest::createScene());
}
<file_sep>/*
* GameGlobals.cpp
*
* Created on: 08-Oct-2014
* Author: woigames
*/
#include "GameGlobals.h"
Size GameGlobals::screen_size_ = Size::ZERO;
void GameGlobals::Init()
{
GameGlobals::screen_size_ = Director::getInstance()->getWinSize();
}
b2Body* GameGlobals::GetBodyForWorld(b2World* world, b2BodyType type, b2Shape::Type shape, EBodySize body_size)
{
b2BodyDef body_def;
body_def.type = type;
b2Body* body = world->CreateBody(&body_def);
b2PolygonShape box_shape = GameGlobals::GetRandomBoxShape(body_size);
b2FixtureDef fixture_def;
fixture_def.shape = &box_shape;
fixture_def.density = 0.5f;
body->CreateFixture(&fixture_def);
return body;
}
b2PolygonShape GameGlobals::GetRandomBoxShape(EBodySize body_size)
{
b2PolygonShape box_shape;
float width = 0, height = 0;
switch(body_size)
{
case E_BODY_SMALL:
width = MIN_SHAPE_SIZE + CCRANDOM_0_1() * MAX_SHAPE_SIZE;
width *= 1.25f;
height = MIN_SHAPE_SIZE + CCRANDOM_0_1() * MAX_SHAPE_SIZE;
break;
case E_BODY_MEDIUM:
width = 3.75f * MIN_SHAPE_SIZE + CCRANDOM_0_1() * MAX_SHAPE_SIZE;
width *= 1.25f;
height = 3.75f * MIN_SHAPE_SIZE + CCRANDOM_0_1() * MAX_SHAPE_SIZE;
break;
case E_BODY_LARGE:
width = 7.5f * MIN_SHAPE_SIZE + CCRANDOM_0_1() * MAX_SHAPE_SIZE;
width *= 1.25f;
height = 7.5f * MIN_SHAPE_SIZE + CCRANDOM_0_1() * MAX_SHAPE_SIZE;
break;
}
box_shape.SetAsBox(width, height);
return box_shape;
}
b2CircleShape GameGlobals::GetRandomCircleShape()
{
b2CircleShape circle_shape;
circle_shape.m_radius = MIN_SHAPE_SIZE + CCRANDOM_0_1() * (MAX_SHAPE_SIZE - MIN_SHAPE_SIZE);
return circle_shape;
}
void GameGlobals::GetTrajectory(b2Vec2 initial_position, b2Vec2 initial_velocity, b2Vec2 gravity, vector<Vec2> &points)
{
points.clear();
float t = 1 / 60.0f; // seconds per time step (at 60fps)
b2Vec2 step_velocity = t * initial_velocity; // m/s
b2Vec2 step_gravity = t * t * gravity; // m/s/s
for(int i = 0; i < NUM_TRAJECTORY_STEPS; ++i)
{
b2Vec2 point_b2 = initial_position + i * step_velocity + 0.5f * (i*i+i) * step_gravity;
Vec2 point(point_b2.x * PTM_RATIO, point_b2.y * PTM_RATIO);
points.push_back(point);
}
}
bool GameGlobals::Inside(b2Vec2 cp1, b2Vec2 cp2, b2Vec2 p)
{
return (cp2.x-cp1.x)*(p.y-cp1.y) > (cp2.y-cp1.y)*(p.x-cp1.x);
}
b2Vec2 GameGlobals::Intersection(b2Vec2 cp1, b2Vec2 cp2, b2Vec2 s, b2Vec2 e)
{
b2Vec2 dc(cp1.x - cp2.x, cp1.y - cp2.y);
b2Vec2 dp(s.x - e.x, s.y - e.y);
float n1 = cp1.x * cp2.y - cp1.y * cp2.x;
float n2 = s.x * e.y - s.y * e.x;
float n3 = 1.0 / (dc.x * dp.y - dc.y * dp.x);
return b2Vec2((n1 * dp.x - n2 * dc.x) * n3, (n1 * dp.y - n2 * dc.y) * n3);
}
//http://rosettacode.org/wiki/Sutherland-Hodgman_polygon_clipping#JavaScript
//Note that this only works when fB is a convex polygon, but we know all
//fixtures in Box2D are convex, so that will not be a problem
bool GameGlobals::FindIntersectionOfFixtures(b2Fixture* fA, b2Fixture* fB, vector<b2Vec2>& output_vertices)
{
//currently this only handles polygon vs polygon
if (fA->GetShape()->GetType() != b2Shape::e_polygon
|| fB->GetShape()->GetType() != b2Shape::e_polygon)
return false;
b2PolygonShape* polyA = (b2PolygonShape*) fA->GetShape();
b2PolygonShape* polyB = (b2PolygonShape*) fB->GetShape();
//fill subject polygon from fixtureA polygon
for (int i = 0; i < polyA->GetVertexCount(); i++)
output_vertices.push_back(fA->GetBody()->GetWorldPoint(polyA->GetVertex(i)));
//fill clip polygon from fixtureB polygon
vector<b2Vec2> clip_polygon;
for (int i = 0; i < polyB->GetVertexCount(); i++)
clip_polygon.push_back(fB->GetBody()->GetWorldPoint(polyB->GetVertex(i)));
b2Vec2 cp1 = clip_polygon[clip_polygon.size() - 1];
for (int j = 0; j < clip_polygon.size(); j++)
{
b2Vec2 cp2 = clip_polygon[j];
if (output_vertices.empty())
return false;
vector<b2Vec2> input_list = output_vertices;
output_vertices.clear();
b2Vec2 s = input_list[input_list.size() - 1]; //last on the input list
for (int i = 0; i < input_list.size(); i++)
{
b2Vec2 e = input_list[i];
if (GameGlobals::Inside(cp1, cp2, e))
{
if (!GameGlobals::Inside(cp1, cp2, s))
{
output_vertices.push_back(GameGlobals::Intersection(cp1, cp2, s, e));
}
output_vertices.push_back(e);
}
else if (GameGlobals::Inside(cp1, cp2, s))
{
output_vertices.push_back(GameGlobals::Intersection(cp1, cp2, s, e));
}
s = e;
}
cp1 = cp2;
}
return !output_vertices.empty();
}
//Taken from b2PolygonShape.cpp
b2Vec2 GameGlobals::ComputeCentroid(vector<b2Vec2> vs, float& area)
{
int count = (int) vs.size();
b2Assert(count >= 3);
b2Vec2 c;
c.Set(0.0f, 0.0f);
area = 0.0f;
// pRef is the reference point for forming triangles.
// Its location doesnt change the result (except for rounding error).
b2Vec2 pRef(0.0f, 0.0f);
const float32 inv3 = 1.0f / 3.0f;
for (int32 i = 0; i < count; ++i) {
// Triangle vertices.
b2Vec2 p1 = pRef;
b2Vec2 p2 = vs[i];
b2Vec2 p3 = i + 1 < count ? vs[i + 1] : vs[0];
b2Vec2 e1 = p2 - p1;
b2Vec2 e2 = p3 - p1;
float32 D = b2Cross(e1, e2);
float32 triangle_area = 0.5f * D;
area += triangle_area;
// Area weighted centroid
c += triangle_area * inv3 * (p1 + p2 + p3);
}
// Centroid
if (area > b2_epsilon)
c *= 1.0f / area;
else
area = 0;
return c;
}
<file_sep>BuoyancyTest
============
BuoyancyTest is a simple buoyancy simulation.
It has been built using Box2D in conjunction with cocos2d-x-3.2
| 9334a332c0f058933cdbfdfb5b7af6746daccf27 | [
"Markdown",
"C++"
] | 7 | C++ | agalchavijaycalls/BuoyancyTest | d6e27fd761929c757bd6232cb31112fb83d1ad2f | 28dd16187cbe1cd3d89e46e5a0f873dc2f14d24b | |
refs/heads/master | <file_sep>const router = require('express').Router();
const passport = require('passport');
const Score = require('../models/score-model');
const User = require('../models/user-model');
const bodyParser = require('body-parser');
const jsonParser = bodyParser.json();
router.get('/gameplay', (req, res) => {
res.render('gameplay', {
user: req.user,
});
});
router.post("/score", jsonParser, function (req, res) {
// Take the request...
var newScore = req.body;
newScore.googleId = req.user.googleId;
newScore.thumbnail = req.user.thumbnail;
newScore.postedBy = req.user.username;
// console.log("I am line 24 game-routes\n", req.user);
var latest = new Score({
googleId: newScore.googleId,
thumbnail: newScore.thumbnail,
postedBy: newScore.postedBy,
difficulty: newScore.difficulty,
score: newScore.score
});
Score.create(latest)
.then(score => {
console.log("Created a score record!");
res.status(201).json(score);
})
.catch(err => {
res.status(400).json(err);
});
});
module.exports = router;<file_sep># Whack-A-Bug #
### About Whack-A-Bug: ###
Whack-A-Bug is a full-stack game built for developers to release the inevitable stress that comes with being a developer. The goal of the game is to smash all of the "bugs" in the game box as quickly as possible.
This app is deployed to Heroku at: https://whackabug.herokuapp.com/
---------------------------------
### How to use Whack-A-Bug: ###
Log in using your Google account for authentication (or create a Google account if you do not have one).
You will be taken to your profile page, where you can view your Personal Bests as well as the Global Leaderboard.
Click "Play New Game" and be taken to the gameplay page.
Select your difficulty level (Easy, Medium, Hard, or Plague). The difficulty level corresponds to the number of "moles" that you will need to smash in the game.
When the game begins, click on the "bugs" (red circles) as quickly as you can. Be careful! You'll be penalized if you click on a non-bug (green circle).
Try to improve your score and compete with other users of the platform!
---------------------------------
### Built with: ###
#### Front-end ####
Bulma.io: https://bulma.io/
jQuery: https://jquery.com/
#### Back-end ####
Express: https://expressjs.com/
Node.js: https://nodejs.org/en/
Passport.js: http://www.passportjs.org/
MongoDB: https://www.mongodb.com/
Mongoose NPM: https://www.npmjs.com/package/mongoose
---------------------------------
### Contributers: ###
<NAME>: https://github.com/albertcoder
<NAME>: https://github.com/EthanPFisher
<NAME>: https://github.com/rsharar<file_sep>const router = require('express').Router();
const Score = require('../models/score-model');
const User = require('../models/user-model');
const authCheck = (req, res, next) => {
if (!req.user) {
res.redirect('/auth/login');
} else {
next();
}
};
router.get('/', authCheck, (req, res) => {
// console.log("This is the user: "+req.user.googleId);
var googleIdee = req.user.googleId;
var fetchAllScores = function () {
return Score.find({}, function (err, usersReturned) {
if (err) return handleError(err);
}).sort({
score: 1
}).limit(3).then(function (data) {
// console.log(data);
return data;
});
};
var fetchLoggedInUserScores = function () {
return Score.find({
googleId: googleIdee
}, function (err, usersReturned) {
if (err) return handleError(err);
}).sort({
score: 1
}).limit(3).then(function (data) {
return data;
});
};
// fetchAllScores();
Promise.all([fetchAllScores(), fetchLoggedInUserScores()]).then(function (data) {
console.log("I am fetchLogged \n", data[0].length);
if (data[0].length >= 3) {
res.render('profile', {
user: req.user,
userData: data
});
}
else {
res.send("Please play at least 3 times to see your leaderboard.");
}
});
});
module.exports = router;<file_sep>module.exports = {
google: {
clientID: '744866401172-kp4aq9mevkpvfmo8kg3ce4iicken9l5c.apps.googleusercontent.com',
clientSecret: '<KEY>'
},
mongodb: {
dbURI: 'mongodb://test:<EMAIL>:57268/whackabug'
},
session: {
cookieKey: 'thenetninjaisawesomeiguess'
}
}; | 1fb310e79d045323a881ed69a7f788cd46560a13 | [
"JavaScript",
"Markdown"
] | 4 | JavaScript | rsharar/whack_a_mole | 68986b9ef93d9314d02453cf22ccad813e839bd2 | 98c1d9ecabe62d459e7179c9d8e37acc57b66e9d | |
refs/heads/master | <file_sep>/**
* Copyright 2004 - 2007 Blue Bamboo International Inc.
* All rights reserved.
*
*
* Blue Bamboo PROPRIETARY/CONFIDENTIAL.
*
*/
package com.googlecode.eclipse.navigatorext.var;
import java.text.SimpleDateFormat;
import java.util.Date;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.variables.IDynamicVariable;
import org.eclipse.core.variables.IDynamicVariableResolver;
public class DateTimeVariableResolver implements IDynamicVariableResolver {
public String resolveValue(IDynamicVariable variable, String argument) throws CoreException {
String pattern = "yyyyMMdd";
if (argument != null && argument.length() > 0) {
pattern = argument;
}
SimpleDateFormat format = new SimpleDateFormat(pattern);
return format.format(new Date());
}
}
| 9058bb6e5a176319ce2095102230cec73006c8d9 | [
"Java"
] | 1 | Java | tectronics/navigatorext | d60bb0069136d696dd25e1ae58d29cf8c1851cb5 | f91de844132746fc5ad4065dd19863fbb835aad2 | |
refs/heads/master | <file_sep># Movie App 2021
React JS Fundamentals Course(2019 update)
Online class from [NomadCoder](https://nomadcoders.co/)
<file_sep>// React Practice 1 code
// originally App.js
/*
import React from "react";
import PropTypes from "prop-types"
function Food({name, picture, rating}){
return <div>
<h2>I like {name}</h2>
<h4>{rating}/5.0</h4>
<img src={picture} alt={name}/>
</div>
}
Food.propTypes = {
name: PropTypes.string.isRequired,
picture: PropTypes.string.isRequired,
rating: PropTypes.number.isRequired
}
const foodILike = [
{
id:1,
name: "kimchi",
rating: 4.9,
image: "https://upload.wikimedia.org/wikipedia/commons/f/f8/Various_kimchi.jpg"
},
{
id:2,
name: "chicken",
rating: 1.5,
image: "https://upload.wikimedia.org/wikipedia/commons/5/50/Female_pair.jpg"
},
{
id:3,
name: "pizza",
rating: 5,
image: "https://upload.wikimedia.org/wikipedia/commons/5/50/Female_pair.jpg"
}
]
function renderFood(dish){
console.log(dish);
return <Food
key={dish.id}
name={dish.name}
rating={dish.rating}
picture={dish.image}
/>
}
function App() {
return (
<div>
{foodILike.map(renderFood)}
</div>
);
}
export default App;
*/ | 2a744ccb0705ca03a7e4c399578923f79989f7af | [
"Markdown",
"JavaScript"
] | 2 | Markdown | Woojung0618/movie_app | d71ee90a2532704bd4eae1f0d788136d50c34cfb | e55699ae63b9250bdac4212e7ce01bca7a889608 | |
refs/heads/master | <file_sep>let model = {
init: function() {
if (!localStorage.cats) {
localStorage.cats = JSON.stringify([
{
name: "aaaa",
image: "cat0.jpg",
count: 0
},
{
name: "bbbb",
image: "cat1.jpg",
count: 0
},
{
name: "cccc",
image: "cat2.jpg",
count: 0
},
{
name: "dddd",
image: "cat3.jpg",
count: 0
},
{
name: "eeee",
image: "cat4.jpg",
count: 0
}
]);
}
},
getCats: function() {
return JSON.parse(localStorage.cats);
},
setCats: function(data) {
localStorage.cats = JSON.stringify(data);
},
updateCount: function(index) {
let cats = this.getCats();
let count = cats[index]["count"];
count += 1;
cats[index]["count"] = count;
this.setCats(cats);
return count;
}
};
let controller = {
init: function() {
model.init();
view.init();
this.showCat(0);
},
getCats: function() {
return model.getCats();
},
showCat: function(i) {
let cats = this.getCats();
let name = cats[i]["name"];
let image = cats[i]["image"];
let count = cats[i]["count"];
view.displayCat(name, image, count, i);
},
updateCount: function(i) {
let count = model.updateCount(i);
view.displayCount(count);
}
};
let view = {
init: function() {
this.showList();
},
showList: function() {
let catList = document.getElementById("catList");
let cats = controller.getCats();
cats.map(function(cat, i) {
let catItem = document.createElement("li");
catItem.textContent = cat.name;
catItem.addEventListener(
"click",
function() {
controller.showCat(i);
},
false
);
catList.appendChild(catItem);
});
},
displayCat: function(name, image, count, i) {
let bigPic = document.getElementById("bigPic");
if (bigPic.childElementCount) {
bigPic.removeChild(bigPic.firstChild);
}
let bigCat = document.createElement("div");
let catImage = document.createElement("img");
let catName = document.createElement("div");
let catCount = document.createElement("div");
catImage.src = image;
catName.textContent = name;
catCount.textContent = count;
catCount.id = "catCount";
bigCat.appendChild(catImage);
bigCat.appendChild(catName);
bigCat.appendChild(catCount);
bigCat.addEventListener(
"click",
function() {
controller.updateCount(i);
},
false
);
bigPic.appendChild(bigCat);
},
displayCount: function(count) {
let catCount = document.getElementById("catCount");
let parent = catCount.parentNode;
let newCount = document.createElement("div");
newCount.textContent = count;
newCount.id = "catCount";
parent.replaceChild(newCount, catCount);
}
};
controller.init();
<file_sep>let model = {
showAdmin: false,
currentCat: null,
cats: [
{
name: "aaaa",
image: "cat0.jpg",
count: 0
},
{
name: "bbbb",
image: "cat1.jpg",
count: 0
},
{
name: "cccc",
image: "cat2.jpg",
count: 0
},
{
name: "dddd",
image: "cat3.jpg",
count: 0
},
{
name: "eeee",
image: "cat4.jpg",
count: 0
}
]
};
//===================================================
let controller = {
init: function() {
model.currentCat = model.cats[0];
listView.init();
catView.init();
adminView.init();
},
getCurrentCat: function() {
return model.currentCat;
},
getCats: function() {
return model.cats;
},
setCurrentCat: function(cat) {
model.currentCat = cat;
},
updateCount: function() {
model.currentCat.count += 1;
console.log("mcc", model.currentCat.count);
catView.displayCount(model.currentCat.count);
},
showAdmin: function() {
model.showAdmin = true;
adminView.render(model.showAdmin);
},
cancelAdmin: function() {
model.showAdmin = false;
adminView.render(model.showAdmin);
},
saveAdmin: function() {
let fName = document.getElementById("f-cat-name").value;
let fImgUrl = document.getElementById("f-img-url").value;
let fClickCount = document.getElementById("f-click-count").value;
model.currentCat.name = fName;
model.currentCat.image = fImgUrl;
model.currentCat.count = Number.parseInt(fClickCount);
console.log(Number.isInteger(model.currentCat.count));
model.showAdmin = false;
adminView.render(model.showAdmin);
catView.render();
}
};
//=====================================================================
let catView = {
init: function() {
this.catName = document.getElementById("cat-name");
this.catCount = document.getElementById("cat-count");
this.catImage = document.getElementById("cat-image");
this.catImage.addEventListener(
"click",
function() {
controller.updateCount();
},
false
);
this.render();
},
render: function() {
let currentCat = controller.getCurrentCat();
this.catName.textContent = currentCat.name;
this.catCount.textContent = currentCat.count;
this.catImage.src = currentCat.image;
},
displayCount: function(count) {
console.log(count);
this.catCount.textContent = count;
}
};
//---------------------------------------------------------------
let listView = {
init: function() {
this.catList = document.getElementById("cat-list");
this.render();
},
render: function() {
let catList = document.getElementById("cat-list");
let cats = controller.getCats();
cats.map(function(cat) {
let catItem = document.createElement("li");
catItem.textContent = cat.name;
catItem.addEventListener(
"click",
function() {
controller.setCurrentCat(cat);
catView.render();
adminView.render();
},
false
);
catList.appendChild(catItem);
});
}
};
//------------------------------------------------------------------
let adminView = {
init: function() {
this.adminForm = document.getElementById("admin-form");
this.fName = document.getElementById("f-cat-name");
this.fImgUrl = document.getElementById("f-img-url");
this.fClickCount = document.getElementById("f-click-count");
let adminBtn = document.getElementById("admin-btn");
adminBtn.addEventListener("click", function() {
controller.showAdmin();
});
let cancelBtn = document.getElementById("cancel-btn");
cancelBtn.addEventListener("click", function() {
controller.cancelAdmin();
});
let saveBtn = document.getElementById("save-btn");
saveBtn.addEventListener("click", function() {
controller.saveAdmin();
});
},
render: function(show) {
if (show) {
let currentCat = controller.getCurrentCat();
this.fName.value = currentCat.name;
this.fImgUrl.value = currentCat.image;
this.fClickCount.value = currentCat.count;
this.adminForm.style.display = "block";
} else {
this.adminForm.style.display = "none";
}
}
};
controller.init();
<file_sep>let pics = document.getElementById("pics");
let clicks = document.getElementById("clicks");
let cat = document.getElementById("cat");
let cats = [
{
name: "aaaa",
img: "cat0.jpg"
},
{
name: "bbbb",
img: "cat1.jpg"
}
];
cats.map(function(cat) {
insertCat(cat);
});
function insertCat(cat) {
let catPic = document.createElement("div");
let image = document.createElement("img");
let catName = document.createElement("div");
let catCount = document.createElement("div");
catCount.textContent = 0;
let counter = 0;
image.src = cat.img;
// image.width = 200;
image.addEventListener(
"click",
function() {
counter += 1;
catCount.textContent = counter;
},
false
);
catName.textContent = cat.name;
catName.className = "name";
catPic.appendChild(image);
catPic.appendChild(catName);
catPic.appendChild(catCount);
pics.appendChild(catPic);
}
<file_sep># catclicker
udemy project
| 30b77ca52d0723dc4b80e8151808e9131e3345a7 | [
"JavaScript",
"Markdown"
] | 4 | JavaScript | morandj/catclicker | 4bb91a7d293568d17c5c4280d17d0752f0b02cde | 1b7ba62723327e21eabbfa7a951c3eb0cbbb1dcf | |
refs/heads/master | <repo_name>giwa/python-circleci<file_sep>/test.py
import sys
if sys.version_info[0] < 3:
raise TypeError("Must be using Python 3")
def test():
""" Print foo
>> test()
foo
"""
return 'foo'
if __name__ == '__main__':
import doctest
doctest.testmod()
| b75149ecf360249ae41a0c3d90fb26d616eb77c5 | [
"Python"
] | 1 | Python | giwa/python-circleci | f0e93edeca309a96208438c0008e1f5539f1fa08 | 0968a3823de03d8a3956e1e6d900bc36466d6c38 | |
refs/heads/master | <repo_name>dadonas/node-fundamentals<file_sep>/app.js
var Resource = require("./inharitance");
var r = new Resource(10);
r.on("start", function(){
console.log("I've just started!");
});
r.on("data", function(d){
console.log("Data received -> " + d);
});
r.on("end", function(d){
console.log("I've just finished with " + d + " events.");
}); | 45d66f95f9911c409cc7c39e59fba87c19a07db2 | [
"JavaScript"
] | 1 | JavaScript | dadonas/node-fundamentals | 4127a875ac5b89f318dedaaa68f82440791eda59 | a256fa6cdcc0628825056e9d9c0199e3bbbbb8b0 | |
refs/heads/master | <file_sep>using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Xml;
namespace Gay_Podcast_Access
{
class Episode_Download
{
/* めもでござりゅ
*
* 動作としては、1つのファイル毎に繰り返す仕様にしたい
*
* RSS.XMLからURLとかいろいろ読み出す
* ↓
* ダウンロードするURLとか変数に代入
* ↓
* ループ作業
* ↓
* URLのHTTPステータスチェック
* ↓
* ダウンロード開始するぅ
* ↓
* ダウンロード終わったやでって来た
* ↓
* 次のURLの設定
* ↓
* ループの頭へ
*/
private void Xml_Extraction(string RSS_File, string File_Saving)
{
XmlDocument xmlDocument = new XmlDocument();
xmlDocument.Load(RSS_File);
try
{
XmlElement xmlElement = xmlDocument.DocumentElement;
XmlNodeList xmlNodeList_enclosure = xmlElement.GetElementsByTagName("enclosure");
XmlNodeList xmlNodeList_title = xmlElement.GetElementsByTagName("title");
string[] episode_url = new string[xmlNodeList_enclosure.Count];
string[] episode_title = new string[xmlNodeList_title.Count];
bool[] catch_data = new bool[2];
// エピソードURLの取得
if (xmlNodeList_enclosure.Count != 0)
{
for (int i = 0; i < xmlNodeList_enclosure.Count; i++) // URLの取得
{
XmlElement element = (XmlElement)xmlNodeList_enclosure.Item(i);
episode_url[i] = element.GetAttribute("url");
catch_data[0] = true;
}
download_all = xmlNodeList_enclosure.Count;
}
else
{
DialogResult choose = MessageBox.Show("\"enclosure\"タグが存在しません。RSSファイルを確認してください。\nRSSファイルを開きますか?", "タグが見つかりません", MessageBoxButtons.YesNo, MessageBoxIcon.Error);
if (choose == DialogResult.Yes)
{
System.Diagnostics.Process P = System.Diagnostics.Process.Start(RSS_File);
bool result = P.Start();
}
}
// titleの取得
if (xmlNodeList_title.Count != 0)
{
for (int i = 0; i < xmlNodeList_title.Count; i++)
{
episode_title[i] = xmlNodeList_title.Item(i).InnerText;
catch_data[1] = true;
}
}
else
{
DialogResult choose = MessageBox.Show("\"title\"タグが存在しません。RSSファイルを確認してください。\nRSSファイルを開きますか?", "タグが見つかりません", MessageBoxButtons.YesNo, MessageBoxIcon.Error);
if (choose == DialogResult.Yes)
{
System.Diagnostics.Process P = System.Diagnostics.Process.Start(RSS_File);
bool result = P.Start();
}
}
if (catch_data[0] == true && catch_data[1] == true)
{
for (int i = 0; i < episode_url.Length; i++)
{
string[] httpstatus_code = new string[2];
httpstatus_code = HttpStatus(episode_url[i]);
if (httpstatus_code[0] == "OK" && httpstatus_code[1] == "OK")
Download_check(episode_url[i], Folder_URI, Episode_Title_CATCH(i, episode_url, episode_title));
}
}
}
catch (XmlException Exception) //Exception発生時のエラーメッセ表示
{
MessageBox.Show("Error: " + Exception.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
}
}
<file_sep>using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.IO;
namespace Split4
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
String FileUrl = "C:\\Users\\guxtu\\Downloads\\削除コマンド確認用";
DeleteFile(FileUrl);
}
public void DeleteFile(String targetDirectoryPath)
{
if (!Directory.Exists(targetDirectoryPath))
{
return;
}
//ディレクトリ以外の全ファイルを削除
string[] filePaths = Directory.GetFiles(targetDirectoryPath);
foreach (string filePath in filePaths)
{
File.SetAttributes(filePath, FileAttributes.Normal);
Console.WriteLine("Delete: " + filePath);
File.Delete(filePath);
}
}
}
}
<file_sep>using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Xml;
// 目的: RSSからURLを取り出す
namespace Split3
{
public partial class Form1 : Form
{
private const bool T = true;
private const bool F = false;
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
// 動作内容: RSSファイル(.rss)を選択する → TextBox1にファイルアドレスを表示する
//OpenFileDialogクラスのインスタンスを作成
OpenFileDialog ofd = new OpenFileDialog
{
//はじめに表示されるフォルダを指定
InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile),
//[ファイルの種類]に表示される選択肢を指定
Filter = "RSS File(*.rss)|*.rss",
//タイトルを設定する
Title = "Choose the RSS fle you want to road",
//ダイアログボックスを閉じる前に現在のディレクトリを復元するようにする
RestoreDirectory = T
};
//ダイアログを表示する
if (ofd.ShowDialog() == DialogResult.OK)
{
//OKボタンがクリックされたとき、選択されたファイル名を表示する
textBox1.Text = ofd.FileName;
}
}
private void button2_Click(object sender, EventArgs e)
{
// 動作内容: RSSファイルの読み込み → ファイルから特定のタグを検索 → 検索したタグから属性を抽出
// 1. XMLの読み込み
XmlDocument xmlDocument = new XmlDocument();
xmlDocument.Load(textBox1.Text);
try // 2. XMLから特定のタグを検索
{
XmlElement xmlElement = xmlDocument.DocumentElement;
XmlNodeList xmlNodeList = xmlElement.GetElementsByTagName("enclosure");
if (xmlNodeList.Count != 0)
{
// 3.XMLのタグから属性を抽出
String[] urls = new String[xmlNodeList.Count];
for (int i = 0; i < xmlNodeList.Count; i++)
{
XmlElement element = (XmlElement)xmlNodeList.Item(i);
urls[i] = element.GetAttribute("url"); ;
}
Message(string_add(urls), "Tags", MessageBoxIcon.Information);
}
else
{
DialogResult choose = MessageBox.Show("\"enclosure\"タグが存在しません。RSSファイルを確認してください。\nRSSファイルを開きますか?", "タグが見つかりません", MessageBoxButtons.YesNo, MessageBoxIcon.Error);
if (choose == DialogResult.Yes)
{
System.Diagnostics.Process P = System.Diagnostics.Process.Start(textBox1.Text);
bool result = P.Start();
}
}
}
catch (XmlException Exception) //Exception発生時のエラーメッセ表示
{
Message("Error: " + Exception.Message, "Error", MessageBoxIcon.Error);
}
}
public void Message(String mes, String head, MessageBoxIcon icon)
{
// 動作内容: メッセージボックスの表示。それだけ。
MessageBox.Show(mes, head, MessageBoxButtons.OK, icon);
}
public String string_add(String[] tags)
{
// 動作内容: URLの表示をするために各行毎に改行を入れる
String return_text = "";
for (int i = 0; i < tags.Length; i++) return_text = return_text + tags[i] + "\n";
return return_text;
}
}
}
<file_sep>using System;
using System.IO;
using System.Net;
using System.Windows.Forms;
namespace Gay_Podcast_Access
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
// UI部品設定
private void button1_Click(object sender, EventArgs e)
{
//フォルダの指定を行う
// メモの1番
FolderBrowserDialog file = new FolderBrowserDialog();
file.Description = "フォルダを指定してください。";
file.ShowNewFolderButton = true;
if (file.ShowDialog(this) == DialogResult.OK)
label3.Text = file.SelectedPath;
}
private void button4_Click(object sender, EventArgs e)
{
this.Close();
}
private void timer1_Tick(object sender, EventArgs e)
{
if (textBox1.Text != "" && label3.Text != "")
{
button2.Enabled = true;
timer1.Enabled = false;
}
}
private void button2_Click(object sender, EventArgs e)
{
DialogResult really = MessageBox.Show("これよりエピソードのダウンロードを行います。\n指定したフォルダーのデータが全て削除されます。\n本当に構いませんか?", "Ready to Download", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
if (really == DialogResult.OK)
Download_Portal(textBox1.Text, label3.Text.Replace("\\", "\\\\"), "rss.xml");
}
//RSSのダウンロード
string File_URL_Data = "";
// ベースポータル
public void Download_Portal(string web_address, string folder_address, string File_Name)
{
string[] Status = new string[2];
Status = HttpStatus(web_address);
if (Status[0] == "OK")
{
Uri uriResult;
// URIの有効性の確認
bool result = Uri.TryCreate(web_address, UriKind.Absolute, out uriResult)
&& (uriResult.Scheme == Uri.UriSchemeHttp || uriResult.Scheme == Uri.UriSchemeHttps);
if (result) file_download(web_address, folder_address, File_Name);
}
}
// HTTPステータスの確認
public string[] HttpStatus(string check_URI)
{
string access_url = null;
string[] access_code = { "ERROR", "ERROR" };
//URIの有効性の確認
Uri uriResult;
bool result = Uri.TryCreate(check_URI, UriKind.Absolute, out uriResult)
&& (uriResult.Scheme == Uri.UriSchemeHttp || uriResult.Scheme == Uri.UriSchemeHttps);
if (result)
{
ServicePointManager.SecurityProtocol |= SecurityProtocolType.Tls12;
HttpWebRequest webreq = (HttpWebRequest)WebRequest.Create(check_URI);
HttpWebResponse webres = null;
try
{
webres = (HttpWebResponse)webreq.GetResponse();
access_url = webres.ResponseUri.ToString();
access_code[0] = webres.StatusCode.ToString();
Console.WriteLine("HTTPStatus_Response: " + webres.StatusCode + ", " + webres.StatusDescription);
access_code[1] = webres.StatusDescription;
}
catch (WebException ex)
{
if (ex.Status == WebExceptionStatus.ProtocolError)
{
HttpWebResponse errres = (HttpWebResponse)ex.Response;
access_url = errres.ResponseUri.ToString(); access_code[0] = errres.StatusCode.ToString();
access_code[1] = errres.StatusDescription;
}
}
finally { if (webres != null) webres.Close(); }
}
else
MessageBox.Show("有効なURLではありません。", "確認してください", MessageBoxButtons.OK, MessageBoxIcon.Error);
return access_code;
}
// ファイルのダウンロード
string episode_rss = "";
private void file_download(string RSS_URI, string Folder_URI, string File_Name)
{
WebClient downloadClient = null;
DeleteFile(Folder_URI);
File_URL_Data = Folder_URI;
string File_data = Folder_URI + "\\" + File_Name;
episode_rss = File_data.Replace("\\\\", "\\");
Uri u = new Uri(RSS_URI);
//WebClientの作成
if (downloadClient == null)
{
downloadClient = new WebClient();
//イベントハンドラの作成
downloadClient.DownloadProgressChanged +=
new DownloadProgressChangedEventHandler(
downloadClient_DownloadProgressChanged);
downloadClient.DownloadFileCompleted +=
new System.ComponentModel.AsyncCompletedEventHandler(
downloadClient_DownloadFileCompleted);
}
//非同期ダウンロードを開始する
downloadClient.DownloadFileAsync(u, File_data);
}
private void downloadClient_DownloadProgressChanged(object sender, DownloadProgressChangedEventArgs e)
{
Console.WriteLine("{0}% ({1}byte 中 {2}byte) ダウンロードが終了しました。",
e.ProgressPercentage, e.TotalBytesToReceive, e.BytesReceived);
}
private void downloadClient_DownloadFileCompleted(object sender, System.ComponentModel.AsyncCompletedEventArgs e)
{
if (e.Cancelled)
{
MessageBox.Show(
"ダウンロードがキャンセルされました",
"キャンセル動作がありました",
MessageBoxButtons.OK,
MessageBoxIcon.Error);
}
else if (e.Error != null)
{
MessageBox.Show(
"ダウンロード中にエラーが発生しました。\nエラー内容: " + e.Error.Message,
"エラーが発生しました",
MessageBoxButtons.OK,
MessageBoxIcon.Error);
}
else
{
DialogResult Episode = MessageBox.Show(
"RSSファイルのダウンロードが完了しました\nこれより、エピソードのダウンロードを開始します。",
"ダウンロード完了",
MessageBoxButtons.OK,
MessageBoxIcon.Information);
if (Episode == DialogResult.OK)
{
Episode_Download episode_download = new Episode_Download();
episode_download.Xml_Extraction(episode_rss, File_URL_Data);
}
}
}
// ファイルの削除
public void DeleteFile(string targetDirectoryPath)
{
if (!Directory.Exists(targetDirectoryPath)) return;
//ディレクトリ以外の全ファイルを削除
string[] filePaths = Directory.GetFiles(targetDirectoryPath);
foreach (string filePath in filePaths)
{
File.SetAttributes(filePath, FileAttributes.Normal);
Console.WriteLine("Delete: " + filePath);
File.Delete(filePath);
}
}
}
}<file_sep># Podcasts_RSS-Windows
げいぽのRSSを解析し、自動更新するようなプログラム。
<file_sep>using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Xml;
namespace Gay_Podcast_Access
{
class Episode_Downloaded
{
int download_complete = 0, download_all;
public void episodeDownload_Portal(string RSS_File, string Folder_URI)
{
XmlDocument xmlDocument = new XmlDocument();
xmlDocument.Load(RSS_File);
try
{
XmlElement xmlElement = xmlDocument.DocumentElement;
XmlNodeList xmlNodeList_enclosure = xmlElement.GetElementsByTagName("enclosure");
XmlNodeList xmlNodeList_title = xmlElement.GetElementsByTagName("title");
string[] episode_url = new string[xmlNodeList_enclosure.Count];
string[] episode_title = new string[xmlNodeList_title.Count];
bool[] catch_data = new bool[2];
// エピソードURLの取得
if (xmlNodeList_enclosure.Count != 0)
{
for (int i = 0; i < xmlNodeList_enclosure.Count; i++) // URLの取得
{
XmlElement element = (XmlElement)xmlNodeList_enclosure.Item(i);
episode_url[i] = element.GetAttribute("url");
catch_data[0] = true;
}
download_all = xmlNodeList_enclosure.Count;
}
else
{
DialogResult choose = MessageBox.Show("\"enclosure\"タグが存在しません。RSSファイルを確認してください。\nRSSファイルを開きますか?", "タグが見つかりません", MessageBoxButtons.YesNo, MessageBoxIcon.Error);
if (choose == DialogResult.Yes)
{
System.Diagnostics.Process P = System.Diagnostics.Process.Start(RSS_File);
bool result = P.Start();
}
}
// titleの取得
if (xmlNodeList_title.Count != 0)
{
for (int i = 0; i < xmlNodeList_title.Count; i++)
{
episode_title[i] = xmlNodeList_title.Item(i).InnerText;
catch_data[1] = true;
}
}
else
{
DialogResult choose = MessageBox.Show("\"title\"タグが存在しません。RSSファイルを確認してください。\nRSSファイルを開きますか?", "タグが見つかりません", MessageBoxButtons.YesNo, MessageBoxIcon.Error);
if (choose == DialogResult.Yes)
{
System.Diagnostics.Process P = System.Diagnostics.Process.Start(RSS_File);
bool result = P.Start();
}
}
if (catch_data[0] == true && catch_data[1] == true)
{
for (int i = 0; i < episode_url.Length; i++)
{
string[] httpstatus_code = new string[2];
httpstatus_code = HttpStatus(episode_url[i]);
if (httpstatus_code[0] == "OK" && httpstatus_code[1] == "OK")
Download_check(episode_url[i], Folder_URI, Episode_Title_CATCH(i, episode_url, episode_title));
}
}
}
catch (XmlException Exception) //Exception発生時のエラーメッセ表示
{
MessageBox.Show("Error: " + Exception.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
// HTTPステータスの確認
public string[] HttpStatus(string check_URI)
{
string access_url = null;
string[] access_code = new string[2];
//URIの有効性の確認
Uri uriResult;
bool result = Uri.TryCreate(check_URI, UriKind.Absolute, out uriResult)
&& (uriResult.Scheme == Uri.UriSchemeHttp || uriResult.Scheme == Uri.UriSchemeHttps);
if (result)
{
ServicePointManager.SecurityProtocol |= SecurityProtocolType.Tls12;
HttpWebRequest webreq = (HttpWebRequest)WebRequest.Create(check_URI);
HttpWebResponse webres = null;
try
{
webres = (HttpWebResponse)webreq.GetResponse();
access_url = webres.ResponseUri.ToString();
access_code[0] = webres.StatusCode.ToString();
Console.WriteLine("HTTPStatus_Response: " + webres.StatusCode + ", " + webres.StatusDescription);
access_code[1] = webres.StatusDescription;
}
catch (WebException ex)
{
if (ex.Status == WebExceptionStatus.ProtocolError)
{
HttpWebResponse errres = (HttpWebResponse)ex.Response;
access_url = errres.ResponseUri.ToString(); access_code[0] = errres.StatusCode.ToString();
access_code[1] = errres.StatusDescription;
}
}
finally
{
//閉じる
if (webres != null) webres.Close();
}
}
else
{
MessageBox.Show("有効なURLではありません。", "確認してください", MessageBoxButtons.OK, MessageBoxIcon.Error);
access_code[0] = "Error";
access_code[1] = "Error";
}
return access_code;
}
private string Episode_Title_CATCH(int i, string[] episode_url, string[] episode_title)
{
int index = episode_url[i].LastIndexOf(".");
return (i + 1).ToString("D3") + "_" + episode_title[0] + " - " + episode_title[(episode_title.Length - episode_url.Length + i)] + episode_url[i].Substring(index);
}
// ファイルのダウンロード
public void Download_check(string RSS_URI, string Folder_URI, string File_Name)
{
WebClient downloadClient = null;
string episode_rss = "";
Uri uriResult;
// URIの有効性の確認
bool result = Uri.TryCreate(RSS_URI, UriKind.Absolute, out uriResult)
&& (uriResult.Scheme == Uri.UriSchemeHttp || uriResult.Scheme == Uri.UriSchemeHttps);
string File_data = Folder_URI + "\\" + File_Name;
episode_rss = File_data.Replace("\\\\", "\\");
Uri u = new Uri(RSS_URI);
downloadClient = new WebClient();
//イベントハンドラの作成
downloadClient.DownloadProgressChanged +=
new DownloadProgressChangedEventHandler(
downloadClient_DownloadProgressChanged);
downloadClient.DownloadFileCompleted +=
new System.ComponentModel.AsyncCompletedEventHandler(
downloadClient_DownloadFileCompleted);
//非同期ダウンロードを開始する
downloadClient.DownloadFile(u, File_data);
}
private void downloadClient_DownloadProgressChanged(object sender, DownloadProgressChangedEventArgs e)
{
Console.WriteLine("{0}% ({1}byte 中 {2}byte) ダウンロードが終了しました。",
e.ProgressPercentage, e.TotalBytesToReceive, e.BytesReceived);
}
private void downloadClient_DownloadFileCompleted(object sender, System.ComponentModel.AsyncCompletedEventArgs e)
{
if (e.Cancelled)
{
MessageBox.Show(
"ダウンロードがキャンセルされました",
"キャンセル動作がありました",
MessageBoxButtons.OK,
MessageBoxIcon.Error);
}
else if (e.Error != null)
{
MessageBox.Show(
"ダウンロード中にエラーが発生しました。\nエラー内容: " + e.Error.Message,
"エラーが発生しました",
MessageBoxButtons.OK,
MessageBoxIcon.Error);
}
else
{
download_complete++;
if (download_all != download_complete)
MessageBox.Show("ダウンロード完了しました。\n残り" + (download_all - download_complete) + "件", "Download Finish", MessageBoxButtons.OK, MessageBoxIcon.Information);
else
MessageBox.Show("全てのエピソードのダウンロードが完了しました", "Download Complete!", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
}
}
<file_sep>using System;
using System.Windows.Forms;
namespace Split1
{
class urlaccess
{
public void accessCheck(String url)
{
String access_url = null;
String[] access_code = new String[2];
//URIの有効性の確認
Uri uriResult;
bool result = Uri.TryCreate(url, UriKind.Absolute, out uriResult)
&& (uriResult.Scheme == Uri.UriSchemeHttp || uriResult.Scheme == Uri.UriSchemeHttps);
if (result)
{
//WebRequestの作成
System.Net.HttpWebRequest webreq = (System.Net.HttpWebRequest)System.Net.WebRequest.Create(url);
System.Net.HttpWebResponse webres = null;
try
{
//サーバーからの応答を受信するためのWebResponseを取得
webres = (System.Net.HttpWebResponse)webreq.GetResponse();
//応答したURIを表示する
access_url = webres.ResponseUri.ToString();
//応答ステータスコードを表示する
access_code[0] = webres.StatusCode.ToString();
Console.WriteLine(webres.StatusCode + ", " + webres.StatusDescription);
access_code[1] = webres.StatusDescription;
}
catch (System.Net.WebException ex)
{
//HTTPプロトコルエラーかどうか調べる
if (ex.Status == System.Net.WebExceptionStatus.ProtocolError)
{
//HttpWebResponseを取得
System.Net.HttpWebResponse errres = (System.Net.HttpWebResponse)ex.Response;
//応答したURIを表示する
access_url = errres.ResponseUri.ToString();
//応答ステータスコードを表示する
access_code[0] = errres.StatusCode.ToString();
access_code[1] = errres.StatusDescription;
}
}
finally
{
//閉じる
if (webres != null)
webres.Close();
}
MessageBox.Show("接続URL: " + access_url + "\n" + "HTTPステータス: " + access_code[0] + " " + access_code[1], "HTTP接続結果", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
else
MessageBox.Show("有効なURLではありません。", "確認してください", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
}<file_sep>using System;
using System.Net;
using System.Windows.Forms;
namespace Split2
{
class Download
{
String Folder_URI = "", url = "", DL_File_Name = "";
WebClient downloadClient = null;
public void url_checker(String url, String DL_File_Name)
{
Uri uriResult;
// URIの有効性の確認
bool result = Uri.TryCreate(url, UriKind.Absolute, out uriResult)
&& (uriResult.Scheme == Uri.UriSchemeHttp || uriResult.Scheme == Uri.UriSchemeHttps);
url = this.url;
DL_File_Name = this.DL_File_Name;
// URIの有効時
if (result)
{
Uri_RSScheck();
}
else
{
Message("正しいURLを入力してください", "確認してください", "Error");
}
}
private void Uri_RSScheck()
{
// URIがRSSを指定しているかどうかを確認
if ((url.Substring(url.Length - 3)) == "rss")
{
Folder_DL_Specified();
}
else
{
Message("正しいAnchorが提供しているRSSフィードURLではありません", "確認してください", "Error");
}
}
private void Folder_DL_Specified()
{
FolderBrowserDialog fbDialog = new FolderBrowserDialog
{
// ダイアログの説明文を指定する
Description = "ダイアログの説明文",
// デフォルトのフォルダを指定する
SelectedPath = @"C:",
// 「新しいフォルダーの作成する」ボタンを表示する
ShowNewFolderButton = true
};
//フォルダを選択するダイアログを表示する
if (fbDialog.ShowDialog() == DialogResult.OK)
{
Folder_URI = fbDialog.SelectedPath;
}
if (Folder_URI != "") file_download();
else
{
Message("フォルダ選択中にキャンセルされたか、問題が発生しました", "確認してください", "Error");
}
}
private void file_download()
{
//ダウンロードしたファイルの保存先
string fileName = Folder_URI + "\\" + DL_File_Name + ".rss";
//ダウンロード元のURL
Uri u = new Uri(url);
//WebClientの作成
if (downloadClient == null)
{
downloadClient = new WebClient();
//イベントハンドラの作成
downloadClient.DownloadProgressChanged +=
new DownloadProgressChangedEventHandler(
downloadClient_DownloadProgressChanged);
downloadClient.DownloadFileCompleted +=
new System.ComponentModel.AsyncCompletedEventHandler(
downloadClient_DownloadFileCompleted);
}
//非同期ダウンロードを開始する
downloadClient.DownloadFileAsync(u, fileName);
}
private void downloadClient_DownloadProgressChanged(object sender, DownloadProgressChangedEventArgs e)
{
Console.WriteLine("{0}% ({1}byte 中 {2}byte) ダウンロードが終了しました。",
e.ProgressPercentage, e.TotalBytesToReceive, e.BytesReceived);
}
private void downloadClient_DownloadFileCompleted(object sender, System.ComponentModel.AsyncCompletedEventArgs e)
{
String neko = null;
if (e.Cancelled)
{
neko = "キャンセルされました。";
}
else if (e.Error != null)
{
neko = "エラー: " + e.Error.Message;
}
else
{
neko = "ダウンロードが完了しました。";
}
Message(neko, "ダウンロード", "Information");
}
private void Message(String Text, String Heading, String Icon)
{
MessageBoxIcon ico = new MessageBoxIcon();
switch(Icon){
case "Asterisk":
ico = MessageBoxIcon.Asterisk; //円で囲まれた小文字の i から成る記号
break;
case "Error":
ico = MessageBoxIcon.Error; //背景が赤の円で囲まれた白い X から成る記号
break;
case "Exclamation":
ico = MessageBoxIcon.Exclamation; //背景が黄色の三角形で囲まれた感嘆符から成る記号
break;
case "Hand":
ico = MessageBoxIcon.Hand; //背景が赤の円で囲まれた白い X から成る記号
break;
case "Information":
ico = MessageBoxIcon.Information; //円で囲まれた小文字の i から成る記号
break;
case "None":
ico = MessageBoxIcon.None; //記号を表示しません
break;
case "Question":
ico = MessageBoxIcon.Question; //円で囲んだ疑問符から成るシンボルが含まれます。 疑問符は、質問の特定の種類を明確に表さず、メッセージの言い回しはどのメッセージの種類にも適用されるため、疑問符のメッセージ アイコンは推奨されなくなりました。 さらにユーザーは、疑問符シンボルをヘルプ情報シンボルと混同することがあります。 したがって、メッセージ ボックスには疑問符シンボルを使用しないでください。 システムは引き続き、下位互換性のためだけに、その組み込みをサポートします。
break;
case "Stop":
ico = MessageBoxIcon.Stop; //背景が赤い円で囲んだ白い X から成る記号
break;
case "Warning":
ico = MessageBoxIcon.Warning; //背景が黄色い三角で囲んだ感嘆符から成る記号
break;
default:
ico = MessageBoxIcon.None;
break;
}
MessageBox.Show(Text, Heading, MessageBoxButtons.OK, ico);
}
}
}
| e40b5f0f79beceb79d420bf7cafde4b18f739a72 | [
"Markdown",
"C#"
] | 8 | C# | guxtuti-raven/Podcasts_RSS-Windows | e0787cabcc2e551cb8f49995a245324d406b4b55 | f528ccee18947226aa5f1a19bbf8cdb3fb0c2dad | |
refs/heads/master | <file_sep>package core;
import java.util.Random;
import exception.IllegalShuffleException;
import exception.InvalidCardException;
import player.Player;
import player.Team;
/**
* Main class of the system.
* As for now, the run() method simulates a single round.
* @author Daan
*/
public class FullMatch {
private Team t1;
private Team t2;
private Player[] players;
/**
* Creates a new match between the given teams.
*/
public FullMatch(Team t1, Team t2) {
this.t1 = t1;
this.t2 = t2;
Player[] players = {t1.getPlayer1(),t1.getPlayer2(),t2.getPlayer1(),t2.getPlayer2()};
this.players = players;
}
public void run() throws InvalidCardException, IllegalShuffleException {
Logger.log("========== PLAYERS ==========");
Logger.log(players[0] + " : " + players[0].identify());
Logger.log(players[1] + " : " + players[1].identify());
Logger.log(players[2] + " : " + players[2].identify());
Logger.log(players[3] + " : " + players[3].identify());
Logger.log("========== TEAMS ==========");
Logger.log("Team 1: " + t1.getPlayer1() + ", " + t1.getPlayer2());
Logger.log("Team 2: " + t2.getPlayer1() + ", " + t2.getPlayer2());
Player dealer = players[new Random().nextInt(4)];
Deck deck = new Deck();
deck.execute(ShuffleCommand.createRandomShuffleCommand());
int baseMultiplier = 1;
while ( Math.max(t1.getTotalScore(), t2.getTotalScore()) < 101 ) {
Round r = new Round(t1,t2,dealer,deck,baseMultiplier);
r.run();
// score calculation
int roundScoreTeam1 = 0;
int roundScoreTeam2 = 0;
if ( t1.getPoolScore() > 30 ) {
roundScoreTeam1 = (t1.getPoolScore() - 30)*r.getMultiplier();
} else {
roundScoreTeam2 = (t2.getPoolScore() - 30)*r.getMultiplier();
}
t1.increaseTotalScore(roundScoreTeam1);
t2.increaseTotalScore(roundScoreTeam2);
// multiplier
if ( roundScoreTeam1 == 0 && roundScoreTeam2 == 0 ) {
baseMultiplier = 2;
} else {
baseMultiplier = 1;
}
// notify players & log scores
t1.getPlayer1().notifyOfRoundScore(roundScoreTeam1, roundScoreTeam2, t1.getTotalScore(), t2.getTotalScore() );
t1.getPlayer2().notifyOfRoundScore(roundScoreTeam1, roundScoreTeam2, t1.getTotalScore(), t2.getTotalScore() );
t2.getPlayer1().notifyOfRoundScore(roundScoreTeam2, roundScoreTeam1, t2.getTotalScore(), t1.getTotalScore() );
t2.getPlayer2().notifyOfRoundScore(roundScoreTeam2, roundScoreTeam1, t2.getTotalScore(), t1.getTotalScore() );
Logger.log("========== SCORES ==========");
Logger.log("Team 1: " + t1.getTotalScore());
Logger.log("Team 2: " + t2.getTotalScore());
// recalculate the deck
deck = new Deck(t1.getPool(),t2.getPool());
t1.getPool().reset();
t2.getPool().reset();
// new dealer
dealer = getSuccessor(dealer,t1,t2);
// shuffle
deck.execute(ShuffleCommand.createMultiRiffleShuffle(3));
}
(t1.getTotalScore() >= 101 ? t1 : t2).addMatchPoint();
t1.resetTotalScore();
t2.resetTotalScore();
Logger.log("========== MATCH ENDED ==========");
Logger.log("Team 1: " + t1.getTotalScore());
Logger.log("Team 2: " + t2.getTotalScore());
}
private Player getSuccessor(Player player, Team team1, Team team2) {
if ( player == team1.getPlayer1() ) {
return team2.getPlayer1();
} else if ( player == team1.getPlayer2() ) {
return team2.getPlayer2();
} else if ( player == team2.getPlayer1() ) {
return team1.getPlayer2();
} else {
return team1.getPlayer1();
}
}
}<file_sep>package test;
import java.util.List;
import org.junit.Test;
import core.Card;
import core.Deck;
import core.ShuffleCommand;
public class DeckTest {
@Test
public void testShuffle() {
double sd_acc_average = 0;
double sd_acc_variance = 0;
double ssg_acc_average = 0;
double ssg_acc_variance = 0;
final int runs = 10000;
double[] sd = new double[runs];
double[] ssg = new double[runs];
for ( int x = 0 ; x < runs ; x++) {
Deck d = new Deck();
d.execute(ShuffleCommand.createMultiRiffleShuffle(7));
// according to literature 7 riffle shuffles is enough to produce a random result
// d.multiRiffleShuffle(7);
// d.shuffle();
sd[x] = getSubsequentSymbolDistance(d) / 31;
ssg[x] = getSuitSubGroups(d);
sd_acc_average += sd[x];
ssg_acc_average += ssg[x];
}
for ( int x = 0 ; x < runs ; x++) {
sd_acc_variance += (sd[x] - sd_acc_average / runs)*(sd[x] - sd_acc_average / runs);
ssg_acc_variance += (ssg[x] - ssg_acc_average / runs)*(ssg[x] - ssg_acc_average / runs);
}
System.out.println("runs: " + runs);
System.out.println("# Average symbol distance between subsequent cards:");
System.out.println("average: " + sd_acc_average / runs);
System.out.println("sqrt(variance): " + Math.sqrt(sd_acc_variance / runs));
System.out.println("\n# Suit subgroups:");
System.out.println("average: " + ssg_acc_average / runs);
System.out.println("sqrt(variance): " + Math.sqrt(ssg_acc_variance / runs));
}
private double getSubsequentSymbolDistance(Deck deck) {
List<Card> cards = deck.getCards();
int total = 0;
int i = 0;
for (int j = 1 ; j < cards.size() ; j++) {
Card a = cards.get(i);
Card b = cards.get(j);
total += Math.abs(a.compareTo(b));
i = j;
}
return total;
}
private int getSuitSubGroups(Deck deck) {
List<Card> cards = deck.getCards();
int i = 0;
int total = 1;
for ( int j = 1 ; j < cards.size() ; j++) {
if ( !cards.get(j).getSuit().equals(cards.get(i).getSuit())) {
total++;
}
i = j;
}
return total;
}
}
<file_sep>### Schrijven van een custom AI-speler ###
Je mag zoveel klassen maken als je wilt op voorwaarde dat:
- 1 van je klassen de interface **Intelligence** implementeert
#### API: ####
De eerder vermeldde klasse **Intelligence** is de required interface. Deze gebruikt het programma om
vragen te stellen aan je AI. De klasse **InformationHandle** geeft je toegang tot informatie over het speelveld,
zoals o.a. de kaarten die reeds gespeeld zijn, wat de troef is, ...
Deze klasses kunnen ( en zullen ) nog wijzigen, maar zullen een gelijkaardige functionaliteit behouden.
Er is een diagram aanwezig dat een totaalbeeld schetst. Mocht je vragen of kritiek op het
design hebben: laat me iets weten! :)
#### Taal: ####
De code is het engels geschreven.
Vertaling van Manille-termen:
- slag = trick
- troef = trump
- suit = 'kleur' van de kaart (hearts, spades, ...)
- symbol = teken van de kaart (king, jack, queen, ...)
### TESTEN VAN JE ALGORITME ###
Om je algo te testen kan je de MainGraphical klasse runnen.
( of een eigen test-klasse schrijven )
### KERNPROGRAMMA ###
Voorlopig hou ik me bezig met de kern van het programma. Gelieve dus geen bestaande
klassen aan te passen.
### VRAGEN/FOUTEN/VOORSTELLEN ###
Laat me iets weten :) Er ontbreekt nog een hoop functionaliteit, maar de kern zou er moeten zijn.
<file_sep>package player;
import java.util.ArrayList;
import java.util.List;
import core.*;
/**
* This class allows intelligent actors to ask questions to the system.
* <br/><br/>
* <b>Part of the AI API:</b> custom AI's can use an object of this class (when provided)
* to inspect certain aspects of the system.
* @author Daan
*/
public class InformationHandle {
Round round;
Player player;
public InformationHandle(Player player, Round round) {
this.round = round;
this.player = player;
}
/**
* Returns the previous trick as an array. If the current trick is the first one,
* null will be returned.
* @return an array of Cards of size 4, or null.
*/
public Card[] getPreviousTrick() {
return round.getPreviousTrickClone();
}
/**
* Returns a (sorted) list of the cards on the field.
* The list will be empty if no cards were played yet.
* @return a List of Cards
*/
public List<Card> inspectField() {
return new ArrayList<Card>(round.getField());
}
/**
* Checks if the given card is valid to play at this time.
* Returns false if the card is null.
* @param card
* @return true if it is
*/
public boolean isValidCard(Card card) {
if ( card != null ) {
return round.isValidCard(card, player);
} else {
return false;
}
}
/**
* Inspects the current trump.
* When the round is no-trump, null is returned.
* @return a Suit
*/
public Suit inspectTrump() {
return round.getTrump();
}
/**
* Returns the multiplier for the current round.
* This is the factor by which the score over 30 is multiplied
* at the end of the round.
*/
public int getMultiplier() {
return round.getMultiplier();
}
/**
* Returns the players position in the current trick's order of play.
* This is a number ranging from 0 (first player to play a card) to 3 (last person to play a card).
* @return position (int)
*/
public int getTurn() {
return round.getPositionInSequence(player);
}
/**
* Returns the dealers position in the current trick's order of play.
* This is a number ranging from 0 (dealer was first to play a card) to 3 (dealer is last to play a card)
* @return position (int)
*/
public int getDealerTurn() {
return round.getPositionInSequence(round.getDealer());
}
/**
* Returns the current pool score for the allied team. This is the
* sum of the values of the cards in the tricks the allied team has won.
* @return integer
*/
public int getCurrentAllyPoolScore() {
return round.getTeam(player).getPoolScore();
}
/**
* Return the current pool score for the enemy team. This is the
* sum of the values of the cards in the tricks the enemy team has won.
* @return integer
*/
public int getCurrentEnemyPoolScore() {
return round.getOpposingTeam(player).getPoolScore();
}
}
<file_sep>package core;
/**
* Possible symbols of a card. The following is associated with each symbol:
* <br/>- strength: strength relative to other symbols (between 0 and 7)
* <br/>- value: amount of points the symbol is worth
* @author <NAME>
*/
public enum Symbol implements Comparable<Symbol> {
SEVEN (0,0),
EIGHT (1,0),
NINE (2,0),
JACK (3,1),
QUEEN (4,2),
KING (5,3),
ACE (6,4),
MANILLE (7,5);
/**
* The strength of the symbol, sense of a natural order
*/
private int strength;
/**
* The value of the symbol in points
*/
private int value;
/**
* Constructor
* @param strength
* @param value
*/
Symbol(int strength, int value) {
setStrength(strength);
setValue(value);
}
/**********************************************************************
* VALUE
**********************************************************************/
private void setValue(int value) {
this.value = value;
}
/**
* Inspect the value in points.
*/
public int getValue() {
return value;
}
/**
* Checks if this symbol has a greater value than the given symbol.
* @param symbol
* @return true if it has
*/
public boolean hasGreaterValueThan(Symbol symbol) {
return this.getValue() > symbol.getValue();
}
/**********************************************************************
* STRENGTH
**********************************************************************/
private void setStrength(int strength) {
this.strength = strength;
}
/**
* Inspect the relative strength. (Number between 0 and 7)
*/
public int getStrength() {
return strength;
}
/**
* Checks if this symbol is stronger than the given symbol.
* @param symbol
* @return true if it is
*/
public boolean isStrongerThan(Symbol symbol) {
return this.getStrength() > symbol.getStrength();
}
}
<file_sep>package test;
import org.junit.Test;
import player.Player;
import AI.ArtificialPlayer;
import AI.ExampleIntelligence;
import AI.daan.Deducer;
import AI.daan.MonteCarloAI;
import core.Logger;
import core.Match;
import exception.IllegalShuffleException;
import exception.InvalidCardException;
public class deducerTest {
@Test
public void test() throws InvalidCardException, IllegalShuffleException {
Logger.setPrinting(true);
Logger.setRemember(false);
Player tAp1 = new ArtificialPlayer("Dimitri",new MonteCarloAI());
Player tAp2 = new ArtificialPlayer("Boris",new ExampleIntelligence());
Player tBp1 = new ArtificialPlayer("Samson",new ExampleIntelligence());
Player tBp2 = new ArtificialPlayer("Gert",new ExampleIntelligence());
Match m = new Match(tAp1,tAp2,tBp1,tBp2);
m.run();
}
}
<file_sep>package core;
/**
* Represents a card, which has a suit and a symbol.
*
* @author <NAME>
* @version 0.1
*/
public final class Card implements Comparable<Card> {
/**
* Default constructor
* @param suit
* @param symbol
*/
public Card (Suit suit, Symbol symbol) {
this.symbol = symbol;
this.suit = suit;
}
/**********************************************************************
* SYMBOL
**********************************************************************/
private final Symbol symbol;
/**
* Inspect the symbol of the card.
*/
public Symbol getSymbol() {
return symbol;
}
/**********************************************************************
* SUIT
**********************************************************************/
private final Suit suit;
/**
* Inspect the suit of the card.
*/
public Suit getSuit() {
return suit;
}
/**********************************************************************
* MISC & COMPARISON
**********************************************************************/
/**
* Returns the points value of the card, which is the value of the symbol.
* @return getSymbol.getValue();
*/
public int getValue() {
return getSymbol().getValue();
}
/**
* Compares to another card. If the calling Card is 'stronger' than the given card,
* the result is a positive integer, otherwise negative. If they're equally 'strong',
* 0 is returned. The card strength corresponds to the strength of the symbol.
* @param other The other card.
*/
public int compareTo(Card other) {
if ( other == null ) {
return 1;
} else {
return getSymbol().getStrength() - other.getSymbol().getStrength();
}
}
/**
* Checks whether this card is stronger than the given card.
* @param other
* The other card.
* @return true if this card is stronger.
*/
public boolean isStrongerThan(Card other) {
return this.getSymbol().isStrongerThan(other.getSymbol());
}
/**
* Checks whether this card has the same suit and symbol as the given card.
* @param other
* The other card.
* @return True if Suit and Symbol are equal
* | (getSymbol() == other.getSymbol()) && (getSuit() == other.getSuit())
*/
public boolean equals(Card other) {
return (getSymbol() == other.getSymbol()) && (getSuit() == other.getSuit());
}
public String toString() {
return symbol.toString() + " OF " + suit.toString() + "S";
}
/**
* To work with Set:
*/
public boolean equals(Object other) {
if (other instanceof Card) {
return equals((Card) other);
} else {
return false;
}
}
public int hashCode() {
return 100*(getSuit().ordinal()) + getSymbol().getStrength();
}
}
<file_sep>package exception;
import core.Card;
public class InvalidCardException extends Exception {
private static final long serialVersionUID = -3872951161842873464L;
private Card card;
public InvalidCardException(Card card) {
this.card = card;
}
public String toString() {
return "Invalid card at this time: " + card.toString() + "\n" + super.toString();
}
}
<file_sep>package player;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import core.Card;
/**
* Represents a pool of cards. These are all the cards a team has won
* during a round.
*
* @author <NAME>
*/
public class Pool implements Iterable<Card> {
/**
* Initializes a new pool
*/
public Pool() {
reset();
}
/**********************************************************************
* CARDS
**********************************************************************/
private List<Card> cardList;
public int getSize() {
return cardList.size();
}
public void push(Card card) {
cardList.add(card);
}
public void pushAll(List<Card> cards) {
for ( Card card : cards ) {
push(card);
}
}
public void reset() {
cardList = new ArrayList<Card>();
}
public boolean isEmpty() {
return cardList.isEmpty();
}
/**********************************************************************
* SCORE
**********************************************************************/
public int getScore() {
int score = 0;
for ( Card card : cardList ) {
score += card.getValue();
}
return score;
}
/**********************************************************************
* ITERATE
**********************************************************************/
@Override
public Iterator<Card> iterator() {
return cardList.iterator();
}
}
<file_sep>package AI.daan;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Random;
import java.util.TreeMap;
import player.InformationHandle;
import AI.Intelligence;
import AI.daan.Deducer.Possibility;
import core.Card;
import core.ShuffleCommand;
import core.Suit;
public class MonteCarloAI implements Intelligence {
private Random rand;
private Deducer deducer;
private static int N = 100; // number of simulations per card
private static int M = 10; // number of steps for each simulation
private int trickNumber; // temp var to maintain current trick number, functionality should be present in the handle instead
public MonteCarloAI() {
this.rand = new Random();
}
/**
* Will run a number of simulations for each valid card and select
* the one with the best average results.
* Each simulation is based on a (pseudo-)random starting state
* which satisfies all constraints that have been deduced so far.
*/
@Override
public Card chooseCard(List<Card> hand, InformationHandle info) {
List<Card> valid = new ArrayList<Card>();
for ( Card card : hand ) {
if ( info.isValidCard(card) ) {
valid.add(card);
}
}
if ( valid.isEmpty() ) {
throw new RuntimeException("unexpected");
}
List<Possibility> ps = new ArrayList<Possibility>();
for ( int j = 0 ; j < N ; j++ ) {
ps.add(deducer.generatePossibility());
}
TreeMap<Integer,Card> scores = new TreeMap<Integer,Card>();
for ( Card option : valid ) {
List<Card> optHand = new ArrayList<Card>(hand);
optHand.remove(option);
List<Card> optField = new ArrayList<Card>(info.inspectField());
optField.add(option);
int sum = 0;
for ( Possibility p : ps ) {
Simulation s = new Simulation(info.inspectTrump(),optField,
optHand,p.enemy1,p.ally,p.enemy2);
/*System.out.println("----");
for (Card c : s.getMe()) {
System.out.println(c);
}
System.out.println("----");
for (Card c : s.getEnemy1()) {
System.out.println(c);
}
System.out.println("----");
for (Card c : s.getAlly()) {
System.out.println(c);
}
System.out.println("----");
for (Card c : s.getEnemy2()) {
System.out.println(c);
}
System.out.println("----");*/
sum += s.run(Math.min(M, 9-trickNumber));
}
scores.put(sum/N,option);
// throw new RuntimeException("intended stop");
}
return scores.lastEntry().getValue();
}
@Override
public void notify(List<Card> hand, InformationHandle info) {
List<Card> field = info.inspectField();
List<Card> reducedField = field.subList(0, field.size()-1);
int turn = reducedField.size();
Card p = field.get(turn);
int myTurn = info.getTurn();
if (turn != myTurn) {
deducer.feedAction((turn-myTurn+3) % 4, p, reducedField, info.inspectTrump());
}
//System.out.println(deducer.getLog());
// update of the trick number
if ( field.size() == 4) {
trickNumber++;
//System.out.println("Trick is now: " + trickNumber);
}
}
/**
* Project 2501 trump algo
*/
private final int CORRECTION = 3;
@Override
public Suit chooseTrump(List<Card> hand) {
Map<Suit,Double> amounts = new HashMap<Suit,Double>();
for ( Suit s : Suit.values()) {
amounts.put(s, (double) 0);
}
for ( Card c : hand ) {
double x = amounts.get(c.getSuit()) + c.getSymbol().getStrength() + CORRECTION;
amounts.put(c.getSuit(), x);
}
Suit best = Suit.HEART;
for ( Suit s : amounts.keySet() ) {
if ( amounts.get(s) > amounts.get(best)) { best = s; }
}
return best;
}
/**
* Returns the name of the AI.
*/
@Override
public String identify() {
return "[Monte Carlo]";
}
private final int KNOCK_TRESHOLD = 10;
@Override
public boolean chooseToKnock(List<Card> hand, Suit trump) {
int power = 0;
for ( Card card : hand ) {
if ( card.getSuit().equals(trump) ) {
power += card.getSymbol().getStrength();
}
}
return (power > KNOCK_TRESHOLD);
}
@Override
public List<ShuffleCommand> chooseShuffleCommands() {
return Arrays.asList(ShuffleCommand.createRandomShuffleCommand());
}
@Override
public void notifyOfHand(List<Card> hand) {
this.trickNumber = 1;
deducer = new Deducer();
deducer.feedHand(hand);
}
}
<file_sep>package gui;
import java.lang.reflect.InvocationTargetException;
import java.util.List;
import core.Card;
import core.Suit;
public interface UIController {
public abstract void initialize() throws InvocationTargetException, InterruptedException;
/**********************************************************************
* VISUAL UPDATES
**********************************************************************/
public abstract void updateHand(List<Card> hand, List<Card> valid);
public abstract void updateField(List<Card> field, int turn);
public abstract void updateTrump(Suit trump);
public abstract void informOfInvalidCardChoice();
public abstract void updateTrick(Card[] trick);
public abstract void updateMultiplier(int multiplier);
public abstract void informOfRoundScore(int ally, int enemy, int allyTotal, int enemyTotal);
public abstract void updatePoolScores(int ally, int enemy);
public abstract void updateTotalScores(int ally, int enemy);
/**********************************************************************
* CHOICES
**********************************************************************/
public abstract Object setupCardChoice();
public abstract Card fetchChosenCard();
public abstract boolean fetchKnockChoice(Suit trump);
public abstract Suit fetchChosenTrump();
/**********************************************************************
* NAMES & STRINGS
**********************************************************************/
public abstract void setNames(String playerName, String other1, String other2, String other3);
public abstract void setDealerName(String dealerName);
public abstract void setFrameTitle(String title);
/**********************************************************************
* PAUZE
**********************************************************************/
public void pauze();
}<file_sep>package gui;
import java.awt.BorderLayout;
import java.awt.CardLayout;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.Font;
import java.awt.Frame;
import java.awt.Graphics;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.imageio.ImageIO;
import javax.swing.BorderFactory;
import javax.swing.Box;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JCheckBoxMenuItem;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.SwingConstants;
import javax.swing.border.EmptyBorder;
import javax.swing.border.LineBorder;
import javax.swing.border.TitledBorder;
import core.Card;
import core.Suit;
public class GameFrame extends JFrame {
private static final long serialVersionUID = -2612918951205849060L;
private final int CARD_WIDTH = 71;
private final int CARD_HEIGHT = 96;
private final int BOX_SPACING = 2;
private final int BORDER_WIDTH = 2;
/**
* Create the frame.
*/
public GameFrame() {
loadImages();
handMap = new HashMap<>();
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setBounds(100, 100, 816, 548);
setMinimumSize(new Dimension(816, 548));
JPanel contentPane = new JPanel();
contentPane.setBorder(new EmptyBorder(0, 0, 0, 0));
setContentPane(contentPane);
contentPane.setLayout(new BorderLayout(0, 0));
JPanel center = new JPanel() {
private static final long serialVersionUID = 1L;
@Override
protected void paintComponent(Graphics g)
{
super.paintComponent(g);
g.drawImage(feltBack, 0, 0, getWidth(), getHeight(), null);
}
};
center.setBackground(new Color(0, 128, 0));
contentPane.add(center, BorderLayout.CENTER);
center.setLayout(new GridBagLayout());
JPanel east = new JPanel();
contentPane.add(east, BorderLayout.EAST);
east.setLayout(new GridBagLayout());
//----------------------------------------
JPanel left = new JPanel();
left.setOpaque(false);
left.setBounds(0, 26, 656, 484);
left.setPreferredSize(new Dimension(656,484));
center.add(left);
left.setLayout(null);
//----------------------------------------
JPanel right = new JPanel();
right.setPreferredSize(new Dimension(144,484));
GridBagConstraints gbc_right = new GridBagConstraints();
gbc_right.weighty = 1.0;
gbc_right.anchor = GridBagConstraints.NORTH;
east.add(right, gbc_right);
right.setLayout(null);
/**********************************************************************
* MENU BAR
**********************************************************************/
JMenuBar menuBar = new JMenuBar();
menuBar.setPreferredSize(new Dimension(800,26));
contentPane.add(menuBar, BorderLayout.NORTH);
JMenu settingsMenu = new JMenu("Settings");
menuBar.add(settingsMenu);
JCheckBoxMenuItem chckbxFullscreen = new JCheckBoxMenuItem("FullScreen");
settingsMenu.add(chckbxFullscreen);
chckbxFullscreen.addItemListener(new ItemListener() {
@Override
public void itemStateChanged(ItemEvent e) {
if ( e.getStateChange() == ItemEvent.SELECTED ) {
(GameFrame.this).setExtendedState(Frame.MAXIMIZED_BOTH);
} else {
(GameFrame.this).setBounds(100, 100, 816, 548);
}
}
});
/**********************************************************************
* FIELD PANEL
**********************************************************************/
JPanel fieldPanel = new JPanel();
fieldPanel.setOpaque(false);
fieldPanel.setBounds(182, 61, 295, 230);
fieldPanel.setLayout(null);
left.add(fieldPanel);
EmptyBorder padding = new EmptyBorder(BOX_SPACING,BOX_SPACING,BOX_SPACING,BOX_SPACING);
topField = Box.createHorizontalBox();
topField.setBounds(109, 10, CARD_WIDTH + (BOX_SPACING+BORDER_WIDTH)*2, CARD_HEIGHT + (BOX_SPACING+BORDER_WIDTH)*2);
topField.setBorder(BorderFactory.createCompoundBorder(new LineBorder(new Color(0, 96, 32), BORDER_WIDTH), padding));
leftField = Box.createHorizontalBox();
leftField.setBounds(24, 68, CARD_WIDTH + (BOX_SPACING+BORDER_WIDTH)*2, CARD_HEIGHT + (BOX_SPACING+BORDER_WIDTH)*2);
leftField.setBorder(BorderFactory.createCompoundBorder(new LineBorder(new Color(0, 96, 32), BORDER_WIDTH), padding));
rightField = Box.createHorizontalBox();
rightField.setBounds(194, 68, CARD_WIDTH + (BOX_SPACING+BORDER_WIDTH)*2, CARD_HEIGHT + (BOX_SPACING+BORDER_WIDTH)*2);
rightField.setBorder(BorderFactory.createCompoundBorder(new LineBorder(new Color(0, 96, 32), BORDER_WIDTH), padding));
bottomField = Box.createHorizontalBox();
bottomField.setBounds(109, 120, CARD_WIDTH + (BOX_SPACING+BORDER_WIDTH)*2, CARD_HEIGHT + (BOX_SPACING+BORDER_WIDTH)*2);
bottomField.setBorder(BorderFactory.createCompoundBorder(new LineBorder(new Color(0, 96, 32), BORDER_WIDTH), padding));
fieldPanel.add(leftField);
fieldPanel.add(rightField);
fieldPanel.add(topField);
fieldPanel.add(bottomField);
/**********************************************************************
* PLAYER NAMES
**********************************************************************/
rightNameLabel = new JLabel("Freddy", SwingConstants.CENTER);
rightNameLabel.setForeground(Color.WHITE);
rightNameLabel.setFont(new Font("Tahoma", Font.BOLD, 20));
rightNameLabel.setBounds(479, 157, 180, 27);
left.add(rightNameLabel);
topNameLabel = new JLabel("Freddy", SwingConstants.CENTER);
topNameLabel.setForeground(Color.WHITE);
topNameLabel.setFont(new Font("Tahoma", Font.BOLD, 20));
topNameLabel.setBounds(240, 23, 180, 27);
left.add(topNameLabel);
bottomNameLabel = new JLabel("Freddy", SwingConstants.CENTER);
bottomNameLabel.setForeground(Color.WHITE);
bottomNameLabel.setFont(new Font("Tahoma", Font.BOLD, 20));
bottomNameLabel.setBounds(240, 302, 180, 27);
left.add(bottomNameLabel);
leftNameLabel = new JLabel("Freddy", JLabel.CENTER);
leftNameLabel.setFont(new Font("Tahoma", Font.BOLD, 20));
leftNameLabel.setForeground(Color.WHITE);
leftNameLabel.setBounds(0, 157, 180, 27);
left.add(leftNameLabel);
/**********************************************************************
* HAND PANEL
**********************************************************************/
handPanel = new JPanel();
handPanel.setOpaque(false);
handPanel.setBounds(8, 365, 639, 108);
handPanel.setLayout(null);
left.add(handPanel);
/**********************************************************************
* ...
**********************************************************************/
JLabel lblTrump = new JLabel("Trump:",JLabel.CENTER);
lblTrump.setForeground(Color.DARK_GRAY);
lblTrump.setBounds(9, 11, 125, 17);
lblTrump.setFont(new Font("Tahoma", Font.PLAIN, 14));
right.add(lblTrump);
trumpPanel = new JPanel();
trumpPanel.setBorder(new LineBorder(new Color(128, 128, 128)));
trumpPanel.setLayout(new GridBagLayout());
trumpPanel.setBounds(9, 30, 125, 88);
right.add(trumpPanel);
btnPreviousTrick = new JButton("<html><center>Previous Trick</center></html>");
btnPreviousTrick.setFont(new Font("Tahoma", Font.PLAIN, 14));
btnPreviousTrick.setBounds(9, 388, 125, 37);
btnPreviousTrick.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent arg0) {
displayPreviousTrick();
}
});
btnPreviousTrick.setEnabled(false);
right.add(btnPreviousTrick);
JLabel lblMultText = new JLabel("Multiplier:",JLabel.CENTER);
lblMultText.setForeground(Color.DARK_GRAY);
lblMultText.setFont(new Font("Tahoma", Font.PLAIN, 14));
lblMultText.setBounds(9, 158, 125, 17);
right.add(lblMultText);
JPanel multPanel = new JPanel();
multPanel.setForeground(Color.GRAY);
multPanel.setBorder(new LineBorder(Color.GRAY));
multPanel.setBounds(9, 177, 125, 37);
right.add(multPanel);
multPanel.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));
lblMultNumber = new JLabel("x1");
lblMultNumber.setForeground(Color.GRAY);
lblMultNumber.setFont(new Font("Tahoma", Font.BOLD, 20));
multPanel.add(lblMultNumber);
dealerPanel = new JPanel();
dealerPanel.setForeground(Color.GRAY);
dealerPanel.setBorder(new LineBorder(new Color(128, 128, 128)));
dealerPanel.setBounds(9, 115, 125, 32);
right.add(dealerPanel);
dealerPanel.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));
lblDealer = new JLabel("Freddy");
lblDealer.setForeground(Color.GRAY);
lblDealer.setFont(new Font("Tahoma", Font.BOLD, 18));
dealerPanel.add(lblDealer);
JButton undoButton = new JButton("<html><center>Undo</center></html>");
undoButton.setFont(new Font("Tahoma", Font.PLAIN, 14));
undoButton.setBounds(9, 436, 125, 37);
undoButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent ae) {
JOptionPane.showMessageDialog(GameFrame.this,
"Sorry, the table is sticky.",
"Undo",
JOptionPane.INFORMATION_MESSAGE);
}
});
right.add(undoButton);
JLabel lblPoolScores = new JLabel("Pool scores:", SwingConstants.CENTER);
lblPoolScores.setForeground(Color.DARK_GRAY);
lblPoolScores.setFont(new Font("Tahoma", Font.PLAIN, 14));
lblPoolScores.setBounds(9, 225, 125, 17);
right.add(lblPoolScores);
JPanel poolScorePanelAlly = new JPanel();
poolScorePanelAlly.setBorder(new TitledBorder(new LineBorder(new Color(128, 128, 128)), "Ally", TitledBorder.CENTER, TitledBorder.BOTTOM, null, Color.DARK_GRAY));
poolScorePanelAlly.setBounds(9, 244, 61, 50);
right.add(poolScorePanelAlly);
poolScorePanelAlly.setLayout(new CardLayout(0, 0));
JPanel poolScorePanelEnemy = new JPanel();
poolScorePanelEnemy.setBorder(new TitledBorder(new LineBorder(new Color(128, 128, 128)), "Enemy", TitledBorder.CENTER, TitledBorder.BOTTOM, null, Color.DARK_GRAY));
poolScorePanelEnemy.setBounds(73, 244, 61, 50);
right.add(poolScorePanelEnemy);
poolScorePanelEnemy.setLayout(new CardLayout(0, 0));
lblEnemyPoolScore = new JLabel("0",JLabel.CENTER);
lblEnemyPoolScore.setForeground(Color.GRAY);
lblEnemyPoolScore.setFont(new Font("Tahoma", Font.BOLD, 18));
poolScorePanelEnemy.add(lblEnemyPoolScore, "name_28394980645032");
lblAllyPoolScore = new JLabel("0",JLabel.CENTER);
lblAllyPoolScore.setForeground(Color.GRAY);
lblAllyPoolScore.setFont(new Font("Tahoma", Font.BOLD, 18));
poolScorePanelAlly.add(lblAllyPoolScore, "name_28357213157586");
JLabel lblTotalScores = new JLabel("Total scores:", SwingConstants.CENTER);
lblTotalScores.setForeground(Color.DARK_GRAY);
lblTotalScores.setFont(new Font("Tahoma", Font.PLAIN, 14));
lblTotalScores.setBounds(9, 299, 125, 17);
right.add(lblTotalScores);
JPanel totalScorePanelAlly = new JPanel();
totalScorePanelAlly.setBorder(new TitledBorder(new LineBorder(new Color(128, 128, 128)), "Ally", TitledBorder.CENTER, TitledBorder.BOTTOM, null, Color.DARK_GRAY));
totalScorePanelAlly.setBounds(9, 317, 61, 50);
right.add(totalScorePanelAlly);
totalScorePanelAlly.setLayout(new CardLayout(0, 0));
JPanel totalScorePanelEnemy = new JPanel();
totalScorePanelEnemy.setBorder(new TitledBorder(new LineBorder(new Color(128, 128, 128)), "Enemy", TitledBorder.CENTER, TitledBorder.BOTTOM, null, Color.DARK_GRAY));
totalScorePanelEnemy.setBounds(73, 317, 61, 50);
right.add(totalScorePanelEnemy);
totalScorePanelEnemy.setLayout(new CardLayout(0, 0));
lblAllyTotalScore = new JLabel("0", SwingConstants.CENTER);
lblAllyTotalScore.setForeground(Color.GRAY);
lblAllyTotalScore.setFont(new Font("Tahoma", Font.BOLD, 18));
totalScorePanelAlly.add(lblAllyTotalScore, "name_29314576817384");
lblEnemyTotalScore = new JLabel("0", SwingConstants.CENTER);
lblEnemyTotalScore.setForeground(Color.GRAY);
lblEnemyTotalScore.setFont(new Font("Tahoma", Font.BOLD, 18));
totalScorePanelEnemy.add(lblEnemyTotalScore, "name_29401204335232");
}
/**********************************************************************
* LOCK
**********************************************************************/
private Object lock;
public void attach(Object lock) {
this.lock = lock;
}
/**********************************************************************
* HAND
**********************************************************************/
private JPanel handPanel;
private Map<JLabel,Card> handMap;
private JLabel selected;
private boolean handActive = false;
private Object handActiveLock = new Object();
private static final int HAND_PADDING = 4;
private static final int HAND_X_OFFSET = 18;
private static final int HAND_Y_OFFSET = 4;
private static final int SELECTION_THICKNESS = 2;
private static final Color SELECTION_VALID = new Color(50, 255, 50);
private static final Color SELECTION_INVALID = new Color(255, 50, 50);
public void activateHand() {
synchronized(handActiveLock) {
this.handActive = true;
}
}
public void deactivateHand() {
synchronized(handActiveLock) {
this.handActive = false;
}
}
public void updateHand(List<Card> hand, final List<Card> valid) {
Collections.sort(hand, new Comparator<Card>() {
@Override
public int compare(Card c1, Card c2) {
if (c1.getSuit().equals(c2.getSuit())) {
return c1.compareTo(c2);
} else {
return c1.getSuit().compareTo(c2.getSuit());
}
}
});
clearSelectedCard();
handMap.clear();
handPanel.removeAll();
int cardNumber = 0;
int x_offset = HAND_X_OFFSET + (CARD_WIDTH + HAND_PADDING)*(8-hand.size())/2;
for ( Card card : hand ) {
JLabel cardLabel = new JLabel(getCardImage(card),JLabel.CENTER);
int width = CARD_WIDTH + SELECTION_THICKNESS*2;
int height = CARD_HEIGHT + SELECTION_THICKNESS*2;
cardLabel.setBounds(x_offset + (CARD_WIDTH + HAND_PADDING)*cardNumber, HAND_Y_OFFSET, width, height);
cardLabel.addMouseListener(new MouseListener() {
@Override
public void mouseEntered(MouseEvent e) {
synchronized(handActiveLock) {
if ( handActive ) {
selected = ((JLabel) e.getSource());
unborderAllHandCards();
Color selectionColor = (valid.contains(handMap.get(selected))) ? SELECTION_VALID : SELECTION_INVALID;
selected.setBorder(BorderFactory.createLineBorder(selectionColor,SELECTION_THICKNESS));
}
}
}
@Override
public void mouseExited(MouseEvent e) {
synchronized(handActiveLock) {
if ( handActive ) {
unborderAllHandCards();
}
}
}
@Override
public void mousePressed(MouseEvent e) {}
@Override
public void mouseReleased(MouseEvent e) {
synchronized(handActiveLock) {
if ( handActive && e.getButton() == MouseEvent.BUTTON1) {
submitCard();
}
}
}
@Override
public void mouseClicked(MouseEvent e) {}
});
handPanel.add(cardLabel);
handMap.put(cardLabel, card);
cardNumber++;
}
handPanel.revalidate();
handPanel.repaint();
}
private void unborderAllHandCards() {
for ( JLabel cl : handMap.keySet() ) {
cl.setBorder(BorderFactory.createEmptyBorder());
}
}
private void submitCard() {
synchronized(lock) {
if ( lock != null ) {
lock.notify();
}
}
}
public Card getSelectedCard() {
return handMap.get(selected);
}
private void clearSelectedCard() {
this.selected = null;
}
/**********************************************************************
* FIELD
**********************************************************************/
private Box topField;
private Box bottomField;
private Box leftField;
private Box rightField;
public void updateField(List<Card> field, int offset) {
Box[] fieldBoxes = { topField, rightField, bottomField, leftField };
topField.removeAll();
bottomField.removeAll();
leftField.removeAll();
rightField.removeAll();
for ( int i = 0 ; i < Math.min(field.size(),4) ; i++ ) {
fieldBoxes[(i-offset+2+4) % 4].add(new JLabel(getCardImage(field.get(i))));
}
for ( Box b : fieldBoxes ) {
b.revalidate();
b.repaint();
}
}
/**********************************************************************
* TRUMP, DEALER & MULTIPLIER
**********************************************************************/
private JPanel trumpPanel;
private JLabel lblMultNumber;
private JPanel dealerPanel;
private JLabel lblDealer;
public void updateTrump(Suit trump) {
trumpPanel.removeAll();
if ( trump != null ) {
trumpPanel.add(new JLabel(getSuitImage(trump),JLabel.CENTER));
} else {
JLabel x = new JLabel("X",JLabel.CENTER);
x.setFont(new Font("Tahoma",Font.BOLD,40));
x.setForeground(Color.GRAY);
trumpPanel.add(x);
}
trumpPanel.revalidate();
trumpPanel.repaint();
}
public void clearTrump() {
trumpPanel.removeAll();
trumpPanel.revalidate();
trumpPanel.repaint();
}
public void updateDealerName(String dealerName) {
lblDealer.setText(dealerName);
lblDealer.revalidate();
}
public void updateMultiplier(int multiplier) {
lblMultNumber.setText("x" + multiplier);
lblDealer.revalidate();
}
/**********************************************************************
* SCORES
**********************************************************************/
private JLabel lblEnemyPoolScore;
private JLabel lblAllyPoolScore;
private JLabel lblEnemyTotalScore;
private JLabel lblAllyTotalScore;
public void updatePoolScores(int ally, int enemy) {
lblAllyPoolScore.setText(Integer.toString(ally));
lblAllyPoolScore.setForeground(ally > 30 ? new Color(50, 205, 50) : Color.GRAY);
lblEnemyPoolScore.setText(Integer.toString(enemy));
lblEnemyPoolScore.setForeground(enemy > 30 ? Color.RED: Color.GRAY);
lblAllyPoolScore.revalidate();
lblEnemyPoolScore.revalidate();
}
public void updateTotalScores(int ally, int enemy) {
lblEnemyTotalScore.setText(Integer.toString(enemy));
lblAllyTotalScore.setText(Integer.toString(ally));
lblEnemyTotalScore.revalidate();
lblAllyTotalScore.revalidate();
}
/**********************************************************************
* PREVIOUS TRICK
**********************************************************************/
private JPanel trickCache = new JPanel();
private JButton btnPreviousTrick;
public void updatePreviousTrick(Card[] trick) {
synchronized(trickCache) {
trickCache.removeAll();
for ( Card card : trick ) {
trickCache.add(new JLabel(getCardImage(card)));
}
trickCache.revalidate();
}
btnPreviousTrick.setEnabled(true);
}
public void displayPreviousTrick() {
synchronized(trickCache) {
JOptionPane.showMessageDialog(this,trickCache,"Previous Trick",JOptionPane.PLAIN_MESSAGE);
}
}
/**********************************************************************
* PLAYER LABELS
**********************************************************************/
private JLabel rightNameLabel;
private JLabel topNameLabel;
private JLabel bottomNameLabel;
private JLabel leftNameLabel;
public void updateNames(String guiPlayerName, String leftName, String topName, String rightName) {
this.rightNameLabel.setText(rightName);
this.leftNameLabel.setText(leftName);
this.topNameLabel.setText(topName);
this.bottomNameLabel.setText(guiPlayerName);
}
/**********************************************************************
* IMAGES
**********************************************************************/
private BufferedImage allCards;
private BufferedImage allSuits;
private BufferedImage feltBack;
private void loadImages() {
ClassLoader cl = this.getClass().getClassLoader();
try {
allCards = ImageIO.read(cl.getResource("resource/allCards.jpg"));
allSuits = ImageIO.read(cl.getResource("resource/allSuits100.png"));
feltBack = ImageIO.read(cl.getResource("resource/felt.png"));
} catch (IOException e1) {
e1.printStackTrace();
}
}
private ImageIcon getCardImage(Card card) {
int suit = 0;
switch(card.getSuit()) {
case CLUB: suit = 0; break;
case SPADE: suit = 1; break;
case HEART: suit = 2; break;
case DIAMOND: suit = 3; break;
}
int x = 1 + (CARD_WIDTH + 2)*card.getSymbol().getStrength();
int y = 1 + (CARD_HEIGHT + 2)*suit;
return new ImageIcon(allCards.getSubimage(x, y, CARD_WIDTH, CARD_HEIGHT));
}
private static final int SUIT_SIZE = 50;
private ImageIcon getSuitImage(Suit suit) {
switch(suit) {
case SPADE: return new ImageIcon(allSuits.getSubimage(0, 0, SUIT_SIZE, SUIT_SIZE));
case HEART: return new ImageIcon(allSuits.getSubimage(SUIT_SIZE, 0, SUIT_SIZE, SUIT_SIZE));
case DIAMOND: return new ImageIcon(allSuits.getSubimage(0, SUIT_SIZE, SUIT_SIZE, SUIT_SIZE));
case CLUB: return new ImageIcon(allSuits.getSubimage(SUIT_SIZE, SUIT_SIZE, SUIT_SIZE, SUIT_SIZE));
}
return null;
}
}
<file_sep>package core;
import java.util.ArrayList;
import java.util.List;
import player.InformationHandle;
import player.Player;
import player.Team;
import exception.IllegalShuffleException;
import exception.InvalidCardException;
/**
* Sequence of 8 tricks. This class is responsible for
* all game-controlling logic that occurs within
* a single game.
* @author Daan
*/
public class Round {
Team team1;
Team team2;
Player dealer;
Suit trump;
List<Card> field;
Player[] sequence;
Card[] previousTrick;
int multiplier;
Deck deck;
private static final int MIN_COMMAND_POINTS = 6;
public Round(Team team1, Team team2, Player dealer, Deck deck, int multiplier) {
this.team1 = team1;
this.team2 = team2;
this.dealer = dealer;
this.field = new ArrayList<Card>();
this.sequence = new Player[4];
this.multiplier = multiplier;
this.previousTrick = null;
this.deck = deck;
}
/**********************************************************************
* MULTIPLIER
**********************************************************************/
public int getMultiplier() {
return multiplier;
}
/**********************************************************************
* TRUMP
**********************************************************************/
/**
* Returns the trump suit when one was declared.
* Returns null if:<br/>
* 1) no trump suit was declared yet.
* 2) the round is no-trump
* @return a Suit, or null
*/
public Suit getTrump() {
return trump;
}
/**********************************************************************
* RUN
**********************************************************************/
/**
* Executes a sequence of 8 tricks and returns the winning team
* @throws IllegalShuffleException
* @throws InvalidCardException
*/
public void run() throws IllegalShuffleException, InvalidCardException {
// STEP 1: BUILD PLAYER SEQUENCE
Player starter = getSuccessor(dealer);
buildSequence(starter);
// STEP 1.2: EXAMINE SEQUENCE
Logger.log("------- PLAYER ORDER -------");
for ( Player player : sequence ) {
Logger.log(player);
}
// STEP 2: SHUFFLE & DEAL CARDS
List<ShuffleCommand> commands = dealer.chooseShuffleCommands();
if ( legalShuffleCommands(commands)) {
deck.execute(commands);
} else {
throw new IllegalShuffleException();
}
deal323(deck);
for ( Player player : sequence ) {
player.notifyOfNewRound(dealer.getName());
}
// STEP 2.2: EXAMINE HANDS
Logger.log("====== " + dealer + " deals: ======");
for ( Player player : sequence) {
Logger.log(player + " got the following: ");
for ( Card c : player.getHand() ) {
Logger.log(c);
}
Logger.log("---------------------------- ");
}
// STEP 3: DEFINE TRUMP & KNOCKING
trump = dealer.chooseTrump();
if (trump == null) {
multiplier *= 2;
}
if (starter.knocks(trump)) {
Logger.log(starter.getName() + " knocked");
multiplier *= 2;
} else if ( getTeamPlayer(starter).knocks(trump) ) {
Logger.log(getTeam(starter) + " knocked.");
multiplier *= 2;
}
for ( Player player : sequence ) {
player.notifyOfMultiplier(trump, multiplier);
}
// STEP 3.2: EXAMINE THE TRUMP
Logger.log(dealer + " chose the trump: " + trump);
Logger.log("---------------------------- ");
// STEP 4: TRICKS
for (int trick = 1 ; trick <= 8 ; trick++) {
// STEP 4.1: EACH PLAYER PUTS A CARD
for ( Player player : sequence ) {
InformationHandle info = new InformationHandle(player, this);
Card card = player.chooseCard(info);
if (isValidCard(card, player)) {
field.add(card);
player.getHand().removeCard(card);
Logger.log(player + " plays " + card);
for ( Player peer : sequence ) {
peer.notify(new InformationHandle(peer,this));
}
} else {
throw new InvalidCardException(card);
}
}
// STEP 4.2: DETERMINE WINNER
Player winner = getOwner(getBestCard());
Logger.log("-- Trick (" + trick + ") winner is " + winner + " --");
Team winningTeam = getTeam(winner);
// STEP 4.3: CARDS ARE AWARDED TO WINNING TEAMS POOL
winningTeam.getPool().pushAll(field);
// STEP 4.4: STORE THE TRICK AS PREVIOUS TRICK, NOTIFY PLAYERS & CLEAR FIELD
storeTrick();
// STEP 4.5: REBUILD PLAYER SEQUENCE
buildSequence(winner);
}
}
private boolean legalShuffleCommands(List<ShuffleCommand> commands) {
int points = 0;
for ( ShuffleCommand command : commands ) {
points += command.getPoints();
}
return (points >= MIN_COMMAND_POINTS);
}
private void storeTrick() {
previousTrick = new Card[4];
for ( int i = 0 ; i < 4 ; i++ ) {
previousTrick[i] = field.get(i);
}
field.clear();
for ( Player p : sequence ) {
p.notifyOfTrick(previousTrick, new InformationHandle(p,this));
}
}
/**********************************************************************
* CARD PLAYING LOGIC
**********************************************************************/
/**
* Checks if the given card is valid to play at this time
* by the given player.
* This check can still be used if <i>this.trum == null</i>
* @param card
* @param player
* @return true if it is
*/
public boolean isValidCard(Card card, Player player) {
if ( field.isEmpty() ) {
// CASE 1: the field is empty: any card is allowed
return true;
} else {
// CASE 2: the field is not empty
Suit trickSuit = getTrickSuit();
Team leadingTeam = getTeam(getOwner(getBestCard()));
if ( leadingTeam.hasPlayer(player)) {
// CASE 2.1: ally is leading
if ( card.getSuit().equals(trickSuit)) {
// CASE 2.1.1: follow: OK
return true;
} else {
// CASE 2.1.2: don't follow
if ( player.getHand().contains(trickSuit) ) {
// CASE 2.1.2.1: didn't follow --> should have
return false;
} else {
// CASE 2.1.2.2: couldn't follow: any card is OK
return true;
}
}
} else {
// CASE 2.2: enemy is leading
if ( card.getSuit().equals(trickSuit)) {
// CASE 2.2.1: follow
if ( getBestCard().getSuit().equals(trickSuit) ) {
// CASE 2.2.1.1: none bought yet, must follow
if ( player.getHand().contains(trickSuit) && player.getHand().getStrongestOfSuit(trickSuit).isStrongerThan(getBestCard())) {
// CASE 2.2.1.1.1: can overpower
if ( !card.isStrongerThan(getBestCard())) {
// CASE 2.2.1.1.1.1: didn't overpower --> should have
return false;
} else {
// CASE 2.2.1.1.1.2: did overpower: OK
return true;
}
} else {
// CASE 2.2.1.1.2: can't overpower: OK
return true;
}
} else {
// CASE 2.2.1.2: enemy bought, we have to follow, symbol doesn't matter: OK
return true;
}
} else {
// CASE 2.2.2: don't follow
if ( player.getHand().contains(trickSuit)) {
// CASE 2.2.2.1: didn't follow --> should have
return false;
} else {
// CASE 2.2.2.2: couldn't follow
if ( getBestCard().getSuit().equals(trump) ) {
// CASE 2.2.2.2.1: enemy bought
if ( player.getHand().contains(trump)) {
// CASE 2.2.2.2.1.1: player has trump
if ( player.getHand().getStrongestOfSuit(trump).isStrongerThan(getBestCard())) {
// CASE 2.2.2.2.1.1.1: player has a better trump
if ( card.getSuit().equals(trump) && card.isStrongerThan(getBestCard())) {
// CASE 2.2.2.2.1.1.1.1: did overpower: OK
return true;
} else {
// CASE 2.2.2.2.1.1.1.2: didn't overpower --> should have
return false;
}
} else {
// CASE 2.2.2.2.1.1.2: player has worse trump
if ( card.getSuit().equals(trump)) {
// CASE 2.2.2.2.1.1.2.1: player underbought
if ( player.getHand().containsSuitOtherThan(trump)) {
// CASE: couldn't do anything else
return false;
} else {
// CASE: could do something else --> should have done that
return true;
}
} else {
// CASE 2.2.2.2.1.1.2.2: player didn't play trump: OK
return true;
}
}
} else {
// CASE 2.2.2.2.1.2: player doesn't have trump: ok
return true;
}
} else {
// CASE 2.2.2.2.2: enemy did not buy, but owns highest card
if ( player.getHand().contains(trump) && !card.getSuit().equals(trump)) {
// CASE 2.2.2.2.2.1: player can buy, buy didn't --> should have
return false;
} else {
// CASE 2.2.2.2.2.2: player couldn't buy or bought when he could: OK
return true;
}
}
}
}
}
}
}
/**********************************************************************
* SEQUENCE
**********************************************************************/
private void buildSequence(Player starter) {
sequence[0] = starter;
for (int i = 1 ; i < 4 ; i++) {
sequence[i] = getSuccessor(sequence[i-1]);
}
}
private Player getSuccessor(Player player) {
if ( player == team1.getPlayer1() ) {
return team2.getPlayer1();
} else if ( player == team1.getPlayer2() ) {
return team2.getPlayer2();
} else if ( player == team2.getPlayer1() ) {
return team1.getPlayer2();
} else {
return team1.getPlayer1();
}
}
/**
* Returns the index of the given player in the sequence
* @param player
* @return index
*/
public int getPositionInSequence(Player player) {
for ( int i = 0 ; i < 4 ; i++ ) {
if ( sequence[i] == player ) {
return i;
}
}
throw new RuntimeException("unexpected");
}
/**********************************************************************
* MISC
**********************************************************************/
/**
* Returns the team of the given player (the ally team)
*/
public Team getTeam(Player player) {
if ( team1.hasPlayer(player)) {
return team1;
} else {
return team2;
}
}
/**
* Returns the team opposing the given player (the enemy team)
*/
public Team getOpposingTeam(Player player) {
if ( team1.hasPlayer(player)) {
return team2;
} else {
return team1;
}
}
/**
* Returns the team player of the given player
*/
private Player getTeamPlayer(Player player) {
return getTeam(player).getTeamPlayerOf(player);
}
/**
* Returns the owner of the given card.
* (or null when the card isn't on the field)
*/
private Player getOwner(Card card) {
return sequence[field.indexOf(card)];
}
/**
* Returns the best card on the field
*/
private Card getBestCard() {
Card best = field.get(0);
for ( Card card : field ) {
if ((card.getSuit().equals(trump) && !best.getSuit().equals(trump))
|| (best.getSuit().equals(card.getSuit()) && card.isStrongerThan(best))) {
best = card;
}
}
return best;
}
private void deal323(Deck deck) {
for ( Player player : sequence ) {
player.getHand().addCard(deck.draw());
player.getHand().addCard(deck.draw());
player.getHand().addCard(deck.draw());
}
for ( Player player : sequence ) {
player.getHand().addCard(deck.draw());
player.getHand().addCard(deck.draw());
}
for ( Player player : sequence ) {
player.getHand().addCard(deck.draw());
player.getHand().addCard(deck.draw());
player.getHand().addCard(deck.draw());
}
}
/**
* Return the suit of the first card in this trick.
* Returns null when the field is empty.
* @return a Suit, or null.
*/
public Suit getTrickSuit() {
if ( !field.isEmpty() ) {
return field.get(0).getSuit();
} else {
return null;
}
}
public List<Card> getField() {
return field;
}
/**
* Returns a clone of the previous trick if there is one,
* else returns null.
*/
public Card[] getPreviousTrickClone() {
return previousTrick.clone();
}
public Player getDealer() {
return this.dealer;
}
}
| c9b4e14f82e59a3a84ab8262b7753c48a2073f20 | [
"Markdown",
"Java"
] | 13 | Java | dseynaev/Manilla | c608a554c7df5267c660da97326094bdc1ff7454 | abcd009fa3703554d0c85a577556a25614fb54c6 | |
refs/heads/master | <repo_name>ArthurTuggle/Mini-Exam-2-Step-2<file_sep>/main.cs
using System;
class MainClass {
public static void Main (string[] args) {
{
double side1, side2, hypotenuse;
Console.Write("Enter Side 1 : ");
side1 = Convert.ToDouble(Console.ReadLine());
Console.Write("Enter Side 2 : ");
side2 = Convert.ToDouble(Console.ReadLine());
hypotenuse = Math.Sqrt(Math.Pow(side1, 2) + Math.Pow(side2, 2));
Console.WriteLine("Hypotenuse : "+hypotenuse);
Console.ReadKey();
}
}
} | ccd613fb9b29e351b0ec29eb0cbf9227a04c54ff | [
"C#"
] | 1 | C# | ArthurTuggle/Mini-Exam-2-Step-2 | 9bb53d4fe5238e85662663d955ab8f1670a335a3 | 389d838bd85b563db25acd292eb1a06882153757 | |
refs/heads/master | <repo_name>fossabot/openvpn-on-docker<file_sep>/README.md
[](https://travis-ci.org/OlegGorj/openvpn-on-docker)
[](https://github.com/OlegGorJ/openvpn-on-docker/issues)
[](http://isitmaintained.com/project/OlegGorJ/openvpn-on-docker "Average time to resolve an issue")
[](http://isitmaintained.com/project/OlegGorJ/openvpn-on-docker "Percentage of issues still open")
[](https://app.fossa.io/projects/git%2Bgithub.com%2FOlegGorj%2Fopenvpn-on-docker?ref=badge_shield)
# OpenVPN on docker container
Implementation of OpenVPN on Docker container
To setup VPN clients, generate VPN client credentials for `CLIENTNAME` without password protection; leave 'nopass' out to enter password.
```
ENDPOINT_SERVER=<external IP of bastion instance>
CLIENTNAME=openvpn
docker run --user=$(id -u) -e OVPN_CN=$ENDPOINT_SERVER -e OVPN_SERVER_URL=tcp://$ENDPOINT_SERVER:1194 -i -v $PWD:/etc/openvpn oleggorj/openvpn ovpn_initpki nopass $ENDPOINT_SERVER
docker run --user=$(id -u) -v $PWD:/etc/openvpn -ti oleggorj/openvpn easyrsa build-client-full $CLIENTNAME nopass
```
To generate `ovpn` file:
```
docker run --user=$(id -u) -e OVPN_DEFROUTE=1 -e OVPN_SERVER_URL=tcp://$INGRESS_IP_ADDRESS:80 -v $PWD:/etc/openvpn --rm oleggorj/openvpn ovpn_getclient $CLIENTNAME > ${CLIENTNAME}.ovpn
```
## License
[](https://app.fossa.io/projects/git%2Bgithub.com%2FOlegGorj%2Fopenvpn-on-docker?ref=badge_large)<file_sep>/bin/ovpn_initpki
#!/bin/bash
#
# Initialize the EasyRSA PKI
#
if [ "$DEBUG" == "1" ]; then
set -x
fi
set -e
source /usr/local/bin/func.sh
# Specify "nopass" as arg[2] to make the CA insecure (not recommended!)
nopass=$1
cn=$2
# Provides a sufficient warning before erasing pre-existing files
easyrsa init-pki
# CA always has a password for protection in event server is compromised. The
# password is only needed to sign client/server certificates. No password is
# needed for normal OpenVPN operation.
echo -e "\n\n" | easyrsa build-ca $cn $nopass
RANDFILE=/tmp/.rnd easyrsa gen-dh
openvpn --genkey --secret $EASYRSA_PKI/ta.key
# For a server key with a password, manually init; this is autopilot
easyrsa build-server-full "$OVPN_CN" nopass
<file_sep>/entrypoint.sh
#!/bin/bash
[[ $DEBUG ]] && set -x && OVPN_VERB=${OVPN_VERB:-5}
set -ae
source /usr/local/bin/func.sh
addArg "--config" "$OVPN_CONFIG"
# Server name is in the form "udp://vpn.example.com:1194"
if [[ "$OVPN_SERVER_URL" =~ ^((udp|tcp)://)?([0-9a-zA-Z\.\-]+)(:([0-9]+))?$ ]]; then
OVPN_PROTO=${BASH_REMATCH[2]};
OVPN_CN=${BASH_REMATCH[3]};
OVPN_PORT=${BASH_REMATCH[5]};
else
echo "Need to pass in OVPN_SERVER_URL in 'proto://fqdn:port' format"
exit 1
fi
#OVPN_NETWORK="${OVPN_NETWORK:-10.140.0.0/24}"
OVPN_NETWORK="${OVPN_NETWORK:-10.0.1.0/24}"
OVPN_PROTO="${OVPN_PROTO:-tcp}"
OVPN_NATDEVICE="${OVPN_NATDEVICE:-eth0}"
#OVPN_K8S_DOMAIN="${OVPN_K8S_DOMAIN:-svc.cluster.local}"
OVPN_VERB=${OVPN_VERB:-3}
if [ ! -d "${EASYRSA_PKI}" ]; then
echo "PKI directory missing. Did you mount in your Secret?"
exit 1
fi
#if [ -z "${OVPN_K8S_SERVICE_NETWORK}" ]; then
# echo "Service network not specified"
# exit 1
#fi
#if [ -z "${OVPN_K8S_POD_NETWORK}" ]; then
# echo "Pod network not specified"
# exit 1
#fi
# You don't need to set this variable unless you touched your dnsPolicy for this pod.
#if [ -z "${OVPN_K8S_DNS}" ]; then
# OVPN_K8S_DNS=$(cat /etc/resolv.conf | grep -i nameserver | head -n1 | cut -d ' ' -f2)
#fi
# Do some CIDR conversion
OVPN_NETWORK_ROUTE=$(getroute ${OVPN_NETWORK})
#OVPN_K8S_SERVICE_NETWORK_ROUTE=$(getroute $OVPN_K8S_SERVICE_NETWORK)
#OVPN_K8S_POD_NETWORK_ROUTE=$(getroute $OVPN_K8S_POD_NETWORK)
envsubst < $OVPN_TEMPLATE > $OVPN_CONFIG
echo "$(date "+%a %b %d %H:%M:%S %Y") Configuring net iptables"
if [ $OVPN_DEFROUTE -gt 0 ]; then
iptables -t nat -C POSTROUTING -s $OVPN_NETWORK -o $OVPN_NATDEVICE -j MASQUERADE || {
iptables -t nat -A POSTROUTING -s $OVPN_NETWORK -o $OVPN_NATDEVICE -j MASQUERADE
}
fi
#sudo iptables -t nat -A POSTROUTING -o $OVPN_NATDEVICE -j MASQUERADE
# Use client configuration directory if it exists.
if [ -d "$OVPN_CCD" ]; then
addArg "--client-config-dir" "$OVPN_CCD"
# Watch for changes to port translation configmap in the background
/sbin/watch-portmapping.sh &
fi
mkdir -p /dev/net
if [ ! -c /dev/net/tun ]; then
mknod /dev/net/tun c 10 200
fi
if [ -n "${OVPN_STATUS}" ]; then
addArg "--status" "${OVPN_STATUS}"
/sbin/print-status.sh ${OVPN_STATUS} &
fi
if [ $DEBUG ]; then
echo "openvpn.conf:"
cat $OVPN_CONFIG
fi
echo "$(date "+%a %b %d %H:%M:%S %Y") Deploying and running 'OpenVPN AS'"
#cd ~ && wget http://swupdate.openvpn.org/as/openvpn-as-2.5.2-Ubuntu16.amd_64.deb
#sudo dpkg -i openvpn-as-2.5.2-Ubuntu16.amd_64.deb
echo "$(date "+%a %b %d %H:%M:%S %Y") Running 'openvpn ${ARGS[@]} ${USER_ARGS[@]}'"
exec openvpn "${ARGS[@]}" "${USER_ARGS[@]}" 1> /dev/stderr 2> /dev/stderr
| d5f521c05f239b901a084defb4305f351a2f891b | [
"Markdown",
"Shell"
] | 3 | Markdown | fossabot/openvpn-on-docker | a8c970964199b627b8b66b6d0975a3e3e71afb31 | 9ea27a2fa928adc04a56f7a926c61c429ec15fba | |
refs/heads/master | <file_sep><?php
return [
'user' => [
'class' => 'weikit\core\components\web\User',
'identityClass' => 'weikit\core\models\User',
'enableAutoLogin' => true,
'founders' => [1] // 创始人ID可多个
],
'db' => require(__DIR__ . '/db.php'),
'authManager' => [
'class' => 'yii\rbac\DbManager'
],
'cache' => [
'class' => 'yii\caching\FileCache',
],
'log' => [
'traceLevel' => YII_DEBUG ? 3 : 0,
'targets' => [
[
'class' => 'yii\log\FileTarget',
'levels' => ['error', 'warning'],
],
],
],
'mailer' => [
'class' => 'yii\swiftmailer\Mailer',
// send all mails to a file by default. You have to set
// 'useFileTransport' to false and configure a transport
// for the mailer to send real emails.
'useFileTransport' => true,
],
'formatter' => [
'datetimeFormat' => 'php:Y-m-d H:i:s'
],
'httpClient' => [
'class' => 'yii\httpclient\Client',
'transport' => 'yii\httpclient\CurlTransport',
'requestConfig' => [
'options' => [
'CONNECTTIMEOUT' => 60,
'TIMEOUT' => 60,
'USERAGENT' => 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:9.0.1) Gecko/20100101 Firefox/9.0.1',
'SSL_VERIFYPEER' => false,
'SSL_VERIFYHOST' => 0,
'SSLVERSION' => CURL_SSLVERSION_TLSv1,
]
]
],
'config' => [
'class' => 'weikit\core\components\base\Config'
]
];<file_sep><?php
if (php_sapi_name() != 'cli') {
exit('如果您看到这条消息, 那就是说您还未执行安装程序, 请参考文档在命令行执行安装程序!');
}
return [
'class' => 'yii\db\Connection',
'dsn' => 'mysql:host=localhost;dbname=weikit',
'username' => 'root',
'password' => '',
'tablePrefix' => 'wk_',
'charset' => 'utf8',
'enableSchemaCache' => !YII_DEBUG
];<file_sep><?php
return [
/* 系统内置模块 !!慎重修改!! */
'admin' => [
'class' => 'weikit\core\modules\admin\Module',
'modules' => [
'wechat' => ['class' => 'weikit\core\modules\wechat\admin\Module'],
'user' => ['class' => 'weikit\core\modules\user\admin\Module'],
]
],
'user' => [
'class' => 'weikit\core\modules\user\Module'
],
'wechat' => [
'class' => 'weikit\core\modules\wechat\Module'
],
'component' => [
'class' => 'weikit\core\modules\component\Module'
],
'gridview' => ['class' => '\kartik\grid\Module'],
/* 自定义模块 */
// 'xxx' => ['class' => 'app\modules\xxx\Module']
];<file_sep><?php
defined('TIMESTAMP') or define('TIMESTAMP', time());
$params = require(__DIR__ . '/params.php');
$config = [
'id' => 'weikit',
'basePath' => dirname(__DIR__),
'language' => 'zh-CN',
'timeZone' => 'Asia/Shanghai',
'bootstrap' => ['log'],
'modules' => require (__DIR__ . '/modules.php'),
'components' => array_merge(require(__DIR__ . '/components.php'), [
'request' => [
'class' => 'weikit\core\components\web\Request',
// !!! insert a secret key in the following (if it is empty) - this is required by cookie validation
'cookieValidationKey' => '1',
'parsers' => [ // Raw方式提交的json数据解析
'application/json' => 'yii\web\JsonParser',
]
],
'response' => [
'class' => 'weikit\core\components\web\Response',
],
'urlManager' => [
'class' => 'yii\web\UrlManager',
'enablePrettyUrl' => true,
'showScriptName' => false
],
'assetManager' => [
'forceCopy' => YII_DEBUG
],
'errorHandler' => [
'errorAction' => 'site/error',
],
]),
'params' => $params,
];
if (YII_ENV_DEV) {
// configuration adjustments for 'dev' environment
$config['bootstrap'][] = 'debug';
$config['modules']['debug'] = [
'class' => 'yii\debug\Module',
'panels' => [
'httpclient' => [
'class' => 'yii\httpclient\debug\HttpClientPanel',
]
]
];
$config['bootstrap'][] = 'gii';
$config['modules']['gii'] = [
'class' => 'yii\gii\Module',
'generators' => [
'adminCrud' => [
'class' => 'weikit\core\generators\admin\crud\Generator'
],
'wechatModule' => [
'class' => 'weikit\core\generators\wechat\module\Generator'
]
]
];
}
return $config;
<file_sep><?php
namespace app\commands;
use Yii;
use yii\helpers\Console;
use yii\console\Controller;
/**
* Class WeikitController
* @package app\commands
*/
class WeikitController extends Controller
{
public $defaultSteps = [
'运行环境监测' => 'check',
'数据库配置' => 'db',
'初始化数据库数据' => 'migrate'
];
/**
* 安装
*/
public function actionInstall()
{
$lockFile = Yii::getAlias('@app/install.lock');
if (file_exists($lockFile)) {
$this->stdout("站点已经配置完毕,无需再配置\n", Console::FG_GREEN);
usleep(500000);
$this->stdout("\n - 如需重新配置, 请删除{$lockFile}文件后再执行命令!\n");
return;
}
$result = $this->runSteps($this->defaultSteps);
if ($result) {
sleep(1);
$this->stdout("恭喜, 站点配置成功!\n", Console::FG_GREEN);
touch($lockFile);
}
}
/**
* 检查当前环境是否可用
*
* @param string $path
* @return bool|null
*/
public function actionCheck($path = '@app/requirements.php')
{
ob_start();
ob_implicit_flush(false);
require Yii::getAlias($path);
$content = ob_get_clean();
$content = strtr($content, [
'OK' => $this->ansiFormat("OK", Console::FG_GREEN),
'WARNING!!!' => $this->ansiFormat("WARNING!!!", Console::FG_YELLOW),
'FAILED!!!' => $this->ansiFormat("FAILED!!!", Console::FG_RED)
]);
foreach (explode("\n\n", $content) as $line) {
$this->stdout($line . "\n\n");
usleep(200000);
}
if (stripos($content, 'FAILED!!!') !== false) {
$this->stdout('*** 运行环境监测不通过, 请修复红色字体行所需的环境后重试 ***', Console::FG_RED);
return false;
}
}
/**
* 生成数据库配置文件
* @return mixed
*/
public function actionDb()
{
$dbFile = Yii::getAlias('@app/config/db.php');
$result = $this->generateDbFile($dbFile);
if ($result !== false) { // 生成文件了之后.加载db配置
Yii::$app->set('db', require $dbFile);
}
return $result;
}
/**
* 创建数据库配置文件
*
* @param $dbFile
* @return mixed
*/
protected function generateDbFile($dbFile)
{
$host = $this->prompt('请输入数据库主机地址:', [
'default' => 'localhost'
]);
$dbName = $this->prompt("请输入数据库名称:", [
'default' => 'weikit'
]);
$dbConfig = [
'dsn' => "mysql:host={$host};dbname={$dbName}",
'username' => $this->prompt("请输入数据库访问账号:", [
'default' => 'root'
]),
'password' => $this->prompt("请输入数据库访问密码:"),
'tablePrefix' => $this->prompt("请输入数据库表前缀:", [
'default' => 'wk_'
]),
'charset' => $this->prompt("请输入数据默认的字符集:", [
'default' => 'utf8'
])
];
if (empty($dbName)) {
$dbConfig['dsn'] .= $dbConfig['username'];
}
$message = null;
if ($this->confirm('是否测试数据库可用?', true)) {
$db = Yii::createObject(array_merge(['class' => 'yii\db\Connection'], $dbConfig));
try {
$db->open();
$this->stdout("数据连接成功\n", Console::FG_GREEN);
} catch (\Exception $e) {
$this->stdout("数据连接失败:" . $e->getMessage() . "\n", Console::FG_RED);
$message = '依然写入文件?(如果依然写入文件, 会影响后续安装步骤)';
}
}
if ($message === null || $this->confirm($message)) {
$this->stdout("生成数据库配置文件...\n");
$code = <<<EOF
<?php
return [
'class' => 'yii\db\Connection',
'dsn' => '{$dbConfig['dsn']}',
'username' => '{$dbConfig['username']}',
'password' => '{$dbConfig['password']}',
'tablePrefix' => '{$dbConfig['tablePrefix']}',
'charset' => '{$dbConfig['charset']}',
'enableSchemaCache' => !YII_DEBUG
];
EOF;
file_put_contents($dbFile, $code);
$this->stdout("恭喜! 数据库配置完毕!\n", Console::FG_GREEN);
} elseif($this->confirm("是否重新设置?", true)) {
return $this->generateDbFile($dbFile);
} else {
return false;
}
}
public $defaultMigrationPath = [
'默认目录' => '@app/migrations',
'内核目录' => '@weikit/core/migrations'
];
/**
* 迁移数据库
*/
public function actionMigrate()
{
$this->stdout("\n开始迁移数据库结构和数据\n", Console::FG_YELLOW);
$this->stdout("\n\n** 如无特殊需求,当询问是否迁移数据时回复yes即可 **\n\n", Console::FG_RED);
sleep(3);
foreach ($this->defaultMigrationPath as $name => $migrationPath) {
$migrationPath = Yii::getAlias($migrationPath);
if (!is_dir($migrationPath)) {
continue;
}
$this->stdout("\n\n正在执行{$name}迁移: {$migrationPath}\n", Console::FG_YELLOW);
Yii::$app->runAction('migrate/up', ['migrationPath' => $migrationPath]);
}
}
/**
* 运行安装步骤
*
* @param array $steps
* @return bool
*/
protected function runSteps(array $steps)
{
$i = 1;
foreach ($steps as $step => $args) {
$this->stdout("\n\n - Step {$i} {$step} \n");
$this->stdout("==================================================\n");
!is_array($args) && $args = (array)$args;
$method = array_shift($args);
usleep(500000);
$result = call_user_func_array([$this, 'action' . $method], $args);
if ($result === false) {
$this->stdout("{$step}失败, 退出安装流程\n", Console::FG_RED);
return false;
}
sleep(1);
$i++;
}
return true;
}
} | 83a6af1c07bab3713f9eade4db8e87669aaba02d | [
"PHP"
] | 5 | PHP | weikit/weikit_y | 79200c5458d1d1ecb5c9400e4f5621efa9d22968 | 655e7ca8bb02a3af768932412b84abee77f70504 | |
refs/heads/master | <repo_name>JungHo-K1m/WeatherCompetition<file_sep>/app/src/main/java/com/example/detail/ChungbukActivity.java
package com.example.detail;
import android.content.Intent;
import android.os.Bundle;
import android.os.PersistableBundle;
import android.view.View;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
public class ChungbukActivity extends AppCompatActivity {
@Override
public void onCreate(@Nullable Bundle savedInstanceState, @Nullable PersistableBundle persistentState) {
super.onCreate(savedInstanceState, persistentState);
setContentView(R.layout.chungbuk);
findViewById(R.id.cb_btn01).setOnClickListener(onClickListener);
findViewById(R.id.cb_btn02).setOnClickListener(onClickListener);
findViewById(R.id.cb_btn03).setOnClickListener(onClickListener);
findViewById(R.id.cb_btn04).setOnClickListener(onClickListener);
findViewById(R.id.cb_btn05).setOnClickListener(onClickListener);
findViewById(R.id.cb_btn06).setOnClickListener(onClickListener);
findViewById(R.id.cb_btn07).setOnClickListener(onClickListener);
}
View.OnClickListener onClickListener = v -> {
switch (v.getId()){
case R.id.cb_btn01:
cnstartActivity(DetailActivity.class, "4311135000");
break;
case R.id.cb_btn02:
cnstartActivity(DetailActivity.class, "4311425300");
break;
case R.id.cb_btn03:
cnstartActivity(DetailActivity.class, "4311134000");
break;
case R.id.cb_btn04:
cnstartActivity(DetailActivity.class, "4311425300/");
break;
case R.id.cb_btn05:
cnstartActivity(DetailActivity.class, "4311169000");
break;
case R.id.cb_btn06:
cnstartActivity(DetailActivity.class, "4311133000");
break;
case R.id.cb_btn07:
cnstartActivity(DetailActivity.class, "4375025300");
break;
}
};
private void cnstartActivity(Class c, String s){
Intent intent = new Intent(this, c);
intent.putExtra("code", s);
startActivity(intent);
}
}
<file_sep>/settings.gradle
rootProject.name = "Detail"
include ':app'
| a5b77b8e3ca8c1856bd64a91c941b2759c227889 | [
"Java",
"Gradle"
] | 2 | Java | JungHo-K1m/WeatherCompetition | 44a853218aa2dde07774db54f2ad8b3bf76db896 | bb2a34be1d43b29b7c94a65d67904e1c18412d73 | |
refs/heads/master | <file_sep>// Dependencies
var express = require("express");
var mongoose = require("mongoose");
var exphbs = require("express-handlebars");
var db = require("./models");
var path = require("path");
var app = express();
var axios = require("axios");
var cheerio = require("cheerio");
// Port Declaration
var PORT = process.env.PORT || 3000;
// Configure Middleware
app.use(express.static("public"));
app.use(express.urlencoded({ extended: true }));
app.use(express.json());
// Handlebars
app.engine(
"handlebars",
exphbs({
defaultLayout: "main"
})
);
app.set("view engine", "handlebars");
// Connecting to MongoDB
// If deployed, use the deployed database. Otherwise use the local mongoHeadlines database
var MONGODB_URI = process.env.MONGODB_URI || "mongodb://localhost/mongoHeadlines";
mongoose.connect(MONGODB_URI);
// Routes
// require("./routes/apiRoutes")(app);
require("./routes/htmlRoutes")(app);
// A GET route for scraping news articles
app.get("/scrape", function (req, res) {
// First, we grab the body of the html with axios
axios.get("http://www.gamesradar.com/news/").then(function (response) {
var $ = cheerio.load(response.data);
// Go through each article div tag and get articles based on the results.
$("a.article-link").each(function (i, element) {
var result = {};
var validResults = {};
result.link = $(this).attr("href");
console.log("Link:", result.link);
result.title = $(this).children("article").children("div.content").children("header").children("h3").text();
console.log("Title:", result.title);
var summary = $(this).children("article").children("div.content").children("p.synopsis").text();
result.summary = summary.substr(summary.indexOf('\n') + 1);
console.log("Summary:", result.summary);
validResults.title = result.title;
validResults.link = result.link;
validResults.summary = result.summary;
db.Article.create(validResults)
.then(function (article) {
console.log(article);
})
.catch(function (err) {
console.log(err);
});
});
res.send("Scrape complete");
});
});
// Route for getting all articles from the db
app.get("/articles", function (req, res) {
// Grab every document in the Articles Collection
db.Article.find({})
.then(function (article) {
res.json(article);
})
.catch(function (err) {
res.json(err);
});
});
// Route for grabbing a specific Article by Id, populate it with it's note.
app.get("/articles/:id", function (req, res) {
db.Article.findOne({ _id: req.params.id })
.populate("note")
.then(function (article) {
res.json(article);
})
.catch(function (err) {
res.json(err);
});
});
// Route for saving/updating an Article's associated note
app.post("/articles/:id", function (req, res) {
db.Note.create(req.body)
.then(function (note) {
return db.Article.findOneAndUpdate({ _id: req.params.id }, { note: note._id }, { new: true });
})
.then(function (article) {
// If unable to update an Article, send it back to the client
res.json(article);
})
.catch(function (err) {
res.json(err);
});
});
// Start the Server
app.listen(PORT, function () {
console.log("App running on port " + PORT + "!");
});
<file_sep># NewScraper
Scrape news articles for personal perusal.
* Headline - the title of the article
* Summary - a short summary of the article
* URL - the url to the original article
* Feel free to add more content to your database (photos, bylines, and so on).
Users should also be able to leave comments on the articles displayed and revisit them later. The comments should be saved to the database as well and associated with their articles. Users should also be able to delete comments left on articles. All stored comments should be visible to every user.
Beyond these requirements, be creative and have fun with this!
**Heroku deployment**: https://git.heroku.com/gentle-springs-30491.git
<file_sep>const db = require("../models");
module.exports = function (app) {
// Load Index Page
app.get("/", function (req, res) {
db.Article.find({})
.then(function (data) {
res.render("index", {
article: data
});
});
});
}<file_sep>
$(document).on("click", "#saveArticle", function () {
event.preventDefault();
var thisArticle = $(this)
console.log("this article:", thisArticle);
});
$(document).on("click", "#navScrape", function () {
event.preventDefault();
$.get("/scrape", function (req, res) {
console.log("Articles Scraped!");
}).then(function () {
location.reload();
})
});
$(document).on("click", "#navClear", function () {
event.preventDefault();
$("#articles").empty();
});
$(document).on("click", "#addNote", function () {
event.preventDefault();
console.log("this:", $(this).attr("data"));
var thisId = $(this).attr("data");
$.ajax({
method: "GET",
url: "/articles/" + thisId
})
.then(function (data) {
console.log("ajax data:", data);
$("#notes").append("<h5>" + data.title.substring(0, 72) + '...' + "</h5>");
$("#notes").append("<input id='titleinput' name='title' >");
$("#notes").append("<textarea id='bodyinput' name='body'></textarea>");
$("#notes").append("<button class='btn-large blue waves-effect right' data-id='" + data._id + "' id='saveNote'>Save Note</button>");
// If there's a note in the article
if (data.note) {
$("#titleinput").val(data.note.title);
$("#bodyinput").val(data.note.body);
}
})
});
$(document).on("click", "#saveNote", function () {
event.preventDefault();
var thisId = $(this).attr("data-id");
console.log("ThisId:", thisId);
$.ajax({
method: "POST",
url: "/articles/" + thisId,
data: {
title: $("#titleinput").val(),
body: $("#bodyinput").val()
}
})
.then(function (data) {
console.log("last data:", data);
});
$("#notes").empty();
// Remove values entered
$("#titleinput").val("");
$("#bodyinput").val("");
}); | f498e7a1d04ba1b1f61295ebff9678f1c1f37e7c | [
"JavaScript",
"Markdown"
] | 4 | JavaScript | Djpowell23/GameScraper | 386fb25d770b452b1ef4ae60c3f9e711c2a6839e | d8c825e3d528076f06752bffe37f20ff6855b3f2 | |
refs/heads/master | <file_sep>//
// Categoria+CoreDataProperties.swift
// ScreensApp
//
// Created by Student on 12/15/15.
// Copyright © 2015 <NAME>. All rights reserved.
//
// Choose "Create NSManagedObject Subclass…" from the Core Data editor menu
// to delete and recreate this implementation file for your updated model.
//
import Foundation
import CoreData
extension Categoria {
@NSManaged var cat_nome: String?
}
<file_sep>//
// EventoDescricaoViewController.swift
// ScreensApp
//
// Created by Student on 12/16/15.
// Copyright © 2015 <NAME>. All rights reserved.
//
import UIKit
class EventoDescricaoViewController: UIViewController {
//OutLets das Descricoes do Evento
@IBOutlet weak var lblDataEvento: UILabel!
@IBOutlet weak var lblNomeEvento: UILabel!
@IBOutlet weak var lblNomeRua: UILabel!
@IBOutlet weak var lblDescricao: UITextView!
@IBOutlet weak var lblImagemEvento: UIImageView!
@IBOutlet weak var lblCriadoPor: UILabel!
@IBOutlet weak var lblTelContato: UILabel!
var evento: Evento!
//edito todos os campos com os atributos do evento selecionado
override func viewDidLoad() {
super.viewDidLoad()
lblNomeEvento.text = evento.evn_nome
lblNomeRua.text = evento.evn_endereco
lblDescricao.text = evento.evn_descricao
lblCriadoPor.text = evento.usuario?.usu_nome
lblTelContato.text = evento.usuario?.usu_telefone
lblDataEvento.text = evento.evn_data_evento
lblImagemEvento.image = UIImage(data: evento.evn_imagem!)
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
}
<file_sep>//
// ViewController.swift
// ScreensApp
//
// Created by Student on 12/10/15.
// Copyright © 2015 <NAME>. All rights reserved.
//
import UIKit
import CoreData
class ViewController: UIViewController, UITableViewDataSource, NSFetchedResultsControllerDelegate {
//outlet da tabela de eventos
@IBOutlet weak var tblEventos: UITableView!
var contexto = (UIApplication.sharedApplication().delegate as! AppDelegate).managedObjectContext
var fetchedResultController: NSFetchedResultsController = NSFetchedResultsController()
override func viewDidLoad() {
super.viewDidLoad()
tblEventos.dataSource = self
carregarEventos()
}
//carrego eventos do banco de dados
func carregarEventos(){
fetchedResultController = getFetchedResultController()
fetchedResultController.delegate = self
do{
try fetchedResultController.performFetch()
} catch let error as NSError {
print("Erro ao buscar eventos: \(error), \(error.userInfo) ")
}
}
//metodos que complementa o carregamento, passando a Tabela e a Ordenacao que sera realizada
func getFetchedResultController() -> NSFetchedResultsController {
fetchedResultController = NSFetchedResultsController( fetchRequest: eventoFetchRequest(), managedObjectContext: contexto, sectionNameKeyPath: nil , cacheName: nil )
return fetchedResultController
}
func eventoFetchRequest() -> NSFetchRequest {
let fetchResquest = NSFetchRequest(entityName: "Evento")
let sortDescriptor = NSSortDescriptor(key: "evn_nome", ascending: true)
fetchResquest.sortDescriptors = [sortDescriptor]
return fetchResquest
}
// TableView DataSource
func numberOfSectionsInTableView(tableView: UITableView) -> Int {
let numberOfSection = fetchedResultController.sections?.count
return numberOfSection!
}
func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
let numberOfRowsInSection = fetchedResultController.sections?[section].numberOfObjects
//print("linhas:", numberOfRowsInSection)
return numberOfRowsInSection!
}
//Metodo onde carrego os eventos do banco na tabela principal
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCellWithIdentifier("cell") as! TableViewCell
let evento = fetchedResultController.objectAtIndexPath(indexPath) as! Evento
cell.lblNomeEvento.text = evento.evn_nome
cell.lblNomeCategoria.text = evento.categoria?.cat_nome
cell.imgImagemEvento.image = UIImage(data: evento.evn_imagem!)
print("log:", evento.evn_descricao)
cell.evento = evento
print("log:\(evento.categoria?.cat_nome)")
return cell
}
//segue para mostrar as descricoes de um evento
override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
if segue.identifier == "mostraDescricaoEvento"{
if let objEvento = segue.destinationViewController as? EventoDescricaoViewController{
if let cell = sender as? TableViewCell{
objEvento.evento = cell.evento
}
}
}
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
//atualizacao da tabela apos algum insert, update ou delete
func controllerDidChangeContent(controller: NSFetchedResultsController) {
tblEventos.reloadData()
}
}
<file_sep>//
// TableViewCell.swift
// ScreensApp
//
// Created by Student on 12/15/15.
// Copyright © 2015 <NAME>. All rights reserved.
//
import UIKit
class TableViewCell: UITableViewCell {
//componentes da celula dentro da tableView
@IBOutlet weak var lblNomeEvento: UILabel!
@IBOutlet weak var lblNomeCategoria: UILabel!
@IBOutlet weak var imgImagemEvento: UIImageView!
var evento : Evento!
override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
}
override func setSelected(selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
// Configure the view for the selected state
}
}
<file_sep>//
// Evento+CoreDataProperties.swift
// ScreensApp
//
// Created by Student on 12/17/15.
// Copyright © 2015 <NAME>. All rights reserved.
//
// Choose "Create NSManagedObject Subclass…" from the Core Data editor menu
// to delete and recreate this implementation file for your updated model.
//
import Foundation
import CoreData
extension Evento {
@NSManaged var env_data_ultima_alteracao: NSDate?
@NSManaged var evn_cidade: String?
@NSManaged var evn_data_cadastro: String?
@NSManaged var evn_data_evento: String?
@NSManaged var evn_descricao: String?
@NSManaged var evn_endereco: String?
@NSManaged var evn_imagem: NSData?
@NSManaged var evn_local_latitude: NSNumber?
@NSManaged var evn_local_longitude: NSNumber?
@NSManaged var evn_nome: String?
@NSManaged var evn_numero: NSNumber?
@NSManaged var categoria: Categoria?
@NSManaged var usuario: Usuario?
}
<file_sep># oqfaZ
# Sumario do Projeto e ideologia
Nossa cidade de Sao Jose dos Campos possui um problema conhecido entre seus habitantes, a falta de divulgacao de envetos abertos ao publico (culturais e nao culturais). Nossa proposta e expor esse problema e mostrar uma solucao.
<file_sep>//
// CadastroViewController.swift
// ScreensApp
//
// Created by <NAME> on 12/17/15.
// Copyright © 2015 <NAME>. All rights reserved.
//
import UIKit
import CoreData
import CoreLocation
import MapKit
class CadastroViewController: UIViewController, UIPickerViewDataSource, UIPickerViewDelegate, UIImagePickerControllerDelegate, UINavigationControllerDelegate, CLLocationManagerDelegate, MKMapViewDelegate {
let contexto = (UIApplication.sharedApplication().delegate as! AppDelegate).managedObjectContext
//outlets da view de Cadastro de Eventos
@IBOutlet weak var categoriaPicker: UIPickerView!
@IBOutlet weak var imgImageEvento: UIImageView!
@IBOutlet weak var txtNomeEvento: UITextField!
@IBOutlet weak var txtEndereco: UITextField!
@IBOutlet weak var txtDescricao: UITextView!
@IBOutlet weak var txtTelefone: UITextField!
@IBOutlet weak var btnAddImagem: UIButton!
@IBOutlet weak var btnSalvar: UIBarButtonItem!
@IBOutlet weak var btnCancelar: UIBarButtonItem!
@IBOutlet weak var txtDataEvento: UITextField!
@IBOutlet weak var theMap: MKMapView!
var evento : Evento! = nil
var categoriaNome: String!
let categorias = ["Show","Festa","Exposição","Confraternização","Inauguração","Teatro","Apresentação","Promoção","Esporte"]
let imagePiker = UIImagePickerController()
var manager:CLLocationManager!
var myLocations: [CLLocation] = []
//carrega o mapa com a localizacao do usuario
override func viewDidLoad() {
super.viewDidLoad()
imagePiker.delegate = self
categoriaPicker.dataSource = self
categoriaPicker.delegate = self
manager = CLLocationManager()
manager.delegate = self
manager.desiredAccuracy = kCLLocationAccuracyBest
manager.requestAlwaysAuthorization()
manager.startUpdatingLocation()
//Setup our Map View
theMap.delegate = self
theMap.mapType = MKMapType.Hybrid
theMap.showsUserLocation = true
// Do any additional setup after loading the view.
}
//metodos do MapKit
func locationManager(manager:CLLocationManager, didUpdateLocations locations:[CLLocation]) {
//theLabel.text = "\(locations[0])"
myLocations.append(locations[0])
let spanX = 0.007
let spanY = 0.007
let newRegion = MKCoordinateRegion(center: theMap.userLocation.coordinate, span: MKCoordinateSpanMake(spanX, spanY))
theMap.setRegion(newRegion, animated: true)
if (myLocations.count > 1){
let sourceIndex = myLocations.count - 1
let destinationIndex = myLocations.count - 2
let c1 = myLocations[sourceIndex].coordinate
let c2 = myLocations[destinationIndex].coordinate
var a = [c1, c2]
let polyline = MKPolyline(coordinates: &a, count: a.count)
theMap.addOverlay(polyline)
}
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
//metodos para carregar imagens a galeria de fotos
@IBAction func btnCarregarImagem(sender: AnyObject) {
imagePiker.allowsEditing = false
imagePiker.sourceType = .PhotoLibrary
presentViewController(imagePiker, animated: true, completion: nil)
}
func imagePickerController(picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [String : AnyObject]) {
if let pickedImage = info[UIImagePickerControllerOriginalImage] as? UIImage{
imgImageEvento.contentMode = .ScaleAspectFit
imgImageEvento.image = pickedImage
}
dismissViewControllerAnimated(true, completion: nil)
}
func imagePickerControllerDidCancel(picker: UIImagePickerController) {
dismissViewControllerAnimated(true, completion: nil)
}
//MARK: - Delegates and data sources
//MARK: Data Sources
//Metodos que trabalham com o PickerView - Categorias
func numberOfComponentsInPickerView(pickerView: UIPickerView) -> Int {
return 1
}
func pickerView(pickerView: UIPickerView, numberOfRowsInComponent component: Int) -> Int {
return categorias.count
}
//MARK: Delegates
func pickerView(pickerView: UIPickerView, titleForRow row: Int, forComponent component: Int) -> String? {
return categorias[row]
}
func pickerView(pickerView: UIPickerView, didSelectRow row: Int, inComponent component: Int) {
categoriaNome = categorias[row]
print("log:\(categoriaNome)")
}
@IBAction func salvar(sender: AnyObject) {
if evento == nil {
criaEvento()
}
dismissViewController()
}
@IBAction func cancelar(sender: AnyObject) {
dismissViewController()
}
// MARK:- Dismiss ViewControllers
func dismissViewController() {
navigationController?.popViewControllerAnimated(true)
}
// MARK:- Create eveto
//Cria evento, insercao direto no banco de dados
func criaEvento() {
let entityEvento = NSEntityDescription.entityForName("Evento", inManagedObjectContext: contexto)
let entityCategoria = NSEntityDescription.entityForName("Categoria", inManagedObjectContext: contexto)
let entityUsuario = NSEntityDescription.entityForName("Usuario", inManagedObjectContext: contexto)
let evento = Evento(entity: entityEvento!, insertIntoManagedObjectContext: contexto)
let categoria = Categoria(entity: entityCategoria!, insertIntoManagedObjectContext: contexto)
let usuario = Usuario(entity: entityUsuario!, insertIntoManagedObjectContext: contexto)
let formato = NSDateFormatter()
evento.evn_nome = txtNomeEvento.text
evento.evn_endereco = txtEndereco.text
evento.evn_data_evento = txtDataEvento.text!
print("data: ", evento.evn_data_evento)
evento.evn_descricao = txtDescricao.text
let data = NSDate()
formato.dateStyle = NSDateFormatterStyle.ShortStyle
evento.evn_data_cadastro = formato.stringFromDate(data)
categoria.cat_nome = categoriaNome
usuario.usu_nome = "<NAME>"
usuario.usu_telefone = txtTelefone.text
evento.evn_imagem = UIImagePNGRepresentation(imgImageEvento.image!)
evento.usuario = usuario
evento.categoria = categoria
do{
try contexto.save()
}catch let error as NSError {
print("Erro ao criar evento")
print(error)
}
}
//pin no mapa
func inserirPin(cx: Double, cy: Double, name: String){
let anot: MKPointAnnotation = MKPointAnnotation()
anot.coordinate = CLLocationCoordinate2DMake(CLLocationDegrees(cx),CLLocationDegrees(cy))
anot.title = name
self.theMap.addAnnotation(anot)
}
var selectedAnnotation: MKPointAnnotation!
func mapView(mapView: MKMapView, annotationView view: MKAnnotationView, calloutAccessoryControlTapped control: UIControl) {
if control == view.rightCalloutAccessoryView {
selectedAnnotation = view.annotation as? MKPointAnnotation
performSegueWithIdentifier("proximo", sender: self)
}
}
func mapView(mapView: MKMapView, viewForAnnotation annotation: MKAnnotation) -> MKAnnotationView? {
let annotationIdentifier = "pin"
var view = mapView.dequeueReusableAnnotationViewWithIdentifier(annotationIdentifier)
if view == nil {
view = MKPinAnnotationView(annotation: annotation, reuseIdentifier: annotationIdentifier)
} else {
view?.annotation = annotation
}
return view
}
}
<file_sep>//
// Usuario+CoreDataProperties.swift
// ScreensApp
//
// Created by Student on 12/15/15.
// Copyright © 2015 <NAME>. All rights reserved.
//
// Choose "Create NSManagedObject Subclass…" from the Core Data editor menu
// to delete and recreate this implementation file for your updated model.
//
import Foundation
import CoreData
extension Usuario {
@NSManaged var usu_nome: String?
@NSManaged var usu_senha: String?
@NSManaged var usu_email: String?
@NSManaged var usu_sexo: NSNumber?
@NSManaged var usu_telefone: String?
@NSManaged var usu_whatsapp: NSNumber?
@NSManaged var usu_viber: NSNumber?
@NSManaged var usu_line: NSNumber?
}
<file_sep>// ViewController.swift
// ScreensApp
//
// Created by Student on 12/10/15.
// Copyright © 2015 <NAME>. All rights reserved.
//
import UIKit
import CoreData
class CadastroEventoViewController: UIViewController, UITableViewDataSource, NSFetchedResultsControllerDelegate {
let contexto = (UIApplication.sharedApplication().delegate as! AppDelegate).managedObjectContext
@IBOutlet weak var imgVImage: UIImageView!
@IBOutlet weak var btnAddImage: UIButton!
@IBOutlet weak var txtFieldNomeEvento: UITextField!
@IBOutlet weak var txtFieldEndereco: UITextField!
@IBOutlet weak var txtViewDescricao: UITextView!
@IBOutlet weak var txtFieldContato: UITextField!
@IBOutlet weak var btnSalvar: UIButton!
let imagePiker = UIImagePickerController()
override func viewDidLoad() {
super.viewDidLoad()
imagePiker.delegate = self
// Do any additional setup after loading the view.
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
@IBAction func loadImageButton(sender: AnyObject) {
imagePiker.allowsEditing = false
imagePiker.sourceType = .PhotoLibrary
presentViewController(imagePiker, animated: true, completion: nil)
}
func imagePickerController(picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [String : AnyObject]) {
if let pickedImage = info[UIImagePickerControllerOriginalImage] as? UIImage{
imgVImage.contentMode = .ScaleAspectFit
imgVImage.image = pickedImage
}
dismissViewControllerAnimated(true, completion: nil)
}
func imagePickerControllerDidCancel(picker: UIImagePickerController) {
dismissViewControllerAnimated(true, completion: nil)
}
@IBAction func salvar(sender: AnyObject) {
if evento == nil {
criaEvento()
}
dismissViewController()
}
@IBAction func cancelar(sender: AnyObject) {
dismissViewController()
}
// MARK:- Dismiss ViewControllers
func dismissViewController() {
navigationController?.popViewControllerAnimated(true)
}
// MARK:- Create task
// MECHER NESSA CLASSE AQUI !!!!!! ---------------------------
func criaEvento() {
let entityEvento = NSEntityDescription.entityForName("Evento", inManagedObjectContext: contexto!)
let entityCategoria = NSEntityDescription.entityForName("Categoria", inManagedObjectContext: contexto!)
let entityUsuario = NSEntityDescription.entityForName("Usuario", inManagedObjectContext: contexto!)
let evento = Evento(entity: entityDescription!, insertIntoManagedObjectContext: contexto)
evento.evn_nome = lblNomeEvendo.text
evento.evn_endereco = lblEndereco.text
evento.evn_imagem = imgImagemEvento.image
do{
try contexto?.save()
}catch let error as NSError {
print("Erro ao criar tarefa")
print(error)
}
}
override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
if segue.identifier == "salvaEvento"{
if let objEvento = segue.destinationViewController as? ViewController{
if let cell = sender as? CadastroEventoViewController{
objEvento.evento = cell.evento
}
}
}
}
} | 51ad789e1971375dc533cb8e1dc24ea7e1dda379 | [
"Swift",
"Markdown"
] | 9 | Swift | perlamber/oqfaZ | f0db74546a0357874554bafedc36c2018901edb9 | 2d0de1aa56680b1cf27a657d7d0eb113de7a398d | |
refs/heads/master | <repo_name>BrandonHarrison01/webauth-iii-challenge<file_sep>/restricted-middleware.js
const jwt = require('jsonwebtoken')
module.exports = (req, res, next) => {
const token = req.headers.authorization;
if(token) {
const secret = 'this is a secret'
jwt.verify(token, secret, (err, decodedToken) => {
if(err){
res.status(401).json({ oops: 'try again'})
} else {
req.user = { username: decodedToken.username }
next();
}
})
} else {
res.status(400).json({ message: 'need a token' })
}
} | 6c3eaa10cdcc01b4158d4941bea536ff69a59b46 | [
"JavaScript"
] | 1 | JavaScript | BrandonHarrison01/webauth-iii-challenge | 7e37b3dddf02bc93d1ca2438930ae8f34e8558db | 30767a9f8d3ab40928341d1c8bbe537cfcf3c997 | |
refs/heads/master | <repo_name>antichars/antichars<file_sep>/info/README.md
Info générale sur le site.
<file_sep>/docs/wp-content/themes/salon_auto/js/custom/gallery_ver=5.3.js
jQuery(function($){
$('.gallery').each(function(){
var $gallery = $(this);
$gallery.magnificPopup({
delegate: 'a',
type: 'image',
gallery: {
enabled: true,
tCounter: '%curr% ' + i18n.of + ' %total%',
},
callbacks: {
elementParse: function(item) {
// the class name
if($(item.el.context).hasClass('video-link')) {
item.type = 'iframe';
} else {
item.type = 'image';
}
}
},
})
});
});<file_sep>/README.md
Développement local
-----
Installer Docker Desktop et, dans le terminal taper:
./scripts/deploy.sh
Site original
-----
Nous avons utilisé le logiciel SiteSucker pour obtenir une copie complète du site web.
Photos
-----
Nous avons pris les photos suivantes du site [Unsplash](https://unsplash.com); toutes les photos ont une [license permissive](https://unsplash.com/license):
* https://unsplash.com/photos/k1AFA4N8O0g par https://unsplash.com/@ryansearle
* https://unsplash.com/photos/XIOSHynz4Wo par https://unsplash.com/@drewbutler
* https://unsplash.com/photos/8osoVBQWWHc par https://unsplash.com/@jens_h
* https://unsplash.com/photos/_1Z5rLrf5-Y par https://unsplash.com/@7seth
* https://unsplash.com/photos/yBhOcUr4TVY par https://unsplash.com/@koushikpal
* https://unsplash.com/photos/ipHlSSaC3vk par https://unsplash.com/@michaeljinphoto
* https://unsplash.com/photos/mHrc8ydLg3c par https://unsplash.com/@matthew_t_rader
Nous avons utilisé iMovie 10.1.13 pour importer les images et les exporter en mp4. Ensuite nous avons réduit la taille du mp4 avec https://www.ps2pdf.com.
La commande suivante peut être utilisée pour réduire le poids des images:
sips -Z 1200 *.jpg
<file_sep>/docs/wp-content/themes/salon_auto/js/custom/header_ver=5.3.js
jQuery(function($){
$('.header-bar__toggle').on('click', function(){
var $toggle = $(this);
if(!$toggle.hasClass('active')){
$toggle.addClass('active');
$('.menu-panel').stop(true,false).slideDown(500, function(){
bodyScrollLock.disableBodyScroll($('.menu-panel')[0]);
});
}else{
$toggle.removeClass('active');
$('.menu-panel').stop(true,false).slideUp(500, function(){
bodyScrollLock.enableBodyScroll($('.menu-panel')[0]);
});
}
});
$('.mobile-menu__arrow').on('click', function(e){
e.preventDefault();
var $arrow = $(this)
var $submenu = $arrow.parent('a').siblings('ul.sub-menu');
if(!$arrow.hasClass('active')){
$('.mobile-menu__arrow.active').removeClass('active').parent('a').siblings('ul.sub-menu').stop(true,false).slideUp();
$arrow.addClass('active');
$submenu.stop(true,false).slideDown();
}else{
$arrow.removeClass('active');
$submenu.stop(true,false).slideUp();
}
});
$('.mobile-header__toggle').on('click', function(){
var $toggle = $(this);
if(!$toggle.hasClass('close')){
$toggle.addClass('close');
$('.mobile-menu').css({left: 0});
bodyScrollLock.disableBodyScroll($('.mobile-menu')[0]);
}else{
$toggle.removeClass('close');
$('.mobile-menu').css({left: '-100%'});
bodyScrollLock.enableBodyScroll($('.mobile-menu')[0]);
}
});
$('.mobile-menu__menu .sub-menu a').on('click', function(e){
var $anchor = $(this);
var href = $anchor.attr('href');
var explode = href.split('/');
if(explode[explode.length - 1][0] == '#'){
e.preventDefault();
window.location = href;
$('.mobile-header__toggle').removeClass('close');
$('.mobile-menu').css({left: '-100%'});
bodyScrollLock.enableBodyScroll($('.mobile-menu')[0]);
}
});
$('.standard-text a').has('.button').css({textDecoration: 'none'});
});<file_sep>/docs/wp-content/themes/salon_auto/js/custom/map_ver=5.3.js
jQuery(function($){
levels = phpVars.levels;
if(getUrlParam('floor', false)){
var currentLevel = parseInt(getUrlParam('floor', false));
for(var i = 0; i < levels.length; i++){
if(levels[i] == currentLevel){
currentLevelPosition = i;
break;
}
}
}else{
currentLevel = parseInt(levels[0]);
currentLevelPosition = 0;
}
hideArrows();
$menuSelect = new Dropkick($('.salon-maps__select-level')[0]);
$('.salon-maps__maps-track').magnificPopup({
type: 'image',
delegate: '.salon-maps__map-outer a',
gallery: {
enabled: true,
tCounter: '%curr% ' + phpVars.i18n.of + ' %total%',
}
})
$('.salon-maps__select-level').on('change', function(){
var $select = $(this);
currentLevelPosition = $select.prop('selectedIndex');
changeFloor($select.val());
});
$('.salon-maps__up').on('click', function(){
if(currentLevelPosition + 1 < levels.length){
currentLevelPosition++;
changeFloor(levels[currentLevelPosition]);
}
});
$('.salon-maps__down').on('click', function(){
if(currentLevelPosition - 1 >= 0){
currentLevelPosition--;
changeFloor(levels[currentLevelPosition]);
}
});
$('.salon-maps__dot').on('click', function(){
var $dot = $(this);
if(!$dot.hasClass('current')){
currentLevelPosition = $dot.data('index');
changeFloor($dot.data('level'));
}
});
function switchDot(){
$('.salon-maps__dot.current').removeClass('current');
$('.salon-maps__dot').eq(currentLevelPosition).addClass('current');
}
function hideArrows(){
if(currentLevelPosition == 0){
$('.salon-maps__down').css({opacity: 0.33});
}else{
$('.salon-maps__down').css({opacity: 1});
}
if(currentLevelPosition >= levels.length - 1){
$('.salon-maps__up').css({opacity: 0.33});
}else{
$('.salon-maps__up').css({opacity: 1});
}
}
function switchSelect(floor){
$('.salon-maps__select-level').val(floor);
$menuSelect.refresh();
}
function changeFloor(floor){
const $currentMap = $('.salon-maps__map-outer.current');
const $targetMap = $('.salon-maps__map-outer[data-level='+floor+']');
const currentPosition = $currentMap.data('level');
if(currentPosition < floor){
var movement = '60px';
}else{
var movement = '-60px';
}
$currentMap.removeClass('current').stop(true,false).animate({top: '+='+movement}, 500, function(){
$(this).css({top: 0});
});
$targetMap.addClass('current').removeClass('invisible').css({top: '-='+movement}).stop(true,false).animate({top: '+='+movement}, 500);
const $currentDescription = $('.salon-maps__level-description-outer.current');
const $targetDescription = $('.salon-maps__level-description-outer[data-level='+floor+']');
$currentDescription.removeClass('current');
$targetDescription.addClass('current').removeClass('invisible')
const $currentExhibitors = $('.map-exhibitors__list.current');
const $targetExhibitors = $('.map-exhibitors__list[data-level='+floor+']');
$currentExhibitors.removeClass('current');
$targetExhibitors.addClass('current').removeClass('invisible')
setTimeout(function(){
if(!$currentMap.hasClass('current')){
$currentMap.addClass('invisible');
$currentDescription.addClass('invisible');
$currentExhibitors.addClass('invisible');
}
},500);
hideArrows();
switchDot();
switchSelect(floor);
}
function getUrlVars() {
var vars = {};
var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) {
vars[key] = value;
});
return vars;
}
function getUrlParam(parameter, defaultvalue){
var urlparameter = defaultvalue;
if(window.location.href.indexOf(parameter) > -1){
urlparameter = getUrlVars()[parameter];
}
return urlparameter;
}
}); | 7ebcab262709283c663304b39e50f5921b517359 | [
"Markdown",
"JavaScript"
] | 5 | Markdown | antichars/antichars | fe42cf40e7526eaebca7b88e9deb5a801dcc7f34 | a416e8d0306641fab934986b110e615da743ec6d | |
refs/heads/master | <file_sep>## Dev
Built with [Electron](http://electron.atom.io).
###### Commands
- Init: `$ yarn install`
- Run: `$ yarn start`
- Package: `$ yarn dist`<file_sep>var electron = require('electron');
const {app} = require('electron');
// const {webContents} = require('electron');
// try {
// require('electron-debug')({enabled: true});
// } catch (e) {
// console.log(e);
// }
// try {
// require('devtron').install();
// } catch (e) {
// console.log(e);
// }
var BrowserWindow = electron.BrowserWindow;
var mainWindow = null;
app.on('window-all-closed', function () {
if (process.platform !== 'darwin') {
app.quit();
}
});
app.on('ready', function () {
var size = electron.screen.getPrimaryDisplay().workAreaSize;
mainWindow = new BrowserWindow({
'title': app.getName(),
'show': true,
frame: true,
// titleBarStyle: 'hiddenInset',
width: size.width,
height: size.height,
minWidth: 400,
minHeight: 200,
resizable: true,
webPreferences: {
// fails without this because of CommonJS script detection
'node-integration': false,
'experimental-canvas-features': true,
'experimental-features': true,
'web-security': true,
'plugins': true,
nativeWindowOpen: true
}
});
mainWindow.webContents.on('new-window', (event, url, frameName, disposition, options, additionalFeatures) => {
event.preventDefault();
if (url.startsWith("https://wave.video/editor")) {
mainWindow.loadURL(url);
} else {
// console.log(event.browserWindowOptions.width);
// console.log(event.browserWindowOptions.width);
Object.assign(options, {
modal: true,
parent: mainWindow,
width: 1000,
height: 1000
});
const modal = event.newGuest = new BrowserWindow(options);
modal.webContents.on('new-window', (event, url, frameName, disposition, options, additionalFeatures) => {
event.preventDefault();
modal.close();
mainWindow.loadURL(url);
});
}
// }
});
// mainWindow.loadURL('https://editor.animatron.com');
mainWindow.loadURL('https://wave.video/editor');
//mainWindow.loadURL('localhost:8888/wave.html#new=1');
mainWindow.on('closed', function () {
mainWindow = null;
});
}); | 5391d5226aefb24ce93f3b8075343424b3f7f1d6 | [
"Markdown",
"JavaScript"
] | 2 | Markdown | RobertoUa/Animatron-Offline | eb518429bd53ac3253a5b43fcf0d359b587ac045 | c9a280b58258b03a99dd4c6a4c52d71a68100be6 | |
refs/heads/master | <repo_name>nassarocky/nyimbo_za_zamani<file_sep>/app/src/main/java/com/nyimbozamani/bongoflava/MainActivity.java
package com.nyimbozamani.nyimbozazamani;
import android.app.NotificationManager;
import android.content.BroadcastReceiver;
import android.content.ComponentName;
import android.content.ContentResolver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.ServiceConnection;
import android.content.SharedPreferences;
import android.database.Cursor;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Color;
import android.graphics.Point;
import android.graphics.Typeface;
import android.media.MediaMetadataRetriever;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.net.Uri;
import android.os.Build;
import android.os.Environment;
import android.os.Handler;
import android.os.IBinder;
import android.preference.PreferenceManager;
import android.provider.MediaStore;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentStatePagerAdapter;
import android.support.v4.view.ViewPager;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.support.v7.widget.Toolbar;
import android.telephony.PhoneStateListener;
import android.telephony.TelephonyManager;
import android.util.DisplayMetrics;
import android.util.Log;
import android.view.Display;
import android.view.KeyEvent;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewTreeObserver;
import android.view.inputmethod.InputMethodManager;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.MediaController;
import android.widget.RelativeLayout;
import android.widget.SeekBar;
import android.widget.TabHost;
import android.widget.TextView;
import android.widget.Toast;
import com.avast.android.dialogs.fragment.SimpleDialogFragment;
import com.daimajia.androidanimations.library.Techniques;
import com.daimajia.androidanimations.library.YoYo;
import com.google.android.gms.ads.AdListener;
import com.google.android.gms.ads.InterstitialAd;
import com.google.android.gms.ads.MobileAds;
import com.google.firebase.database.FirebaseDatabase;
import com.readystatesoftware.systembartint.SystemBarTintManager;
import com.sothree.slidinguppanel.SlidingUpPanelLayout;
import com.sothree.slidinguppanel.SlidingUpPanelLayout.PanelState;
import java.io.File;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import com.nyimbozamani.nyimbozazamani.fragments.AlbumsFragment;
import com.nyimbozamani.nyimbozazamani.fragments.ArtistsFragment;
import com.nyimbozamani.nyimbozazamani.fragments.SearchFragment;
import com.nyimbozamani.nyimbozazamani.fragments.TracksFragment;
import com.nyimbozamani.nyimbozazamani.interfaces.MusicServiceCallbacks;
import com.nyimbozamani.nyimbozazamani.services.MusicService;
import it.neokree.materialtabs.MaterialTab;
import it.neokree.materialtabs.MaterialTabHost;
import it.neokree.materialtabs.MaterialTabListener;
//import for MusicService
import com.nyimbozamani.nyimbozazamani.services.MusicService.MusicBinder;
import com.google.android.gms.ads.AdRequest;
import com.google.android.gms.ads.AdView;
import static android.content.ContentValues.TAG;
//MediaPlayerControl
public class MainActivity extends AppCompatActivity implements MaterialTabListener, ViewPager.OnPageChangeListener, TabHost.OnTabChangeListener, MediaController.MediaPlayerControl, SeekBar.OnSeekBarChangeListener, MusicServiceCallbacks, SlidingUpPanelLayout.PanelSlideListener {
private ViewPager viewPager;
private MaterialTabHost tabHost;
InputMethodManager inputManager;
private Toolbar toolbar;
com.nyimbozamani.nyimbozazamani.adapters.MusiQuikFragmentPagerAdapter mqFragmentPagerAdapter;
TracksFragment tf;
SearchFragment sf;
ArtistsFragment af;
AlbumsFragment alf;
com.nyimbozamani.nyimbozazamani.MP3DownloadListener dlListener;
//ArrayList<Song> downloadedSongs;
//variables for interaction with the MusicService
private MusicService musicSrv;
private Intent playIntent;
private boolean musicBound = false;
private ArrayList<com.nyimbozamani.nyimbozazamani.Song> songList;
private ArrayList<com.nyimbozamani.nyimbozazamani.Song> tempSongList;
private ListView songView;
private com.nyimbozamani.nyimbozazamani.MusicController controller;
ConnectivityManager cm;
NetworkInfo activeNetwork;
//mediaplayer controls
private ImageButton btnPlay;
private ImageButton btnPrev;
private ImageButton btnNext;
private ImageButton btnShuffle;
private ImageButton btnRepeat; //TODO: implement repeat, repeat 1
private SeekBar songProgressBar;
private ImageView coverArt;
private TextView tvSong;
private TextView tvArtist;
private TextView tvAlbum;
private TextView tvElapsedTime;
private TextView tvTotalTime;
//largemediaplayer controls
private ImageButton btnPlay_lrg;
private ImageButton btnPrev_lrg;
private ImageButton btnNext_lrg;
private ImageButton btnShuffle_lrg;
private ImageButton btnRepeat_lrg; //TODO: implement repeat, repeat 1
private SeekBar songProgressBar_lrg;
private ImageView coverArt_lrg;
private TextView tvSong_lrg;
private TextView tvArtist_lrg;
private TextView tvAlbum_lrg;
private TextView tvElapsedTime_lrg;
private TextView tvTotalTime_lrg;
RelativeLayout miniRelativelayout;
LinearLayout slidingPanelLayout;
SlidingUpPanelLayout supl;
//variables for album bitmap
MediaMetadataRetriever mmr;
private Handler mHandler;
private com.nyimbozamani.nyimbozazamani.MusicIntentReceiver myReceiver;
private SlidingUpPanelLayout slidingUpPanelLayout;
LinearLayout mini_player_layout;
LinearLayout large_player_layout;
PhoneStateListener phoneStateListener;
SharedPreferences preferences;
int storedPreference;
private boolean paused = false, playbackPaused = false;
private boolean shuffle = false;
private boolean repeat = false;
Typeface font;
private InterstitialAd mInterstitialAd;
private AdView mAdView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
FirebaseDatabase.getInstance().setPersistenceEnabled(true);
MobileAds.initialize(this,
"ca-app-pub-5942769310685348~6297564915");
mInterstitialAd = new InterstitialAd(this);
mInterstitialAd.setAdUnitId("ca-app-pub-5942769310685348/9251031316");
// [END instantiate_interstitial_ad]
// [START create_interstitial_ad_listener]
mInterstitialAd.setAdListener(new AdListener() {
@Override
public void onAdClosed() {
requestNewInterstitial();
// beginSecondActivity();
}
@Override
public void onAdLoaded() {
// Ad received, ready to display
// [START_EXCLUDE]
// [END_EXCLUDE]
}
@Override
public void onAdFailedToLoad(int i) {
// See https://goo.gl/sCZj0H for possible error codes.
Log.w(TAG, "onAdFailedToLoad:" + i);
}
});
Log.d("MAINACTIVITY", "ONCREATE");
toolbar = (Toolbar) findViewById(R.id.my_toolbar);
setSupportActionBar(toolbar);
getSupportActionBar().setDisplayShowTitleEnabled(false);
preferences = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
storedPreference = preferences.getInt("storedSongInt", 0);
tf = new TracksFragment();
sf = new SearchFragment();
af = new ArtistsFragment();
alf = new AlbumsFragment();
myReceiver = new com.nyimbozamani.nyimbozazamani.MusicIntentReceiver();
mAdView = (AdView) findViewById(R.id.adView);
if (!isConnected()){
mAdView.setVisibility(View.GONE);
}else{
AdRequest adRequest = new AdRequest.Builder().build();
mAdView.loadAd(adRequest);
}
//downloadedSongs = sf.getDlSongs();
initViewPager();
initTabHost();
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
// create our manager instance after the content view is set
SystemBarTintManager tintManager = new SystemBarTintManager(this);
//enable status bar tint
tintManager.setStatusBarTintEnabled(true);
//enable nav bar tint
tintManager.setNavigationBarTintEnabled(true);
int actionBarColor = Color.parseColor("#283593");
tintManager.setStatusBarTintColor(actionBarColor);
}
//custom Typeface bitch
font = Typeface.createFromAsset(getAssets(), "fonts/QuicksandRegular.otf");
TextView tv = (TextView) findViewById(R.id.toolbar_title);
tv.setTypeface(font);
/*if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP){
Window window = getWindow();
window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
window.setStatusBarColor(getResources().getColor(R.color.ColorPrimaryDark));
}*/
//IntentFilter filter1 = new IntentFilter(DownloadManager.ACTION_DOWNLOAD_COMPLETE);
//dlListener = new MP3DownloadListener();
//registerReceiver(dlListener, filter1);
songList = new ArrayList<com.nyimbozamani.nyimbozazamani.Song>();
//songView = (ListView)findViewById(R.id.song_list);
getSongList();
/* Collections.sort(songList, new Comparator<Song>() {
public int compare(Song a, Song b) {
return a.getTitle().toLowerCase().compareTo(b.getTitle().toLowerCase());
}
});*/
//SongAdapter songAdt = new SongAdapter(this, songList);
//songView.setAdapter(songAdt);
Log.d("SONGLIST SIZE", String.valueOf(songList.size()));
//setController();
btnPlay = (ImageButton) findViewById(R.id.btnPlay);
btnPrev = (ImageButton) findViewById(R.id.btnPrevious);
btnNext = (ImageButton) findViewById(R.id.btnNext);
btnShuffle = (ImageButton) findViewById(R.id.btnShuffle);
btnRepeat = (ImageButton)findViewById(R.id.btnRepeat);
songProgressBar = (SeekBar) findViewById(R.id.songProgressBar);
coverArt = (ImageView) findViewById(R.id.ivAlbumArt);
btnPlay_lrg = (ImageButton) findViewById(R.id.btnPlay_lrg);
btnPrev_lrg = (ImageButton) findViewById(R.id.btnPrevious_lrg);
btnNext_lrg = (ImageButton) findViewById(R.id.btnNext_lrg);
btnShuffle_lrg = (ImageButton) findViewById(R.id.btnShuffle_lrg);
btnRepeat_lrg = (ImageButton)findViewById(R.id.btnRepeat_lrg);
songProgressBar_lrg = (SeekBar) findViewById(R.id.songProgressBar_lrg);
coverArt_lrg = (ImageView) findViewById(R.id.ivAlbumArt_lrg);
miniRelativelayout = (RelativeLayout) findViewById(R.id.rel_mini_control_container);
slidingPanelLayout = (LinearLayout) findViewById(R.id.container);
mmr = new MediaMetadataRetriever();
// Listeners
songProgressBar.setOnSeekBarChangeListener(this); // Important
songProgressBar_lrg.setOnSeekBarChangeListener(this); // Important
// Handler to update UI timer, progress bar etc,.
mHandler = new Handler();
btnPlay.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View arg0) {
if (musicSrv.getSongListSize() == 0) {
return;
}
if (!isPlaying()) {
if (musicSrv.isPaused()) {
musicSrv.resumePlayer();
updateProgressBar();
btnPlay_lrg.setImageResource(R.drawable.btn_pause);
btnPlay.setImageResource(R.drawable.btn_pause);
} else {
musicSrv.playSong();
//updateSongDetailViews();
btnPlay_lrg.setImageResource(R.drawable.btn_pause);
btnPlay.setImageResource(R.drawable.btn_pause);
}
} else {
pause();
}
}
});
btnPlay_lrg.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View arg0) {
if (musicSrv.getSongListSize() == 0) {
return;
}
if (!isPlaying()) {
if (musicSrv.isPaused()) {
musicSrv.resumePlayer();
updateProgressBar();
btnPlay_lrg.setImageResource(R.drawable.btn_pause);
btnPlay.setImageResource(R.drawable.btn_pause);
} else {
musicSrv.playSong();
//updateSongDetailViews();
btnPlay_lrg.setImageResource(R.drawable.btn_pause);
btnPlay.setImageResource(R.drawable.btn_pause);
}
} else {
pause();
}
}
});
btnPrev.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View arg0) {
playPrev();
btnPlay_lrg.setImageResource(R.drawable.btn_pause);
btnPlay.setImageResource(R.drawable.btn_pause);
}
});
btnPrev_lrg.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View arg0) {
playPrev();
btnPlay_lrg.setImageResource(R.drawable.btn_pause);
btnPlay.setImageResource(R.drawable.btn_pause);
}
});
btnNext.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View arg0) {
playNext();
btnPlay_lrg.setImageResource(R.drawable.btn_pause);
btnPlay.setImageResource(R.drawable.btn_pause);
}
});
btnNext_lrg.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View arg0) {
playNext();
btnPlay_lrg.setImageResource(R.drawable.btn_pause);
btnPlay.setImageResource(R.drawable.btn_pause);
}
});
btnShuffle.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (shuffle == false) {
shuffle = true;
musicSrv.setShuffle();
btnShuffle.setImageResource(R.mipmap.ic_shuffle_green_36dp);
btnShuffle_lrg.setImageResource(R.mipmap.ic_shuffle_green_36dp);
} else {
shuffle = false;
musicSrv.setShuffle();
btnShuffle.setImageResource(R.drawable.ic_shuffle_white_36dp);
btnShuffle_lrg.setImageResource(R.drawable.ic_shuffle_white_36dp);
}
}
});
btnShuffle_lrg.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (shuffle == false) {
shuffle = true;
musicSrv.setShuffle();
btnShuffle.setImageResource(R.mipmap.ic_shuffle_green_36dp);
btnShuffle_lrg.setImageResource(R.mipmap.ic_shuffle_green_36dp);
} else {
shuffle = false;
musicSrv.setShuffle();
btnShuffle.setImageResource(R.drawable.ic_shuffle_white_36dp);
btnShuffle_lrg.setImageResource(R.drawable.ic_shuffle_white_36dp);
}
}
});
btnRepeat.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (repeat == false) {
repeat = true;
musicSrv.setRepeat();
btnRepeat.setImageResource(R.mipmap.ic_repeat_green_36dp);
btnRepeat_lrg.setImageResource(R.mipmap.ic_repeat_green_36dp);
} else {
repeat = false;
musicSrv.setRepeat();
btnRepeat.setImageResource(R.drawable.ic_repeat_white_36dp);
btnRepeat_lrg.setImageResource(R.drawable.ic_repeat_white_36dp);
}
}
});
btnRepeat_lrg.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (repeat == false) {
repeat = true;
musicSrv.setRepeat();
btnRepeat.setImageResource(R.mipmap.ic_repeat_green_36dp);
btnRepeat_lrg.setImageResource(R.mipmap.ic_repeat_green_36dp);
} else {
repeat = false;
musicSrv.setRepeat();
btnRepeat.setImageResource(R.drawable.ic_repeat_white_36dp);
btnRepeat_lrg.setImageResource(R.drawable.ic_repeat_white_36dp);
}
}
});
int relHeight = miniRelativelayout.getHeight();
System.out.println("HEIGHT: " + String.valueOf(relHeight));
supl = (SlidingUpPanelLayout) findViewById(R.id.sliding_layout);
miniRelativelayout.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
@Override
public void onGlobalLayout() {
// gets called after layout has been done but before display.
miniRelativelayout.getViewTreeObserver().removeGlobalOnLayoutListener(this);
int relHeight = miniRelativelayout.getHeight();
System.out.println("HEIGHT: " + String.valueOf(relHeight));
System.out.println("HEIGHT + NAV HEIGHT: " + String.valueOf(relHeight + getSoftButtonsBarSizePort(MainActivity.this)));
supl.setPanelHeight(relHeight);
supl.setMinimumHeight(relHeight);
supl.setEnabled(true);
supl.setTouchEnabled(true);
SlidingUpPanelLayout.LayoutParams params = new SlidingUpPanelLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT);
params.setMargins(params.leftMargin, params.topMargin - relHeight, params.rightMargin, params.bottomMargin);
slidingPanelLayout.setLayoutParams(params);
}
});
IntentFilter filter = new IntentFilter(Intent.ACTION_HEADSET_PLUG);
myReceiver = new com.nyimbozamani.nyimbozazamani.MusicIntentReceiver();
myReceiver.setMainActivityHandler(this);
registerReceiver(myReceiver, filter);
slidingUpPanelLayout = (SlidingUpPanelLayout) findViewById(R.id.sliding_layout);
slidingUpPanelLayout.setPanelSlideListener(this);
mini_player_layout = (LinearLayout) findViewById(R.id.rel_mini_control);
large_player_layout = (LinearLayout) findViewById(R.id.rel_large_control);
phoneStateListener = new PhoneStateListener() {
@Override
public void onCallStateChanged(int state, String incomingNumber) {
if (state == TelephonyManager.CALL_STATE_RINGING) {
//incoming call; pause music
if(musicSrv.isPng()){
pause();
}
} else if (state == TelephonyManager.CALL_STATE_IDLE) {
//not in call; play music
/*if (musicSrv != null && musicSrv.isPaused()) {
musicSrv.resumePlayer();
updateProgressBar();
btnPlay_lrg.setImageResource(R.drawable.btn_pause);
btnPlay.setImageResource(R.drawable.btn_pause);
}*/
} else if (state == TelephonyManager.CALL_STATE_OFFHOOK) {
//a call is a dialing, active, or on hold
}
super.onCallStateChanged(state, incomingNumber);
}
};
TelephonyManager mgr = (TelephonyManager) getSystemService(TELEPHONY_SERVICE);
if(mgr != null){
mgr.listen(phoneStateListener,PhoneStateListener.LISTEN_CALL_STATE);
}
double scale = getApplicationContext().getResources().getDisplayMetrics().density;
double scaleDPI = getApplicationContext().getResources().getDisplayMetrics().densityDpi;
Log.d("DENSITY",String.valueOf(scale));
Log.d("DENSITY",String.valueOf(scaleDPI));
if(isConnected()) {
requestNewInterstitial();
final Handler handler = new Handler();
handler.postDelayed(new Runnable() {
@Override
public void run() {
// Do something after 5s = 5000ms
if (mInterstitialAd.isLoaded()) {
mInterstitialAd.show();
}
}
}, 120000);
}
}
NotificationBroadcast notificationBroadcast = new NotificationBroadcast(){
@Override
public void onReceive(Context context, Intent intent) {
if (intent.getAction().equals(NOTIFY_PLAY)) {
if (musicSrv.getSongListSize() == 0) {
return;
}
if (!isPlaying()) {
if (musicSrv.isPaused()) {
musicSrv.resumePlayer();
updateProgressBar();
btnPlay_lrg.setImageResource(R.drawable.btn_pause);
btnPlay.setImageResource(R.drawable.btn_pause);
} else {
musicSrv.playSong();
//updateSongDetailViews();
btnPlay_lrg.setImageResource(R.drawable.btn_pause);
btnPlay.setImageResource(R.drawable.btn_pause);
}
}
} else if (intent.getAction().equals(NOTIFY_PAUSE)) {
if (musicSrv != null) {
playbackPaused = true;
btnPlay.setImageResource(R.drawable.btn_play);
btnPlay_lrg.setImageResource(R.drawable.btn_play);
musicSrv.pausePlayer();
}
} else if (intent.getAction().equals(NOTIFY_NEXT)) {
musicSrv.playNext();
//updateSongDetailViews();
if (playbackPaused) {
// setController();
playbackPaused = false;
}
} else if (intent.getAction().equals(NOTIFY_DELETE)) {
stopService(playIntent);
musicSrv = null;
//remove the notification from the notification panel
NotificationManager nm;
nm = (NotificationManager)getSystemService(Context.NOTIFICATION_SERVICE);
nm.cancel(1935);
System.exit(0);
}else if (intent.getAction().equals(NOTIFY_PREVIOUS)) {
}
}
};
public class NotificationBroadcast extends BroadcastReceiver {
public static final String NOTIFY_PREVIOUS = "com.tutorialsface.notificationdemo.previous";
public static final String NOTIFY_DELETE = "com.tutorialsface.notificationdemo.delete";
public static final String NOTIFY_PAUSE = "com.tutorialsface.notificationdemo.pause";
public static final String NOTIFY_PLAY = "com.tutorialsface.notificationdemo.play";
public static final String NOTIFY_NEXT = "com.tutorialsface.notificationdemo.next";
@Override
public void onReceive(Context context, Intent intent) {
if (intent.getAction().equals(NOTIFY_PLAY)) {
Log.d("NOTIFICATION_BROADCAST","PLAY");
} else if (intent.getAction().equals(NOTIFY_PAUSE)) {
} else if (intent.getAction().equals(NOTIFY_NEXT)) {
} else if (intent.getAction().equals(NOTIFY_DELETE)) {
}else if (intent.getAction().equals(NOTIFY_PREVIOUS)) {
}
}
}
public ArrayList<com.nyimbozamani.nyimbozazamani.Song> getSongArray() {
Log.d("MAINACTIVITY","GETSONGARRAY");
return songList;
}
public void getSongList() {
Log.d("MAINACTIVITY","GETSONGLIST");
//AsynctaskRunner runner = new AsynctaskRunner();
//runner.execute();
//query external audio
songList.clear();
ContentResolver musicResolver = getContentResolver();
Uri musicUri = android.provider.MediaStore.Audio.Media.EXTERNAL_CONTENT_URI;
Log.d("EXTERNAL_CONTENT_URI", musicUri.toString());
Log.d("CONTENT_URI_DOWNLOADS", Environment.DIRECTORY_DOWNLOADS);
Log.d("CONTENT_URI_MUSIC", Environment.DIRECTORY_MUSIC);
Log.d("CONTENT_URI_IS_MUSIC", android.provider.MediaStore.Audio.Media.IS_MUSIC);
String selection = MediaStore.Audio.Media.DATA + " like ?";
String[] selArgs = {"DOWNLOAD"};
Cursor musicCursor = musicResolver.query(musicUri, null, MediaStore.Audio.Media.IS_MUSIC + "<> 0", null, null);
if(musicCursor == null){
Toast.makeText(getBaseContext(),"No music found.", Toast.LENGTH_LONG).show();
}else{
Log.d("CURSOR COUNT", String.valueOf(musicCursor.getCount()));
//iterate over results if valid
if (musicCursor != null && musicCursor.moveToFirst()) {
System.out.println(musicCursor.toString());
//get columns
int titleColumn = musicCursor.getColumnIndex
(android.provider.MediaStore.Audio.Media.TITLE);
int idColumn = musicCursor.getColumnIndex
(android.provider.MediaStore.Audio.Media._ID);
int artistColumn = musicCursor.getColumnIndex
(android.provider.MediaStore.Audio.Media.ARTIST);
int albumColumn = musicCursor.getColumnIndex
(android.provider.MediaStore.Audio.Media.ALBUM);
int durationColumn = musicCursor.getColumnIndex
(android.provider.MediaStore.Audio.Media.DURATION);
int artistData = musicCursor.getColumnIndex(android.provider.MediaStore.Audio.Media.DATA);
BitmapFactory.Options bmpFactoryOptions = new BitmapFactory.Options();
bmpFactoryOptions.inSampleSize = 4;
//add songs to list
do {
long thisId = musicCursor.getLong(idColumn);
String thisTitle = musicCursor.getString(titleColumn);
String thisArtist = musicCursor.getString(artistColumn);
String thisPath = musicCursor.getString(artistData);
String thisAlbum = musicCursor.getString(albumColumn);
long thisDuration = musicCursor.getLong(durationColumn);
//------------------------------------
songList.add(new com.nyimbozamani.nyimbozazamani.Song(thisId, thisTitle, thisArtist, thisAlbum, thisPath, thisDuration));
}
while (musicCursor.moveToNext());
}
Collections.sort(songList, new Comparator<com.nyimbozamani.nyimbozazamani.Song>() {
public int compare(com.nyimbozamani.nyimbozazamani.Song a, com.nyimbozamani.nyimbozazamani.Song b) {
return a.getTitle().toLowerCase().compareTo(b.getTitle().toLowerCase());
}
});
}
}
/*private class AsynctaskRunner extends AsyncTask<Void, Void, Void> {
@Override
protected Void doInBackground(Void... params) {
//query external audio
Bitmap bitmap = null;
BitmapDrawable drawable = null;
ContentResolver musicResolver = getContentResolver();
Uri musicUri = android.provider.MediaStore.Audio.Media.EXTERNAL_CONTENT_URI;
Log.d("EXTERNAL_CONTENT_URI", musicUri.toString());
Log.d("CONTENT_URI_DOWNLOADS", Environment.DIRECTORY_DOWNLOADS);
Log.d("CONTENT_URI_MUSIC", Environment.DIRECTORY_MUSIC);
Log.d("CONTENT_URI_IS_MUSIC", android.provider.MediaStore.Audio.Media.IS_MUSIC);
String selection = MediaStore.Audio.Media.DATA + " like ?";
String[] selArgs = {"DOWNLOAD"};
Cursor musicCursor = musicResolver.query(musicUri, null, MediaStore.Audio.Media.IS_MUSIC + "<> 0", null, null);
Log.d("CURSOR COUNT", String.valueOf(musicCursor.getCount()));
//iterate over results if valid
if (musicCursor != null && musicCursor.moveToFirst()) {
System.out.println(musicCursor.toString());
//get columns
int titleColumn = musicCursor.getColumnIndex
(android.provider.MediaStore.Audio.Media.TITLE);
int idColumn = musicCursor.getColumnIndex
(android.provider.MediaStore.Audio.Media._ID);
int artistColumn = musicCursor.getColumnIndex
(android.provider.MediaStore.Audio.Media.ARTIST);
int albumColumn = musicCursor.getColumnIndex
(android.provider.MediaStore.Audio.Media.ALBUM);
int albumId = musicCursor.getColumnIndex
(android.provider.MediaStore.Audio.Media.ALBUM_ID);
int artistData = musicCursor.getColumnIndex(android.provider.MediaStore.Audio.Media.DATA);
BitmapFactory.Options bmpFactoryOptions = new BitmapFactory.Options();
bmpFactoryOptions.inSampleSize = 3;
//add songs to list
do {
long thisId = musicCursor.getLong(idColumn);
String thisTitle = musicCursor.getString(titleColumn);
String thisArtist = musicCursor.getString(artistColumn);
String thisPath = musicCursor.getString(artistData);
String thisAlbum = musicCursor.getString(albumColumn);
long thisAlbumId = musicCursor.getLong(albumId);
//------------------------------------
final Uri ART_CONTENT_URI = Uri.parse("content://media/external/audio/albumart");
Uri albumArtUri = ContentUris.withAppendedId(ART_CONTENT_URI, thisAlbumId);
ContentResolver res = getApplicationContext().getContentResolver();
InputStream in;
try { // Yes, the album art has been found. I am sure of this.
if(bitmap != null)
{
bitmap = null;
if(drawable != null)
{
drawable = null;
}
}
in = res.openInputStream(albumArtUri);
bitmap = BitmapFactory.decodeStream(in, null, bmpFactoryOptions);
bitmap = Bitmap.createScaledBitmap(bitmap,200,200,true);
drawable = new BitmapDrawable(getResources(), bitmap);
} catch (FileNotFoundException e) { // Album not found so set default album art
e.printStackTrace();
drawable = (BitmapDrawable) getResources().getDrawable(R.drawable.ic_launcher);
}
//------------------------------------
songList.add(new Song(thisId, thisTitle, thisArtist, thisAlbum, thisPath, drawable));
}
while (musicCursor.moveToNext());
}
return null;
}
@Override
protected void onPostExecute(Void aVoid) {
super.onPostExecute(aVoid);
tf.updateTrackList();
}
}*/
//connect to the service
private ServiceConnection musicConnection = new ServiceConnection() {
@Override
public void onServiceConnected(ComponentName name, IBinder service) {
MusicBinder binder = (MusicBinder) service;
//get service
musicSrv = binder.getService();
//pass list
musicSrv.setList(songList);
musicSrv.setCallbacks(MainActivity.this);
musicBound = true;
//check for action_view intent and song
//get song title and artist from file and compare to data in songList
//set the song and initiate playing it
if(songList.size()>0) {
musicSrv.setSong(storedPreference);
setInitialView(storedPreference);
}
Intent intent = getIntent();
Log.d("INTENTDATA", intent.getAction());
if(musicSrv != null && intent.getData() != null){
Log.d("INTENTDATA", "" +intent.getData().getPath());
musicSrv.setSong(getIndexFromSongPath(songList, intent.getData()));
musicSrv.playSong();
btnPlay_lrg.setImageResource(R.drawable.btn_pause);
btnPlay.setImageResource(R.drawable.btn_pause);
}
}
@Override
public void onServiceDisconnected(ComponentName name) {
musicBound = false;
}
};
@Override
protected void onStart() {
super.onStart();
Log.d("TAG onStart", "ONSTART");
if (playIntent == null) {
playIntent = new Intent(this, MusicService.class);
bindService(playIntent, musicConnection, Context.BIND_AUTO_CREATE);
startService(playIntent);
}
}
@Override
protected void onPause() {
Log.d("TAG onPause", "ONPAUSE");
// unregisterReceiver(myReceiver);
paused = true;
btnPlay.setImageResource(R.drawable.btn_play);
btnPlay_lrg.setImageResource(R.drawable.btn_play);
//unregisterReceiver(notificationBroadcast);
super.onPause();
}
@Override
protected void onResume() {
refreshSongs();
//if (paused) {
// setController();
// updateProgressBar();
//}
Log.d("TAG onResume", "RESUME");
if (playIntent == null) {
playIntent = new Intent(this, MusicService.class);
bindService(playIntent, musicConnection, Context.BIND_AUTO_CREATE);
startService(playIntent);
}
if (musicSrv != null && musicSrv.isPng()) {
Log.d("TAG", "(musicSrv != null && musicSrv.isPng())");
paused = false;
updateProgressBar();
btnPlay.setImageResource(R.drawable.btn_pause);
btnPlay_lrg.setImageResource(R.drawable.btn_pause);
} else if (musicSrv != null && musicSrv.isPaused()) {
Log.d("TAG", "(musicSrv != null && musicSrv.isPaused())");
paused = true;
btnPlay.setImageResource(R.drawable.btn_play);
btnPlay_lrg.setImageResource(R.drawable.btn_play);
}
//IntentFilter filter = new IntentFilter(Intent.ACTION_HEADSET_PLUG);
//registerReceiver(myReceiver, filter);
IntentFilter deleteIntent = new IntentFilter(NotificationBroadcast.NOTIFY_DELETE);
IntentFilter pauseIntent = new IntentFilter(NotificationBroadcast.NOTIFY_PAUSE);
IntentFilter playIntent = new IntentFilter(NotificationBroadcast.NOTIFY_PLAY);
IntentFilter nextIntent = new IntentFilter(NotificationBroadcast.NOTIFY_NEXT);
registerReceiver(notificationBroadcast,deleteIntent);
registerReceiver(notificationBroadcast,pauseIntent);
registerReceiver(notificationBroadcast,playIntent);
registerReceiver(notificationBroadcast,nextIntent);
//if (Intent.ACTION_VIEW.equals(mIntent.getAction())) {
//}
super.onResume();
}
@Override
protected void onNewIntent(Intent mIntent){
super.onNewIntent(mIntent);
Log.d("INTENTDATA", "" +mIntent.getAction());
if(musicSrv != null && mIntent.getData() != null){
Log.d("INTENTDATA", "" +mIntent.getData().getPath());
refreshSongs();
musicSrv.setSong(getIndexFromSongPath(songList, mIntent.getData()));
musicSrv.playSong();
btnPlay_lrg.setImageResource(R.drawable.btn_pause);
btnPlay.setImageResource(R.drawable.btn_pause);
}
}
@Override
protected void onStop() {
// controller.hide();
Log.d("TAG onStop", "ONSTOP");
mHandler.removeCallbacks(mUpdateTimeTask);
super.onStop();
}
@Override
protected void onDestroy() {
Log.d("TAG onDestroy", "ONDESTROY");
stopService(playIntent);
musicSrv.stopSelf();
unbindService(musicConnection);
musicSrv = null;
unregisterReceiver(myReceiver);
unregisterReceiver(notificationBroadcast);
NotificationManager nm;
nm = (NotificationManager)getSystemService(Context.NOTIFICATION_SERVICE);
nm.cancel(1935);
TelephonyManager mgr = (TelephonyManager) getSystemService(TELEPHONY_SERVICE);
if (mgr != null) {
mgr.listen(phoneStateListener, PhoneStateListener.LISTEN_NONE);
}
super.onDestroy();
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.menu_main, menu);
return super.onCreateOptionsMenu(menu);
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.action_settings:
settingsDialog(getResources().getString(R.string.action_settings), "settings section", "Okay");
break;
case R.id.action_about:
settingsDialog(getResources().getString(R.string.action_about), getResources().getString(R.string.about_content), "Okay");
break;
case R.id.action_exit:
stopService(playIntent);
musicSrv = null;
NotificationManager nm;
nm = (NotificationManager)getSystemService(Context.NOTIFICATION_SERVICE);
nm.cancel(1935);
System.exit(0);
break;
}
return super.onOptionsItemSelected(item);
}
private void initTabHost() {
tabHost = (MaterialTabHost) findViewById(R.id.materialTabHost);
for (int i = 0; i < mqFragmentPagerAdapter.getCount(); i++) {
tabHost.addTab(tabHost.newTab()
.setText(mqFragmentPagerAdapter.getPageTitle(i))
.setTabListener(this));
}
}
private void initViewPager() {
viewPager = (ViewPager) findViewById(R.id.view_pager);
List<Fragment> listFragments = new ArrayList<>();
listFragments.add(new SearchFragment());
listFragments.add(tf);
listFragments.add(af);
listFragments.add(alf);
//listFragments.add(new PlaylistFragment());
mqFragmentPagerAdapter = new com.nyimbozamani.nyimbozazamani.adapters.MusiQuikFragmentPagerAdapter(this, getSupportFragmentManager(), listFragments);
viewPager.setAdapter(mqFragmentPagerAdapter);
viewPager.setOnPageChangeListener(this);
}
@Override
public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
}
@Override
public void onPageSelected(int selectedItem) {
tabHost.setSelectedNavigationItem(selectedItem);
}
@Override
public void onPageScrollStateChanged(int state) {
}
@Override
public void onTabChanged(String tabId) {
}
public Fragment getCurrentPagerFragment(int position) {
FragmentStatePagerAdapter a = (FragmentStatePagerAdapter) viewPager.getAdapter();
return (Fragment) a.instantiateItem(viewPager, position);
}
@Override
public void onTabSelected(MaterialTab materialTab) {
int position = materialTab.getPosition();
viewPager.setCurrentItem(position);
//no need for the keyboard on the tracks or playlists tab by default
if ((position == 1) || (position == 2)) {
inputManager = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
inputManager.hideSoftInputFromWindow((null == getCurrentFocus()) ? null : getCurrentFocus().getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);
}
}
@Override
public void onTabReselected(MaterialTab materialTab) {
viewPager.setCurrentItem(materialTab.getPosition());
}
@Override
public void onTabUnselected(MaterialTab materialTab) {
}
//MediaPlayerControl ==================================================
private void setController() {
//set up the controller
controller = new com.nyimbozamani.nyimbozazamani.MusicController(this);
controller.setPrevNextListeners(new View.OnClickListener() {
@Override
public void onClick(View v) {
playNext();
}
}, new View.OnClickListener() {
@Override
public void onClick(View v) {
playPrev();
}
});
controller.setMediaPlayer(this);
//controller.setAnchorView(findViewById(R.id.view_pager));
//controller.setEnabled(true);
}
@Override
public void start() {
}
@Override
public void pause() {
if (musicSrv != null) {
playbackPaused = true;
btnPlay.setImageResource(R.drawable.btn_play);
btnPlay_lrg.setImageResource(R.drawable.btn_play);
musicSrv.pausePlayer();
}
}
@Override
public int getDuration() {
if (musicSrv != null && musicBound && musicSrv.isPng())
return musicSrv.getDur();
else return 0;
}
@Override
public int getCurrentPosition() {
if (musicSrv != null && musicBound && musicSrv.isPng())
return musicSrv.getPosn();
else return 0;
}
@Override
public void seekTo(int pos) {
musicSrv.seek(pos);
}
@Override
public boolean isPlaying() {
if (musicSrv != null && musicBound)
return musicSrv.isPng();
return false;
}
@Override
public int getBufferPercentage() {
return 0;
}
@Override
public boolean canPause() {
return true;
}
@Override
public boolean canSeekBackward() {
return true;
}
@Override
public boolean canSeekForward() {
return true;
}
@Override
public int getAudioSessionId() {
return 0;
}
//play next
private void playNext() {
musicSrv.playNext();
//updateSongDetailViews();
if (playbackPaused) {
// setController();
playbackPaused = false;
}
//controller.show(3);
}
//play previous
private void playPrev() {
musicSrv.playPrev();
//updateSongDetailViews();
if (playbackPaused) {
// setController();
playbackPaused = false;
}
//controller.show(3);
}
@Override
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
}
/**
* When user starts moving the progress handler
*/
@Override
public void onStartTrackingTouch(SeekBar seekBar) {
// remove message Handler from updating progress bar
mHandler.removeCallbacks(mUpdateTimeTask);
}
/**
* When user stops moving the progress hanlder
*/
@Override
public void onStopTrackingTouch(SeekBar seekBar) {
mHandler.removeCallbacks(mUpdateTimeTask);
int totalDuration = musicSrv.getDur();
Log.d("total duration", String.valueOf(totalDuration));
int currentPosition = seekBar.getProgress();
// forward or backward to certain seconds
seekTo(currentPosition);
if (musicSrv.isPng())
// update timer progress again
updateProgressBar();
}
//========================================================
public void songPicked(View view) {
int viewTag = Integer.parseInt(view.getTag().toString());
musicSrv.setSong(viewTag);
musicSrv.playSong();
//updateSongDetailViews();
btnPlay.setImageResource(R.drawable.btn_pause);
btnPlay_lrg.setImageResource(R.drawable.btn_pause);
if (playbackPaused) {
// setController();
playbackPaused = false;
}
int x = slidingUpPanelLayout.getPanelHeight();
Log.d("STARTING TOP", String.valueOf(x));
Display display = getWindowManager().getDefaultDisplay();
Point size = new Point();
display.getSize(size);
int width = size.x;
int height = size.y;
/* TranslateAnimation animation = new TranslateAnimation(0,0,height,0);
animation.setDuration(1000);
animation.setFillAfter(true);
slidingUpPanelLayout.startAnimation(animation);*/
//slidingUpPanelLayout.setVisibility(View.INVISIBLE);
YoYo.with(Techniques.Landing).duration(500).playOn(findViewById(R.id.rel_large_control));
//YoYo.with(Techniques.FadeIn).duration(1000).playOn(findViewById(R.id.rel_large_control));
slidingUpPanelLayout.setPanelState(PanelState.EXPANDED);
//slidingUpPanelLayout.setVisibility(View.VISIBLE);
//slidingUpPanelLayout.setPanelState(PanelState.COLLAPSED);
//controller.show(3);
//add song to preferences
}
public void updateProgressBar() {
long totalDuration = musicSrv.getDur();
long currentDuration = musicSrv.getPosn();
tvElapsedTime = (TextView) findViewById(R.id.tvElapsedTime);
tvTotalTime = (TextView) findViewById(R.id.tvTotalTime);
tvElapsedTime_lrg = (TextView) findViewById(R.id.tvElapsedTime_lrg);
tvTotalTime_lrg = (TextView) findViewById(R.id.tvTotalTime_lrg);
long second = (currentDuration / 1000) % 60;
long minute = (currentDuration / (1000 * 60)) % 60;
long hour = (currentDuration / (1000 * 60 * 60)) % 24;
long dsecond = (totalDuration / 1000) % 60;
long dminute = (totalDuration / (1000 * 60)) % 60;
long dhour = (totalDuration / (1000 * 60 * 60)) % 24;
String runningTime = String.format("%02d:%02d:%02d", hour, minute, second);
String totalTime = String.format("%02d:%02d:%02d", dhour, dminute, dsecond);
try {
tvElapsedTime.setText(runningTime);
tvTotalTime.setText(totalTime);
tvElapsedTime_lrg.setText(runningTime);
tvTotalTime_lrg.setText(totalTime);
} catch (Exception e) {
e.printStackTrace();
}
songProgressBar.setProgress((int) currentDuration);
songProgressBar_lrg.setProgress((int) currentDuration);
mHandler.postDelayed(mUpdateTimeTask, 500);
}
private Runnable mUpdateTimeTask = new Runnable() {
@Override
public void run() {
//TODO: display total duration and completed playing
//songTotalDurationLabel.setText(""+utils.milliSecondsToTimer(totalDuration));
//songCurrentDurationLabel.setText(""+utils.milliSecondsToTimer(currentDuration));
//updating progress bar
//int progress = (int)(utils.getProgressPercentage(currentDuration,totalDuration));
updateProgressBar();
}
};
public void setInitialView(int index){
com.nyimbozamani.nyimbozazamani.Song song = musicSrv.getSong(index);
tvSong = (TextView) findViewById(R.id.tvSong);
tvArtist = (TextView) findViewById(R.id.tvArtist);
tvAlbum = (TextView) findViewById(R.id.tvAlbum);
tvSong.setTypeface(font,Typeface.BOLD);
tvArtist.setTypeface(font,Typeface.BOLD);
tvAlbum.setTypeface(font,Typeface.BOLD);
tvSong_lrg = (TextView) findViewById(R.id.tvSong_lrg);
tvArtist_lrg = (TextView) findViewById(R.id.tvArtist_lrg);
tvAlbum_lrg = (TextView) findViewById(R.id.tvAlbum_lrg);
tvSong_lrg.setTypeface(font,Typeface.BOLD);
tvArtist_lrg.setTypeface(font,Typeface.BOLD);
tvAlbum_lrg.setTypeface(font,Typeface.BOLD);
coverArt = (ImageView) findViewById(R.id.ivAlbumArt);
coverArt_lrg = (ImageView) findViewById(R.id.ivAlbumArt_lrg);
tvSong.setText(song.getTitle());
tvArtist.setText(song.getArtist());
tvAlbum.setText(song.getAlbum());
tvSong_lrg.setText(song.getTitle());
tvArtist_lrg.setText(song.getArtist());
tvAlbum_lrg.setText(song.getAlbum());
//update album art...fingers crossed
mmr = new MediaMetadataRetriever();
mmr.setDataSource(song.getPath());
byte[] data = mmr.getEmbeddedPicture();
if (data != null) {
Bitmap bitmap = BitmapFactory.decodeByteArray(data, 0, data.length);
coverArt.setImageBitmap(bitmap);
coverArt_lrg.setImageBitmap(bitmap);
//coverArt.setAdjustViewBounds(true);
//coverArt.setLayoutParams(new RelativeLayout.LayoutParams(50,50));
} else {
coverArt.setImageResource(R.drawable.placeholder_musiquik);
coverArt_lrg.setImageResource(R.drawable.placeholder_musiquik);
//coverArt.setAdjustViewBounds(true);
//coverArt.setLayoutParams(new RelativeLayout.LayoutParams(50, 50));
}
}
@Override
public void updateSongDetailViews() {
tvSong = (TextView) findViewById(R.id.tvSong);
tvArtist = (TextView) findViewById(R.id.tvArtist);
tvAlbum = (TextView) findViewById(R.id.tvAlbum);
tvSong.setTypeface(font,Typeface.BOLD);
tvArtist.setTypeface(font,Typeface.BOLD);
tvAlbum.setTypeface(font,Typeface.BOLD);
tvSong_lrg = (TextView) findViewById(R.id.tvSong_lrg);
tvArtist_lrg = (TextView) findViewById(R.id.tvArtist_lrg);
tvAlbum_lrg = (TextView) findViewById(R.id.tvAlbum_lrg);
tvSong_lrg.setTypeface(font,Typeface.BOLD);
tvArtist_lrg.setTypeface(font,Typeface.BOLD);
tvAlbum_lrg.setTypeface(font,Typeface.BOLD);
coverArt = (ImageView) findViewById(R.id.ivAlbumArt);
coverArt_lrg = (ImageView) findViewById(R.id.ivAlbumArt_lrg);
tvSong.setText(musicSrv.getSongTitle());
tvArtist.setText(musicSrv.getSongArtist());
tvAlbum.setText(musicSrv.getSongAlbum());
tvSong_lrg.setText(musicSrv.getSongTitle());
tvArtist_lrg.setText(musicSrv.getSongArtist());
tvAlbum_lrg.setText(musicSrv.getSongAlbum());
//update album art...fingers crossed
mmr = new MediaMetadataRetriever();
String mpath = musicSrv.getSongPath();
mmr.setDataSource(mpath);
byte[] data = mmr.getEmbeddedPicture();
if (data != null) {
Bitmap bitmap = BitmapFactory.decodeByteArray(data, 0, data.length);
coverArt.setImageBitmap(bitmap);
coverArt_lrg.setImageBitmap(bitmap);
//coverArt.setAdjustViewBounds(true);
//coverArt.setLayoutParams(new RelativeLayout.LayoutParams(50,50));
} else {
coverArt.setImageResource(R.drawable.placeholder_musiquik);
coverArt_lrg.setImageResource(R.drawable.placeholder_musiquik);
//coverArt.setAdjustViewBounds(true);
//coverArt.setLayoutParams(new RelativeLayout.LayoutParams(50, 50));
}
//seekbar stuff
songProgressBar.setProgress(0);
songProgressBar.setMax(musicSrv.getDur());
songProgressBar_lrg.setProgress(0);
songProgressBar_lrg.setMax(musicSrv.getDur());
updateProgressBar();
tvSong.setFocusable(true);
tvSong.setSelected(true);
tvSong_lrg.setFocusable(true);
tvSong_lrg.setSelected(true);
}
@Override
public void onPanelSlide(View view, float v) {
Log.d("PANELSTATE", "panelslide");
}
@Override
public void onPanelCollapsed(View view) {
Log.d("PANELSTATE", "collapsed");
int relHeight = miniRelativelayout.getHeight();
relHeight += getSoftButtonsBarSizePort(MainActivity.this);
supl.setPanelHeight(relHeight);
supl.setMinimumHeight(relHeight);
}
@Override
public void onPanelExpanded(View view) {
Log.d("PANELSTATE", "expanded");
//getSoftButtonsBarSizePort(MainActivity.this)
}
@Override
public void onPanelAnchored(View view) {
Log.d("PANELSTATE", "anchored");
}
@Override
public void onPanelHidden(View view) {
Log.d("PANELSTATE", "hidden");
}
@Override
public void onBackPressed() {
if (slidingUpPanelLayout.getPanelState().equals(PanelState.EXPANDED)) {
slidingUpPanelLayout.setPanelState(PanelState.COLLAPSED);
} else {
super.onBackPressed();
}
}
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_BACK) {
if (slidingUpPanelLayout.getPanelState().equals(PanelState.EXPANDED)) {
slidingUpPanelLayout.setPanelState(PanelState.COLLAPSED);
return true;
}
}
return super.onKeyDown(keyCode, event);
}
public void refreshSongs(){
//show progress dialog
Log.d("MAINACTIVITY", "REFRESHSONGS");
getSongList();
//update adapters
TracksFragment uTrackFragment = (TracksFragment)getSupportFragmentManager().findFragmentByTag("android:switcher:" +R.id.view_pager+ ":" +1);
if(uTrackFragment != null){
uTrackFragment.updateAdapter();
}
ArtistsFragment uArtistsFragment = (ArtistsFragment)getSupportFragmentManager().findFragmentByTag("android:switcher:" +R.id.view_pager+ ":" +2);
if(uArtistsFragment != null){
uArtistsFragment.updateAdapter();
}
AlbumsFragment uAlbumsFragment = (AlbumsFragment)getSupportFragmentManager().findFragmentByTag("android:switcher:" +R.id.view_pager+ ":" +3);
if(uAlbumsFragment != null){
uAlbumsFragment.updateAdapter();
}
}
public static int getSoftButtonsBarSizePort(AppCompatActivity activity) {
// getRealMetrics is only available with API 17 and +
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
DisplayMetrics metrics = new DisplayMetrics();
activity.getWindowManager().getDefaultDisplay().getMetrics(metrics);
int usableHeight = metrics.heightPixels;
activity.getWindowManager().getDefaultDisplay().getRealMetrics(metrics);
int realHeight = metrics.heightPixels;
if (realHeight > usableHeight)
return realHeight - usableHeight;
else
return 0;
}
return 0;
}
public int getIndexFromSongPath(ArrayList<com.nyimbozamani.nyimbozazamani.Song> sList, Uri sPath){
String title="";
String artist="";
String path="";
File f = new File(sPath.getPath());
ContentResolver mResolver = getContentResolver();
Cursor musicCursor = mResolver.query(android.provider.MediaStore.Audio.Media.EXTERNAL_CONTENT_URI, null, MediaStore.Audio.Media.DATA + "=?", new String[] {sPath.getPath()} , null);
if (musicCursor != null && musicCursor.moveToFirst()) {
System.out.println(musicCursor.toString());
//get columns
int titleColumn = musicCursor.getColumnIndex
(android.provider.MediaStore.Audio.Media.TITLE);
int artistColumn = musicCursor.getColumnIndex
(android.provider.MediaStore.Audio.Media.ARTIST);
int artistPath = musicCursor.getColumnIndex(android.provider.MediaStore.Audio.Media.DATA);
path = musicCursor.getString(artistPath);
//add songs to list
for(int i=0; i<sList.size(); i++){
if(sList.get(i).getPath().equalsIgnoreCase(path)){
return i;
}
}
}
return 0;
}
//settings dialog
public void settingsDialog(String title,String content, String buttonText){
SimpleDialogFragment.createBuilder(this, getSupportFragmentManager()).setTitle(title).setMessage(content).setPositiveButtonText(buttonText).show();
}
private void requestNewInterstitial() {
AdRequest adRequest = new AdRequest.Builder()
.build();
mInterstitialAd.loadAd(adRequest);
}
public boolean isConnected() {
boolean connected;
cm = (ConnectivityManager) getBaseContext().getSystemService(Context.CONNECTIVITY_SERVICE);
activeNetwork = cm.getActiveNetworkInfo();
connected = activeNetwork != null && activeNetwork.isConnectedOrConnecting();
return connected;
}
}
<file_sep>/app/src/main/java/com/nyimbozamani/bongoflava/interfaces/ExpandableListAdapterCallbacks.java
package com.nyimbozamani.nyimbozazamani.interfaces;
/**
* Created by measley on 10/7/2015.
*/
public interface ExpandableListAdapterCallbacks {
void refreshLists();
}
<file_sep>/app/src/main/java/com/nyimbozamani/bongoflava/interfaces/MusicServiceCallbacks.java
package com.nyimbozamani.nyimbozazamani.interfaces;
/**
* Created by measley on 9/14/2015.
*/
public interface MusicServiceCallbacks {
void updateSongDetailViews();
}
<file_sep>/app/build.gradle
apply plugin: 'com.android.application'
apply plugin: 'com.neenbedankt.android-apt'
android {
compileSdkVersion compileSdk
buildToolsVersion buildTools
defaultConfig {
applicationId "com.nyimbozamani.nyimbozazamani"
minSdkVersion minSdk
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
buildTypes {
release {
lintOptions {
disable 'MissingTranslation'
}
minifyEnabled false;
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile "com.android.support:design:$supportLibraryVersion"
compile 'com.google.firebase:firebase-ads:10.2.0'
compile 'com.firebaseui:firebase-ui-database:1.2.0'
compile 'com.google.firebase:firebase-ads:10.2.0'
// The following dependencies are not required to use the Firebase UI library.
// They are used to make some aspects of the demo app implementation simpler for
// demonstrative purposes, and you may find them useful in your own apps; YMMV.
compile "com.android.support:cardview-v7:$supportLibraryVersion"
compile 'org.droidparts:droidparts:2.7.7'
compile 'it.neokree:MaterialTabs:0.11'
compile 'com.readystatesoftware.systembartint:systembartint:1.0.3'
compile 'com.sothree.slidinguppanel:library:3.1.1'
compile 'de.hdodenhof:circleimageview:1.3.0'
compile 'com.wunderlist:sliding-layer:1.2.5'
compile 'com.github.wseemann:FFmpegMediaMetadataRetriever:1.0.1'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.daimajia.easing:library:1.0.1@aar'
compile 'com.daimajia.androidanimations:library:1.1.3@aar'
compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.4'
compile 'com.shehabic.droppy:Droppy:0.2.5.1@aar'
compile 'com.flyco.dialog:FlycoDialog_Lib:1.1.0@aar'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.flyco.animation:FlycoAnimation_Lib:1.0.0@aar'
compile 'com.avast:android-styled-dialogs:2.2.0'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.google.guava:guava:18.0'
// compile files('libs/jsoup-1.8.3.jar')
//i compile files('libs/commons-validator-1.4.1.jar')
}
apply plugin: 'com.google.gms.google-services'
| 2a1525ed3cb5d36054ff2b46862df779bb3e7abc | [
"Java",
"Gradle"
] | 4 | Java | nassarocky/nyimbo_za_zamani | d35a668cb225bc832c7318478e697b8aa4e2d72e | a38650a8fb3a56f473f98ee23fdf718288f75c96 | |
refs/heads/master | <repo_name>ShlomoNEU/Learning<file_sep>/app/src/main/java/com/shne/learning/Activity/MainActivity.java
package com.shne.learning.Activity;
import android.os.Bundle;
import android.support.v4.app.FragmentManager;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.SearchView;
import android.support.v7.widget.Toolbar;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import com.shne.learning.Activity.Fragments.MainFragment;
import com.shne.learning.Activity.Fragments.TransactionView;
import com.shne.learning.Arguments.JsonArguments;
import com.shne.learning.Mudole.CreditCard;
import com.shne.learning.R;
import org.json.JSONArray;
import org.json.JSONException;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.ArrayList;
public class MainActivity extends AppCompatActivity {
private Toolbar toolbar;
MainFragment fragment;
private ArrayList<CreditCard> cards;
FragmentManager fragmentManager;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
fragmentManager = getSupportFragmentManager();
cards = loadCards();
FragmentManager fm = getSupportFragmentManager();
fragment = (MainFragment) fm.findFragmentById(R.id.MainFrame);
if (fragment == null) {
fragment = MainFragment.newInstance("", "");
fm.beginTransaction().add(R.id.MainFrame, fragment).commit();
}
toolbar = (Toolbar) findViewById(R.id.my_toolbar);
setSupportActionBar(toolbar);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.main_menu_toolbar, menu);
MenuItem item = menu.findItem(R.id.actions_search);
SearchView searchView = (SearchView) item.getActionView();
searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener() {
@Override
public boolean onQueryTextSubmit(String query) {
return false;
}
@Override
public boolean onQueryTextChange(String newText) {
fragment.SearchInList(newText);
return false;
}
});
return super.onCreateOptionsMenu(menu);
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
return super.onOptionsItemSelected(item);
}
public void openTransactionFragment(String FilePath) {
toolbar.setVisibility(View.GONE);
TransactionView fragment = new TransactionView();
getSupportFragmentManager().beginTransaction().replace(R.id.MainFrame,fragment).addToBackStack(null).commit();
}
public void returnToolbar(){
toolbar = (Toolbar) findViewById(R.id.my_toolbar);
setSupportActionBar(toolbar);
}
public ArrayList loadCards() {
String Filedata = openFile("cardlist.card");
ArrayList cardList = new ArrayList();
try {
JSONArray object = new JSONArray(Filedata);
for(int i = 0; i < object.length(); i++ ){
CreditCard creditCard = new CreditCard(this.getApplicationContext());
creditCard.setName(object.getJSONObject(i).getString(JsonArguments.Arg_Name));
creditCard.setCardCompany(object.getJSONObject(i).getString(JsonArguments.Arg_Compeny));
creditCard.setFourDig(object.getJSONObject(i).getString(JsonArguments.Arg_Digets));
creditCard.setAmount(object.getJSONObject(i).getDouble(JsonArguments.Arg_Amount));
cardList.add(creditCard);
}
return cardList;
} catch (JSONException e) {
e.printStackTrace();
}
return new ArrayList();
}
public void writeFile(String filename, String data) {
File file = new File(filename);
FileOutputStream outputStream = null;
try {
FileOutputStream fos = openFileOutput(filename,MODE_PRIVATE);
fos.write(data.getBytes());
fos.close();
} catch (Exception e) {
e.printStackTrace();
}
}
private String openFile(String filename) {
try {
File file = new File(getFilesDir()+filename);
FileInputStream inputStream = openFileInput(filename);
byte[] dat = new byte[inputStream.available()];
inputStream.read(dat);
String s = new String(dat);
return s;
} catch (FileNotFoundException e) {
e.printStackTrace();
writeFile(filename,"");
} catch (IOException e) {
e.printStackTrace();
}
return "";
}
public ArrayList<CreditCard> getCards() {
return cards;
}
public Toolbar getToolbar() {
return toolbar;
}
}
<file_sep>/app/src/main/java/com/shne/learning/Activity/Fragments/MainFragment.java
package com.shne.learning.Activity.Fragments;
import android.content.DialogInterface;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.RectF;
import android.os.Bundle;
import android.support.design.widget.FloatingActionButton;
import android.support.v4.app.Fragment;
import android.support.v7.app.AlertDialog;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.helper.ItemTouchHelper;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.EditText;
import com.shne.learning.Activity.MainActivity;
import com.shne.learning.Adapters.CreditCardRecyler;
import com.shne.learning.Arguments.JsonArguments;
import com.shne.learning.Dialogs.NewCardDialog;
import com.shne.learning.Mudole.CreditCard;
import com.shne.learning.R;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import java.io.InputStream;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
/**
* A simple {@link Fragment} subclass.
* Use the {@link MainFragment#newInstance} factory method to
* create an instance of this fragment.
*/
public class MainFragment extends Fragment {
public MainFragment() {
// Required empty public constructor
}
/**
* Use this factory method to create a new instance of
* this fragment using the provided parameters.
*
* @param param1 Parameter 1.
* @param param2 Parameter 2.
* @return A new instance of fragment MainFragment.
*/
public static MainFragment newInstance(String param1, String param2) {
MainFragment fragment = new MainFragment();
Bundle args = new Bundle();
fragment.setArguments(args);
return fragment;
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (getArguments() != null) {
//All the Setting Before Loading View
}
}
private RecyclerView recyclerView;
private CreditCardRecyler mAdapter;
private Paint p = new Paint();
private FloatingActionButton AddCardBtn;
private EditText Type,Name,Code;
private JSONArray cardJson;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
// Inflate the layout for this fragment
View v = inflater.inflate(R.layout.fragment_main, container, false);
recyclerView = (RecyclerView) v.findViewById(R.id.ListRecycle);
AddCardBtn = (FloatingActionButton) v.findViewById(R.id.AddFab);
((MainActivity)getActivity()).getToolbar().setVisibility(View.VISIBLE);
AddCardBtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
NewCardDialog cardDialog = new NewCardDialog(getContext(),new CreditCard(getActivity().getApplicationContext()),mAdapter);
cardDialog.show();
}
});
recyclerView.setHasFixedSize(true);
LinearLayoutManager layoutManager = new LinearLayoutManager(getContext());
layoutManager.setOrientation(LinearLayoutManager.VERTICAL);
mAdapter = new CreditCardRecyler(getContext(),((MainActivity)getActivity()).getCards());
recyclerView.setAdapter(mAdapter);
recyclerView.setLayoutManager(layoutManager);
recyclerView.addOnScrollListener(new RecyclerView.OnScrollListener() {
@Override
public void onScrolled(RecyclerView recyclerView, int dx, int dy) {
super.onScrolled(recyclerView, dx, dy);
if (dy > 5){
AddCardBtn.hide();
}else if (dy < -5) {
AddCardBtn.show();
}
}
}
);
mAdapter.setActivity((MainActivity) getActivity());
return v;
}
void initSwipes(){
ItemTouchHelper.SimpleCallback simpleCallback = new ItemTouchHelper.SimpleCallback(0,ItemTouchHelper.LEFT) {
@Override
public boolean onMove(RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder, RecyclerView.ViewHolder target) {
return false;
}
@Override
public void onSwiped(RecyclerView.ViewHolder viewHolder, int direction) {
final int position = viewHolder.getAdapterPosition();
final CreditCard e = mAdapter.getCardList().get(position);
if(direction == ItemTouchHelper.LEFT){
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
builder.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
mAdapter.removeCard(position);
}
});
builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
mAdapter.removeCard(position);
mAdapter.addCard(e,position);
}
});
builder.setMessage(R.string.delete);
AlertDialog dialog = builder.create();
dialog.show();
}
}
@Override
public void onChildDraw(Canvas c, RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder, float dX, float dY, int actionState, boolean isCurrentlyActive) {
Bitmap icon;
if(actionState == ItemTouchHelper.ACTION_STATE_SWIPE){
View itemView = viewHolder.itemView;
float height = (float) itemView.getBottom() - (float) itemView.getTop();
float width = height / 3;
p.setColor(Color.parseColor("#D32F2F"));
RectF background = new RectF((float) itemView.getRight() + dX, (float) itemView.getTop(),(float) itemView.getRight(), (float) itemView.getBottom());
c.drawRect(background,p);
icon = BitmapFactory.decodeResource(getResources(), R.drawable.ic_remove_circle_outline_black_24dp);
RectF icon_dest = new RectF((float) itemView.getRight() - 2*width ,(float) itemView.getTop() + width,(float) itemView.getRight() - width,(float)itemView.getBottom() - width);
c.drawBitmap(icon,null,icon_dest,p);
}
super.onChildDraw(c, recyclerView, viewHolder, dX, dY, actionState, isCurrentlyActive);
}
};
ItemTouchHelper itemTouchHelper = new ItemTouchHelper(simpleCallback);
itemTouchHelper.attachToRecyclerView(recyclerView);
}
public void SearchInList(String SearchTerm){
mAdapter.getFilter().filter(SearchTerm);
}
/**
* Filling False Data
* For Testing ONLY
* @return List<CreditCard>
*/
List<CreditCard> CardMaker(){
ArrayList<CreditCard> cards = new ArrayList<>();
for (int x =0;x<6;x++){
cards.add(new CreditCard(getActivity().getApplicationContext()));
}
return cards;
}
public Bitmap LoadImageFromWebOperations(String url) {
try {
return BitmapFactory.decodeStream((InputStream)new URL(url.replace(" ","")).getContent());
} catch (Exception e) {
return null;
}
}
@Override
public void onStop() {
super.onStop();
saveListToFile();
}
void saveListToFile(){
JSONArray array = new JSONArray();
int x = 0;
for (CreditCard card:mAdapter.getList()){
JSONObject object = new JSONObject();
try {
object.put(JsonArguments.Arg_Name,card.getName());
object.put(JsonArguments.Arg_Amount,card.getAmount());
object.put(JsonArguments.Arg_Digets,card.getFourDig());
object.put(JsonArguments.Arg_Compeny,card.getCardCompany());
array.put(x,object);
x++;
} catch (JSONException e) {
e.printStackTrace();
}
}
((MainActivity)getActivity()).writeFile("cardlist.card",array.toString());
}
}
| 7699701fd0c990007f0582eb3ac9e45cac14788d | [
"Java"
] | 2 | Java | ShlomoNEU/Learning | 422b85b3d19b9ffa6137ccb3810333f1f914f6e6 | 04f28f2c707b235da34770c133bc2eabbcb3f3a0 | |
refs/heads/master | <file_sep># streamlit_apps_ml
Created some simple streamlit ML apps
<file_sep>import numpy as np
import streamlit as st
import matplotlib.pyplot as plt
from datetime import date
import yfinance as yf
from fbprophet import Prophet
from fbprophet.plot import plot_plotly
from plotly import graph_objs as go
# We using facebook prophet here from prediction
START = "2015-01-01"
TODAY = date.today().strftime("%Y-%m-%d")
stocks = ("AAPL", "GOOG", "MSFT", "GME")
selected_stock = st.selectbox("Select dataset for prediction", stocks)
n_years = st.slider("Years of predeiction", 1, 4)
period = n_years * 365
@st.cache # will cash the downloaded data so it wont download again and again
def load_data(ticker):
data = yf.download(ticker, START, TODAY) # return data in dataframe format
data.reset_index(inplace = True) # replace index with date as index
return data
data_load_state = st.text("Load data...")
data = load_data(selected_stock)
data_load_state.text("Loading data... done!")
st.subheader("Raw data")
st.write(data.tail())
def plot_raw_data():
fig = go.Figure()
fig.add_trace(go.Scatter(x = data['Date'], y = data['Open'], name = 'stock_open'))
fig.add_trace(go.Scatter(x = data['Date'], y = data['Close'], name = 'stock_close'))
fig.layout.update(title_text = "Time Series Data", xaxis_rangeslider_visible=True)
st.plotly_chart(fig)
plot_raw_data()
# Forcasting
df_train = data[['Date', 'Close']]
df_train = df_train.rename(columns = {"Date":"ds", "Close":"y"}) # fbprophen requires this format so we rename the df
model = Prophet()
model.fit(df_train)
future = model.make_future_dataframe(periods = period)
forcast = model.predict(future)
st.subheader("Forcasted data")
st.write(forcast.tail())
st.write('Forcast data')
forcast_fig = plot_plotly(model, forcast)
st.plotly_chart(forcast_fig)
st.write('Forcast components')
fig2 = model.plot_components(forcast)
st.write(fig2)
#
<file_sep>import numpy as np
import streamlit as st
from sklearn import datasets
import matplotlib.pyplot as plt
from sklearn.svm import SVC
from sklearn.decomposition import PCA # principal componant analysis algo
from sklearn.metrics import accuracy_score
from sklearn.neighbors import KNeighborsClassifier
from sklearn.ensemble import RandomForestClassifier
from sklearn.model_selection import train_test_split
st.title("Streamlit learning")
st.write(""" ## Explore diffirent classifier """)
# selectbox
dataset_name = st.sidebar.selectbox("Select Dataset", ("Iris", "Breast Cancer", "Wine"))
classifier_name = st.sidebar.selectbox("Select Classifier", ("KNN", "SVM", "Random Forest"))
def get_dataset(dataset_name):
if dataset_name == "Iris":
data = datasets.load_iris()
elif dataset_name == "Breast Cancer":
data = datasets.load_breast_cancer()
else:
data = datasets.load_wine()
X = data.data
y = data.target
return X, y
def add_parameter_ui(clf_name):
params = dict()
if clf_name == "KNN":
K = st.sidebar.slider("K", 1, 15)
params["K"] = K
elif clf_name == "SVM":
C = st.sidebar.slider("C", 0.01, 10.0)
params["C"] = C
else:
max_depth = st.sidebar.slider("max_depth", 2, 15)
n_estimators = st.sidebar.slider("n_estimators", 1, 100)
params["max_depth"] = max_depth
params["n_estimators"] = n_estimators
return params
def get_classifier(clf_name, params):
if clf_name == "KNN":
clf = KNeighborsClassifier(n_neighbors = params['K'])
elif clf_name == "SVM":
clf = SVC(C = params['C'])
else:
clf = RandomForestClassifier(n_estimators = params['n_estimators'],
max_depth = params['max_depth'],
random_state = 1234
)
return clf
X, y = get_dataset(dataset_name)
params = add_parameter_ui(classifier_name)
clf = get_classifier(classifier_name, params)
st.write("Shape of the dataset: ", X.shape)
st.write("Number of classes: ", len(np.unique(y)))
show_dataset = st.checkbox("Show dataset (Type: {})".format(type(X)))
if show_dataset:
st.write("{} dataset: ".format(dataset_name), X)
st.write("Labels: ", y)
# Classification
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size = 0.2, random_state = 1234)
clf.fit(X_train, y_train)
y_pred = clf.predict(X_test)
acc = accuracy_score(y_test, y_pred)
st.write(f"Classifier = {classifier_name}")
st.write(f"Accuracy = {acc}")
# PLOT datasets
pca = PCA(2) # 2 = no. of dimantion (2D), PCA converts features to lowar dimantional space
X_projected = pca.fit_transform(X)
x1 = X_projected[:, 0]
x2 = X_projected[:, 1]
fig = plt.figure()
plt.scatter(x1, x2, c = y, alpha = 0.8, cmap = "viridis")
plt.xlabel("Principal componet 1")
plt.ylabel("Principal componet 2")
plt.colorbar()
st.pyplot(fig)
# TODO:
## add more parameters (sklearn)
## add other classifiers
## add feature scaling
| 0fa7ac17781e8a2f0e9cedf513f5ed614fd60325 | [
"Markdown",
"Python"
] | 3 | Markdown | gourabdg47/streamlit_apps_ml | 82e755392906090c6a6e22261b2a0125074db74c | 92ec3148f4e643722add5cb0530571a645dec98a | |
refs/heads/master | <file_sep>class ChatroomController < ApplicationController
before_action :require_user
def index
@message = Message.new
@messages = Message.custom_display # instead of Message.all, scope defined in the Message model
@online_users = User.where("last_seen_at > ?", 3.minutes.ago)
end
end<file_sep>class ApplicationController < ActionController::Base
helper_method :current_user, :logged_in?
# allows the use of these methods in my views
before_action :update_last_seen_at, if: -> { logged_in? && (current_user.last_seen_at.nil? || current_user.last_seen_at < 1.minutes.ago) }
# before every load, we only want to update the last seen column if the user is logged in and if the current user is logging in the first time or the value of last seen is more than 2 minutes old
def current_user
@current_user ||= User.find(session[:user_id]) if session[:user_id]
end
def logged_in?
!!current_user
# turns current_user to a boolean
end
def require_user
if !logged_in?
flash[:error] = "You must be logged in to perform that action."
redirect_to login_path
end
end
def update_last_seen_at
current_user.update_attribute(:last_seen_at, Time.current)
end
end<file_sep># README
Personal project. Simple live chatroom web-app using Semantic UI gem for the front-end part. Dependencies: NodeJS, Yarn, Webpacker.
<file_sep>class ChatroomChannel < ApplicationCable::Channel
def subscribed
# stream_from "some_channel"
stream_from "chatroom_channel"
# also need to create a route for this websocket connection (actioncable mounts the data in the routes.rb file)
end
def unsubscribed
# Any cleanup needed when channel is unsubscribed
end
end
| 88f09ba5dd253d10214597a61b99ddf7426860ac | [
"Markdown",
"Ruby"
] | 4 | Ruby | arijanbabickovic/ChatApp | 2c84cf4f4bf4af0814b8122278e0f1290e22fd99 | 8289ff5846daabf6924b716b4289902ce9fb5d4a | |
refs/heads/master | <file_sep>#!/usr/bin/python
import numpy as np # for numercial computations
import matplotlib.pyplot as plt # for graphing
import seaborn as sns # for extra plots such as heatmap
import pickle # for loading and dumping datasets
import pandas as pd # for easy exploratory data analysis
from time import time # to measure ML process time
import sys
sys.path.append("../tools/")
from feature_format import featureFormat, targetFeatureSplit
from tester import dump_classifier_and_data, test_classifier
### set random seed for reproducing same results in the future
np.random.seed(42)
### load dictionary and see dataset structure
data_dict = pickle.load(open('final_project_dataset.pkl', 'rb'))
# keys in dictionary
print('keys in dataset: {}'.format(data_dict.keys()))
# number of observations
print('\nThere are {} observations in the dataset.'.format(len(data_dict)))
# number of pois(target)
count = 0
for i in data_dict:
if data_dict[i]['poi']:
count += 1
print('\nThere are {} POIs in the dataset.'.format(count))
# number of features
print('\nThere are {} predictor features and 1 target feature in the dataset.'.format(len(data_dict['METTS MARK'])))
### exploratory data analysis and outliers
# remove 'THE TRAVEL AGENCY IN THE PARK' - this is not an employee
data_dict.pop('THE TRAVEL AGENCY IN THE PARK')
# rmoeve 'LOCKHART EUGENE E' as this peron only has NaN value for predictive variables
data_dict.pop('LOCKHART EUGENE E')
# create pandas dataframe for exploratory data analysis
data_df = pd.DataFrame(data_dict).transpose()
# get rid of 'email_address'(non-numerical) and 'poi'(target) from the list of variables
data_df.drop(['email_address', 'poi'], axis = 1, inplace = True)
# convert all 'NaN' string values to np.NaN values, then turn all values to float values for numerical computations
for i in data_df:
for j in range(len(data_df)):
if data_df[i][j] == 'NaN':
data_df[i][j] = np.NaN
data_df = data_df.astype(np.float)
# check for null values for each variable
print(data_df.info())
# create heatmap to view correlation among variables
data_df_corr = data_df.corr()
mask = np.zeros_like(data_df_corr, dtype = np.bool)
mask[np.triu_indices_from(mask)] = True
sns.heatmap(data_df_corr, cmap = 'RdBu_r', mask = mask, alpha = 0.7)
plt.show()
# choose two variables to see if they are truly correlated
plt.scatter(data = data_df, x = 'salary', y = 'bonus')
plt.show()
# identify outlier
data_df[data_df['salary'] > 25000000]
# get rid of 'TOTAL' from both the dataframe and the dictionary
data_dict.pop('TOTAL')
data_df = data_df[data_df['salary'] < 25000000]
# create the heatmap and scatterplot again to examine changes after getting rid of huge outlier
plt.scatter(data = data_df, x = 'salary', y = 'bonus')
plt.show()
mask = np.zeros_like(data_df.corr(), dtype = np.bool)
mask[np.triu_indices_from(mask)] = True
sns.heatmap(data_df.corr(), cmap = 'RdBu_r', mask = mask, alpha = 0.7)
plt.show()
### Feature engineering, scaling, and selection
# original features_list
features_list = ['poi', 'salary', 'deferral_payments',
'total_payments', 'loan_advances', 'bonus',
'restricted_stock_deferred', 'deferred_income',
'total_stock_value', 'expenses',
'exercised_stock_options', 'other',
'long_term_incentive', 'restricted_stock',
'director_fees','to_messages',
'from_poi_to_this_person', 'from_messages',
'from_this_person_to_poi', 'shared_receipt_with_poi',
'stock_salary_proportion']
# create new feature 'stock_salary_proportion', which shows the proportion of stock out of the sum of stock and salary
# this measures how much of the person's compensation is of 'arbitary value'
# my theory is that the person will be more interested in boosting the company's arbitary face value
# if they have high stock proportion, so that they can also benefit from improved stock value
for i in data_dict:
emp = data_dict[i]
try:
emp['stock_salary_proportion'] = emp['total_stock_value'] / (emp['total_stock_value'] + emp['salary'])
except:
emp['stock_salary_proportion'] = 'NaN'
# store new dataset into my_dataset
my_dataset = data_dict
# create function select k best features from dataset
def select_k_best(data_dict, features_list, k):
# import selectkbest module and f_classif for selector function
from sklearn.feature_selection import SelectKBest, f_classif
# split target and data
data = featureFormat(data_dict, features_list)
target, features = targetFeatureSplit(data)
# create selector and fit data
selector = SelectKBest(f_classif, k = k)
selector.fit(features, target)
# get scores of individual features and group with feature name
scores = selector.scores_
feature_scores = zip(features_list[1:], scores)
# list of features in order of score
scores_ordered = list(sorted(feature_scores, key = lambda x: x[1], reverse = True))
# select k best features from the list
k_best = scores_ordered[:k]
# print scores of k best features
print('scores of {} best features:\n'.format(k))
for i in k_best:
print(i)
# return list of best features
return [i[0] for i in k_best]
# create a list of best features
k_list = [7, 9, 10, 11, 12, 13]
best_features = [select_k_best(my_dataset, features_list, k) for k in k_list]
# create function to transform data dictionary into features and labels
def format_data(data_dict, features_list):
# add 'poi' to the begnning of the list if not in features_list
if 'poi' not in features_list:
features_list.insert(0, 'poi')
data = featureFormat(data_dict, features_list)
labels, features = targetFeatureSplit(data)
return labels, features
# use 7 features for now
labels, features = format_data(my_dataset, best_features[0])
print('These are the 7 best features.')
print(best_features[0])
# split data to train and test set
from sklearn.model_selection import train_test_split
train_X, test_X, train_y, test_y = train_test_split(features, labels, test_size = 0.3)
print('There are {} training points.'.format(len(train_X)))
print('There are {} test points.'.format(len(test_X)))
# scale features using minmaxscaler
from sklearn.preprocessing import MinMaxScaler
min_max_scaler = MinMaxScaler()
min_max_scaler.fit(train_X)
train_X = min_max_scaler.transform(train_X)
test_X = min_max_scaler.transform(test_X)
### Testing different algorithms
# binary classification task, and a supervised learning. import all the algorithms to use.
from sklearn.tree import DecisionTreeClassifier
from sklearn.naive_bayes import GaussianNB
from sklearn.svm import SVC
from sklearn.ensemble import RandomForestClassifier, AdaBoostClassifier
from sklearn.neighbors import KNeighborsClassifier
from sklearn.metrics import precision_score, recall_score, f1_score, classification_report
# create function to create dataframe from classification report
def classification_report_to_df(report):
report_data = []
lines = report.split('\n')
for line in lines[2:-3]:
row = {}
row_data = line.split(' ')
row['precision'] = float(row_data[2].strip())
row['recall'] = float(row_data[3].strip())
row['f1-score'] = float(row_data[4].strip())
row['support'] = float(row_data[5].strip())
report_data.append(row)
result = lines[-2].split(' ')
result = [float(i.strip()) for i in result[1:]]
df_test = pd.DataFrame.from_dict(report_data)
df_test = df_test.append(pd.DataFrame([result],
columns = ['precision','recall','f1-score','support']),
ignore_index = True)
df_test.index = ['non-poi', 'poi', 'avg/total']
return df_test
classifier_name = ['Decision tree', 'Gaussian Naive Bayes',
'SVC', 'Random Forest', 'AdaBoost','KNN']
classifier = [DecisionTreeClassifier(),
GaussianNB(),
SVC(),
RandomForestClassifier(),
AdaBoostClassifier(),
KNeighborsClassifier()]
# create function to evaluate each algorithm and return a classification report
def get_scores(train_X, test_X, train_y, test_y,
classifier_list, classifier_names):
for i, model in enumerate(classifier):
clf = classifier[i]
clf.fit(train_X, train_y)
pred = clf.predict(test_X)
report = classification_report(test_y, pred)
report_df = classification_report_to_df(report)
print(classifier_names[i],'\n')
print(report_df, '\n')
# get scores for each algorithm without any tuning
get_scores(train_X, test_X, train_y, test_y, classifier, classifier_name)
### Parameter tuning
### use GridSearchCV and StratifiedShuffleSplit to find best parameters for each module and for each number of features
from sklearn.model_selection import GridSearchCV, StratifiedShuffleSplit
# define scoring function for GridSearchCV, ONLY returning f1_score if both the recall and precision scores are above 0.3 threshold
def scoring(estimator, features_test, labels_test):
labels_pred = estimator.predict(features_test)
p = precision_score(labels_test, labels_pred, average='micro')
r = recall_score(labels_test, labels_pred, average='micro')
if p > 0.3 and r > 0.3:
return f1_score(labels_test, labels_pred, average='macro')
return 0
# define parameters
param_dt = {'max_features': [3,4,5],
'criterion': ('gini', 'entropy'),
'max_depth': [1,2,3,4,5,6],
'min_samples_split': [2,3],
'min_samples_leaf': [1,2,3,4,5]}
param_rf = {'max_features': [3,4,5],
'criterion': ('gini', 'entropy'),
'min_samples_leaf': [1,2,3,4,5],
'n_estimators': [10,50,100,500]}
param_ada = {'n_estimators': [10,50,100,500],
'algorithm': ('SAMME','SAMME.R'),
'learning_rate': [0.05, 0.1, 1.0] }
param_svc = {'C': [1,10,100,1000],
'gamma': [0.001, 0.0001]}
param_knn = {'n_neighbors': [3, 5, 7, 9],
'weights': ('uniform', 'distance'),
'metric': ('minkowski','euclidean'),
'algorithm': ('auto', 'ball_tree', 'kd_tree', 'brute')}
param_nb = {}
params = []
params.append(param_dt)
params.append(param_rf)
params.append(param_ada)
params.append(param_svc)
params.append(param_knn)
params.append(param_nb)
# define classifiers
classifier_name = ['Decision tree', 'Random Forest',
'AdaBoost','SVC','KNN','Gaussian Naive Bayes' ]
classifier = [DecisionTreeClassifier(),
RandomForestClassifier(),
AdaBoostClassifier(),
SVC(kernel = 'rbf'),
KNeighborsClassifier(),
GaussianNB()]
# create function to find best estimator for an algorithm and return that estimator
def find_best_estim(classifier, classifier_name,
param, scoring, features, target):
# create StratifiedShuffleSplit instance
cv = StratifiedShuffleSplit(n_splits = 10, test_size = 0.1,
random_state = 42)
# scale features
min_max_scaler = MinMaxScaler()
features = min_max_scaler.fit_transform(features)
# create grid and fit data
t0 = time()
clf = classifier
grid = GridSearchCV(clf, param, cv=cv, scoring=scoring)
grid.fit(features, target)
print(classifier_name)
print('time taken to process grid: {}'.format(time() - t0))
print('best parameters: {}'.format(grid.best_params_))
print('best score: {}'.format(grid.best_score_))
return grid.best_estimator_
# ignore warnings
import warnings
warnings.filterwarnings('ignore')
# create labels and features for each number of features
target7, features7 = format_data(data_dict, best_features[0])
target9, features9 = format_data(data_dict, best_features[1])
target10, features10 = format_data(data_dict, best_features[2])
target11, features11 = format_data(data_dict, best_features[3])
target12, features12 = format_data(data_dict, best_features[4])
target13, features13 = format_data(data_dict, best_features[5])
# find best parameters for 7 features
best_estimators_7 = []
print('<7 best features>\n')
for i, model in enumerate(classifier):
best_estimators_7.append(find_best_estim(model, classifier_name[i], params[i],
scoring, features7, target7))
print('\n')
# find best parameters for 9 features
best_estimators_9 = []
print('<9 best features>\n')
for i, model in enumerate(classifier):
best_estimators_9.append(find_best_estim(model, classifier_name[i], params[i],
scoring, features9, target9))
print('\n')
# find best parameters for 10 features
best_estimators_10 = []
print('<10 best features>\n')
for i, model in enumerate(classifier):
best_estimators_10.append(find_best_estim(model, classifier_name[i], params[i],
scoring, features10, target10))
print('\n')
# find best parameters for 11 features
best_estimators_11 = []
print('<11 best features>\n')
for i, model in enumerate(classifier):
best_estimators_11.append(find_best_estim(model, classifier_name[i], params[i],
scoring, features11, target11))
print('\n')
# find best parameters for 12 features
best_estimators_12 = []
print('<12 best features>\n')
for i, model in enumerate(classifier):
best_estimators_12.append(find_best_estim(model, classifier_name[i], params[i],
scoring, features12, target12))
print('\n')
# find best parameters for 13 features
best_estimators_13 = []
print('<13 best features>\n')
for i, model in enumerate(classifier):
best_estimators_13.append(find_best_estim(model, classifier_name[i], params[i],
scoring, features13, target13))
print('\n')
### Validation
### choose only classifiers with scores over 0.7 to test the classifier
print('testing decision tree with 10 variables:')
t0 = time()
test_classifier(best_estimators_10[0], my_dataset, best_features[2], folds = 1000)
print('time taken to process: {}'.format(time() - t0))
print('\n')
print('testing adaboost with 13 variables:')
t0 = time()
test_classifier(best_estimators_13[2], my_dataset, best_features[5], folds = 1000)
print('time taken to process: {}'.format(time() - t0))
print('\n')
print('testing gaussian naive bayes with 9 variables:')
t0 = time()
test_classifier(best_estimators_9[5], my_dataset, best_features[1], folds = 1000)
print('time taken to process: {}'.format(time() - t0))
print('\n')
### final winner
clf = best_estimators_9[5]
features_list = best_features[1]
print('final classifier is: ')
test_classifier(best_estimators_9[5], my_dataset, best_features[1], folds = 1000)
### dump classifer and data
from tester import dump_classifier_and_data
dump_classifier_and_data(clf, my_dataset, features_list)
<file_sep># Enron_fraud_poi_detector
Detect who may be a person of interest of the enron fraud
| 3dffde29df0ec5a26fbf479fc2b67349d24de413 | [
"Markdown",
"Python"
] | 2 | Python | jk6653284/Enron_fraud_poi_detector | 66fbe37a2bb312edcd5cda5e971c33277f1e9067 | 0dd9ebd76c517e093232f66dfda3e3cdbc9de668 | |
refs/heads/master | <file_sep>var _ = require('lodash');
var DataActionCreators = require('../actions/DataActionCreators');
var DataStore = require('../stores/DataStore.js');
module.exports = {
getFeatures: () => {
var fetch = ['c_DueDate', 'Name', 'Owner', 'ScheduleState'];
Ext.create('Rally.data.WsapiDataStore', {
limit: Infinity,
model: 'PortfolioItem/Feature',
fetch: fetch
}).load({
callback: (features) => {
_.each(features, (feature) => {
feature.getCollection('UserStories').load({
fetch: fetch,
callback: (stories) => {
var featureData = feature.data;
featureData.UserStories = _.pluck(stories, 'data');
DataActionCreators.receiveFeature(featureData);
},
scope: this
})
}, this);
},
scope: this
});
},
updateField: (id, fieldName, value) => {
console.log('Updating ' + id + ': [' + fieldName + '] ' + value);
return new Promise((resolve, reject) => {
Rally.data.ModelFactory.getModel({
type: 'UserStory',
success: (model) => {
model.load(id, {
fetch: [value],
callback: (record, operation) => {
// record.set(fieldName, value);
record.save({
callback: (result, operation) => {
if (operation.wasSuccessful()) {
resolve();
}
}
});
}
});
}
});
});
}
};<file_sep>/*** @jsx React.DOM */
var _ = require('lodash');
var React = require('react');
var ReactAddons = require('react-addons');
var ListItem = require('./ListItem');
var List = React.createClass({
getInitialState: function() {
return {
expanded: true,
newItem: false
}
},
render: function() {
var panelId = _.uniqueId('panel-');
var uncompletedItems = _.filter(this.props.items, { complete: false });
var completedItems = _.filter(this.props.items, { complete: true });
return (
<div className="list panel-group">
<div className="panel">
<div className="panel-heading" data-toggle="collapse" data-target={ '#' + panelId } onClick={ this.toggleState.bind(this, 'expanded') }>
<h4 className="panel-title">
<span>{ this.props.text }</span>
<span className={ this.getChevronIconClasses() }></span>
</h4>
</div>
<div id={ panelId } className={ this.getPanelClasses() }>
<div className="panel-body">
{ _.map(uncompletedItems, this.createListItemElement) }
{ this.state.newItem ? this.createListItemElement() : this.getAddNewButton() }
</div>
</div>
</div>
</div>
);
},
createListItemElement: function(item, onChangeFn) {
return (
<ListItem
data={ item }
hideAvatars={ this.props.hideAvatars }
onStateChange={ this.props.onStateChange }
hideDates={ this.props.hideDates }
/>
);
},
getChevronIconClasses: function() {
return ReactAddons.classSet({
'icon': true,
'icon-chevron-up': this.state.expanded,
'icon-chevron-down': !this.state.expanded,
'pull-right': true
});
},
getPanelClasses: function() {
return ReactAddons.classSet({
'panel-collapse': true,
'collapse': true,
'in': this.state.expanded
})
},
getAddNewButton: function() {
return (
<button type="button" className="btn btn-default btn-sm add-new" onClick={ this.addNewItem }>
<span className="icon icon-add"></span> Add New
</button>
);
},
addNewItem: function() {
this.toggleState('newItem');
},
toggleState: function(key) {
var newState = {};
newState[key] = !this.state[key];
this.setState(newState);
}
});
module.exports = List;<file_sep>/*** @jsx React.DOM */
var moment = require('moment');
var React = require('react');
var ReactAddons = require('react-addons');
var WSAPI = require('../apis/WSAPI');
var ListItem = React.createClass({
propTypes: {
data: React.PropTypes.object.isRequired,
hideDates: React.PropTypes.bool,
hideAvatars: React.PropTypes.bool
},
getInitialState: function() {
return {
text: this.props.data.text
};
},
getDefaultProps: function() {
return {
data: {}
};
},
onFieldUpdated: function(field, value) {
this.props.onStateChange(this.props.id, field, value);
},
handleChecked: function(e) {
this.onFieldUpdated('complete', e.target.checked);
},
updateText: function(e) {
this.setState({
text: e.target.value
});
},
updateTaskName: function(e) {
WSAPI.updateField(this.props.data.id, 'Name', this.state.text)
.then(this.flairItem);
},
componentDidMount: function () {
if (!this.props.data.text) {
this.refs.input.getDOMNode().focus();
}
},
flairItem: function() {
debugger;
},
getAvatar: function(url) {
var hideAvatarClass = this.props.hideAvatars ? ' hidden' : '';
return (
<div className="avatar">
<span className="icon icon-user" />
</div>
);
},
getDateIcon: function(date) {
return (
<div className="date">
<span className="icon icon-calendar" />
<span className="text">{ date && this.formatDate(date) || 'assign due date' }</span>
</div>
);
},
formatDate: function(date) {
var daysRemaining = moment(date).endOf('day').diff(moment(), 'days');
if (daysRemaining < 0) {
return 'Past Due (' + moment(date).format('l') + ')';
} else if (daysRemaining === 0) {
return 'due Today';
} else if (daysRemaining === 1) {
return 'due Tomorrow';
} else {
return 'due ' + moment(date).format('l');
}
},
render: function() {
var item = this.props.data;
return (
<div className="list-item">
<div className="row">
<label className="checkbox-label col-md-1">
<input className="checkbox" type="checkbox" defaultChecked={ item.complete } onChange={ this.handleChecked } />
</label>
<div className="col-md-10">
<input
className={ "textbox complete-" + item.complete }
value={ this.state.text }
placeholder="New Item"
onChange={ this.updateText }
onBlur={ this.updateTaskName }
ref="input"
/>
</div>
<span className="icon icon-trash tool" />
<span className="icon icon-pencil tool" />
</div>
<div className="row">
<div className="col-md-1" />
<div className="col-md-11">
{ this.getAvatar(item.avatarUrl) }
{ this.getDateIcon(item.date) }
</div>
</div>
</div>
);
}
});
module.exports = ListItem;<file_sep>var AppDispatcher = require('../dispatchers/AppDispatcher');
var EventEmitter = require('events').EventEmitter;
var AppConstants = require('../constants/AppConstants');
var merge = require('react/lib/merge');
var _data = {
items: [{
Name: 'Mock To-Do List',
UserStories: [{
Name: 'Task 0',
c_DueDate: new Date('2015-1-3')
},{
Name: 'Task 1',
c_DueDate: new Date('2015-1-6')
},{
Name: 'Task 2',
c_DueDate: new Date('2015-1-7')
},{
Name: 'Task 3',
c_DueDate: new Date('2020-1-1')
}]
}]
};
var DataStore = merge(EventEmitter.prototype, {
addChangeListener: function(callback) {
this.on(AppConstants.CHANGE_EVENT, callback);
},
removeChangeListener: function(callback) {
this.removeListener(AppConstants.CHANGE_EVENT, callback);
},
emitChange: function() {
this.emit(AppConstants.CHANGE_EVENT);
},
_getListItemData: function(item) {
return {
id: item.ObjectID,
text: item.Name,
complete: item.ScheduleState === 'Accepted',
date: item.c_DueDate
};
},
getListItems: function() {
return _.map(_data.items, function(item) {
var parsedItem = this._getListItemData(item);
parsedItem.items = _.map(item.UserStories, this._getListItemData, this);
return parsedItem;
}, this);
},
dispatcherIndex: AppDispatcher.register(function(payload) {
var action = payload.action;
switch(action.type) {
case AppConstants.ActionTypes.RECEIVE_ITEM:
_data.items.push(action.item);
DataStore.emitChange();
break;
}
})
});
module.exports = DataStore;<file_sep>var gulp = require('gulp');
var sass = require('gulp-sass');
var traceur = require('gulp-traceur');
var browserify = require('gulp-browserify');
var concat = require('gulp-concat');
gulp.task('sass', function () {
gulp.src('src/sass/*.scss')
.pipe(sass())
.pipe(gulp.dest('dist/css'));
});
gulp.task('js', function() {
gulp.src('src/js/index.js')
.pipe(browserify({transform: 'reactify'}))
.pipe(concat('index.js'))
.pipe(traceur())
.pipe(gulp.dest('dist/js'));
});
gulp.task('copy', function() {
gulp.src('src/index.html')
.pipe(gulp.dest('dist'));
});
gulp.task('build', ['sass', 'js', 'copy']);
gulp.task('watch', ['build'], function() {
gulp.watch('src/**/*.*', ['build']);
});
gulp.task('default', ['build']);
<file_sep>/*** @jsx React.DOM */
var React = require('react');
var DataStore = require('../stores/DataStore');
var ActionCreator = require('../actions/DataActionCreators');
var WSAPI = require('../apis/WSAPI');
var List = require('./List');
var App = React.createClass({
componentDidMount: function() {
DataStore.addChangeListener(this._onChange);
Rally.onReady(this._onRallyReady);
},
componentWillUnmount: function() {
DataStore.removeChangeListener(this._onChange);
},
getInitialState: function() {
return {
listItems: []
};
},
_onRallyReady: function() {
WSAPI.getFeatures();
},
_onChange: function() {
this.setState({
listItems: DataStore.getListItems()
});
},
render: function() {
return (
<div className="row">
<div className="col-md-8"></div>
<div className="col-md-4">
{ _.map(this.state.listItems, List) }
</div>
</div>
);
}
});
module.exports = App;
| 5dcd233c2c7743331f4608ca90af011f836faa31 | [
"JavaScript"
] | 6 | JavaScript | kurtharriger/Dinero-Flux | fefa6f576bd721d84c69fd0a4399ba868dc57f36 | cc020d2745cb411b7e2a1ab73cf7c6e52a8ab21a | |
refs/heads/master | <file_sep>#!/bin/bash
export $(cut -d= -f1 $1)
<file_sep>#!/bin/bash
# gen_breakpoints - Creates a list of breakpoints for all functions in an ELF file.
# Input: non-stripped ELF file.
FILE="$1"
nm -C $FILE | egrep ' [TtW] ' > ${FILE}_breakpoints.txt
sed -i -e 's/^/# 0x/' -e 's/\# \(0x[0-9a-f]*\).*/\0\nbreak \*\1/' ${FILE}_breakpoints.txt
mv ${FILE}_breakpoints.txt .
<file_sep>#!/bin/bash
sed -i '/<return>/d' $1
<file_sep>#!/bin/bash
# Create a list of the function names and also a list of breakpoints of these functions to be used in GDB
FILE="$1"
nm $FILE | egrep ' [TW] ' > ${FILE}FunctionIndex
sed -i -e 's/^/0x/' ${FILE}FunctionIndex
nm $FILE | egrep ' [TW] ' | grep -Eo '^[^ ]+' > ${FILE}ListOfBreakpoints
sed -i -e 's/^/break *0x/' ${FILE}ListOfBreakpoints
sed -i '/break/a commands\n continue\n end' ${FILE}ListOfBreakpoints
mv ${FILE}ListOfBreakpoints .
mv ${FILE}FunctionIndex .
<file_sep>#!/bin/bash
function ngp-connect() {
if [ "$#" -eq 0 ] ; then
NGP_IP=10.10.92.63
SSH_PORT=4022
NGP_PW='<PASSWORD>'
else
NGP_IP="$1"
SSH_PORT=4022
NGP_PW='<PASSWORD>'
fi
sshpass -p $NGP_PW ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -oStrictHostKeyChecking=no root@$NGP_IP -p $SSH_PORT
}
function kngp-connect() {
if [ "$#" -eq 0 ] ; then
NGP_IP=10.10.92.63
SSH_PORT=4022
NGP_PW='<PASSWORD>'
else
NGP_IP="$1"
SSH_PORT=4022
NGP_PW='<PASSWORD>'
fi
sshpass -p $NGP_PW ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -oStrictHostKeyChecking=no root@$NGP_IP -p $SSH_PORT
}
function ngp-connect-first() {
if [ "$#" -eq 0 ] ; then
NGP_IP=10.10.92.63
SSH_PORT=4022
NGP_PW='<PASSWORD>'
else
NGP_IP="$1"
SSH_PORT=4022
NGP_PW='<PASSWORD>'
fi
ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -oStrictHostKeyChecking=no root@$NGP_IP -p $SSH_PORT
}
function ngp-cp-to() {
if [ "$#" -eq 2 ] ; then
NGP_IP=10.10.92.63
SSH_PORT=4022
NGP_PW='<PASSWORD>'
FILE="$1"
TO_PATH="$2"
else
NGP_IP="$1"
SSH_PORT=4022
NGP_PW='<PASSWORD>'
FILE="$2"
TO_PATH="$3"
fi
sshpass -p $NGP_PW scp -P $SSH_PORT -oKexAlgorithms=+diffie-hellman-group1-sha1 $FILE root@$NGP_IP:$TO_PATH
}
<file_sep>#!/bin/bash
#insert the continue command afet the break point in order to get a full list of hitten breakpoints
FILE="$1"
sed -i -e 's/break \(\*0x[0-9a-f]*\).*/\0\n commands\ncontinue\n end/' $FILE
<file_sep>clean:
-rm vmlinux*
-rm list*
-rm selected*
-rm kernel_dump
-rm hit*
-rm ../img/gdb.txt
<file_sep>#! /usr/bin/python3
import sys
def has_a_function_of_interest(line, functions_of_interest):
for function in functions_of_interest:
assert(function)
if function in line:
return True
return False
def select_breakpoints(functions_of_interest: list, breakpoints: list):
selected_breakpoints = []
interesting_function_found = False
for i in range(len(breakpoints)):
line = breakpoints[i]
if '#' in line:
if has_a_function_of_interest(line, functions_of_interest):
interesting_function_found = True
selected_breakpoints.append(line + '\n')
elif 'break' in line:
if interesting_function_found:
selected_breakpoints.append(line + '\n')
interesting_function_found = False
return selected_breakpoints
def main(argv):
if len(argv) < 3:
print('Usage ./gen_breakpoints functions_of_interest.txt BREAKPOINTS.txt')
return
if 'functions_of_interest.txt' not in argv[1]:
print('functions_of_interest.txt must be provided before BREAKPOINTS.txt and must have that name')
return
functions_of_interest_file = open(argv[1])
functions_of_interest = functions_of_interest_file.read()
functions_of_interest_file.close()
functions_of_interest = functions_of_interest.split('\n')
functions_of_interest = list(filter(None, functions_of_interest))
breakpoints_file = open(argv[2], 'r')
breakpoints = breakpoints_file.read()
breakpoints_file.close()
breakpoints = breakpoints.split('\n')
selected_breakpoints = select_breakpoints(functions_of_interest, breakpoints)
selected_breakpoints_file = open('selected_breakpoints.txt', 'w')
selected_breakpoints_file.write(''.join(selected_breakpoints))
selected_breakpoints_file.close()
if __name__ == '__main__':
main(sys.argv)
<file_sep>#!/bin/bash
# translate_brakpoints_fcn.sh - takes gdb.txt ("set logging on") and from the addresses of the
# hit functions it looks up the function name in vmlinux_breakpoints.txt
# Input: gdb.txt and file_breakpoints.txt
GDB="$1"
DICT="$2"
ADDR_COL=3
while read line; do
if [[ "$line" == *"??"* ]] ; then
echo "$line" | cut -d " " -f $ADDR_COL >> hit_breakpoints
fi
done < $GDB
#sed -i '$ d' hit_breakpoints # Used to deal with last line in file
while read address; do
while read line; do
if [[ "$line" == *"break"* ]]; then
:
else
if [[ "$line" == *"$address"* ]] ; then
# sed -i -e 's/'$address'/'$line'' $BP
echo "$line" >> list_hit_breakpoints
fi
fi
done < "$DICT"
done < hit_breakpoints
<file_sep>#!/bin/bash
function umg-connect() {
UMG_PW='<PASSWORD>'
if [ "$#" -eq 0 ] ; then
UMG_IP=10.10.92.69
SSH_PORT=4022
else
UMG_IP="$1"
SSH_PORT=4022
fi
sshpass -p $UMG_PW ssh -oStrictHostKeyChecking=no root@$UMG_IP -p $SSH_PORT
}
function umg-connect-first() {
UMG_PW='<PASSWORD>'
if [ "$#" -eq 0 ] ; then
UMG_IP=10.10.92.69
SSH_PORT=4022
else
UMG_IP="$1"
SSH_PORT=4022
fi
ssh -oStrictHostKeyChecking=no root@$UMG_IP -p $SSH_PORT
}
function umg-cp-to() {
UMG_PW='<PASSWORD>'
if [ "$#" -eq 2 ] ; then
UMG_IP=10.10.92.69
SSH_PORT=4022
FILE="$1"
TO_PATH="$2"
else
UMG_IP="$1"
SSH_PORT=4022
FILE="$2"
TO_PATH="$3"
fi
sshpass -p $UMG_PW scp -P $SSH_PORT $FILE root@$UMG_IP:$TO_PATH
}
<file_sep>#!/bin/bash
#
#
#
ctags -R --exclude=tools/testing/* .
<file_sep>#!/bin/bash
# set_disable_once.sh - Takes a list of breakpoints and disables every breakpoint once it is hit
# Input: list of breakpoints already in gdb format
FILE="$1"
n=0
sed -i -e 's/break \(\*0x[0-9a-f]*\).*/\0\n commands\ndisable\ncontinue\n end/' $FILE
while read line; do
string="disable"
if [[ "$line" == "$string" ]] ; then
n=$((++n))
echo "$line" | sed -e 's/disable/disable '$n'/' >> selected_breakpoints_commands
else
echo "$line" >> selected_breakpoints_commands
fi
done < $FILE
<file_sep>#!/bin/bash
#
#
#
# Usage: sudo ./do_all.sh vmlinux functions_of_interest.txt (yes) - Args inside () are optional
if [ "$(id -u)" != "0" ]; then
echo "This script must be run as root" 1>&2
exit 1
fi
FILE="$1" # usually vmlinux in this script, but can also apply to any non-stripped ELF inside a virtual disk
LIST="$2" # functions_of_insterest.txt - Must be a file with this exact name with the function names
DISABLE="$3" # Yes if you want to set all the breakpoints to automatic mode
if [ "$#" -eq 3 ] ; then
virt-copy-out -a ../alpine.qcow /root/lisha-dev/linux-3.18.20/${FILE} .
echo "Got File From Virtual Disk"
if [ -f "$FILE" ]; then
echo "Generating Breakpoints"
./gen_breakpoints.sh $FILE
echo "Filtering Breakpoints"
./gen_breakpoints.py $LIST ${FILE}_breakpoints.txt
if [[ "$DISABLE" == "yes" ]] ; then
echo "Adding Commands"
./set_disable_once.sh selected_breakpoints.txt
fi
echo "Generating Object Dump"
objdump -S $FILE > objdump_list
fi
fi
<file_sep>#!/bin/bash
printf "rbock:\n"
fortune
printf "\n\nnaka:\n"
fortune
printf "\n\ngfdamasio:\n"
fortune
printf "\n\nrafascar:\n"
fortune
printf "\n\nmeurer:\n"
fortune
printf "\n\narthur:\n"
fortune
printf "\n\nzeinacio:\n"
fortune
<file_sep>#!/usr/bin/python3
import sys
import binascii
def crc32(buf):
"""
Generates the CRC32 for a given buffer
:param buf: Bytes to be used when generating the checksum.
:type buf: bytes
:return: 4 bytes Big endian of the generated crc
:rtype: bytes
"""
return binascii.crc32(buf).to_bytes(4, byteorder='big', signed=False)
def add_crc32_to_file(path):
"""
Generates the crc32 of the given file and appends to the end of it.
:param path: Valid file path.
:type path: str
"""
with open(path, 'rb+') as file:
buf = file.read()
print("CALCULATED CRC IS:", crc32(buf))
file.write(crc32(buf))
if __name__ == "__main__":
if len(sys.argv) -1 < 1:
print("Wrong args")
sys.exit(1)
else:
add_crc32_to_file(sys.argv[1])
sys.exit(0)
<file_sep>#!/usr/bin/python3
# -*- coding: utf-8 -*-
"""
Module Description:
Example:
Todo:
*Bot para avisar quando der 8 horas
*Bot para avisar quando deu horário do almoço
*Bot para avisar caso não tenha uma hora de intervalo durante o dia
"""
__author__ = "<NAME>"
__email__ = "<EMAIL>"
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import sys
import time
from datetime import datetime
from datetime import date
import calendar
import math
class bcolors:
RED = "\033[1;31m"
BLUE = "\033[1;34m"
CYAN = "\033[1;36m"
GREEN = "\033[0;32m"
YELLOW = "\033[1;33m"
RESET = "\033[0;0m"
BOLD = "\033[;1m"
REVERSE = "\033[;7m"
B_YELLOW = "\033[0;43m"
B_BLACK = "\033[0;40m"
BLACK = "\033[0;30m"
def check_work_regular(work_intervals):
for interval in work_intervals:
if interval > 360:
print("WORK TIME FOR DAY IS IRREGULAR, WORKED MORE THAN 6 STRAIGHT HOURS")
return False
else:
return True
def check_pause_regular(pause_intervals):
had_lunch_interval = False
for interval in pause_intervals:
if interval >= 60:
had_lunch_interval = True
return had_lunch_interval
def check_regular(work_intervals, pause_intervals):
if sum(work_intervals) > 360:
work = check_work_regular(work_intervals)
pause = check_pause_regular(pause_intervals)
return work and pause
elif sum(work_intervals) == 0:
return None
else:
return True
def get_work_intervals(time_list):
work_intervals = []
time_stamps = len(time_list)
time_list = turn_into_datetime(time_list)
if time_stamps == 0:
return work_intervals
elif time_stamps % 2 == 0:
for i in range(0, time_stamps, 2):
if i < time_stamps:
work_intervals.append((time_list[i + 1] - time_list[i]).seconds / 60)
elif time_stamps % 2 == 1:
for i in range(0, time_stamps, 2):
if i + 1 < time_stamps:
work_intervals.append((time_list[i + 1] - time_list[i]).seconds / 60)
else:
now = datetime.today().strftime("%H:%M")
now = turn_into_datetime(now)
work_intervals.append((now - time_list[i]).seconds / 60)
return work_intervals
def get_pause_intervals(time_list):
pause_intervals = []
time_stamps = len(time_list)
time_list = turn_into_datetime(time_list)
if time_stamps <=2:
return pause_intervals
pauses = math.ceil(time_stamps / 2)
for i in range(0, pauses, 2):
pause_intervals.append((time_list[i + 2] - time_list[i + 1]).seconds / 60)
return pause_intervals
def turn_into_datetime(times):
if type(times) is list:
time_list = []
for item in times:
item = datetime.strptime(item, '%H:%M')
time_list.append(item)
return time_list
else:
times = datetime.strptime(times, '%H:%M')
return times
def get_work_time_today(time_list):
work_intervals = get_work_intervals(time_list)
work_minutes_today = sum(work_intervals)
return work_minutes_today
def get_pause_time_today(time_list):
pause_intervals = get_pause_intervals(time_list)
pause_minutes_today = sum(pause_intervals)
return pause_minutes_today
def get_extra_hours(overview_table):
for row in overview_table.splitlines():
if 'SALDO' in row:
extra_hours = row.split()[1]
return extra_hours
return "Not Found"
def get_list_of_dates(year, month):
days_in_month = calendar.monthrange(year, month)[1]
dates = [date(year, month, day) for day in range(1, days_in_month + 1)]
dates_str_list = []
for item in dates:
dates_str_list.append(item.strftime("%d/%m/%Y"))
return dates_str_list
def login_and_get_info():
# browser = webdriver.Firefox()
browser = webdriver.PhantomJS()
browser.get('https://www.ahgora.com.br/externo/index/empresakhomp')
assert ':: Ahgora Sistemas ::' in browser.title
form = browser.find_element_by_id('boxLogin')
elem = form.find_element_by_id('matricula') # Find the search box
elem.send_keys('305' + Keys.TAB)
elem = browser.find_element_by_id('senha') # Find the search box
elem.send_keys('1226' + Keys.RETURN)
time.sleep(4)
print("Logged in as:")
elems = browser.find_elements_by_xpath("//div[@class='col-xs-12 col-sm-9']/dl/dd")
print(elems[0].text)
browser.find_element_by_id('espelho_ponto_icon').click()
time.sleep(5)
elem = browser.find_element_by_id('titulo_mes')
tables = browser.find_elements_by_xpath("//tbody")
overview_table = tables[0].text
time_table = tables[1].text
time.sleep(1)
tables = [overview_table, time_table]
browser.quit()
return tables
def get_time_list(time_table, date_of_interest):
time_list = []
for item in time_table.splitlines():
if date_of_interest in item:
if "KHOMP BATIDAS - KHOMP BATIDAS" in item:
table_list = item.split("KHOMP BATIDAS - KHOMP BATIDAS")[1]
table_list = table_list.split(" ")
table_list.pop(0)
for item in table_list:
if item == "Horas" or item == "Feriado:":
break
elif item == "Banco":
break
time_list.append(item.replace(",", ""))
else:
table_list = []
return time_list
def main():
curr_year = datetime.today().year
curr_month = datetime.today().month
list_of_dates = get_list_of_dates(curr_year, curr_month)
today_str = datetime.today().strftime("%d/%m/%Y")
tables = login_and_get_info()
overview_table = tables[0]
time_table = tables[1]
print(bcolors.CYAN + "--------------------------------------------------")
print("| DATE | WORK TIME | PAUSE TIME | STATUS |")
print("--------------------------------------------------" + bcolors.RESET)
for day in list_of_dates:
time_list = get_time_list(time_table, day)
work_time = get_work_time_today(time_list)
pause_time = get_pause_time_today(time_list)
work_hours = int(work_time / 60)
work_minutes = int(work_time % 60)
pause_hours = int(pause_time / 60)
pause_minutes = int(pause_time % 60)
work_intervals = get_work_intervals(time_list)
pause_intervals = get_pause_intervals(time_list)
ok_status = check_regular(work_intervals, pause_intervals)
if ok_status:
ok_status = bcolors.GREEN + str(ok_status) + bcolors.RESET
elif ok_status is None:
pass
elif not ok_status:
ok_status = bcolors.RED + str(ok_status) + bcolors.RESET
if day == today_str:
day = bcolors.YELLOW + day + bcolors.RESET
print("| %s | %02d:%02dh | %02d:%02dh | %s |" % (day, work_hours, work_minutes, pause_hours, pause_minutes, ok_status))
if day == today_str:
sys.stdout.write(bcolors.RESET)
extra_hours = get_extra_hours(overview_table)
print(bcolors.CYAN + "--------------------------------------------------")
print("| You have in total %sh extra hours |" %(extra_hours))
print("--------------------------------------------------" + bcolors.RESET)
if __name__ == "__main__":
main()
<file_sep>#!/bin/bash
# Generates the files used for debugging the kernel
# The last argument is optional - if set to yes disables the breakpoints when
# they are hit
#
# Usage: ./gen_debug vmlinux functions_of_interest.txt (yes)
FILE="$1" # Target ELF, in our case is vmlinux
LIST="$2" # functions_of_interest.txt - Must be the file with this exact name
DISABLE="$3" # yes, if the user wants to disable all of the breakpoints when hit
# which contains parts of function names that will be filtered
if [ "$#" -ge 2 ] ; then
echo "Generating the Breakpoints from ELF"
./gen_breakpoints.sh $FILE
echo "Filtering functions from file"
./gen_breakpoints.py $LIST vmlinux_breakpoints.txt
echo "Generating Object Dump from ELF"
objdump -S $FILE > kernel_dump
if [ "$#" -eq 3 ] ; then
if [[ "$DISABLE" == "yes" ]] ; then
echo "Adding Commands to disable breakpoints after hit"
./set_disable_once.sh selected_breakpoints.txt
fi
fi
fi
<file_sep>#!/bin/bash
#
#
#
if [ "$#" -eq 0 ] || [ "$#" -gt 2 ] ; then
echo Wrong Usage Dummy
else
if [ "$#" -ge 2 ] ; then
DIR="$1"
PATTERN="$2"
grep -rnw $DIR -i -E -e $PATTERN;
fi
if [ "$#" -eq 1 ] ; then
PATTERN="$1"
grep -rnw ./ -i -E -e $1;
fi
fi
| f9f38c341f84fc19875fa0e6bbea6ec6c5b7d665 | [
"Python",
"Makefile",
"Shell"
] | 18 | Shell | rsmeurer0/scripts | aed84a4f84aea66a58dcf96e0bcb11b2f04bc14c | 11aead652ffabd9c35f4c561ea4c4fdfae963909 | |
refs/heads/master | <file_sep>class Chunk(object):
'''
Class used to store and manage generated chunk data/metadata
'''
def __init__(self,Schema,chunk_id,cellcount,coordinates,attributes):
self.schema = Schema
self.chunk_id = chunk_id
self.coordinates = coordinates
self.attributes = attributes
self.cellcount = cellcount
<file_sep>from scidb_attribute import ScidbAttribute
from scidb_dimension import ScidbDimension
import math
class ScidbSchema:
'''
Class used to store a parsed SciDB schema.
'''
def __init__(self, name, attributes, dimensions):
'''
Arguments:
name -- name of the array
attributes -- list of ScidbAttribute objects
dimensions -- list of ScidbDimension objects
'''
self.name = ""
self.attributes = []
self.dimensions = []
if name is not None:
self.name = name
if (attributes is not None) and (len(attributes) > 0):
self.attributes = attributes
if (dimensions is not None) and (len(dimensions) > 0):
self.dimensions = dimensions
def compute_dimid(self,chunk_id,cell_id):
'''
Given a chunk id and local cell id for the chunk,
this method uses the schema definition to generate proper dimension id's for the
cell.
Arguments:
chunk_id -- a single integer representing the location of the chunk.
cell_id -- a single integer representing the location of the cell within the given chunk
Returns:
An integer array of length equal to the number of dimensions in the schema
Note: I assume the first dimension is most significant, and last dimension least significant
'''
numdims = len(self.dimensions)
base_index = [0] * numdims
offset_index = [0] * numdims
chunksize = self.compute_chunksize()
totalchunks = self.compute_totalchunks()
range_starts = []
base_widths = []
widths = []
for dim in self.dimensions:
chunks = math.ceil((1.0*dim.range_end - dim.range_start + 1) / dim.chunk_width)
base_widths.append(chunks) # chunks along this dimension
widths.append(dim.chunk_width)
range_starts.append(dim.range_start)
if numdims > 1:
for i,base_width in enumerate(base_widths[:numdims-1]):
totalchunks /= base_width
while chunk_id >= totalchunks:
chunk_id -= totalchunks
base_index[i] += 1
base_index[i] *= widths[i] # want the logical index, not chunk index
for i,width in enumerate(widths[:numdims-1]):
chunksize /= width
while cell_id >= chunksize:
cell_id -= chunksize
offset_index[i] += 1
offset_index[i] += base_index[i] + range_starts[i]# compute final index for this dim
#final index for last dim
base_index[numdims-1] = chunk_id * widths[numdims-1]
offset_index[numdims-1] = cell_id + base_index[numdims-1] + range_starts[numdims - 1]
return offset_index
def compute_chunksize(self):
'''
Multiplies all chunk widths together to get the logical size of a single chunk in the schema
'''
chunksize = 1
for dim in self.dimensions:
chunksize *= dim.chunk_width
return chunksize
def compute_totalchunks(self):
'''
Computes the total number of chunks created in the schema by computing number of chunks along
each dimension and multiplying them together.
'''
totalchunks = 1
for dim in self.dimensions: # assume these are integers
cw = dim.chunk_width
rs = dim.range_start
re = dim.range_end
dimrange = re - rs + 1
numchunks = math.ceil(dimrange / cw)
if numchunks > 0:
totalchunks *= numchunks
return int(totalchunks)
@staticmethod
def parse_schema(schema_def):
'''
Method to parse a SciDB schema definition. Dimensions are assumed to be the default SciDB
datatype of int64.
Arguments:
schema_def -- string representing a SciDB schema definiton
Returns:
tuple containing the name, list of attributes, and list of dimensions represented in schema_def
Example:
sdef = "array<attribute1:double>[dimension1=1:10,10,0,dimension2=1:10,10,0]"
(name,attributes,dimensions) = Schema.parse(sdef)
'''
a1 = schema_def.index('<')
a2 = schema_def.index('>')
d1 = schema_def.index('[')
d2 = schema_def.index(']')
name = schema_def[:a1]
attr_string = schema_def[a1+1:a2] # want to exclude '<'
dim_string = schema_def[d1+1:d2] # want to exclude '['
attributes = ScidbSchema.parse_attributes(attr_string)
dimensions = ScidbSchema.parse_dimensions(dim_string)
return (name,attributes,dimensions)
@staticmethod
def parse_attributes(attr_string):
'''
Turns a SciDB description of attributes into a list of ScidbAttribute objects
Arguments:
attr_string -- string representing attributes from a SciDB schema definition
*without* '<' and '>'
Returns:
A list of ScidbAttribute objects
'''
attribute_list = []
#split on ','
attrs = attr_string.split(',')
#split each token on ':' for (name,dtype)
for attr in attrs:
pair = attr.split(':')
if len(pair) == 2: # there should only be 2 items here
name = pair[0]
dtype = pair[1]
attribute_list.append(ScidbAttribute(name,dtype))
else:
raise Exception("malformed attribute:\""+attr+"\"")
return attribute_list
@staticmethod
def parse_dimensions(dim_string):
'''
Turns a SciDB description of dimensions into a list of ScidbDimension objects
Arguments:
dim_string -- string representing dimensions from a SciDB schema definition
*without* '[' and ']'
Returns:
A list of ScidbDimension objects
'''
dimension_list = []
#split on ','
dims = dim_string.split(',')
if (len(dims) % 3) != 0:
raise Exception("Malformed dimension description. \
Incorrect number of parameters per dimension: \""+dim_string+"\"")
temp = None
#traverse every 3 tokens (name+range,chunk width, chunk overlap)
for i,dim in enumerate(dims):
i = i % 3
if i == 0: # name and dimension range
temp = ScidbDimension(None,None,None,None,None,None)
temp.dtype = "int64"
#name+range
nar = dim.split('=')
if len(nar) == 2: # name and range only
name = nar[0]
if len(name) != 0:
temp.name = name
else: # name is empty
raise Exception("Malformed dimension description. No dimension name:\""+dim+"\"")
dim_range = nar[1].split(':')
if (len(dim_range) == 2) and (len(dim_range[0]) > 0) and (len(dim_range[1]) > 0):
# range start and range end only
temp.range_start = int(dim_range[0])
temp.range_end = int(dim_range[1])
else: # split for dimension range didn't work
raise Exception("Malformed dimension description. Incorrect range:\""+dim+"\"")
else: # split on '=' for name/range didn't work
raise Exception("Malformed dimension description. \
Typo with name/dimension range:\""+dim+"\"")
elif i == 1: # chunk width
if len(dim) > 0:
temp.chunk_width = int(dim)
else:
raise Exception("Malformed dimension description. No chunk width.")
else: # chunk overlap
if len(dim) > 0:
temp.chunk_overlap = int(dim)
dimension_list.append(temp)
else:
raise Exception("Malformed dimension description. No chunk overlap.")
return dimension_list
<file_sep>import os
import numpy as np
offset = 0
offsetB = 0
def file_setup(Schema,aorb='A',path_prefix=''):
dim_handles = []
attr_handles = []
chunkmap_handle = None
path = os.path.join(path_prefix,Schema.name+aorb)
try: # make the directory for the data
os.makedirs(path)
except OSError:
if not os.path.isdir(path):
raise
numdims = len(Schema.dimensions)
for i,dim in enumerate(Schema.dimensions):
f = os.path.join(path,str(i)+'.chunk')
dim_handles.append(open(f,'w'))
for i,attr in enumerate(Schema.attributes):
f = os.path.join(path,str(i+numdims)+'.chunk')
attr_handles.append(open(f,'w'))
f = os.path.join(path,'chunkmap')
chunkmap_handle = open(f,'w')
return (dim_handles,attr_handles,chunkmap_handle)
def close_handle(handle):
'''
Closes a single file handle
'''
handle.close()
def close_handles(handles):
'''
Closes a list of file handles
'''
for i in range(len(handles)):
handles[i].close()
def write_dimvals(chunk,dim_handles,chunkmap_handle,aorb='A'):
global offset
global offsetB
chunk_id = chunk.chunk_id
coords = chunk.coordinates
#coords contains 1 list for each nonempty cell of length # dims
for coord in coords:
for i,handle in enumerate(dim_handles):
handle.write(str(coord[i]))
handle.write('\n')
o = offset
if aorb == 'B':
o = offsetB
chunkmap_handle.write(','.join([str(chunk_id),str(o),str(chunk.cellcount)]))
chunkmap_handle.write('\n')
# do not close handles!!!
if aorb == 'A':
offset += chunk.cellcount
else:
offsetB += chunk.cellcount
def reset_offset(aorb='A'):
global offset
if aorb == 'B':
offsetB = 0
else:
offset = 0
def write_dimvals_binary(chunk,dim_handles,chunkmap_handle):
global offset
chunk_id = chunk.chunk_id
coords = np.array(chunk.coordinates)
coords = coords.T # take the transpose
#write to dimension files
for i,handle in enumerate(dim_handles): #each row of coords is all values for dim i
handle.write(coords[i].tostring())
# do not close handles!!!
def write_attrvals_binary(chunk,attr_handles):
chunk_id = chunk.chunk_id
attrvals = np.array(chunk.attributes)
# attrvals contains 1 list for each attribute of length cellcount
for i,handle in enumerate(attr_handles):
handle.write(attrvals[i].tostring())
# do not close handles!
def write_attrvals(chunk,attr_handles):
chunk_id = chunk.chunk_id
attrvals = chunk.attributes
# attrvals contains 1 list for each attribute of length cellcount
for i,handle in enumerate(attr_handles):
for attr in attrvals[i]:
handle.write(str(attr))
handle.write('\n')
# do not write to chunkmap!
# do not close handles!
def write_chunk(chunk,dim_handles,attr_handles,chunkmap_handle,aorb='A'):
#print "writing chunk"
write_dimvals(chunk,dim_handles,chunkmap_handle,aorb=aorb)
write_attrvals(chunk,attr_handles)
def write_chunk_binary(chunk,dim_handles,attr_handles,chunkmap_handle):
#print "writing chunk"
write_dimvals_binary(chunk,dim_handles,chunkmap_handle)
write_attrvals_binary(chunk,attr_handles)
<file_sep>import math
import random
import numpy as np
c = 0.0
first = True
c2 = 0.0
carr = None
def zipf(alpha,n):
global c
global first
if first:
c = 0.0
for i in range(1,n+1):
c += 1.0 / math.pow(i,alpha)
c = 1.0 / c
first = False
z = random.random()
while z == 0.0: # random excludes 1.0 by default
z = random.random()
sum_prob = 0
zipf_value = 0
for i in range(1,n+1):
sum_prob += c / math.pow(i,alpha)
if sum_prob >= z:
zipf_value = i
break
if (zipf_value < 1) or (zipf_value > n):
raise Exception("Zipf value out of bounds")
return zipf_value
def zipf_variable(alpha,n):
return lambda: zipf2(alpha,n)
#broken
def zipf2(alpha,n):
global carr
global c2
if carr is None:
print "carr is None, calculating..."
carr = np.zeros(n)
temp = np.array(range(1,n+1)).astype(float)
temp = np.power(temp,alpha)
temp = 1.0 / temp
c2 = 1.0 / np.sum(temp)
#print "c2:",c2,",temp:",temp
temp = c2 * temp
carr[0] = temp[0]
for i in range(1,n):
carr[i] = carr[i-1] + temp[i]
#print "carr["+str(i)+"]:",carr[i]
print "done calculating carr"
z = np.random.uniform(.0000001,1)
for i in range(1,n+1):
if carr[i-1] >= z:
return i
<file_sep>from scidb_attribute import *
from scidb_dimension import *
from scidb_schema import *
<file_sep>from partition import Partition
class RangePartition(Partition):
def __init__(self,Schema,range_starts,range_widths):
for i in range(len(range_starts)):
for j in range(len(range_starts[i])):
range_starts[i][j] = int(range_starts[i][j])
for i in range(len(range_widths)):
for j in range(len(range_widths[i])):
range_widths[i][j] = int(range_widths[i][j])
super(RangePartition,self).__init__(Schema,range_starts,range_widths)
def get_chunks(self,node_id):
'''
Returns the list of chunk id's associated with the given node
using this partitioning scheme
'''
node_chunks = []
if self.nodecount <= node_id: # this layout usees fewer nodes
return node_chunks
range_start = self.range_starts[node_id]
range_width = self.range_widths[node_id]
range_end = [0] * len(range_start)
for i in range(len(range_start)):
range_end[i] = range_start[i] + range_width[i] - 1
totalchunks = self.Schema.compute_totalchunks()
#chunksize = self.Schema.compute_chunksize
numdims = len(self.Schema.dimensions)
for i in range(totalchunks):
coord = self.Schema.compute_dimid(i,0)
#print "chunk:",i,",coord:",coord,",range start:",range_start,",range end:",range_end
add = True
for dim in range(numdims):
if (coord[dim] < range_start[dim]) or (coord[dim] > range_end[dim]):
add = False
break
if add:
#print "adding chunk",i
node_chunks.append(i)
return node_chunks
def compute_overlap(self,other,node_id):
'''
Returns the list of chunk id's that are shared between this partitioning scheme and another
partitioning scheme for the given node
Arguments:
other -- an instance of the Partition class to compare with
node_id -- the node to compare for overlap between the partitioning schemes
'''
overlap = []
non_overlap1 = [] # only need to keep track of this one
non_overlap2 = [] # just tracking this to be thorough
node1_chunks = self.get_chunks(node_id)
node2_chunks = other.get_chunks(node_id)
len1 = len(node1_chunks)
len2 = len(node2_chunks)
i1 = 0
i2 = 0
while (i1 < len1) and (i2 < len2):
val1 = node1_chunks[i1]
val2 = node2_chunks[i2]
if val1 == val2:
overlap.append(val1)
i1 += 1
i2 += 1
elif val1 < val2:
i1 += 1
non_overlap1.append(val1)
else:
i2 += 1
non_overlap2.append(val2)
while i1 < len1:
val1 = node1_chunks[i1]
non_overlap1.append(val1)
i1 += 1
while i2 < len2:
val2 = node2_chunks[i2]
non_overlap2.append(val2)
i2 += 1
return (overlap,non_overlap1,non_overlap2)
@staticmethod
def parse(partition_string):
#split on |
node_strings = partition_string.split('|')
numnodes = len(node_strings)
range_starts = []
range_widths = []
#for each item (one for each node):
for node_string in node_strings:
# split on :, first is node name, second is starts and ranges
nar = node_string.split(':')
node_id = int(nar[0])
range_string = nar[1]
# split second on ',' and count the items
range_items = range_string.split(',')
# if the number of items is not even, this is wrong
lri = len(range_items)
if (lri % 2) != 0:
raise Exception("malformed ranges for node "+nar[0]+": "+range_string)
# store the first half as range_starts
half = lri/2 # this should just work bc it's even
range_starts.append(range_items[:half])
# store the second half as range_widths
range_widths.append(range_items[half:])
return (range_starts,range_widths)
<file_sep>import schema_parser as parser
from zipf import zipf_variable
import math
import random
import io # located in io.py
from chunk import Chunk
from partition import Partition #do I need this?
from range_partition import RangePartition
import numpy as np
schema_defs = [
"array1<attr1:double,attr2:int64>[dim1=1:200000,1000,0,dim2=1:200000,1000,0]"
,"array5<attr1:int64,attr2:int64>[dim1=1:100,25,0,dim2=1:100,25,0]"
,"array6<attr1:double,attr2:int64>[dim1=1:1000,50,0,dim2=1:1000,50,0]"
#,"array2<attr1:double,attr2:int64>[dim1=1:10,5,0,dim2=0:9,5,0]"
#,"array4<attr1:double,attr2:int64>[dim1=0:9,5,0,dim2=0:9,5,0]"
,"array3<attr1:int64>[dim1=1:100,10,0,dim2=1:100,10,0]"
]
partition_defs = {
# quarters
'quarters':"0:1,1,100000,100000\
|2:1,100001,100000,100000\
|1:100001,1,100000,100000\
|3:100001,100001,100000,100000"
# rows
,'rows':"0:1,1,50000,200000\
|1:50001,1,50000,200000\
|2:100001,1,50000,200000\
|3:150001,1,50000,200000"
# quarters
,'quarters2':"0:1,1,50,50\
|2:1,51,50,50\
|1:51,1,50,50\
|3:51,51,50,50"
# rows
,'rows2':"0:1,1,25,100\
|1:26,1,25,100\
|2:51,1,25,100\
|3:76,1,25,100"
,'quarters3':"0:1,1,500,500\
|2:1,501,500,500\
|1:501,1,500,500\
|3:501,501,500,500"
# rows
,'rows3':"0:1,1,250,1000\
|1:251,1,250,1000\
|2:501,1,250,1000\
|3:751,1,250,1000"
# quarters
,'quarters4':"0:1,1,50,50\
|2:1,51,50,50\
|1:51,1,50,50\
|3:51,51,50,50"
# rows
,'rows4':"0:1,1,30,100\
|1:31,1,20,100\
|2:51,1,30,100\
|3:81,1,20,100"
}
#partition_defs = [
##modis quarters
#"0:0,-1800000,-900000,20161,1800000,900000\
#|2:0,-1800000,0,20161,1800000,900001\
#|1:0,0,-900000,20161,1800001,900000\
#|3:0,0,0,20161,1800001,900001"
##modis rows
#,"0:0,-1800000,-900000,20161,3600001,450000\
#|1:0,-1800000,-450000,20161,3600001,450000\
#|2:0,-1800000,0,20161,3600001,450000\
#|3:0,-1800000,450000,20161,3600001,450001"
#]
#print "name:",name
#print "attributes:",attributes
#print "dimensions:",dimensions
DEFAULT_ALPHA = 1.
DEFAULT_CHUNKSIZE = 100
DEFAULT_CUTOFF = .8
min_chunksize = .05
max_chunksize = .5
z_range = 10
join_alignment = .5
DEFAULT_ZIPF = zipf_variable(DEFAULT_ALPHA,DEFAULT_CHUNKSIZE)
##############################
'''
myschema = schema_defs[0]
myrange1 = 'quarters'
myrange2 = 'rows'
'''
'''
myschema = schema_defs[1]
myrange1 = 'quarters2'
myrange2 = 'rows2'
'''
'''
myschema = schema_defs[2]
myrange1 = 'quarters3'
myrange2 = 'rows3'
'''
myschema = schema_defs[3]
myrange1 = 'quarters4'
myrange2 = 'rows4'
##############################
def get_hotcold_cellcounts(totalchunks,n,distribution=DEFAULT_ZIPF):
hotchunks = []
coldchunks = []
cutoff = DEFAULT_CUTOFF * n
for i in range(totalchunks):
val = distribution()
if val >= cutoff:
hotchunks.append(val)
else:
coldchunks.append(val)
return (hotchunks,coldchunks)
def build_ABchunks(Schema,chunk_id,countA,countB,chunksize,overlap=1.):
maxcount = max(countA,countB)
mincount = min(countA,countB)
# build the maxchunk from scratch
maxchunk = build_chunk(Schema,chunk_id,maxcount,chunksize)
if maxcount == mincount: # they are the same, so stop here
return (maxchunk,maxchunk)
attrlen = len(Schema.attributes)
minchunk = Chunk(Schema,chunk_id,mincount,[],[[]]*attrlen) # empty chunk for now
minitems = choose_randk(range(maxcount),mincount) # copy random subset of the larger chunk
# copy the selected cells from maxchunk to minchunk
for i in minitems:
minchunk.coordinates.append(maxchunk.coordinates[i])
for j in range(attrlen):
minchunk.attributes[j].append(maxchunk.attributes[j][i])
if countA > countB:
chunkA = maxchunk
chunkB = minchunk
else:
chunkA = minchunk
chunkB = maxchunk
return (chunkA,chunkB)
def build_chunk(Schema,chunk_id,cellcount,chunksize):
chosen = []
coords = [] # coordinates of nonempty cells
attrvals = [] # attribute values of nonempty cells
chunk = Chunk(Schema,chunk_id,cellcount,[],[]) # empty chunk for now
if chunksize == 1:
return [0]
candidates = range(chunksize)
if cellcount == chunksize:
return candidates
chosen = choose_randk(candidates,cellcount)
#generate dimension coordinates
for i in chosen:
coords.append(Schema.compute_dimid(chunk_id,i))
chunk.coordinates = coords
#generate attribute values
attrvals = generate_attributes(Schema.attributes,cellcount)
chunk.attributes = attrvals
#print "chosen:",chosen
#print "dimensions for cell",chosen[0],"of chunk",chunk_id,":",Schema.compute_dimid(chunk_id,chosen[0])
#print "coords for chunk",chunk_id,":",coords
#print "attributes for chunk",chunk_id,":",attrvals
return chunk
def shuffle_firstk(candidates,k):
'''
shuffles the first k items, and returns the resulting list. this assumes k < len(candidates)
'''
l = len(candidates) - 1
for i in range(k): # shuffle the first k items
x = random.randint(i,l) #should be possible to stay in place
temp = candidates[x]
candidates[x] = candidates[i]
candidates[i] = temp
return candidates #return everything
def choose_randk(candidates,k):
'''
returns a list of k randomly selected items chosen from the given list
'''
l = len(candidates) - 1
for i in range(k): # shuffle the first k items
x = random.randint(i,l) #should be possible to stay in place
temp = candidates[x]
candidates[x] = candidates[i]
candidates[i] = temp
return candidates[:k]
def build_chunks(Schema,cellcounts,chunksize):
for i,cellcount in enumerate(cellcounts):
build_chunk(Schema,i,cellcount,chunksize)
def generate_attributes(attributes,cellcount,shift=3):
result = []
window = math.pow(10,3)
numattrs = len(attributes)
for attr in attributes:
#array of length cellcount for each attribute
x = []
if attr.dtype in ['float','double']:
x = [random.random() * window for j in range(cellcount)]
else: # assume int or uint type
x = [random.randint(1,window) for j in range(cellcount)]
result.append(x)
return result
def map_chunksize(z,minc,maxc,chunksize):
global z_range
maxc = 1. * maxc * chunksize
minc = 1. * minc * chunksize
return math.ceil(1. * z / z_range * (maxc - minc) + minc)
# create schema and partition objects
(name,attributes,dimensions) = parser.ScidbSchema.parse_schema(myschema)
Schema = parser.ScidbSchema(name,attributes,dimensions)
(range_starts,range_widths) = RangePartition.parse(partition_defs[myrange1])
range1 = RangePartition(Schema,range_starts,range_widths)
(range_starts,range_widths) = RangePartition.parse(partition_defs[myrange2])
range2 = RangePartition(Schema,range_starts,range_widths)
numnodes = max(range1.nodecount,range2.nodecount)
overlaps = []
non_overlaps1 = []
non_overlaps2 = []
#compute overlap for all nodes
for i in range(numnodes):
#print "range1 chunks on node "+str(i)+":",range1.get_chunks(i)
#print "range2 chunks on node "+str(i)+":",range2.get_chunks(i)
(overlap,non_overlap1,non_overlap2) = range1.compute_overlap(range2,i)
overlaps.append(overlap)
if len(non_overlap1) > 0:
non_overlaps1.append(non_overlap1)
if len(non_overlap2) > 0:
non_overlaps2.append(non_overlap2)
#print "overlap for node",i,"on range1 and range2:",overlap
#print "non-overlap for node",i,"on range1:",non_overlap1
#print "non-overlap for node"+str(i)+" on range2:",non_overlap2
non_overlaps = None
if len(non_overlaps1) < len(non_overlaps2):
non_overlaps = non_overlaps2
else:
non_overlaps = non_overlaps1
total_regions = len(overlaps) + len(non_overlaps)
print total_regions,"total regions of overlap and non-overlap"
#generate the cellcounts
io.reset_offset()
io.reset_offset(aorb='B')
# prepare file handles
(dim_handlesA,attr_handlesA,chunkmap_handleA) = io.file_setup(Schema,path_prefix='data')
(dim_handlesB,attr_handlesB,chunkmap_handleB) = io.file_setup(Schema,aorb='B',path_prefix='data')
totalchunks = Schema.compute_totalchunks()
print "total chunks in",Schema.name,":",totalchunks
chunksize = Schema.compute_chunksize()
print "chunk size of",Schema.name,":",chunksize
#get zipf distribution ready
z = zipf_variable(DEFAULT_ALPHA,z_range)
#generate cellcounts for each chunk
(hotchunks,coldchunks) = get_hotcold_cellcounts(totalchunks,z_range,distribution=z)
numhot = len(hotchunks)
numhot_perregion = numhot / total_regions
hotcounts = [numhot_perregion] * total_regions
#fraction of hot chunks *not* aligned in B
numnotaligned = int(1. * numhot * join_alignment)
# divided evenly across all regions
numnotaligned_perregion = numnotaligned / total_regions
nonaligncounts = [numnotaligned_perregion] * total_regions
remainder = numhot - total_regions * numhot_perregion
remainder_nonaligned = numnotaligned - numnotaligned_perregion * total_regions
for i in range(total_regions):
if remainder > 0:
hotcounts[i] +=1
remainder -= 1
if remainder_nonaligned > 0:
nonaligncounts[i] +=1
remainder_nonaligned -= 1
print "total hot chunks: ",numhot
print "hot chunks per region:",hotcounts
print "total chunks *not* aligned in B:",numnotaligned
print "non-aligned chunks per region:",nonaligncounts
# put all these regions together, doesn't matter because they don't overlap
regions = overlaps + non_overlaps
hot_indexA = 0
cold_indexA = 0
hot_indexB = 0
cold_indexB = 0
cellcountsA = [0] * totalchunks # cell counts for all chunks
cellcountsB = [0] * totalchunks # cell counts for all chunks
#Build array A
#arrange cellcounts per region:
for i,region in enumerate(regions):
#this is a list
#pick k chunks from this region to be hot
h = hotcounts[i]
x = nonaligncounts[i]
# can actually shuffle first k+x elements here, where x is # hotchunks in array B that should
# *not* align with hot chunks in array A for this region
k = shuffle_firstk(region,h+x) #list of chunk indexes with first k shuffled
regions[i] = k # save this for later for use with array B
#print "k:",k[:100]
#first k are made hot in A
for j in range(h):
cellcountsA[k[j]] = hotchunks[hot_indexA] #the chunk at index k[j] is now hot
hot_indexA += 1
#the rest are cold in A
for j in range(h,len(k)):
cellcountsA[k[j]] = coldchunks[cold_indexA] #the chunk at index k[j] is now cold
cold_indexA += 1
for j in (range(h-x)+range(h,h+x)):
cellcountsB[k[j]] = hotchunks[hot_indexB]
hot_indexB += 1
for j in (range(h-x,h)+range(h+x,len(k))):
cellcountsB[k[j]] = coldchunks[cold_indexB]
cold_indexB += 1
if (hot_indexA != len(hotchunks)) or (cold_indexA != len(coldchunks)):
print "hot_indexA:",hot_indexA,",hotchunk count:",len(hotchunks)
print "cold_indexA:",cold_indexA,",coldchunk count:",len(coldchunks)
raise Exception("bad math here for array A")
if (hot_indexB != len(hotchunks)) or (cold_indexB != len(coldchunks)):
print "hot_index:",hot_indexB,",hotchunk count:",len(hotchunks)
print "cold_index:",cold_indexB,",coldchunk count:",len(coldchunks)
raise Exception("bad math here for array B")
#print "raw cellcounts for array A:",cellcountsA,",mean:",np.mean(cellcountsA)
for i in range(1,z_range+1):
print str(i)+":",cellcountsA.count(i)
for i in range(totalchunks):
cellcountsA[i] = map_chunksize(cellcountsA[i],min_chunksize,max_chunksize,chunksize)
cellcountsB[i] = map_chunksize(cellcountsB[i],min_chunksize,max_chunksize,chunksize)
print "new cellcounts for array A:",cellcountsA,",mean:",np.mean(cellcountsA)
print "regions:",regions
print "totalchunks:",totalchunks
#print "mean cellcount:",np.mean(cellcountsA)
#generate and write chunks to disk
for i in range(totalchunks):
(chunkA,chunkB) = build_ABchunks(Schema,i,int(cellcountsA[i]),int(cellcountsB[i]),chunksize)
#chunk = build_chunk(Schema,i,int(cellcountsA[i]),chunksize)
#io.write_chunk_binary(chunkA,dim_handlesA,attr_handlesA,chunkmap_handleA)
io.write_chunk(chunkA,dim_handlesA,attr_handlesA,chunkmap_handleA)
#io.write_chunk_binary(chunkB,dim_handlesB,attr_handlesB,chunkmap_handleB)
io.write_chunk(chunkB,dim_handlesB,attr_handlesB,chunkmap_handleB,aorb='B')
io.close_handles(dim_handlesA)
io.close_handles(attr_handlesA)
io.close_handle(chunkmap_handleA)
io.close_handles(dim_handlesB)
io.close_handles(attr_handlesB)
io.close_handle(chunkmap_handleB)
<file_sep>import schema_parser as parser
from partition import Partition #do I need this?
from range_partition import RangePartition
schema_defs = [
"array1<attr1:double,attr2:int64>[dim1=1:100,25,0,dim2=1:100,25,0]"
#,"array2<attr1:double,attr2:int64>[dim1=1:10,5,0,dim2=0:9,5,0]"
#,"array4<attr1:double,attr2:int64>[dim1=0:9,5,0,dim2=0:9,5,0]"
#,"array3<attr1:double,attr2:int64>[dim1=1:100,10,0,dim2=0:99,20,0]"
]
partition_defs = {
# quarters
'quarters':"0:1,1,50,50\
|2:1,51,50,50\
|1:51,1,50,50\
|3:51,51,50,50"
# rows
,'rows':"0:1,1,25,100\
|1:26,1,25,100\
|2:51,1,25,100\
|3:76,1,25,100"
}
(name,attributes,dimensions) = parser.ScidbSchema.parse_schema(schema_defs[0])
Schema = parser.ScidbSchema(name,attributes,dimensions)
(range_starts,range_widths) = RangePartition.parse(partition_defs['quarters'])
print "range starts for quarters:",range_starts
print "range widths for quarters:",range_widths
range1 = RangePartition(Schema,range_starts,range_widths)
(range_starts,range_widths) = RangePartition.parse(partition_defs['rows'])
print "range starts for rows:",range_starts
print "range widths for rows:",range_widths
range2 = RangePartition(Schema,range_starts,range_widths)
numnodes = max(range1.nodecount,range2.nodecount)
overlaps = []
non_overlaps1 = []
non_overlaps2 = []
#compute overlap for node 0
for i in range(numnodes):
#print "range1 chunks on node "+str(i)+":",range1.get_chunks(i)
#print "range2 chunks on node "+str(i)+":",range2.get_chunks(i)
(overlap,non_overlap1,non_overlap2) = range1.compute_overlap(range2,i)
overlaps.append(overlap)
if len(non_overlap1) > 0:
non_overlaps1.append(non_overlap1)
if len(non_overlap2) > 0:
non_overlaps2.append(non_overlap2)
print "overlap for node",i,"on range1 and range2:",overlap
print "non-overlap for node",i,"on range1:",non_overlap1
print "non-overlap for node"+str(i)+" on range2:",non_overlap2
non_overlaps = None
if len(non_overlaps1) < len(non_overlaps2):
non_overlaps = non_overlaps2
else:
non_overlaps = non_overlaps1
total_regions = len(overlaps) + len(non_overlaps)
print total_regions,"total regions of overlap and non-overlap"
<file_sep>class ScidbDimension(object):
'''
Class used to store SciDB dimension information
'''
def __init__(self, name, dtype,range_start,range_end,chunk_width,chunk_overlap):
self.name = name
self.dtype = dtype
self.range_start = -1
self.range_end = -1
self.chunk_width = -1
self.chunk_overlap = 0
if range_start is not None:
self.range_start = int(range_start)
if range_end is not None:
self.range_end = int(range_end)
if chunk_width is not None:
self.chunk_width = int(chunk_width)
if chunk_overlap is not None:
self.chunk_overlap = int(chunk_overlap)
def __repr__(self):
s = "ScidbDimension(%s,%s,%d,%d,%d,%d)" % \
(self.name,self.dtype,self.range_start,self.range_end,self.chunk_width,self.chunk_overlap)
return s
<file_sep>class ScidbAttribute(object):
'''
Class used to store SciDB attribute information
'''
def __init__(self, name, dtype):
self.name = name;
self.dtype = dtype;
def __repr__(self):
s = "ScidbAttribute(%s,%s)" % (self.name,self.dtype)
return s
<file_sep>data_generator
==============
data generator for joins project
<file_sep>class Partition(object):
def __init__(self,Schema,range_starts,range_widths):
self.Schema = Schema
self.range_starts = []
self.range_widths = []
self.nodecount = 0
if range_starts is not None:
self.range_starts = range_starts
self.nodecount = len(range_starts)
if range_widths is not None:
self.range_widths = range_widths
def get_chunks(self,node_id):
'''
Returns the list of chunk id's associated with the given node
using this partitioning scheme
'''
return []
def compute_overlap(self,other,node_id):
'''
Returns the list of chunk id's that are shared between this partitioning scheme and another
partitioning scheme for the given node
Arguments:
other -- an instance of the Partition class to compare with
node_id -- the node to compare for overlap between the partitioning schemes
'''
return []
<file_sep>from scidb_schema import ScidbSchema
from scidb_attribute import ScidbAttribute
from scidb_dimension import ScidbDimension
print "testing SciDB schema parse functon"
schema_def = "array<attr1:double,attr2:int64>[dim1=1:10,10,0,dim2=0:9,10,0]"
(name,attributes,dimensions) = ScidbSchema.parse_schema(schema_def)
print "name:",name
print "attributes:",attributes
print "dimensions:",dimensions
| ddc9929f5ac22af74e45a369a80dd4fb45ee7359 | [
"Markdown",
"Python"
] | 13 | Python | leibatt/data_generator | da170e8626244ef7dc3c71383193efe10c622d24 | 66130859b075827a9d3f90fd238c7e541b940919 | |
refs/heads/master | <repo_name>MasuraParvinMohona/friend<file_sep>/classFriend.cpp
#include<iostream>
using namespace std;
class add2;
class add1
{
private:
int a;
public:
void setData(int x)
{
a=x;
}
friend void fun(add1,add2);
};
class add2
{
private:
int b;
public:
void setData(int y)
{
b=y;
}
friend void fun(add1,add2);
};
void fun(add1 c1,add2 c2)
{
cout<<"sum is\n"<<c1.a+c2.b<<endl;
}
main()
{
add1 c1;
add2 c2;
c1.setData(5);
c2.setData(8);
fun(c1,c2);
}
| 8c1256a26a9f62455bfd781efe06a8ce711f589c | [
"C++"
] | 1 | C++ | MasuraParvinMohona/friend | 1e65e4e32fee392a9f3e07fbcbc04ca7ab49d3a5 | cdcc93a0a0f522208eec587a1fd405134f0206f7 | |
refs/heads/master | <file_sep>import matplotlib.pyplot as plt
import numpy as np
labels = ["Poly"]
values = np.linspace(.001,3,5)
results = [0.0098, 0.0098, 0.26961, 0.08987, 0.04052]
std = [0.0, 0.0, 0.01274, 0.00594, 0.00455]
plt.style.use("ggplot")
fig = plt.figure(figsize=(14,9))
ax = fig.add_subplot(111)
ax.errorbar(values, results, yerr=std, label=labels[0])
ax.legend()
plt.title("Varying Degree Parameter in the Poly Kernel")
plt.xlabel("Degree")
plt.ylabel("Accuracy")
text = "Feature Extractor: SURF\nNumber of Clusters: 800\n(Best from Graph #1)\nC: 1\nGamma: Auto"
ax.text(-.1,0,text,verticalalignment='bottom', horizontalalignment='left')
plt.show()
<file_sep>import csv
import matplotlib.pyplot as plt
import numpy as np
path = "./graph1_accuracy.csv"
x_axis = []
y_axis = []
with open(path, "rb") as file:
reader = csv.reader(file)
for row in reader:
x_axis.append(row[1])
y_axis.append(row[2])
plt.plot(x_axis, y_axis)
plt.locator_params(numticks=4)
plt.show()
<file_sep>import matplotlib.pyplot as plt
import numpy as np
labels = ["Ball Tree", "KD Tree", "Brute"]
values = range(1,31,1)
ball_results = [0.17516, 0.17516, 0.17941, 0.17712, 0.17974, 0.17876, 0.1768, 0.17484, 0.1719, 0.17288, 0.1719, 0.17059, 0.16993, 0.17059, 0.17157, 0.1683, 0.16503, 0.16242, 0.16209, 0.15882, 0.15915, 0.15817, 0.15784, 0.15817, 0.1585, 0.15686, 0.15817, 0.15686, 0.15588, 0.15621]
ball_std = [0.01229, 0.01229, 0.01488, 0.01087, 0.00895, 0.00989, 0.00829, 0.00941, 0.0064, 0.00443, 0.00823, 0.0069, 0.00752, 0.0065, 0.00547, 0.00547, 0.00547, 0.00824, 0.00696, 0.00855, 0.00939, 0.01255, 0.01072, 0.01071, 0.00846, 0.0067, 0.00903, 0.00766, 0.00658, 0.00811]
kd_results = [0.17516, 0.17516, 0.17941, 0.17712, 0.17974, 0.17876, 0.1768, 0.17484, 0.1719, 0.17288, 0.1719, 0.17059, 0.16993, 0.17059, 0.17157, 0.1683, 0.16503, 0.16242, 0.16209, 0.15882, 0.15915, 0.15817, 0.15784, 0.15817, 0.1585, 0.15686, 0.15817, 0.15686, 0.15588, 0.15621]
kd_std = [0.01229, 0.01229, 0.01488, 0.01087, 0.00895, 0.00989, 0.00829, 0.00941, 0.0064, 0.00443, 0.00823, 0.0069, 0.00752, 0.0065, 0.00547, 0.00547, 0.00547, 0.00824, 0.00696, 0.00855, 0.00939, 0.01255, 0.01072, 0.01071, 0.00846, 0.0067, 0.00903, 0.00766, 0.00658, 0.00811]
brute_results = [0.17516, 0.17516, 0.17941, 0.17712, 0.17974, 0.17876, 0.1768, 0.17484, 0.1719, 0.17288, 0.1719, 0.17059, 0.16993, 0.17059, 0.17157, 0.1683, 0.16503, 0.16242, 0.16209, 0.15882, 0.15915, 0.15817, 0.15784, 0.15817, 0.1585, 0.15686, 0.15817, 0.15686, 0.15588, 0.15621]
brute_std = [0.01229, 0.01229, 0.01488, 0.01087, 0.00895, 0.00989, 0.00829, 0.00941, 0.0064, 0.00443, 0.00823, 0.0069, 0.00752, 0.0065, 0.00547, 0.00547, 0.00547, 0.00824, 0.00696, 0.00855, 0.00939, 0.01255, 0.01072, 0.01071, 0.00846, 0.0067, 0.00903, 0.00766, 0.00658, 0.00811]
plt.style.use("ggplot")
fig = plt.figure(figsize=(14,9))
ax = fig.add_subplot(111)
ax.errorbar(values, ball_results, yerr=ball_std, label=labels[0])
ax.legend()
ax = fig.add_subplot(111)
ax.errorbar(values, kd_results, yerr=kd_std, label=labels[1])
ax.legend()
ax = fig.add_subplot(111)
ax.errorbar(values, brute_results, yerr=brute_std, label=labels[2])
ax.legend()
plt.title("Varying Number of Neighbors with Different Algorithms")
plt.xlabel("Number of Neighbors")
plt.ylabel("Accuracy")
text = "(All of the results were exactly the same)\n\nFeature Extractor: SURF\nNumber of Clusters: 400\n(Best from Graph #1)\nWeight: Distance\nP: 2"
ax.text(0,.1435,text,verticalalignment='bottom', horizontalalignment='left')
plt.show()
<file_sep># need
import cv2
import glob
import numpy as np
import pickle
import os
from sklearn.utils import shuffle
import math
import random
from itertools import compress
from shutil import copy
def saveImagesToPickle(path, color, out_filename):
""" Reads all images from a certain path. The images will be saved to a .pkl file as
a dictionary. The keys are the name of the categories (which are to be the folder
names).
Params:
path: The location of the images
color: Boolean of whether to encode the images in color or not
out_filename: Name of the pickle file to be saved
Returns:
None (The images are saved to the disk as a .pkl file)
"""
all_images = {}
for folder in glob.glob(path + "*"):
# Set color flags
if color:
color_flag = cv2.IMREAD_COLOR
else:
color_flag = cv2.IMREAD_GRAYSCALE
# Get name of category which is the folder name
category = folder.split("\\")[-1]
all_images[category] = []
# Loop through all images and read them
for image in glob.glob(path + category + "/*"):
if color:
image = cv2.imread(image, color_flag)
else:
image = cv2.imread(image, color_flag)
all_images[category].append(image)
# Save all images to disk
pickle.dump(all_images, open("../tmp/objects/" + out_filename + ".pkl", "wb"))
def loadImagesRandomly(file, n_category_train):
""" Loads the images from a .pkl file. This assumes the .pkl file contains a
dictionary with the keys being a string of the category name and the values
to be a list of images. The images that are selected are chosen at random.
Params:
file: The location of the .pkl file
n_category_train: The number of images to randomly select
from each category for the training set
Returns:
images: A list containing all the iamges. The length will be
num_categories * num_per_category
target: A list of labels that match up with the images respectively
"""
all_images = pickle.load(file)
X_train = []
y_train = []
X_test = []
y_test = []
# Loop through each category and pull out n_category_train images
# for the training set and use the rest of the dataset as the testing
# set
for category in all_images:
category_length = list(range(len(all_images[category])))
rand_indexes = random.sample(category_length, k=n_category_train)
complement = []
for i in category_length:
if i not in rand_indexes:
complement.append(i)
# Append images and labels to train list
for i in rand_indexes:
X_train.append(all_images[category][i])
y_train.append(category)
# Append images and labels to test list
for i in complement:
X_test.append(all_images[category][i])
y_test.append(category)
return X_train, X_test, y_train, y_test
def cropImages(images, size):
""" Loops through and crops images to a certain size
Params:
images: A list of the images to crop
size: A list where the first two elements are taken for the new dimensions. [width, height]
Returns: A list of the resized images
"""
cropped_images = []
for image in images:
cropped_images.append(cv2.resize(image, (size[0], size[1])))
cropped_images = np.asarray(cropped_images)
return cropped_images
def divideImages(data_path, train, test, n_category_train):
base_path = os.getcwd()
data_path = os.path.join(base_path, data_path)
categories = os.listdir(data_path)
training_path = os.path.join(base_path, train)
testing_path = os.path.join(base_path, test)
# Loop through folders
for cat in categories:
image_files = os.listdir(os.path.join(data_path, cat))
category_len_list = list(range(len(image_files)))
# Get indexes of n_category_train number of images
rand_indexes = random.sample(category_len_list, k=n_category_train)
# Get the rest of the images
complement = []
for i in category_len_list:
if i not in rand_indexes:
complement.append(i)
# Create lists of image paths using respective indexes
training_files = []
testing_files = []
for i in rand_indexes:
training_files.append(image_files[i])
for i in complement:
testing_files.append(image_files[i])
# Copy training files
for image in training_files:
origin_path = os.path.join(data_path, cat, image)
dest_dir = os.path.join(training_path, cat)
dest_path = os.path.join(training_path, cat, image)
if not os.path.isdir(dest_dir):
os.mkdir(dest_dir)
copy(origin_path, dest_path)
# Copy testing files
for image in testing_files:
origin_path = os.path.join(data_path, cat, image)
dest_dir = os.path.join(testing_path, cat)
dest_path = os.path.join(testing_path, cat, image)
if not os.path.isdir(dest_dir):
os.mkdir(dest_dir)
copy(origin_path, dest_path)
def divideImagePaths(path, n_category_train):
filenames = {}
training_files = []
testing_files = []
for folder in glob.glob(path + "*"):
category = folder.split("\\")[-1]
filenames[category] = []
for image in glob.glob(folder + "/*"):
filenames[category].append(image)
for cat in filenames:
image_files = os.listdir(os.path.join(path, cat))
category_len_list = list(range(len(image_files)))
rand_indexes = random.sample(category_len_list, k=n_category_train)
complement = []
for i in category_len_list:
if i not in rand_indexes:
complement.append(i)
for i in rand_indexes:
training_files.append(path + image_files[i])
for i in complement:
testing_files.append(path + image_files[i])
training_files = np.asarray(training_files)
testing_files = np.asarray(testing_files)
np.save("training_files.npy", training_files)
np.save("testing_files.npy", testing_files)<file_sep>import keras
from keras.preprocessing.image import ImageDataGenerator
from models import marconet
from keras.optimizers import sgd
##########################
# Constants
##########################
batch_size = 64
epochs = 10
image_input_shape = (224, 224, 3)
num_classes = 101
dropout = 0.5
weight_decay = .01
##########################
# Pre-Processing
##########################
train_data_path = "./data/train/"
test_data_path = "./data/test/"
train_data_generator = ImageDataGenerator(
# rotation_range=20,
# horizontal_flip=True,
# vertical_flip=True,
# zoom_range=0.2,
# width_shift_range=0.2,
# height_shift_range=0.2,
# fill_mode="wrap"
)
test_data_generator = ImageDataGenerator(
#
)
train_generator = train_data_generator.flow_from_directory(
train_data_path,
batch_size=batch_size,
shuffle=True,
target_size=(224, 224)
)
test_generator = test_data_generator.flow_from_directory(
test_data_path,
batch_size=batch_size,
shuffle=False,
target_size=(224, 224)
)
##########################
# Model
##########################
# import matplotlib.pyplot as plt
# from PIL import Image
# test = train_generator[0][0]
# for i in range(10):
# img = train_generator[0][0][i]
# plt.imshow(img/255.0)
# plt.show()
# model = marconet.build_marconet()
model = keras.models.load_model("model_marconet_snapshot.h5")
# model = keras.applications.VGG16(weights=None, classes=102)
sgd = sgd(lr=.05, decay=5e-4, momentum=.9, nesterov=True)
# adam = optimizers.adam()
# opt = keras.optimizers.rmsprop(lr=0.0001, decay=1e-6)
model.compile(optimizer=sgd, loss='categorical_crossentropy', metrics=['acc'])
##########################
# Fit
##########################
# model.fit_generator(
# train_generator,
# epochs=epochs,
# validation_data=(test_generator),
# shuffle=True,
# verbose=1
# )
##########################
# Predict
##########################
import matplotlib.pyplot as plt
import numpy as np
# predictions = model.predict_generator(test_generator, verbose=1)
# np.save("./predictions.npy", predictions)
predictions = np.load(open("predictions.npy", "rb"))
results = []
class_percentage = {}
percentages = []
key_to_label = {v: k for k, v in test_generator.class_indices.items()}
for category in test_generator.class_indices:
class_percentage[category] = [0, 0]
for prediction in predictions:
results.append(np.argmax(prediction))
for r, a in zip(results, test_generator.classes):
class_name = key_to_label[a]
class_percentage[class_name][0] += 1
if r == a:
class_percentage[class_name][1] += 1
for category in class_percentage:
total = class_percentage[category][0]
correct = class_percentage[category][1]
percentage = correct / total
percentages.append(percentage)
class_percentage[category] = percentage
print("Category: {} - Accuracy: {}".format(category, percentage))
print("Mean class average: {}".format(np.mean(percentages)))
stop
# for i in range(test_generator.samples):
# if i % 10:
# img = test_generator[0][0][i, :, :, :]
# plt.imshow(img / 255.0)
# predictions = np.argmax(model.predict(np.expand_dims(img, axis=0)))
# key_to_label = {v: k for k, v in test_generator.class_indices.items()}
# # plt.title(key_to_label[predictions])
# plt.title(key_to_label[test_generator.classes[i]])
# plt.show()
# model.save('model_marconet_snapshot_2.h5')
<file_sep>
class SVM(Classifer):
""" This class allows the user to classify images using support vector machine.
Params:
svm_params: A dictionary of all the Classifiers parameters
"""
def __init__(self, images, labels, detector, n_clusters, bow="True", **svm_params):
Classifer.__init__(images, labels, detector, n_clusters, bow)
self.model = SVC(**svm_params)
self.scale = None
def predict(self, images):
features = self._get_features(images, self.detector)
if self.bow:
histogram = self._make_histograms(features)
return self.model.predict(histogram)<file_sep>from sklearn import cluster
from sklearn.preprocessing import StandardScaler
import cv2
from sklearn.svm import SVC
from sklearn.neighbors import KNeighborsClassifier
import numpy as np
class Classifer:
""" This class builds a classifier using visual bag of words
Params:
classifier: The classifier you wish to use
images: The training images
labels: The image labels
detector: Which feature detector to use. Either "sift" or "surf"
n_clusters: The number of clusters to use for KMeans. This only applied if using bow.
bow: Whether or not to use bow (Currently no other option. Must use bow)
**params: A dictionary of the parameters for the classifier
"""
def __init__(self, classifier, images, labels, detector, n_clusters, bow=True, **params):
self.images = images
self.labels = labels
self.detector = detector
self.n_clusters = n_clusters
self.bow = bow
self.classifier = classifier
self.scale = None
if self.classifier == "svm":
self.model = SVC(**params)
elif self.classifier == "knn":
self.model = KNeighborsClassifier(**params)
self.features = self._get_features(images, detector)
if self.bow:
self.kmeans = cluster.MiniBatchKMeans(self.n_clusters)
self.vocabulary = self._make_histograms(self.features)
self.model.fit(self.vocabulary, self.labels)
def _get_features(self, images, detector):
""" Gets features from numpy array of images.
Params:
images: A list of numpy images
detector: A string of which feature detector to use.
Returns:
Returns a list of numpy arrays that contain the features of each image
"""
if detector == "sift":
sift = cv2.xfeatures2d.SIFT_create()
elif detector == "surf":
surf = cv2.xfeatures2d.SURF_create()
features = []
for image in images:
if detector == "sift":
kp, feats = sift.detectAndCompute(image, None)
features.append(feats)
if detector == "surf":
kp, feats = surf.detectAndCompute(image, None)
features.append(feats)
return features
def _make_histograms(self, features):
""" Creates a numpy array whose shape is (Frequency, Number of clusters)
Params:
features: A list containing separate numpy arrays of features for each image.
Each element in the list is a numpy array of the features for an image.
Returns: The vocabulary that is a numpy array with the shape
(number of images, number of clusters).
"""
# Move all the features together into one list and create a separate list
# containing an image label for that feature
all_features = []
all_features_labels = []
label = 0
for image in features:
for feature in image:
all_features.append(feature)
all_features_labels.append(label)
label += 1
# Cluster all features using Kmeans
clustered_features = self.kmeans.fit_predict(all_features)
img_count = len(features)
vocabulary = np.array([np.zeros(self.n_clusters) for i in range(img_count)])
for i in range(len(clustered_features)):
image_id = all_features_labels[i]
visual_word_id = clustered_features[i]
vocabulary[image_id][visual_word_id] += 1
# Scale the data
if self.scale is None:
self.scale = StandardScaler().fit(vocabulary)
vocabulary = self.scale.transform(vocabulary)
return vocabulary
def predict(self, images):
""" Predicts the categories of a list of numpy images.
Params:
images: A list of numpy images
Returns:
A list of predictions
"""
features = self._get_features(images, self.detector)
if self.bow:
histogram = self._make_histograms(features)
return self.model.predict(histogram)<file_sep>import cv2
class Sift():
def __init__(self):
self.sift = cv2.xfeatures2d.SIFT_create()
def getImageFeatures(self, image):
keypoints, features = self.sift.detectAndCompute(image, None)
return features
def getDataFeatures(self, images):
data_features = []
for image in images:
data_features.append(self.getImageFeatures(image))
return data_features
class Surf():
def __init__(self):
self.surf = cv2.xfeatures2d.SURF_create()
def getImageFeatures(self, image):
keypoints, features = self.surf.detectAndCompute(image, None)
return features
def getDataFeatures(self, images):
data_features = []
for image in images:
data_features.append(self.getImageFeatures(image))
return data_features
<file_sep>import time
from FeatureExtraction import *
from Classifiers import *
from ImageProcessing import *
from BagOfWords import *
class Testing:
def testSVM(self, K, CV, n_categories, n_train_imgs, C, kernel, gamma, dfs, path, feature_extractor, value):
print("Processing value: {}".format(value))
start = time.time()
# image processing
print("Processing images for value {}".format(value))
ip = ImageProcessing()
svm = SVM(C, kernel, gamma, dfs)
category_limit = n_train_imgs/n_categories
images, target, img_count = ip.readImages(path, category_limit)
data_features = feature_extractor.getDataFeatures(images)
# data representation
print("Processing data representation for value {}".format(value))
bow = BagOfWords(K)
data = bow.makeVocabulary(data_features, img_count)
# classification
print("Processing classification for value {}".format(value))
scores = svm.cross_validate(data, target, CV)
end = time.time()
print("Finished processing value: {} Time elapsed: {}".format(value, end-start))
print("Value {}'s scores: {}".format(value, scores))
return scores
def testKNN(self, K, CV, n_categories, n_train_imgs, path, feature_extractor, n_neighbors, weights, value):
print("Processing value: {}".format(value))
start = time.time()
# image processing
print("Processing images for value {}".format(value))
ip = ImageProcessing()
knn = KNN(n_neighbors, weights)
category_limit = n_train_imgs/n_categories
images, target, img_count = ip.readImages(path, category_limit)
data_features = feature_extractor.getDataFeatures(images)
# data representation
print("Processing data representation for value {}".format(value))
bow = BagOfWords(K)
data = bow.makeVocabulary(data_features, img_count)
# classification
print("Processing classification for value {}".format(value))
scores = knn.cross_validate(data, target, CV)
end = time.time()
print("Finished processing value: {} Time elapsed: {}".format(value, end-start))
print("Value {}'s scores: {}".format(value, scores))
return scores
def testTrainingData(self, K, n_categories, n_train_imgs, C, kernel, gamma, dfs, path, feature_extractor, value):
print("Processing value: {}".format(value))
start = time.time()
# image processing
print("Processing images for value {}".format(value))
ip = ImageProcessing()
svm = SVM(C, kernel, gamma, dfs)
category_limit = n_train_imgs / n_categories
images, target, img_count = ip.readImages(path, category_limit)
data_features = feature_extractor.getDataFeatures(images)
# data representation
print("Processing data representation for value {}".format(value))
bow = BagOfWords(K)
data = bow.makeVocabulary(data_features, img_count)
# classification
print("Processing classification for value {}".format(value))
score = svm.training_set_accuracy(data, target, .30)
end = time.time()
print("Finished processing value: {} Time elapsed: {}".format(value, end - start))
print("Value {}'s scores: {}".format(value, score))
return score
<file_sep>https://docs.google.com/presentation/d/12qr0uVl_mSnhTXN7G3i20MDHA2w7djscZ1KrPDVKr-o/edit?usp=sharing
<file_sep>import tensorflow as tf
import numpy as np
from tensorflow.examples.tutorials.mnist import input_data
from ImageProcessing import *
import matplotlib.pyplot as plt
from sklearn.model_selection import train_test_split, KFold
from sklearn.preprocessing import LabelBinarizer
DATA_DIR = "/tmp/data"
NUM_STEPS = 95
NUM_MINI_BATCHES = 20
# Pre processing
ip = ImageProcessing()
images, target, img_count = ip.readImages("./images/",30)
cropped_images = []
for image in images:
cropped_images.append(cv2.resize(image,(100,100)))
cropped_images = np.asarray(cropped_images)
cropped_images_split = np.split(cropped_images, NUM_MINI_BATCHES)
lb = LabelBinarizer()
target = lb.fit_transform(target)
target_split = np.split(target, NUM_MINI_BATCHES)
# CNN
# Species the weights for either fully connected or convolutional layers of the network
def weight_variable(shape):
initial = tf.truncated_normal(shape, stddev=0.1)
return tf.Variable(initial)
def bias_vaiable(shape):
initial = tf.constant(0.1, shape=shape)
return tf.Variable(initial)
def conv2d(x, W, stride):
return tf.nn.conv2d(x, W, strides=stride, padding="SAME")
def max_pool_2x2(x):
return tf.nn.max_pool(x, ksize=[1,2,2,1],
strides=[1,2,2,1], padding="SAME")
def max_pool_3x3(x):
return tf.nn.max_pool(x, ksize=[1,3,3,1],
strides=[1,2,2,1], padding="SAME")
def conv_layer(input, shape, stride):
W = weight_variable(shape)
b = bias_vaiable([shape[3]])
return tf.nn.relu(conv2d(input, W, stride) + b)
def full_layer(input, size):
in_size = int(input.get_shape()[1])
W = weight_variable([in_size, size])
b = bias_vaiable([size])
return tf.matmul(input, W) + b
x = tf.placeholder(tf.float32, shape=[None, 100,100])
y_ = tf.placeholder(tf.float32, shape=[None, 102])
x_image = tf.reshape(x, [-1, 100, 100, 1]) # reshaped images
conv1 = conv_layer(x_image, shape=[11, 11, 1, 96], stride=[1,4,4,1]) # first convolution 25x25x96
conv1_pool = max_pool_2x2(conv1) # first pooling 14x14x32
conv2 = conv_layer(conv1_pool, shape=[5, 5, 96, 256], stride=[1,1,1,1]) # second convolution 25x25x64
conv2_pool = max_pool_2x2(conv2) # second pooling 7x7x64
conv3 = conv_layer(conv2_pool, shape=[3, 3, 256, 384], stride=[1,1,1,1])
conv4 = conv_layer(conv3, shape=[3, 3, 384, 384], stride=[1,1,1,1])
conv5 = conv_layer(conv4, shape=[3, 3, 384, 256], stride=[1,1,1,1])
conv5_pool = max_pool_2x2(conv5)
conv5_flat = tf.reshape(conv5_pool, [-1,])
conv2_flat = tf.reshape(conv2_pool, [-1, 25*25*64]) # flatten previous output to 1x1x40000
full_1 = tf.nn.relu(full_layer(conv2_flat, 1024)) # makes fully connected layer and performs relu
keep_prob = tf.placeholder(tf.float32)
full1_drop = tf.nn.dropout(full_1, keep_prob=keep_prob) # drops random
y_conv = full_layer(full1_drop, 102)
cross_entropy = tf.reduce_mean(tf.nn.softmax_cross_entropy_with_logits(logits=y_conv, labels=y_))
train_step = tf.train.AdamOptimizer(1e-4).minimize(cross_entropy)
correct_prediction = tf.equal(tf.argmax(y_conv, 1), tf.argmax(y_, 1)) # list of true and false values
accuracy = tf.reduce_mean(tf.cast(correct_prediction, tf.float32)) # percentage
writer = tf.summary.FileWriter("./tmp/events/")
writer.add_graph(tf.get_default_graph())
writer.close()
with tf.Session() as sess:
sess.run(tf.global_variables_initializer())
test_X_fold = cropped_images_split[0]
train_X_folds = cropped_images_split[1:]
test_y_fold = target_split[0]
train_y_folds = target_split[1:]
print(len(train_X_folds))
print(train_X_folds[0].shape)
for i in range(NUM_STEPS):
print("Performing step: {}".format(i))
# periodic logging to let us know what is going
if i % 10 == 0:
train_accuracy = sess.run(accuracy, feed_dict={x: train_X_folds[i%19], y_: train_y_folds[i%19],
keep_prob: 1.0})
print("Step: {} - Training Accuracy: {}".format(i, train_accuracy))
sess.run(train_step, feed_dict={x: train_X_folds[i%19], y_: train_y_folds[i%19],
keep_prob: .5})
test_accuracy = np.mean(sess.run(accuracy, feed_dict={x: test_X_fold, y_: test_y_fold, keep_prob: 1.0}))
print("Test Accuracy: {}".format(np.mean(test_accuracy)))
<file_sep>from keras import Sequential
from keras.layers import (
Conv2D,
MaxPooling2D,
Activation,
Flatten,
Dense
)
from keras.layers.convolutional import ZeroPadding2D
from keras.layers.normalization import BatchNormalization
from keras.regularizers import l2
def build_marconet():
# Constants
weight_reg = 5e-4
model = Sequential()
model.add(Conv2D(filters=128, kernel_size=(5, 5), strides=(2, 2), kernel_initializer="he_normal",
data_format="channels_last", kernel_regularizer=l2(weight_reg), input_shape=(224, 224, 3)))
model.add(BatchNormalization())
model.add(Activation("relu"))
model.add(MaxPooling2D(pool_size=(2, 2), strides=(2, 2)))
model.add(Conv2D(filters=256, kernel_size=(3, 3), strides=(1, 1), kernel_initializer="he_normal",
data_format="channels_last", kernel_regularizer=l2(weight_reg)))
model.add(BatchNormalization())
model.add(Activation("relu"))
model.add(MaxPooling2D(pool_size=(2, 2), strides=(2, 2)))
model.add(ZeroPadding2D(padding=(1, 1)))
model.add(Conv2D(filters=512, kernel_size=(3, 3), strides=(1, 1), kernel_initializer="he_normal",
data_format="channels_last", kernel_regularizer=l2(weight_reg)))
model.add(BatchNormalization())
model.add(Activation("relu"))
model.add(MaxPooling2D(pool_size=(2, 2), strides=(2, 2)))
model.add(Flatten())
model.add(Dense(1024, kernel_initializer="he_normal", kernel_regularizer=l2(weight_reg)))
model.add(BatchNormalization())
model.add(Activation("relu"))
model.add(Dense(101, kernel_initializer="he_normal", kernel_regularizer=l2(weight_reg)))
model.add(Activation("softmax"))
return model<file_sep># need
from sklearn import cluster
from sklearn.preprocessing import StandardScaler
import numpy as np
import time
#test
from sklearn.decomposition import PCA
class BagOfWords:
def __init__(self, n_clusters):
self.n_clusters = n_clusters
self.kmeans_obj = cluster.MiniBatchKMeans(n_clusters)
self.scale = None
def combineFeatures(self, data_features):
features = [] # features from all images
feature_img_ids = [] # identifies what image the feature belongs to
img_id = 0
for image in data_features:
for feature in image:
features.append(feature)
feature_img_ids.append(img_id)
img_id += 1
print("Length of feature list: {}".format(len(features)))
return features, feature_img_ids
# Poorly named. This is really making the training data.
def makeVocabulary(self, data_features, img_count):
features, feature_img_ids = self.combineFeatures(data_features)
# this line does two things: it clusters all the features getting the cluster centers,
# but then it goes back through each feature and returns an array of what cluster center
# each feature was closest to
# Because I am using cross validation in this project, if I wanted to bring in outside images
# I would have to make sure the outside image is just using predict so it will compare it to the
# cluster centers from the training data
start = time.time()
print("Started kmeans")
features = self.kmeans_obj.fit_predict(features)
end = time.time()
print("Finished kmeans - Time elapsed: {}".format(end-start))
vocabulary = np.array([np.zeros(self.n_clusters) for i in range(img_count)])
for i in range(len(features)):
image_id = feature_img_ids[i]
visual_word_id = features[i]
vocabulary[image_id][visual_word_id] += 1
if self.scale is None:
self.scale = StandardScaler().fit(vocabulary)
vocabulary = self.scale.transform(vocabulary)
return vocabulary
<file_sep>import matplotlib.pyplot as plt
import numpy as np
labels = ["RBF"]
values = np.linspace(2**-15,2**3)
results = [0.14575, 0.07222, 0.11144, 0.10948, 0.10425, 0.08824, 0.07712, 0.07157, 0.05948, 0.05261, 0.04706, 0.04118, 0.03725, 0.03562, 0.03366, 0.03235, 0.02974, 0.02745, 0.02582, 0.02353, 0.02288, 0.0219, 0.02059, 0.01993, 0.01928, 0.0183, 0.01797, 0.01765, 0.01765, 0.01601, 0.01536, 0.01471, 0.01471, 0.01471, 0.01373, 0.01373, 0.0134, 0.01209, 0.01209, 0.01144, 0.01144, 0.01144, 0.01144, 0.01144, 0.01144, 0.01176, 0.01176, 0.01176, 0.01176, 0.01176]
std = [0.01124, 0.01284, 0.01477, 0.01529, 0.01162, 0.00953, 0.00873, 0.01015, 0.0069, 0.00551, 0.00489, 0.00606, 0.00769, 0.00673, 0.00581, 0.00623, 0.00681, 0.00734, 0.00597, 0.00553, 0.00517, 0.00502, 0.00434, 0.00419, 0.00419, 0.00419, 0.004, 0.00392, 0.00364, 0.00217, 0.00196, 0.00273, 0.00273, 0.00273, 0.00336, 0.00336, 0.00378, 0.00303, 0.00303, 0.00231, 0.00231, 0.00231, 0.00231, 0.00231, 0.00231, 0.00191, 0.00191, 0.00191, 0.00191, 0.00191]
plt.style.use("ggplot")
fig = plt.figure(figsize=(14,9))
ax = fig.add_subplot(111)
ax.errorbar(values, results, yerr=std, label=labels[0])
ax.legend()
plt.title("Varying Gamma on RBF Kernel")
plt.xlabel("Gamma")
plt.ylabel("Accuracy")
text = "Feature Extractor: SURF\nNumber of Clusters: 800\n(Best from Graph #1)\nC: 1"
ax.text(0,.005,text,verticalalignment='bottom', horizontalalignment='left')
plt.show()
<file_sep>
# This is to get rid of the deprecation warning
def warn(*args, **kwargs):
pass
import warnings
warnings.warn = warn
from ImageProcessing import *
from FeatureExtraction import *
from BagOfWords import *
from Classifiers import *
from Testing import *
import time
from sklearn.grid_search import GridSearchCV
from sklearn.svm import SVC
from sklearn.neighbors import KNeighborsClassifier
from sklearn.externals import joblib
if __name__ == "__main__":
# Classifier
svm = SVC()
# Classifiers params
kernel_list = ["rbf"]
# c_list = np.linspace(2 ** -5, 2 ** 15)
c_list = [1]
gamma_list = ["auto"]
# Classifiers grid
param_grid = dict(kernel=kernel_list,
C=c_list,
gamma=gamma_list
)
grid = GridSearchCV(svm, param_grid, cv=5, scoring='accuracy', n_jobs=-1, verbose=1)
# data = joblib.load("../objects/102/bow/surf/102_bow_800_surf_.pkl")
# target = joblib.load("../objects/102/102_target_surf.pkl")
bow = BagOfWords(800)
surf = Surf()
training_files = np.load("../training_files.npy")
testing_files = np.load("../testing_files.npy")
# Grid search
grid.fit(data, target)
print(grid.grid_scores_)
print(grid.best_score_)
print(grid.best_params_)
# def bowScores(clf, CV, n_clusters, data_features, img_count, target, saveToDisk):
# bow = BagOfWords(n_clusters)
# data = bow.makeVocabulary(data_features, img_count)
# scores = cross_val_score(clf, data, target, cv=CV)
# if saveToDisk:
# filename = "./objects/bow/102_bow_" + str(n_clusters) + "_surf_.pkl"
# joblib.dump(data,filename)
# print("Scores: {}".format(scores))
# print("Mean: {}".format(np.mean(scores)))
# print("STD: {}".format(np.std(scores)))
# results.append(np.mean(scores))
# std.append(np.std(scores))
#
# data_features = joblib.load("./objects/102_data_features_surf.pkl")
# img_count = joblib.load("./objects/102_img_count_surf.pkl")
# target = joblib.load("./objects/102_target_surf.pkl")
#
# svm = SVC()
#
# values = range(2000,50000,5000)
# for value in values:
# print("Computing value: {}".format(value))
# start = time.time()
# bowScores(svm,5,value,data_features,img_count,target, True)
# end = time.time()
# print("Finished value: {} - Time elapsed: {}".format(value, end-start))
#
# print("Results:")
# print(results)
# print("STD:")
# print(std)
# knn = KNeighborsClassifier()
# target = joblib.load("./objects/10_target_surf.pkl")
#
# for value in values:
# filename_data = "./objects/bow/10_bow_" + str(value) + "_surf_.pkl"
# data = joblib.load(filename_data)
# scores = cross_val_score(knn, data, target, cv=5)
# print("Scores: {}".format(scores))
# print("Mean: {}".format(np.mean(scores)))
# print("STD: {}".format(np.std(scores)))
# results.append(np.mean(scores))
# std.append(np.std(scores))
#
# print(results)
# print(std)
#
<file_sep>import matplotlib.pyplot as plt
import numpy as np
labels = ["P=1","P=2"]
values = range(1,31,1)
p1_results = [0.13758, 0.11928, 0.11863, 0.11928, 0.12026, 0.12026, 0.12124, 0.11895, 0.11895, 0.11667, 0.11503, 0.11405, 0.11471, 0.11569, 0.11536, 0.11438, 0.11438, 0.11373, 0.11405, 0.11209, 0.11078, 0.11144, 0.11209, 0.11242, 0.11307, 0.11242, 0.11176, 0.11111, 0.10784, 0.10882]
p1_std = [0.01545, 0.00685, 0.00824, 0.008, 0.00843, 0.00837, 0.01124, 0.01225, 0.01129, 0.00899, 0.01087, 0.0079, 0.01071, 0.00977, 0.01163, 0.01584, 0.0165, 0.01251, 0.01353, 0.01144, 0.01216, 0.01365, 0.01412, 0.01369, 0.01203, 0.01305, 0.01427, 0.01554, 0.01303, 0.01478]
p2_results = [0.17516, 0.15523, 0.14542, 0.14771, 0.15327, 0.14935, 0.14902, 0.15229, 0.15425, 0.15229, 0.15163, 0.15163, 0.14967, 0.14902, 0.15065, 0.15163, 0.15, 0.14673, 0.14706, 0.14608, 0.14902, 0.14706, 0.14771, 0.14902, 0.14804, 0.14641, 0.14706, 0.14608, 0.14673, 0.14641]
p2_std = [0.01229, 0.00969, 0.01447, 0.01125, 0.00836, 0.0069, 0.00521, 0.00521, 0.00749, 0.00783, 0.00649, 0.0079, 0.00469, 0.00478, 0.00455, 0.00455, 0.00711, 0.00349, 0.00462, 0.00336, 0.003, 0.00231, 0.0032, 0.00521, 0.0059, 0.00303, 0.00537, 0.00658, 0.00836, 0.00735]
plt.style.use("ggplot")
fig = plt.figure(figsize=(14,9))
ax = fig.add_subplot(111)
ax.errorbar(values, p1_results, yerr=p1_std, label=labels[0])
ax.legend()
ax = fig.add_subplot(111)
ax.errorbar(values, p2_results, yerr=p2_std, label=labels[1])
ax.legend()
plt.title("Different Values for P over Various Number of Neighbors")
plt.xlabel("Number of Neighbors")
plt.ylabel("Accuracy")
text = "Feature Extractor: SURF\nNumber of Clusters: 400\n(Best from Graph #1)\nWeight: Uniform"
ax.text(0.1,.09,text,verticalalignment='bottom', horizontalalignment='left')
plt.show()
<file_sep>import glob
path = "./images/"
count = {}
for folder in glob.glob(path+"*"):
category = folder.split("\\")[-1]
count[category] = 0
for image in glob.glob(folder+"/*"):
count[category] += 1
import pprint
pp = pprint.PrettyPrinter(indent=4)
pp.pprint(count)
small = min(count, key=count.get)
large = max(count, key=count.get)
print(count[small])
print(count[large])
<file_sep>import cv2
import numpy as np
import glob
from Classifiers import Classifer
# Read two images for debugging
images = []
labels = ["desert", "jellyfish"]
for image in glob.glob("./test_images/*"):
image = cv2.imread(image)
images.append(image)
# Test the package
svm_params = dict(n_neighbors=2)
svm = Classifer(classifier="knn", images=images, labels=labels, detector="surf",
n_clusters=50, bow=True, **svm_params)
predictions = svm.predict(images)
stop<file_sep>import matplotlib.pyplot as plt
import numpy as np
labels = ["Uniform","Distance"]
values = range(1,31,1)
uniform_results = [0.17516, 0.15523, 0.14542, 0.14771, 0.15327, 0.14935, 0.14902, 0.15229, 0.15425, 0.15229, 0.15163, 0.15163, 0.14967, 0.14902, 0.15065, 0.15163, 0.15, 0.14673, 0.14706, 0.14608, 0.14902, 0.14706, 0.14771, 0.14902, 0.14804, 0.14641, 0.14706, 0.14608, 0.14673, 0.14641]
uniform_std = [0.01229, 0.00969, 0.01447, 0.01125, 0.00836, 0.0069, 0.00521, 0.00521, 0.00749, 0.00783, 0.00649, 0.0079, 0.00469, 0.00478, 0.00455, 0.00455, 0.00711, 0.00349, 0.00462, 0.00336, 0.003, 0.00231, 0.0032, 0.00521, 0.0059, 0.00303, 0.00537, 0.00658, 0.00836, 0.00735]
distance_results = [0.17516, 0.17516, 0.17941, 0.17712, 0.17974, 0.17876, 0.1768, 0.17484, 0.1719, 0.17288, 0.1719, 0.17059, 0.16993, 0.17059, 0.17157, 0.1683, 0.16503, 0.16242, 0.16209, 0.15882, 0.15915, 0.15817, 0.15784, 0.15817, 0.1585, 0.15686, 0.15817, 0.15686, 0.15588, 0.15621]
distance_std = [0.01229, 0.01229, 0.01488, 0.01087, 0.00895, 0.00989, 0.00829, 0.00941, 0.0064, 0.00443, 0.00823, 0.0069, 0.00752, 0.0065, 0.00547, 0.00547, 0.00547, 0.00824, 0.00696, 0.00855, 0.00939, 0.01255, 0.01072, 0.01071, 0.00846, 0.0067, 0.00903, 0.00766, 0.00658, 0.00811]
plt.style.use("ggplot")
fig = plt.figure(figsize=(14,9))
ax = fig.add_subplot(111)
ax.errorbar(values, uniform_results, yerr=uniform_std, label=labels[0])
ax.legend()
ax = fig.add_subplot(111)
ax.errorbar(values, distance_results, yerr=distance_std, label=labels[1])
ax.legend()
plt.title("Different Weights over Various Number of Neighbors")
plt.xlabel("Number of Neighbors")
plt.ylabel("Accuracy")
text = "Feature Extractor: SURF\nNumber of Clusters: 400\n(Best from Graph #1)\nP: 2"
ax.text(0.1,.129,text,verticalalignment='bottom', horizontalalignment='left')
plt.show()
<file_sep>from Classifiers.Classifier import Classifer | 9513d16a6badb30e1bf20a66e52ddff50ed7b0c6 | [
"Markdown",
"Python"
] | 20 | Python | scott-zockoll/SURP-ObjectRecognition | d62df6c8d668537c60aacd0b4f0ce42a9f271770 | 5f29e6654e63c0e6674eaed7f605866d8f7dc0f6 | |
refs/heads/master | <repo_name>estefanou/WheelofFortune<file_sep>/README.md
# WheelofFortune
Lets Play a Game
In order to play, Download all files into a parent file and open parent file in java IDE, (Eclipse, Dr.Java, etc.).
Follow the commands on the screen.
You are playing against 2 computer simulators, good luck!
<file_sep>/Player.java
public class Player
{
String playerName = "0";
double playerMoney = 0.00;
public Player(String name)
{
playerName = name;
}//end Player method
public String getPlayerName()
{
return playerName;
}
public void setPlayerMoney(double num)
{
playerMoney = num;
}
public double getPlayerMoney()
{
return playerMoney;
}
public void sort(Player [] arrayofPlayers) //7. Sort Method //10. MYMETH(O)
{
for (int i=0;i<arrayofPlayers.length-1;i++)
{
for (int j=i+1;j<arrayofPlayers.length;j++)
{
if (arrayofPlayers[i].getPlayerMoney() < arrayofPlayers[j].getPlayerMoney())
{
Player temp = arrayofPlayers[i];
arrayofPlayers[i] = arrayofPlayers[j];
arrayofPlayers[j] = temp;
}
}
}
}//end sort
}//end Player | 0dbeac1f266b78108322418fed36c41c6eaec91c | [
"Markdown",
"Java"
] | 2 | Markdown | estefanou/WheelofFortune | 0a71ca0b271afc91b7a7d66e18f1fd675964a13e | 4a23c002bc6abfcf40c71d3af3c07f0d2e9aa883 | |
refs/heads/master | <repo_name>uvic-proteincentre/mousequapro<file_sep>/backend/src/qmpkbapp/downLoadData.py
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from collections import Counter
from itertools import combinations
import ast
from operator import itemgetter
import operator
import json
import re,sys
import itertools
from collections import OrderedDict
import datetime
from statistics import mean
# function to generate peptidebased info into nested json format
def updateDataToDownload(jfinaldata):
tempjfinaldata=[]
for jitem in jfinaldata:
sumtempconcendata=jitem["Summary Concentration Range Data"]
alltempconcendata=jitem["All Concentration Range Data"]
allConDataSampleLLOQ=jitem["All Concentration Range Data-Sample LLOQ Based"]
sumconcinfo=jitem["Summary Concentration Range Data"].split(';')
sumtempconcendata=['|'.join(x.split('|')[1:]) for x in sumtempconcendata.split(';')]
alltempconcendata=['|'.join(x.split('|')[1:]) for x in alltempconcendata.split(';')]
allConDataSampleLLOQ=['|'.join(x.split('|')[1:]) for x in allConDataSampleLLOQ.split(';')]
sumconclist=[]
for scitem in sumconcinfo:
scinfo =scitem.split('|')
measuredSampSize=int(scinfo[5].split('/')[1])
for i in range(0,measuredSampSize):
tempStempidInfo=scinfo[1:5]
tempStempidInfo.insert(2,str(i+1))
stempid='|'.join(map(str,tempStempidInfo))
sumconclist.append([stempid,'NA|NA|NA'])
for s in sumconclist:
for x in allConDataSampleLLOQ:
if len(x)>0:
tempID='|'.join(x.split('|')[:5])
if tempID == s[0]:
s[1]='|'.join(x.split('|')[5:])
finalAllConDataSampleLLOQ=['|'.join(y) for y in sumconclist]
jitem["Summary Concentration Range Data"]=';'.join(sumtempconcendata)
jitem["All Concentration Range Data"]=';'.join(alltempconcendata)
jitem["All Concentration Range Data-Sample LLOQ Based"]=';'.join(finalAllConDataSampleLLOQ)
tempjfinaldata.append(jitem)
return tempjfinaldata<file_sep>/client/qmpkb-app/src/app/basic-search-without-example-result/basic-search-without-example-result.component.ts
import { Component, OnInit, Input, Renderer } from '@angular/core';
import { Router } from '@angular/router';
import { FormGroup, FormBuilder, FormControl, Validators, FormArray } from '@angular/forms';
import { HttpClient,HttpErrorResponse } from '@angular/common/http';
import {QmpkbService} from '../qmpkb-service/qmpkb.service';
import { NgxSpinnerService } from 'ngx-spinner';
@Component({
selector: 'app-basic-search-without-example-result',
templateUrl: './basic-search-without-example-result.component.html',
styleUrls: ['./basic-search-without-example-result.component.css']
})
export class BasicSearchWithoutExampleResultComponent implements OnInit {
searchQuery: string;
baseUrl;
@Input()
passedQuery: string;
errorStr:Boolean;
public alertIsVisible:boolean= false;
constructor(
private router: Router,
private http: HttpClient,
private renderer: Renderer,
private _qmpkb:QmpkbService,
private spinner: NgxSpinnerService
) { }
ngOnInit() {
}
submitSearch(event,formData){
let searchedQuery = formData.value['searchterm']
if (searchedQuery){
this.spinner.show();
let tempURL=window.location.origin+'/results/?searchterm='+searchedQuery;
//window.open(tempURL,'_blank');
//window.focus();
location.assign(tempURL);
}
}
moveAdv(){
location.assign('/');
}
}<file_sep>/client/qmpkb-app/src/app/drug-bank/drug-bank.component.spec.ts
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { DrugBankComponent } from './drug-bank.component';
describe('DrugBankComponent', () => {
let component: DrugBankComponent;
let fixture: ComponentFixture<DrugBankComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ DrugBankComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(DrugBankComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
<file_sep>/backend/src/qmpkbapp/api/urls.py
from rest_framework import routers
from django.conf.urls import include, url
from django.conf.urls.static import static
from django.views.generic import TemplateView
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.views.static import serve
from django.views.generic import RedirectView
from django.conf import settings
from .views import fileApi
urlpatterns = [
url(r'^$',fileApi),
]
if settings.DEBUG:
urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
urlpatterns +=static(settings.FILE_URL,document_root=settings.FILE_ROOT)<file_sep>/backend/updatefile/generate_final_data_report_qmpkp.py
import os,subprocess,psutil,re,shutil,datetime,sys,glob
import urllib,urllib2,urllib3
from bioservices.kegg import KEGG
from socket import error as SocketError
import errno
from Bio import SeqIO
import xmltodict
from xml.dom import minidom
from xml.parsers.expat import ExpatError
import random, time
from goatools import obo_parser
import csv
import json
import pandas as pd
import requests
from collections import Counter
from itertools import combinations
from xml.etree import cElementTree as ET
import pickle
import cPickle
import operator
from compileSkylineDataToFit import compileSkylineFile
import numpy as np
from statistics import mean
from presencePepSeqInHuman import presencePepSeqHuman
from ncbiGeneAPI import ncbiGeneExp
from addModCol import addModCol
from addSelCol import addSelCol
from maketotalassaypep import totalAssayPep
from preloadData import preLoadJsonData
from uploadDataElasticSearch import uploadData
import ctypes
from generate_pre_downloadable_file import preDownloadFile
def makemergedict(listOfResourceFile,colname,humanuniprotdic,humankdeggic):
mergedictdata={}
humanmousemergedic={}
humanfuncdict = cPickle.load(open(humanuniprotdic, 'rb'))
humanKEGGdict = cPickle.load(open(humankdeggic, 'rb'))
for fitem in listOfResourceFile:
with open(fitem,'r') as pepfile:
reader = csv.DictReader(pepfile, delimiter='\t')
for row in reader:
info=[]
for i in colname:
info.append(str(row[i]).strip())
if mergedictdata.has_key(info[0].strip()):
mergedictdata[info[0].strip()].append(info[4])
else:
mergedictdata[info[0].strip()]=[info[4]]
temphumanunilist=info[-1].split(',')
hPNlist=[]
hGNlist=[]
hdislist=[]
hunidislist=[]
hunidisURLlist=[]
hdisgenlist=[]
hdisgenURLlist=[]
hDruglist=[]
hGoIDList=[]
hGoNamList=[]
hGoTermList=[]
hGoList=[]
hKeggList=[]
hKeggdetailsList=[]
for h in temphumanunilist:
if h in humanfuncdict:
hPNlist.append(humanfuncdict[h][0])
hGNlist.append(humanfuncdict[h][1])
hdislist.append(humanfuncdict[h][4])
hunidislist.append(humanfuncdict[h][5])
hunidisURLlist.append(humanfuncdict[h][6])
hdisgenlist.append(humanfuncdict[h][7])
hdisgenURLlist.append(humanfuncdict[h][8])
hDruglist.append(humanfuncdict[h][9])
hGoIDList.append(humanfuncdict[h][10])
hGoNamList.append(humanfuncdict[h][11])
hGoTermList.append(humanfuncdict[h][12])
hGoList.append(humanfuncdict[h][-1])
if h in humanKEGGdict:
hKeggList.append(humanKEGGdict[h][0])
hKeggdetailsList.append(humanKEGGdict[h][1])
hPN='NA'
hGN='NA'
hdis='NA'
hunidis='NA'
hunidisURL='NA'
hdisgen='NA'
hdisgenURL='NA'
hDrug='NA'
hGoiddata='NA'
hGonamedata='NA'
hGotermdata='NA'
hGodata='NA'
hKeggdata='NA'
hKeggdetails='NA'
if len(hPNlist)>0:
hPN='|'.join(list(set([l.strip() for k in hPNlist for l in k.split('|') if len(l.strip()) >0])))
if len(hGNlist)>0:
hGN='|'.join(list(set([l.strip() for k in hGNlist for l in k.split('|') if len(l.strip()) >0])))
if len(hdislist)>0:
hdis='|'.join(list(set([l.strip() for k in hdislist for l in k.split('|') if len(l.strip()) >0])))
if len(hunidislist)>0:
hunidis='|'.join(list(set([l.strip() for k in hunidislist for l in k.split('|') if len(l.strip()) >0])))
if len(hunidisURLlist)>0:
hunidisURL='|'.join(list(set([l.strip() for k in hunidisURLlist for l in k.split('|') if len(l.strip()) >0])))
if len(hdisgenlist)>0:
hdisgen='|'.join(list(set([l.strip() for k in hdisgenlist for l in k.split('|') if len(l.strip()) >0])))
if len(hdisgenURLlist)>0:
hdisgenURL='|'.join(list(set([l.strip() for k in hdisgenURLlist for l in k.split('|') if len(l.strip()) >0])))
if len(hDruglist)>0:
hDrug='|'.join(list(set([l.strip() for k in hDruglist for l in k.split('|') if len(l.strip()) >0])))
if len(hGoIDList)>0:
hGoiddata='|'.join(list(set([l.strip() for k in hGoIDList for l in k.split('|') if len(l.strip()) >0])))
if len(hGoNamList)>0:
hGonamedata='|'.join(list(set([l.strip() for k in hGoNamList for l in k.split('|') if len(l.strip()) >0])))
if len(hGoTermList)>0:
hGotermdata='|'.join(list(set([l.strip() for k in hGoTermList for l in k.split('|') if len(l.strip()) >0])))
if len(hGoList)>0:
hGodata='|'.join(list(set([l.strip() for k in hGoList for l in k.split('|') if len(l.strip()) >0])))
if len(hKeggList)>0:
hKeggdata='|'.join(list(set([str(l).strip() for k in hKeggList for l in k ])))
if len(hKeggdetailsList)>0:
hKeggdetails='|'.join(list(set([l.strip() for k in hKeggdetailsList for l in k.split('|') if len(l.strip()) >0])))
humanmousemergedic[info[0].strip()]=[str(hPN),str(hGN),str(hdis),str(hunidis),str(hunidisURL),\
str(hdisgen),str(hdisgenURL),str(hDrug),str(info[-1]),str(hGoiddata),str(hGonamedata),str(hGotermdata),\
str(hGodata),str(hKeggdata),str(hKeggdetails)]
print (str(fitem),"data dictionay job done",str(datetime.datetime.now()))
return mergedictdata,humanmousemergedic
def runprog():
# runcomplete=compileSkylineFile()
# if runcomplete ==0:
# print("No new data has been added!",str(datetime.datetime.now()))
runcomplete=1
return runcomplete
if __name__ == '__main__':
colname=['UniProtKB Accession','Protein','Gene','Organism','Peptide Sequence','Summary Concentration Range Data','All Concentration Range Data','All Concentration Range Data-Sample LLOQ Based','Peptide ID',\
'Special Residues','Molecular Weight','GRAVY Score','Transitions','Retention Time','Analytical inofrmation',\
'Gradients','AAA Concentration','CZE Purity','Panel','Knockout','LLOQ','ULOQ','Sample LLOQ','Protocol','Trypsin','QC. Conc. Data','Human UniProtKB Accession']
print (datetime.datetime.now())
print ("Update mother file job starts now")
#increase the field size of CSV
csv.field_size_limit(int(ctypes.c_ulong(-1).value // 2))
runcomplete=runprog()
if runcomplete==1:
#get home directory path
homedir = os.path.normpath(os.getcwd() + os.sep + os.pardir)
outfilefilename ='outfilefile.csv'
filename='ReportBook_mother_file.csv'
kdicfile='keggdic.obj'
filepath = os.path.join(homedir, 'src/qmpkbmotherfile', filename)
# #copy mother file from its source to working directory
if os.path.exists(filepath):
movefilepath=os.path.join(homedir, 'updatefile', filename)
if os.path.exists(movefilepath):
os.remove(movefilepath)
if not os.path.exists(movefilepath):
shutil.copy2(filepath, movefilepath)
#create backup folder before update and then move that folder with old version mother file for backup
mydate = datetime.datetime.now()
folder_name="version_"+mydate.strftime("%B_%d_%Y_%H_%M_%S")
if not os.path.exists('./backup/'+folder_name):
os.makedirs('./backup/'+folder_name)
if not os.path.exists('./backup/'+folder_name+'/ReportBook_mother_file.csv'):
shutil.copy2(movefilepath, './backup/'+folder_name+'/ReportBook_mother_file.csv')
listOfResourceFile=['mouse_report_peptrack_data.csv']
humanuniprotdic='humanUniprotfuncinfodic.obj'
humankdeggic='humankeggdic.obj'
mergedictdata,humanmousemergedic=makemergedict(listOfResourceFile,colname,humanuniprotdic,humankdeggic)
if len(mergedictdata)>0:
print ("Data formatting and checking pep seq present in uniprot specified seq, job starts",str(datetime.datetime.now()))
uniidlist=[]
dicmrm={}
orgidDic={}
unqisocheckdic={}
unifuncdic={}
countProt=0
countPep=0
RETRY_TIME = 20.0
curr_dir = os.getcwd()
below_curr_dir=os.path.normpath(curr_dir + os.sep + os.pardir)
totalUniId=list(set(mergedictdata.keys()))
tempcanonicalUnId=[]
canonisounidic={}
for tuid in totalUniId:
tuempcode=(str(tuid).split('-'))[0]
if canonisounidic.has_key(tuempcode):
canonisounidic[tuempcode].append(tuid)
else:
canonisounidic[tuempcode]=[tuid]
canonisounidic={a:list(set(b)) for a, b in canonisounidic.items()}
unqcanonicalUnId=list(set(canonisounidic.keys()))
print ("Total Unique protein in this file: ",len(unqcanonicalUnId))
countProt=0
print ("Extracting Protein Name, Gene, Organism Name,GO,Sub cellular data, drug bank data ,disease data and checking pep seq present in uniprot specified seq, job starts",str(datetime.datetime.now()))
tempgotermdic={}
tempsubcdic={}
protgnogscgofilename='uniprotfuncdata.csv'
protgnogscgofile=open(protgnogscgofilename,'w')
protgnogscgoHeader=['ActualUniID','UpdatedUniID','PepSeq','ProteinName','Gene','Organism',\
'OrganismID','Subcellular','Mouse GOID','Mouse GOName','Mouse GoTerm','Mouse Go',\
'Human DrugBank','Human DiseaseData','Human UniProt DiseaseData','Human UniProt DiseaseData URL',\
'Human DisGen DiseaseData','Human DisGen DiseaseData URL','PresentInSeq','Human UniProtKB Accession',\
'Human ProteinName','Human Gene','Human Kegg Pathway Name',\
'Human Kegg Pathway','Human Go ID','Human Go Name','Human Go Term','Human Go']
protgnogscgofile.write('\t'.join(protgnogscgoHeader)+'\n')
for subcgcode in unqcanonicalUnId:
time.sleep(2)
ScAllLocList=[]
GoIDList=[]
GoNamList=[]
GoTermList=[]
GOinfo=[]
PN='NA'
GN='NA'
OG='NA'
OGID='NA'
try:
countProt+=1
if countProt%1000 ==0:
print (str(countProt), "th protein Protein Name, Gene, Organism Name, GO, sub cellular and checking pep seq present in uniprot specified seq job starts",str(datetime.datetime.now()))
SGrequestURL="https://www.uniprot.org/uniprot/"+str(subcgcode)+".xml"
SGunifile=urllib.urlopen(SGrequestURL)
SGunidata= SGunifile.read()
SGunifile.close()
try:
SGunidata=minidom.parseString(SGunidata)
try:
subcelldata=(SGunidata.getElementsByTagName('subcellularLocation'))
for subcItem in subcelldata:
try:
subloc=(subcItem.getElementsByTagName('location')[0]).firstChild.nodeValue
if len(str(subloc).strip()) >0:
ScAllLocList.append(str(subloc).strip())
except:
pass
except IndexError:
pass
try:
godata=(SGunidata.getElementsByTagName('dbReference'))
for gItem in godata:
if (gItem.attributes['type'].value).upper() == 'GO':
try:
gonamedetails=(str(gItem.getElementsByTagName('property')[0].attributes['value'].value).strip()).split(':')[1]
gotermdetails=(str(gItem.getElementsByTagName('property')[0].attributes['value'].value).strip()).split(':')[0]
GoNamList.append(gonamedetails)
goid=str(gItem.attributes['id'].value).strip()
GoIDList.append(goid)
tempGoTerm=None
if gotermdetails.lower()=='p':
tempGoTerm='Biological Process'
if gotermdetails.lower()=='f':
tempGoTerm='Molecular Function'
if gotermdetails.lower()=='c':
tempGoTerm='Cellular Component'
GoTermList.append(tempGoTerm)
tempGOData=gonamedetails+';'+goid+';'+tempGoTerm
GOinfo.append(tempGOData)
except:
pass
if (gItem.attributes['type'].value).strip() == 'NCBI Taxonomy':
try:
OGID=str(gItem.attributes['id'].value).strip()
except:
pass
except IndexError:
pass
try:
try:
PN=(((SGunidata.getElementsByTagName('protein')[0]).getElementsByTagName('recommendedName')[0]).getElementsByTagName('fullName')[0]).firstChild.nodeValue
except:
PN=(((SGunidata.getElementsByTagName('protein')[0]).getElementsByTagName('submittedName')[0]).getElementsByTagName('fullName')[0]).firstChild.nodeValue
except IndexError:
pass
try:
try:
GN=((SGunidata.getElementsByTagName('gene')[0]).getElementsByTagName('name')[0]).firstChild.nodeValue
except:
GN='NA'
except IndexError:
pass
try:
try:
OG=((SGunidata.getElementsByTagName('organism')[0]).getElementsByTagName('name')[0]).firstChild.nodeValue
except:
OG='NA'
except IndexError:
pass
except ExpatError:
pass
except IOError:
pass
subcelldata='NA'
goiddata='NA'
gonamedata='NA'
gotermdata='NA'
goData='NA'
if len(ScAllLocList)>0:
subcelldata='|'.join(list(set(ScAllLocList)))
if len(GoIDList)>0:
goiddata='|'.join(list(set(GoIDList)))
if len(GoNamList)>0:
gonamedata='|'.join(list(set(GoNamList)))
if len(GoTermList)>0:
gotermdata='|'.join(list(set(GoTermList)))
if len(GOinfo)>0:
goData='|'.join(list(set(GOinfo)))
if subcgcode in canonisounidic:
for canisoitem in canonisounidic[subcgcode]:
time.sleep(1)
try:
tempfastaseq=''
unifastaurl="https://www.uniprot.org/uniprot/"+str(canisoitem)+".fasta"
fr = requests.get(unifastaurl)
fAC=(str(fr.url).split('/')[-1].strip()).split('.')[0].strip()
fastaresponse = urllib.urlopen(unifastaurl)
for seq in SeqIO.parse(fastaresponse, "fasta"):
tempfastaseq=(seq.seq).strip()
if len(tempfastaseq.strip()) >0:
if canisoitem in mergedictdata:
for temppgopepseq in mergedictdata[canisoitem]:
pepinfastapresent='No'
if temppgopepseq in tempfastaseq:
pepinfastapresent='Yes'
protFileDataList=['NA']*28
if '-' in fAC:
if canisoitem in humanmousemergedic:
protFileDataList[0]=str(canisoitem)
protFileDataList[1]=str(fAC)
protFileDataList[2]=str(temppgopepseq)
protFileDataList[3]=str(PN)
protFileDataList[4]=str(GN)
protFileDataList[5]=str(OG)
protFileDataList[6]=str(OGID)
protFileDataList[12]=str(humanmousemergedic[canisoitem][7])
protFileDataList[13]=str(humanmousemergedic[canisoitem][2])
protFileDataList[14]=str(humanmousemergedic[canisoitem][3])
protFileDataList[15]=str(humanmousemergedic[canisoitem][4])
protFileDataList[16]=str(humanmousemergedic[canisoitem][5])
protFileDataList[17]=str(humanmousemergedic[canisoitem][6])
protFileDataList[18]=str(pepinfastapresent)
protFileDataList[19]=str(humanmousemergedic[canisoitem][8])
protFileDataList[20]=str(humanmousemergedic[canisoitem][0])
protFileDataList[21]=str(humanmousemergedic[canisoitem][1])
protFileDataList[22]=str(humanmousemergedic[canisoitem][-2])
protFileDataList[23]=str(humanmousemergedic[canisoitem][-1])
protFileDataList[24]=str(humanmousemergedic[canisoitem][9])
protFileDataList[25]=str(humanmousemergedic[canisoitem][10])
protFileDataList[26]=str(humanmousemergedic[canisoitem][11])
protFileDataList[27]=str(humanmousemergedic[canisoitem][12])
else:
protFileDataList[0]=str(canisoitem)
protFileDataList[1]=str(fAC)
protFileDataList[2]=str(temppgopepseq)
protFileDataList[3]=str(PN)
protFileDataList[4]=str(GN)
protFileDataList[5]=str(OG)
protFileDataList[6]=str(OGID)
protFileDataList[18]=str(pepinfastapresent)
else:
if canisoitem in humanmousemergedic:
protFileDataList[0]=str(canisoitem)
protFileDataList[1]=str(fAC)
protFileDataList[2]=str(temppgopepseq)
protFileDataList[3]=str(PN)
protFileDataList[4]=str(GN)
protFileDataList[5]=str(OG)
protFileDataList[6]=str(OGID)
protFileDataList[7]=str(subcelldata)
protFileDataList[8]=str(goiddata)
protFileDataList[9]=str(gonamedata)
protFileDataList[10]=str(gotermdata)
protFileDataList[11]=str(goData)
protFileDataList[12]=str(humanmousemergedic[canisoitem][7])
protFileDataList[13]=str(humanmousemergedic[canisoitem][2])
protFileDataList[14]=str(humanmousemergedic[canisoitem][3])
protFileDataList[15]=str(humanmousemergedic[canisoitem][4])
protFileDataList[16]=str(humanmousemergedic[canisoitem][5])
protFileDataList[17]=str(humanmousemergedic[canisoitem][6])
protFileDataList[18]=str(pepinfastapresent)
protFileDataList[19]=str(humanmousemergedic[canisoitem][8])
protFileDataList[20]=str(humanmousemergedic[canisoitem][0])
protFileDataList[21]=str(humanmousemergedic[canisoitem][1])
protFileDataList[22]=str(humanmousemergedic[canisoitem][-2])
protFileDataList[23]=str(humanmousemergedic[canisoitem][-1])
protFileDataList[24]=str(humanmousemergedic[canisoitem][9])
protFileDataList[25]=str(humanmousemergedic[canisoitem][10])
protFileDataList[26]=str(humanmousemergedic[canisoitem][11])
protFileDataList[27]=str(humanmousemergedic[canisoitem][12])
else:
protFileDataList[0]=str(canisoitem)
protFileDataList[1]=str(fAC)
protFileDataList[2]=str(temppgopepseq)
protFileDataList[3]=str(PN)
protFileDataList[4]=str(GN)
protFileDataList[5]=str(OG)
protFileDataList[6]=str(OGID)
protFileDataList[7]=str(subcelldata)
protFileDataList[8]=str(goiddata)
protFileDataList[9]=str(gonamedata)
protFileDataList[10]=str(gotermdata)
protFileDataList[11]=str(goData)
protFileDataList[18]=str(pepinfastapresent)
protgnogscgofile.write('\t'.join(protFileDataList)+'\n')
except IOError:
pass
protgnogscgofile.close()
mergedictdata.clear()
countProt=0
print ("Extracting Protein Name, Gene, Organism Name,GO,Sub cellular data, and checking pep seq present in uniprot specified seq, job done",str(datetime.datetime.now()))
countProt=0
countPep=0
tempunifuncdic={}
with open(protgnogscgofilename) as pgosgfile:
preader = csv.DictReader(pgosgfile, delimiter='\t')
for prow in preader:
tempCol=['ActualUniID','ProteinName','Gene','Organism',\
'OrganismID','Subcellular','PepSeq','Human DiseaseData',\
'Human UniProt DiseaseData','Human UniProt DiseaseData URL',\
'Human DisGen DiseaseData','Human DisGen DiseaseData URL',\
'Mouse GOID','Mouse GOName','Mouse GoTerm','Mouse Go',\
'Human DrugBank','Human UniProtKB Accession','Human ProteinName','Human Gene',\
'Human Kegg Pathway Name','Human Kegg Pathway',\
'Human Go ID','Human Go Name','Human Go Term','Human Go','PresentInSeq']
templist=[]
for tc in tempCol:
templist.append(str(prow[tc]).strip())
tempfuncid=str(prow['UpdatedUniID']).strip()+'_'+str(prow['PepSeq']).strip()
tempunifuncdic[tempfuncid]=templist
uniidlist.append((((prow['UpdatedUniID']).split('-'))[0]).strip())
if str(prow['PresentInSeq']).strip() =='Yes':
tempid=str(prow['UpdatedUniID']).strip()+'_'+str(prow['OrganismID']).strip()
if unqisocheckdic.has_key(tempid):
unqisocheckdic[tempid].append(str(prow['PepSeq']).strip())
else:
unqisocheckdic[tempid]=[str(prow['PepSeq']).strip()]
unquniidlist=list(set(uniidlist))
print ("Extracting KEGG pathway name, job starts",str(datetime.datetime.now()))
keggdictfile={}
uniproturl = 'https://www.uniprot.org/uploadlists/'
k = KEGG()
for kx in range(0,len(unquniidlist),2000):
countProt+=kx+2000
if countProt%2000 ==0:
print (str(countProt), "th protein kegg job starts",str(datetime.datetime.now()))
uniprotcodes=' '.join(unquniidlist[kx:kx+2000])
uniprotparams = {
'from':'ACC',
'to':'KEGG_ID',
'format':'tab',
'query':uniprotcodes
}
while True:
try:
kuniprotdata = urllib.urlencode(uniprotparams)
kuniprotrequest = urllib2.Request(uniproturl, kuniprotdata)
kuniprotresponse = urllib2.urlopen(kuniprotrequest)
for kuniprotline in kuniprotresponse:
kudata=kuniprotline.strip()
if not kudata.startswith("From"):
kuinfo=kudata.split("\t")
if len(kuinfo[1].strip()):
kegg=k.get(kuinfo[1].strip())
kudict_data = k.parse(kegg)
try:
try:
if len(str(kuinfo[0]).strip()) >5:
tempkeggData='|'.join('{};{}'.format(key, value) for key, value in kudict_data['PATHWAY'].items())
keggdictfile[kuinfo[0].strip()]=[kudict_data['PATHWAY'].values(),tempkeggData]
except TypeError:
pass
except KeyError:
pass
break
except urllib2.HTTPError:
time.sleep(RETRY_TIME)
print ('Hey, I am trying again until succeeds to get data from KEGG!',str(datetime.datetime.now()))
pass
kdicf = open(kdicfile, 'wb')
pickle.dump(keggdictfile, kdicf , pickle.HIGHEST_PROTOCOL)
kdicf.close()
diseasefilepath = os.path.join(below_curr_dir, 'src/UniDiseaseInfo/' 'humsavar.txt')
print ("Extracting disease data, job starts",str(datetime.datetime.now()))
try:
urllib.urlretrieve('ftp://ftp.uniprot.org/pub/databases/uniprot/current_release/knowledgebase/variants/humsavar.txt',diseasefilepath)
urllib.urlcleanup()
except:
print ("Can't able to download humsavar.txt file!!")
print ("Extracting Human disease data, job done",str(datetime.datetime.now()))
print ("Checking uniqueness of peptide sequence and presence in isoforms, job starts",str(datetime.datetime.now()))
countProt=0
countPep=0
outfilefileUnqIsoname='UnqIsoresult.csv'
outfilefileUnqIso = open(outfilefileUnqIsoname,'w')
outfilefileUnqIso.write('UniProtKB Accession'+'\t'+'Peptide Sequence'+'\t'+'Unique in protein'+'\t'+'Present in isoforms'+'\n')
for mkey in unqisocheckdic.keys():
pepunid=mkey.split('_')[0]
unqtemppepseqList=list(set(unqisocheckdic[mkey]))
pepUnqDic={}
pepIsodic={}
nonprotuniqstatDic={}
peppresentUniFastaDic={}
canopepunid=''
pepunidver=''
if '-' in pepunid:
pepunidinfo=pepunid.split('-')
canopepunid=pepunidinfo[0]
pepunidver=pepunidinfo[-1]
else:
canopepunid=pepunid
pirUqorgid=mkey.split('_')[1]
countProt+=1
if countProt%1000 ==0:
print (str(countProt), "th protein peptide uniqueness job starts",str(datetime.datetime.now()))
time.sleep(10)
for mx in range(0,len(unqtemppepseqList),90):
countPep+=mx+90
if countPep%4000 ==0:
print (str(countPep), "th peptide seq uniqueness check job starts",str(datetime.datetime.now()))
unqtemppepseq=','.join(unqtemppepseqList[mx:mx+90])
while True:
try:
PIRpepMatrequestURLUnq ="https://research.bioinformatics.udel.edu/peptidematchapi2/match_get?peptides="+str(unqtemppepseq)+"&taxonids="+str(pirUqorgid)+"&swissprot=true&isoform=true&uniref100=false&leqi=false&offset=0&size=-1"
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
PIRPepMatrUnq = requests.get(PIRpepMatrequestURLUnq, headers={ "Accept" : "application/json"},verify=False)
if not PIRPepMatrUnq.ok:
PIRPepMatrUnq.raise_for_status()
sys.exit()
PIRPepMatresponseBodyUnq = PIRPepMatrUnq.json()
if len(PIRPepMatresponseBodyUnq['results'][0]['proteins'])>0:
for piritemUnq in PIRPepMatresponseBodyUnq['results'][0]['proteins']:
uniID=piritemUnq['ac'].strip()
pirRevStatUnq=piritemUnq['reviewStatus'].strip()
if pepunid.lower() == (str(uniID).lower()).strip():
for sxmatchpep in piritemUnq["matchingPeptide"]:
matchpeptide=sxmatchpep["peptide"]
if str(matchpeptide).strip() in unqtemppepseqList[mx:mx+90]:
peppresentUniFastaDic[str(matchpeptide).strip()]=True
if 'sp' == (str(pirRevStatUnq).lower()).strip():
canouniID=''
uniIDver=''
if '-' in uniID:
uniIDinfo=uniID.split('-')
canouniID=uniIDinfo[0]
uniIDver=uniIDinfo[-1]
else:
canouniID=uniID
for mxmatchpep in piritemUnq["matchingPeptide"]:
uimatchpeptide=mxmatchpep["peptide"]
if str(uimatchpeptide).strip() in unqtemppepseqList[mx:mx+90]:
if (canouniID.strip()).lower() == (canopepunid.strip()).lower():
if len(uniIDver.strip()) ==0:
pepUnqDic[str(uimatchpeptide).strip()]=True
if len(uniIDver.strip()) !=0:
if pepIsodic.has_key(str(uimatchpeptide).strip()):
pepIsodic[str(uimatchpeptide).strip()].append(uniID)
else:
pepIsodic[str(uimatchpeptide).strip()]=[uniID]
if canouniID.strip() !=canopepunid.strip():
nonprotuniqstatDic[str(uimatchpeptide).strip()]=True
break
except requests.exceptions.ConnectionError:
time.sleep(RETRY_TIME)
print ('Hey, I am trying again until succeeds to get data from Peptide Match Server!',str(datetime.datetime.now()))
pass
except requests.exceptions.ChunkedEncodingError:
time.sleep(RETRY_TIME)
print ('chunked_encoding_error happened',str(datetime.datetime.now()))
pass
for peptideseq in unqtemppepseqList:
peptideunique='NA'
pepisodata='No'
if peptideseq not in nonprotuniqstatDic:
if peptideseq in pepUnqDic:
if pepUnqDic[peptideseq]:
peptideunique='Yes'
else:
peptideunique='Not unique'
else:
peptideunique='NA'
if peptideseq in pepIsodic:
pepisodata=','.join(list(set(pepIsodic[peptideseq])))
outfilefileUnqIso.write(str(pepunid)+'\t'+str(peptideseq)+'\t'+str(peptideunique)+'\t'+str(pepisodata)+'\n')
outfilefileUnqIso.close()
print ("Checking uniqueness of peptide sequence and presence in isoforms, job done",str(datetime.datetime.now()))
tempunqisodic={}
with open(outfilefileUnqIsoname) as unqisofile:
uireader = csv.DictReader(unqisofile, delimiter='\t')
for uirow in uireader:
tempunqisodic[str(uirow['UniProtKB Accession']).strip()+'_'+str(uirow['Peptide Sequence']).strip()]=[str(uirow['Unique in protein']).strip(),str(uirow['Present in isoforms']).strip()]
keggdict = cPickle.load(open(kdicfile, 'rb'))
tempunikeggunqisofuncdic={}
for tukey in tempunifuncdic:
tempkeggdata='NA'
tempkeggdetails='NA'
tempunqdata='NA'
tempisodata='NA'
tuniID=tukey.split('_')[0]
if tuniID in keggdict:
tempkeggdata='|'.join(list(set(keggdict[tuniID][0])))
tempkeggdetails=keggdict[tuniID][1]
if tukey in tempunqisodic:
tempunqdata=tempunqisodic[tukey][0]
tempisodata=tempunqisodic[tukey][1]
tuitem=tempunifuncdic[tukey]
tuitem.insert(7,tempunqdata)
tuitem.insert(8,tempisodata)
tuitem.insert(9,tempkeggdata)
tuitem.insert(10,tempkeggdetails)
tempolduniid=tuitem[0]
tuitem[0]=tuniID
modtukey=tempolduniid+'_'+tukey.split('_')[1]
tempunikeggunqisofuncdic[modtukey]=tuitem
print ("Functional data dictionay job done",str(datetime.datetime.now()))
keggdict.clear()
tempunifuncdic.clear()
tempunqisodic.clear()
temptransdic={}
for fitem in listOfResourceFile:
with open(fitem,'r') as pepfile:
reader = csv.DictReader(pepfile, delimiter='\t')
for row in reader:
resinfo=[]
for i in colname:
resinfo.append(str(row[i]).strip())
restempid=resinfo[0].strip()+'_'+resinfo[4].strip()
if temptransdic.has_key(restempid):
temptransdic[restempid].append(resinfo[5:])
else:
temptransdic[restempid]=[resinfo[5:]]
print (str(fitem),"transition data dictionay job done",str(datetime.datetime.now()))
outFileColName=['UniProtKB Accession','Protein','Gene','Organism','Organism ID','SubCellular',\
'Peptide Sequence','Summary Concentration Range Data','All Concentration Range Data',\
'All Concentration Range Data-Sample LLOQ Based','Peptide ID','Special Residues','Molecular Weight',\
'GRAVY Score','Transitions','Retention Time','Analytical inofrmation','Gradients','AAA Concentration',\
'CZE Purity','Panel','Knockout','LLOQ','ULOQ','Sample LLOQ','Protocol','Trypsin','QC. Conc. Data',\
'Unique in protein','Present in isoforms','Mouse Kegg Pathway Name','Mouse Kegg Pathway',\
'Human Disease Name','Human UniProt DiseaseData','Human UniProt DiseaseData URL',\
'Human DisGen DiseaseData','Human DisGen DiseaseData URL','Mouse Go ID',\
'Mouse Go Name','Mouse Go Term','Mouse Go','Human Drug Bank',\
'Human UniProtKB Accession','Human ProteinName','Human Gene',\
'Human Kegg Pathway Name','Human Kegg Pathway','Human Go ID',\
'Human Go Name','Human Go Term','Human Go','UniprotKb entry status']
outFileColNameData='\t'.join(outFileColName)
outfilefile = open(outfilefilename,'w')
outfilefile.write(outFileColNameData+'\n')
for key in temptransdic:
for subtempitem in temptransdic[key]:
temprow=['NA']*52
peptracktemprowpos=[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27]
for i,j in zip(subtempitem,peptracktemprowpos):
temprow[j]=str(i)
functemprowpos=[0,1,2,3,4,5,6,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51]
if key in tempunikeggunqisofuncdic:
for x,y in zip(tempunikeggunqisofuncdic[key],functemprowpos):
temprow[y]=str(x)
if (temprow[0].strip()).upper() != 'NA' and (temprow[6].strip()).upper() != 'NA':
finalreportdata='\t'.join(temprow)
outfilefile.write(finalreportdata+'\n')
temprow=[]
outfilefile.close()
print ("Initial report file creation, job done",str(datetime.datetime.now()))
temptransdic.clear()
tempunikeggunqisofuncdic.clear()
os.rename(outfilefilename,filename)
shutil.move(movefilepath,filepath)
print ("Initial report file transfer, job done",str(datetime.datetime.now()))
addModCol()
keggcmd='python statKEGGcoverage.py'
subprocess.Popen(keggcmd, shell=True).wait()
statjobcmd='python generateSummaryReport.py'
subprocess.Popen(statjobcmd, shell=True).wait()
totalAssayPep()
addSelCol()
presencePepSeqHuman()
ncbiGeneExp()
preLoadJsonData(homedir,filepath)
uploadData()
print ("Extracting Prepare download, job starts",str(datetime.datetime.now()))
preDownloadFile()
print ("Extracting Prepare download, job starts",str(datetime.datetime.now()))
<file_sep>/backend/updatefile/generateSummaryReport.py
import urllib,urllib2
from bioservices.kegg import KEGG
import os,subprocess,psutil,re,shutil,datetime,sys,glob
from operator import itemgetter
import numpy as np
import random, time
from itertools import count, groupby
import pandas as pd
import csv
import itertools
import json
import ctypes
#increase the field size of CSV
csv.field_size_limit(int(ctypes.c_ulong(-1).value // 2))
homedir = os.path.normpath(os.getcwd() + os.sep + os.pardir)
filename='ReportBook_mother_file.csv'
filepath = os.path.join(homedir, 'src/qmpkbmotherfile', filename)
statfilename='overallstat.py'
statmovefilepath=os.path.join(homedir, 'updatefile', statfilename)
statfilepath = os.path.join(homedir, 'src/qmpkbapp', statfilename)
orglist=[]
orglistID=[]
statKeggDic={}
with open(filepath) as pepcsvfile:
pepreader=csv.DictReader(pepcsvfile, delimiter='\t')
for peprow in pepreader:
if str(peprow['UniprotKb entry status']).strip().upper()=='YES':
orglist.append(' '.join(str(peprow['Organism']).strip().split(' ')[:2]))
orglistID.append(str(peprow['Organism ID']).strip())
statuniID=str(peprow['UniProtKB Accession']).strip().split('-')[0]
statPathway=str(peprow['Mouse Kegg Pathway Name']).strip()
statSpeciesID=str(peprow['Organism ID']).strip()
if len(statPathway)>0:
statPathwayList=statPathway.split('|')
for stpItem in statPathwayList:
if stpItem.lower() !='na':
keggid=stpItem.strip()
if statKeggDic.has_key(keggid):
statKeggDic[keggid].append(statuniID.strip())
else:
statKeggDic[keggid] =[statuniID.strip()]
unqorglist=list(set(orglist))
unqorglist.sort(key=str.lower)
speciesList=unqorglist
speciesProt={}
speciesPep={}
godic={}
speciesdic={}
keggpathwaycoverage=[]
#print speciesList
with open(filepath) as pepcsvfile:
pepreader=csv.DictReader(pepcsvfile, delimiter='\t')
for frow in pepreader:
if str(frow['UniprotKb entry status']).strip().upper()=='YES':
pepseq=frow['Peptide Sequence'].strip()
Calorg=str(frow['Organism']).strip()
CalorgID=str(frow['Organism ID']).strip()
speciesdic[CalorgID]=Calorg
acccode=None
acccode=str(frow['UniProtKB Accession']).split('-')[0]
if acccode != None:
for spitem in speciesList:
if spitem in Calorg:
if speciesProt.has_key(spitem):
speciesProt[spitem].append(acccode)
else:
speciesProt[spitem]=[acccode]
if speciesPep.has_key(spitem):
speciesPep[spitem].append(pepseq)
else:
speciesPep[spitem]=[pepseq]
if frow["Mouse Go Name"].upper() !='NA' and len(str(frow["Mouse Go Name"]).strip())>0:
goname=(str(frow["Mouse Go Name"]).strip()).split('|')
for gitem in goname:
if godic.has_key(str(gitem).strip()):
godic[str(gitem).strip()].append(acccode)
else:
godic[str(gitem).strip()]=[acccode]
sys.path.append(os.path.join(homedir, 'src/qmpkbapp'))
from calculationprog import *
pepfinalresult=finalresult['prodataseries']
keggpathwaycoverage=[]
for kskey in statKeggDic:
keggpathwayname=(kskey.strip()).split('|')[0]
tempUniqKeggUniIDList=list(set(statKeggDic[kskey]))
peptrack=[]
for ckey in pepfinalresult:
if ckey == "PeptideTracker":
peptrack=list(set(pepfinalresult[ckey]).intersection(tempUniqKeggUniIDList))
temppeptrack=len(list(set(peptrack)))
tempTotal=len(list(set(tempUniqKeggUniIDList)))
templist=[keggpathwayname,tempTotal,temppeptrack]
keggpathwaycoverage.append(templist)
statsepcies=[]
speciesProt={k:len(list(set(j))) for k,j in speciesProt.items()}
speciesPep={k:len(list(set(j))) for k,j in speciesPep.items()}
godic={k:len(set(v)) for k, v in godic.items()}
for skey in speciesProt:
if skey in speciesPep:
statsepcies.append([skey,speciesProt[skey],speciesPep[skey]])
sortedstatsepcies=sorted(statsepcies, key= itemgetter(1), reverse=True)
golist=[]
for gkey in godic:
golist.append([gkey,godic[gkey]])
sortedgolist=sorted(golist, key= itemgetter(1), reverse=True)
keggpathwaycoverage.sort()
unqkeggpathwaycoverage=list(keggpathwaycoverage for keggpathwaycoverage,_ in itertools.groupby(keggpathwaycoverage))
sortedkeggpathwaycoverage=sorted(unqkeggpathwaycoverage, key= itemgetter(1), reverse=True)
overallSumresult={}
overallSumresult['organism']=unqorglist
unqorglist.insert(0,"")
overallSumresult['species']=unqorglist
overallSumresult['speciesstat']=sortedstatsepcies
overallSumresult['mousegostat']=sortedgolist
overallSumresult['mousekeggstat']=sortedkeggpathwaycoverage
statfileoutput=open(statfilename,'w')
statfileoutput.write("overallSumresult=")
statfileoutput.write(json.dumps(overallSumresult))
statfileoutput.close()
shutil.move(statmovefilepath,statfilepath)<file_sep>/client/qmpkb-app/src/app/detail-concentration/detail-concentration.component.spec.ts
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { DetailConcentrationComponent } from './detail-concentration.component';
describe('DetailConcentrationComponent', () => {
let component: DetailConcentrationComponent;
let fixture: ComponentFixture<DetailConcentrationComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ DetailConcentrationComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(DetailConcentrationComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
<file_sep>/client/qmpkb-app/src/app/detail-concentration/detail-concentration.component.ts
import { Component, OnInit, OnDestroy, ViewChild, Renderer, HostListener,Input} from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { Location } from '@angular/common';
import { HttpClient,HttpErrorResponse } from '@angular/common/http';
import { DataTableDirective } from 'angular-datatables';
import { NgxSpinnerService } from 'ngx-spinner';
import {QmpkbService} from '../qmpkb-service/qmpkb.service';
import * as Plotly from 'plotly.js';
import * as $ from "jquery";
declare var jquery: any;
@Component({
selector: 'app-detail-concentration',
templateUrl: './detail-concentration.component.html',
styleUrls: ['./detail-concentration.component.css']
})
export class DetailConcentrationComponent implements OnInit {
dtOptions: any = {};
dtOptionsOther: any = {};
errorStr:Boolean;
conclist:any;
conclistlen:number;
foundHits:number;
sampleConcUnit:string;
protList:any
queryData:any;
plotlyData:any=[];
lenOfConcData:any;
screenWidth:any;
finalPlotData:any={};
queryConcen:any;
strainData:any;
knockoutData:any;
bioMatData:any;
sexData:any;
allConcSamLLOQ:any;
allConc:any;
concenPlotlyData:any=[];
concenPlotDataUnit: string;
bioMatDataTableData:any=[];
bioMatDataLen=0;
strainDataTableData:any=[];
strainDataLen=0;
sexDataTableData:any=[];
sexDataLen=0;
knockoutDataTableData:any=[];
knockoutDataLen=0;
concenDataStatus=false;
/* cocenDataTypeObj={
'biomat':[this.bioMatData,0],
'str':['strainData',1],
'knock':['knockoutData',1],
'sex':['sexData',1]
}*/
wildObj={
'Wild type':'WT'
};
sexObj={
'Male':'M',
'Female':'F'
};
@ViewChild(DataTableDirective)
datatableElement: DataTableDirective;
plotDataOptions=[
{num:0, name:'Concentration Data'},
{num:1, name:'Log2(Concentration Data)'},
{num:2, name:'Log10(Concentration Data)'},
];
/* this.selectedLevel=this.plotDataOptions[0];*/
selected=this.plotDataOptions[2];
@HostListener('window.resize', ['$event'])
getScreenSize(event?){
this.screenWidth=(window.innerWidth-50)+"px";
}
constructor(
private route: ActivatedRoute,
private location: Location,
private http: HttpClient,
private router: Router,
private spinner: NgxSpinnerService,
private _qmpkb:QmpkbService,
private renderer: Renderer,
) {
this.getScreenSize();
}
@Input()
set concentermQuery(concenQuery:any){
this.queryConcen=concenQuery;
}
async getConcenData(){
let queryConcenArray=this.queryConcen.split('|');
await this._qmpkb.receiveDataFromBackendSearch('/detailConcentrationapi/?uniProtKb=' + queryConcenArray[0]+ '&resultFilePath=' + queryConcenArray[1]).subscribe((response: any)=>{
this.queryData=response;
this.conclist=this.queryData.conclist;
this.strainData=this.queryData.strainData;
this.knockoutData=this.queryData.knockoutData;
this.bioMatData=this.queryData.bioMatData;
this.sexData=this.queryData.sexData;
this.allConcSamLLOQ=this.queryData.allConcSamLLOQ;
this.allConc=this.queryData.allConc;
this.conclistlen=Object.keys(this.conclist).length
this.foundHits=this.queryData.foundHits;
this.sampleConcUnit=this.queryData.concUnit;
this.lenOfConcData= this.queryData.lenOfConcData;
jQuery.extend( jQuery.fn.dataTable.ext.oSort, {
"na-asc": function (str1, str2) {
if(str1 == "NA" || str1.includes('Sample'))
return 1;
else if(str2 == "NA" || str2.includes('Sample') )
return -1;
else{
var fstr1 = parseFloat(str1);
var fstr2 = parseFloat(str2);
return ((fstr1 < str2) ? -1 : ((fstr1 > fstr2) ? 1 : 0));
}
},
"na-desc": function (str1, str2) {
if(str1 == "NA" || str1.includes('Sample'))
return 1;
else if(str2 == "NA" || str2.includes('Sample'))
return -1;
else {
var fstr1 = parseFloat(str1);
var fstr2 = parseFloat(str2);
return ((fstr1 < fstr2) ? 1 : ((fstr1 > fstr2) ? -1 : 0));
}
}
} );
this.dtOptions = {
processing: true,
serverSide: false,
orderCellsTop: true,
fixedHeader: true,
pageLength: 10,
pagingType: 'full_numbers',
scrollX:true,
scrollY:'650px',
scrollCollapse:true,
columnDefs:[
{
targets: 0,
data: null,
defaultContent: '',
orderable: false,
className: 'select-checkbox',
searchable:false
},
{
targets: 1,
searchable:false,
visible:false
},
{
targets: 2,
searchable:false,
visible:false
},
/* {
targets: 3,
searchable:false,
visible:false
},*/
{
targets: 13,
searchable:false,
visible:false
},
{
targets: 14,
searchable:false,
visible:false
},
{
targets: 15,
searchable:false,
visible:false
},
{
targets: 16,
searchable:false,
visible:false
},
{
targets: 17,
searchable:false,
visible:false
},
{type: 'na', targets: [8,9,10,11]} // define 'name' column as na type
],
select:{
style:'multi'
},
// Declare the use of the extension in the dom parameter
dom: 'lBfrtip',
buttons: [
{
extend:'csv',
filename: 'ConcentrationMouseQuaPro',
text:'Download all(CSV)',
exportOptions:{
columns:[1,2,3,4,5,6,7,8,9,10,11,12,15,16,17]
}
},
{
extend:'excel',
filename: 'ConcentrationMouseQuaPro',
text:'Download all(Excel)',
exportOptions:{
columns:[1,2,3,4,5,6,7,8,9,10,11,12,15,16,17]
}
},
'selectAll',
'selectNone'
],
order: [],
autoWidth:true
};
this.dtOptionsOther = {
orderCellsTop: true,
fixedHeader: true,
pageLength: 10,
pagingType: 'full_numbers',
scrollX:true,
scrollY:'650px',
scrollCollapse:true,
autoWidth:true,
columnDefs:[{
type: 'na',
targets: 4
}]
};
if (this.lenOfConcData > 0){
setTimeout(() => {this.dataTableGenerated()}, 100);
}
this.concenDataStatus=true;
}, error=>{
this.errorStr = error;
})
}
ngOnInit() {
this.getConcenData()
}
dataTableGenerated(): void {
const self = this;
self.datatableElement.dtInstance.then((dtInstance:any) => {
dtInstance.rows(function(idx,data){
const plotName=data[13].split('|');
//plotName[0]=self.wildObj[plotName[0]];
plotName[2]=self.sexObj[plotName[2]];
const plotData=data[14];
const plotDataSampleLLOQ=data[15];
const sampleLLOQ=data[16];
const ULOQ=data[17];
const tempPlotArray=[plotName.join('|'),plotData,plotDataSampleLLOQ,sampleLLOQ,ULOQ];
self.plotlyData.push(tempPlotArray.join(';'));
return idx >=0;
}).select();
self.prepareDatatoPlot(self.plotlyData);
});
self.datatableElement.dtInstance.then(table => {
$('#dataTables-wrkld-concentration').on('select.dt', function (e,dt,type,indexes) {
if (self.lenOfConcData == indexes.length){
self.plotlyData=[];
for(let j=0; j< indexes.length;j++){
const plotName=dt.row(indexes[j]).data()[13].split('|');
//plotName[0]=self.wildObj[plotName[0]];
plotName[2]=self.sexObj[plotName[2]];
const plotData=dt.row(indexes[j]).data()[14];
const plotDataSampleLLOQ=dt.row(indexes[j]).data()[15];
const sampleLLOQ=dt.row(indexes[j]).data()[16];
const ULOQ=dt.row(indexes[j]).data()[17];
const tempPlotArray=[plotName.join('|'),plotData,plotDataSampleLLOQ,sampleLLOQ,ULOQ];
self.plotlyData.push(tempPlotArray.join(';'));
self.selected=self.plotDataOptions[0];
}
self.prepareDatatoPlot(self.plotlyData);
} else {
const plotName=dt.row(indexes[0]).data()[13].split('|');
//plotName[0]=self.wildObj[plotName[0]];
plotName[2]=self.sexObj[plotName[2]];
const plotData=dt.row(indexes[0]).data()[14];
const plotDataSampleLLOQ=dt.row(indexes[0]).data()[15];
const sampleLLOQ=dt.row(indexes[0]).data()[16];
const ULOQ=dt.row(indexes[0]).data()[17];
const tempPlotArray=[plotName.join('|'),plotData,plotDataSampleLLOQ,sampleLLOQ,ULOQ];
self.plotlyData.push(tempPlotArray.join(';'));
self.prepareDatatoPlot(self.plotlyData);
self.selected=self.plotDataOptions[0];
}
});
$('#dataTables-wrkld-concentration').on('deselect.dt', function (e,dt,type,indexes) {
if (self.lenOfConcData == indexes.length || indexes.length>1 || self.plotlyData == indexes.length){
self.plotlyData=[];
self.prepareDatatoPlot(self.plotlyData);
} else {
const plotName=dt.row(indexes[0]).data()[13].split('|');
//plotName[0]=self.wildObj[plotName[0]];
plotName[2]=self.sexObj[plotName[2]];
const plotData=dt.row(indexes[0]).data()[14];
const plotDataSampleLLOQ=dt.row(indexes[0]).data()[15];
const sampleLLOQ=dt.row(indexes[0]).data()[16];
const ULOQ=dt.row(indexes[0]).data()[17];
const tempPlotArray=[plotName.join('|'),plotData,plotDataSampleLLOQ,sampleLLOQ,ULOQ];
const indexOfplotlyData=self.plotlyData.indexOf(tempPlotArray.join(';'));
self.plotlyData.splice(indexOfplotlyData,1);
self.prepareDatatoPlot(self.plotlyData);
self.selected=self.plotDataOptions[0];
}
});
});
}
prepareDatatoPlot(rawData:any) {
const tissueColor= {
"Brain":"cyan",
"Brown Adipose":"olive",
"Epididymis":"slategray",
"Eye":"rosybrown",
"Heart":"darksalmon",
"Kidney":"lightcoral",
"Liver Caudate and Right Lobe":"sandybrown",
"Liver Left Lobe":"deepskyblue",
"Lung":"tan",
"Pancreas":"cadetblue",
"Plasma":"greenyellow",
"Ovary":"goldenrod",
"RBCs":"seagreen",
"Salivary Gland":"chocolate",
"Seminal Vesicles":"khaki",
"Skeletal Muscle":"indigo",
"Skin":"thistle",
"Spleen":"violet",
"Testes":"lightpink",
"White Adipose":"plum"
};
let prepareDatatoPlotDataArray=[];
let prepareDatatoPlotDataArrayLog2=[];
let prepareDatatoPlotDataArrayLog10=[];
const yAxisTile='Concentration<br>(fmol target protein/µg extracted protein)';
let layout={
yaxis:{
title:yAxisTile,
zeroline:false,
showlegend: true,
legend :{
x:rawData.length+1
}
},
xaxis:{
automargin: true
}
};
let layout2={
yaxis:{
title:'Concentration<br>in Log2 Scale',
zeroline:false,
showlegend: true,
legend :{
x:rawData.length+1
}
},
xaxis:{
automargin: true
}
};
let layout10={
yaxis:{
title:'Concentration<br>in Log10 Scale',
zeroline:false,
showlegend: true,
legend :{
x:rawData.length+1
}
},
xaxis:{
automargin: true
}
};
const d3colors = Plotly.d3.scale.category10();
for(let i=0; i< rawData.length;i++){
const tempPlotDataArray=rawData[i].split(';');
const plotDataArray=[];
const plotDataArrayLog2=[];
const plotDataArrayLog10=[];
let tempArray=tempPlotDataArray[2].split('|');
if (tempPlotDataArray[2] === 'NA' || tempPlotDataArray[2].trim().length == 0){
tempArray=tempPlotDataArray[1].split('|');
}
for(let j=0; j< tempArray.length;j++){
plotDataArray.push(parseFloat(tempArray[j]));
plotDataArrayLog2.push(Math.log2(parseFloat(tempArray[j])));
plotDataArrayLog10.push(Math.log10(parseFloat(tempArray[j])));
}
let prepareDatatoPlotData={};
let prepareDatatoPlotDataLog2={};
let prepareDatatoPlotDataLog10={};
let boxSamLLOQData={};
let boxSamLLOQDataLog2={};
let boxSamLLOQDataLog10={};
let boxULOQData={};
let boxULOQDataLog2={};
let boxULOQDataLog10={};
let tempplotDataArray=plotDataArray.filter(value=> !Number.isNaN(value));
if (tempPlotDataArray[2] === 'NA' || tempPlotDataArray[2].trim().length == 0){
if (tempplotDataArray.length > 0){
prepareDatatoPlotData={
y:plotDataArray,
name: tempPlotDataArray[0],
boxpoints: 'all',
jitter: 0,
pointpos: 0,
type:'box',
marker:{
color:'black'
},
fillcolor:'rgba(0,0,0,0)',
line:{
color:'rgba(0,0,0,0)'
},
hoverinfo:'skip'
};
prepareDatatoPlotDataLog2={
y:plotDataArrayLog2,
name: tempPlotDataArray[0],
boxpoints: 'all',
jitter: 0,
pointpos: 0,
type:'box',
marker:{
color:'black'
},
fillcolor:'rgba(0,0,0,0)',
line:{
color:'rgba(0,0,0,0)'
},
hoverinfo:'skip'
};
prepareDatatoPlotDataLog10={
y:plotDataArrayLog10,
name: tempPlotDataArray[0],
boxpoints: 'all',
jitter: 0,
pointpos: 0,
type:'box',
marker:{
color:'black'
},
fillcolor:'rgba(0,0,0,0)',
line:{
color:'rgba(0,0,0,0)'
},
hoverinfo:'skip'
};
}
} else {
if (tempplotDataArray.length > 0){
const tempColor=tissueColor[tempPlotDataArray[0].split('|')[0]];
prepareDatatoPlotData={
y:plotDataArray,
name: tempPlotDataArray[0],
boxpoints: 'all',
jitter: 0,
pointpos: 0,
boxmean:true,
marker:{
color:tempColor
},
type:'box'
};
prepareDatatoPlotDataLog2={
y:plotDataArrayLog2,
name: tempPlotDataArray[0],
boxpoints: 'all',
jitter: 0,
pointpos: 0,
boxmean:true,
marker:{
color:tempColor
},
type:'box'
};
prepareDatatoPlotDataLog10={
y:plotDataArrayLog10,
name: tempPlotDataArray[0],
boxpoints: 'all',
jitter: 0,
pointpos: 0,
boxmean:true,
marker:{
color:tempColor
},
type:'box'
};
}
}
if (tempplotDataArray.length > 0){
boxSamLLOQData={
x:[tempPlotDataArray[0]],
y:[parseFloat(tempPlotDataArray[3])],
text: 'Sample LLOQ',
marker:{
color:'red',
symbol:'triangle-up',
size:8
},
showlegend:false
};
boxSamLLOQDataLog2={
x:[tempPlotDataArray[0]],
y:[Math.log2(parseFloat(tempPlotDataArray[3]))],
text: 'Sample LLOQ',
marker:{
color:'red',
symbol:'triangle-up',
size:8
},
showlegend:false
};
boxSamLLOQDataLog10={
x:[tempPlotDataArray[0]],
y:[Math.log10(parseFloat(tempPlotDataArray[3]))],
text: 'Sample LLOQ',
marker:{
color:'red',
symbol:'triangle-up',
size:8
},
showlegend:false
};
boxULOQData={
x:[tempPlotDataArray[0]],
y:[parseFloat(tempPlotDataArray[4])],
text: 'ULOQ',
marker:{
color:'red',
symbol:'triangle-down',
size:8
},
showlegend:false
};
boxULOQDataLog2={
x:[tempPlotDataArray[0]],
y:[Math.log2(parseFloat(tempPlotDataArray[4]))],
text: 'ULOQ',
marker:{
color:'red',
symbol:'triangle-down',
size:8
},
showlegend:false
};
boxULOQDataLog10={
x:[tempPlotDataArray[0]],
y:[Math.log10(parseFloat(tempPlotDataArray[4]))],
text: 'ULOQ',
marker:{
color:'red',
symbol:'triangle-down',
size:8
},
showlegend:false
};
prepareDatatoPlotDataArray.push(prepareDatatoPlotData);
prepareDatatoPlotDataArray.push(boxSamLLOQData);
prepareDatatoPlotDataArray.push(boxULOQData);
prepareDatatoPlotDataArrayLog2.push(prepareDatatoPlotDataLog2);
prepareDatatoPlotDataArrayLog2.push(boxSamLLOQDataLog2);
prepareDatatoPlotDataArrayLog2.push(boxULOQDataLog2);
prepareDatatoPlotDataArrayLog10.push(prepareDatatoPlotDataLog10);
prepareDatatoPlotDataArrayLog10.push(boxSamLLOQDataLog10);
prepareDatatoPlotDataArrayLog10.push(boxULOQDataLog10);
}
}
let finalprepareDatatoPlotDataArray={
0:prepareDatatoPlotDataArray,
1:prepareDatatoPlotDataArrayLog2,
2:prepareDatatoPlotDataArrayLog10
}
let defaultPlotlyConfiguration={};
defaultPlotlyConfiguration ={
responsive: true,
scrollZoom: true,
showTips:true,
modeBarButtonsToRemove: ['sendDataToCloud', 'autoScale2d', 'hoverClosestCartesian', 'hoverCompareCartesian', 'lasso2d', 'select2d','toImage','pan', 'pan2d','zoom2d','toggleSpikelines'],
displayLogo: false
};
this.finalPlotData={
'plotData':finalprepareDatatoPlotDataArray,
'plotLayout':[layout,layout2,layout10],
'config':defaultPlotlyConfiguration
};
Plotly.newPlot('myDivConcAll',finalprepareDatatoPlotDataArray[2],layout10,defaultPlotlyConfiguration);
if (rawData.length==0){
Plotly.purge('myDivConcAll')
}
}
prepareDataToCocenComb(concenTabName:any){
let concQuery=[];
if (concenTabName == "biomat") {
let tempUnit=[];
if (this.bioMatData.length >0 ){
this.bioMatDataLen=1;
for(let y = 0; y <this.bioMatData.length; y++){
let biomatrixifo = this.bioMatData[y];
let tempconcQuery=[];
let tempSampLLOQ=biomatrixifo[8];
let tempULOQ=biomatrixifo[9];
tempconcQuery.push(biomatrixifo[4].trim());
tempconcQuery.push(biomatrixifo[2].trim());
concQuery.push([tempconcQuery.join('|'),tempSampLLOQ,tempULOQ]);
let tempView='<a target="_blank" routerLinkActive="active" href="/dataload/concentration_'+biomatrixifo[7].trim()+'" >' + 'View' + '</a>';
let tempBiomatTableData=[biomatrixifo[4].trim(), biomatrixifo[1].trim(), biomatrixifo[5].trim(), biomatrixifo[6].trim(), biomatrixifo[0].trim(), tempView,biomatrixifo[2].trim()];
this.bioMatDataTableData.push(tempBiomatTableData);
}
for (let m = 0; m <concQuery.length; m++){
const tconcQuery = concQuery[m][0].trim().split('|');
const plotName=concQuery[m][0].trim();
const sampleLLOQ=concQuery[m][1].trim();
const ULOQ=concQuery[m][2].trim();
const plotData=[];
const plotDataSampleLLOQ=[];
for(let x = 0; x <this.allConcSamLLOQ.length; x++){
const tempConcAllSamLLOQ=this.allConcSamLLOQ[x][1].trim().split(';');
if ('NA' != Array.from(new Set(tempConcAllSamLLOQ)).join('')){
for(let i = 0; i <tempConcAllSamLLOQ.length; i++){
const subConcAllSamLLOQ=tempConcAllSamLLOQ[i].trim().split('|');
if(subConcAllSamLLOQ[2] == tconcQuery[0] && this.allConcSamLLOQ[x][0] == tconcQuery[1]){
plotDataSampleLLOQ.push(subConcAllSamLLOQ.slice(-3)[0].split('(')[0].trim())
}
}
}
}
//Group-1|Wild type|Plasma|1|C57BL6NCrl_Perfused|Female
for(let z = 0; z <this.allConc.length; z++){
const tempConcAll=this.allConc[z][1].trim().split(';')
for(let j = 0; j <tempConcAll.length; j++){
const subConcAll=tempConcAll[j].trim().split('|');
if(subConcAll[2] == tconcQuery[0] && this.allConc[z][0] == tconcQuery[1]){
plotData.push(subConcAll.slice(-3)[0].split('(')[0].trim())
tempUnit.push('('+subConcAll.slice(-3)[0].split('(')[1].trim());
}
}
}
const tempPlotArray=[plotName,plotData.join('|'),plotDataSampleLLOQ.join('|'),sampleLLOQ,ULOQ];
this.concenPlotlyData.push(tempPlotArray.join(';'));
}
this.concenPlotDataUnit ='Concentration '+Array.from(new Set(tempUnit)).join('&');
//var plotLyHTML='<div id="myDivConc"></div>';
this.boxplot(this.concenPlotlyData,this.concenPlotDataUnit,0,concenTabName);
}
} else if (concenTabName == "str") {
let tempUnit=[];
if (this.strainData.length >0 ){
this.strainDataLen=1;
for(let y = 0; y <this.strainData.length; y++){
let strainifo = this.strainData[y];
let tempconcQuery=[];
let tempSampLLOQ=strainifo[8];
let tempULOQ=strainifo[9];
tempconcQuery.push(strainifo[5].trim());
tempconcQuery.push(strainifo[4].trim());
tempconcQuery.push(strainifo[2].trim());
concQuery.push([tempconcQuery.join('|'),tempSampLLOQ,tempULOQ]);
let tempView='<a target="_blank" routerLinkActive="active" href="/dataload/concentration_'+strainifo[7].trim()+'" >' + 'View' + '</a>';
let tempStrainTableData=[ strainifo[5].trim(),strainifo[4].trim(), strainifo[1].trim(), strainifo[6].trim(), strainifo[0].trim(), tempView,strainifo[2].trim()];
this.strainDataTableData.push(tempStrainTableData);
}
for (let m = 0; m <concQuery.length; m++){
const tconcQuery = concQuery[m][0].trim().split('|');
const plotName=concQuery[m][0].trim();
const sampleLLOQ=concQuery[m][1].trim();
const ULOQ=concQuery[m][2].trim();
const plotData=[];
const plotDataSampleLLOQ=[];
for(let x = 0; x <this.allConcSamLLOQ.length; x++){
const tempConcAllSamLLOQ=this.allConcSamLLOQ[x][1].trim().split(';');
if ('NA' != Array.from(new Set(tempConcAllSamLLOQ)).join('')){
for(let i = 0; i <tempConcAllSamLLOQ.length; i++){
const subConcAllSamLLOQ=tempConcAllSamLLOQ[i].trim().split('|');
if(subConcAllSamLLOQ[4] == tconcQuery[0] && subConcAllSamLLOQ[2] == tconcQuery[1] && this.allConcSamLLOQ[x][0] == tconcQuery[2]){
plotDataSampleLLOQ.push(subConcAllSamLLOQ.slice(-3)[0].split('(')[0].trim())
}
}
}
}
//Group-1|Wild type|Plasma|1|C57BL6NCrl_Perfused|Female
for(let z = 0; z <this.allConc.length; z++){
const tempConcAll=this.allConc[z][1].trim().split(';')
for(let j = 0; j <tempConcAll.length; j++){
const subConcAll=tempConcAll[j].trim().split('|');
if(subConcAll[4] == tconcQuery[0] && subConcAll[2] == tconcQuery[1] && this.allConc[z][0] == tconcQuery[2]){
plotData.push(subConcAll.slice(-3)[0].split('(')[0].trim())
tempUnit.push('('+subConcAll.slice(-3)[0].split('(')[1].trim());
}
}
}
const tempPlotArray=[plotName,plotData.join('|'),plotDataSampleLLOQ.join('|'),sampleLLOQ,ULOQ];
this.concenPlotlyData.push(tempPlotArray.join(';'));
}
this.concenPlotDataUnit ='Concentration '+Array.from(new Set(tempUnit)).join('&');
//var plotLyHTML='<div id="myDivConc"></div>';
this.boxplot(this.concenPlotlyData,this.concenPlotDataUnit,1,concenTabName);
}
} else if (concenTabName == "knock") {
let tempUnit=[];
if (this.knockoutData.length >0 ){
this.knockoutDataLen=1;
for(let y = 0; y <this.knockoutData.length; y++){
let knockoutifo = this.knockoutData[y];
let tempSampLLOQ=knockoutifo[8];
let tempULOQ=knockoutifo[9];
let tempconcQuery=[];
tempconcQuery.push(knockoutifo[6].trim());
tempconcQuery.push(knockoutifo[4].trim());
tempconcQuery.push(knockoutifo[2].trim());
concQuery.push([tempconcQuery.join('|'),tempSampLLOQ,tempULOQ]);
let tempView='<a target="_blank" routerLinkActive="active" href="/dataload/concentration_'+knockoutifo[7].trim()+'" >' + 'View' + '</a>';
let tempKnockoutTableData=[knockoutifo[6].trim(),knockoutifo[4].trim(), knockoutifo[1].trim(), knockoutifo[5].trim(), knockoutifo[0].trim(), tempView,knockoutifo[2].trim()];
this.knockoutDataTableData.push(tempKnockoutTableData);
}
for (let m = 0; m <concQuery.length; m++){
const tconcQuery = concQuery[m][0].trim().split('|');
const plotName=concQuery[m][0].trim();
const sampleLLOQ=concQuery[m][1].trim();
const ULOQ=concQuery[m][2].trim();
const plotData=[];
const plotDataSampleLLOQ=[];
for(let x = 0; x <this.allConcSamLLOQ.length; x++){
const tempConcAllSamLLOQ=this.allConcSamLLOQ[x][1].trim().split(';');
if ('NA' != Array.from(new Set(tempConcAllSamLLOQ)).join('')){
for(let i = 0; i <tempConcAllSamLLOQ.length; i++){
const subConcAllSamLLOQ=tempConcAllSamLLOQ[i].trim().split('|');
if(subConcAllSamLLOQ[1] == tconcQuery[0] && subConcAllSamLLOQ[2] == tconcQuery[1] && this.allConcSamLLOQ[x][0] == tconcQuery[2]){
plotDataSampleLLOQ.push(subConcAllSamLLOQ.slice(-3)[0].split('(')[0].trim())
}
}
}
}
//Group-1|Wild type|Plasma|1|C57BL6NCrl_Perfused|Female
for(let z = 0; z <this.allConc.length; z++){
const tempConcAll=this.allConc[z][1].trim().split(';')
for(let j = 0; j <tempConcAll.length; j++){
const subConcAll=tempConcAll[j].trim().split('|');
if(subConcAll[1] == tconcQuery[0] && subConcAll[2] == tconcQuery[1] && this.allConc[z][0] == tconcQuery[2]){
plotData.push(subConcAll.slice(-3)[0].split('(')[0].trim())
tempUnit.push('('+subConcAll.slice(-3)[0].split('(')[1].trim());
}
}
}
const tempPlotArray=[plotName,plotData.join('|'),plotDataSampleLLOQ.join('|'),sampleLLOQ,ULOQ];
this.concenPlotlyData.push(tempPlotArray.join(';'));
}
this.concenPlotDataUnit ='Concentration '+Array.from(new Set(tempUnit)).join('&');
//var plotLyHTML='<div id="myDivConc"></div>';
this.boxplot(this.concenPlotlyData,this.concenPlotDataUnit,1,concenTabName);
}
} else if (concenTabName == "sex") {
let strs='';
let tempUnit=[];
if (this.sexData.length >0 ){
this.sexDataLen=1;
for(let y = 0; y <this.sexData.length; y++){
let sexifo = this.sexData[y];
let tempSampLLOQ=sexifo[8];
let tempULOQ=sexifo[9];
let tempconcQuery=[];
tempconcQuery.push(sexifo[1].trim());
tempconcQuery.push(sexifo[4].trim());
tempconcQuery.push(sexifo[2].trim());
concQuery.push([tempconcQuery.join('|'),tempSampLLOQ,tempULOQ]);
let tempView='<a target="_blank" routerLinkActive="active" href="/dataload/concentration_'+sexifo[7].trim()+'" >' + 'View' + '</a>';
let tempSexTableData=[sexifo[1].trim(),sexifo[4].trim(), sexifo[5].trim(), sexifo[6].trim(), sexifo[0].trim(), tempView,sexifo[2].trim()];
this.sexDataTableData.push(tempSexTableData);
}
for (let m = 0; m <concQuery.length; m++){
const tconcQuery = concQuery[m][0].trim().split('|');
const plotName=concQuery[m][0].trim();
const sampleLLOQ=concQuery[m][1].trim();
const ULOQ=concQuery[m][2].trim();
const plotData=[];
const plotDataSampleLLOQ=[];
for(let x = 0; x <this.allConcSamLLOQ.length; x++){
const tempConcAllSamLLOQ=this.allConcSamLLOQ[x][1].trim().split(';');
if ('NA' != Array.from(new Set(tempConcAllSamLLOQ)).join('')){
for(let i = 0; i <tempConcAllSamLLOQ.length; i++){
const subConcAllSamLLOQ=tempConcAllSamLLOQ[i].trim().split('|');
if(subConcAllSamLLOQ[5] == tconcQuery[0] && subConcAllSamLLOQ[2] == tconcQuery[1] && this.allConcSamLLOQ[x][0] == tconcQuery[2]){
plotDataSampleLLOQ.push(subConcAllSamLLOQ.slice(-3)[0].split('(')[0].trim())
}
}
}
}
//Group-1|Wild type|Plasma|1|C57BL6NCrl_Perfused|Female
for(let z = 0; z <this.allConc.length; z++){
const tempConcAll=this.allConc[z][1].trim().split(';')
for(let j = 0; j <tempConcAll.length; j++){
const subConcAll=tempConcAll[j].trim().split('|');
if(subConcAll[5] == tconcQuery[0] && subConcAll[2] == tconcQuery[1] && this.allConc[z][0] == tconcQuery[2]){
plotData.push(subConcAll.slice(-3)[0].split('(')[0].trim())
tempUnit.push('('+subConcAll.slice(-3)[0].split('(')[1].trim());
}
}
}
const tempPlotArray=[plotName,plotData.join('|'),plotDataSampleLLOQ.join('|'),sampleLLOQ,ULOQ];
this.concenPlotlyData.push(tempPlotArray.join(';'));
}
this.concenPlotDataUnit ='Concentration '+Array.from(new Set(tempUnit)).join('&');
//var plotLyHTML='<div id="myDivConc"></div>';
this.boxplot(this.concenPlotlyData,this.concenPlotDataUnit,1,concenTabName);
}
}
//this.boxplot(this.concenPlotlyData,this.concenPlotDataUnit,1);
}
boxplot(dataToPlot:any,yAxisTile:any,tisPos:any, clickedTabName:any):void {
const tissueColor= {
"Brain":"cyan",
"Brown Adipose":"olive",
"Epididymis":"slategray",
"Eye":"rosybrown",
"Heart":"darksalmon",
"Kidney":"lightcoral",
"Liver Caudate and Right Lobe":"sandybrown",
"Liver Left Lobe":"deepskyblue",
"Lung":"tan",
"Pancreas":"cadetblue",
"Plasma":"greenyellow",
"Ovary":"goldenrod",
"RBCs":"seagreen",
"Salivary Gland":"chocolate",
"Seminal Vesicles":"khaki",
"Skeletal Muscle":"indigo",
"Skin":"thistle",
"Spleen":"violet",
"Testes":"lightpink",
"White Adipose":"plum"
};
let boxPlotDataArray=[];
let boxPlotDataArrayLog2=[];
let boxPlotDataArrayLog10=[];
yAxisTile='Concentration<br>(fmol target protein/µg extracted protein)';
let layout={
yaxis:{
title:yAxisTile,
zeroline:false,
showlegend: true,
legend :{
x:dataToPlot.length+1
}
},
xaxis:{
automargin: true,
showticklabels:false
}
};
let layout2={
yaxis:{
title:'Concentration<br>(fmol target protein/µg extracted protein)<br> in Log2 Scale',
zeroline:false,
showlegend: true,
legend :{
x:dataToPlot.length+1
}
},
xaxis:{
automargin: true,
showticklabels:false
}
};
let layout10={
yaxis:{
title:'Concentration<br>(fmol target protein/µg extracted protein)<br> in Log10 Scale',
zeroline:false,
showlegend: true,
legend :{
x:dataToPlot.length+1
}
},
xaxis:{
automargin: true,
showticklabels:false
}
};
const d3colors = Plotly.d3.scale.category10();
let defaultPlotlyConfiguration={};
defaultPlotlyConfiguration ={
responsive: true,
scrollZoom: true,
showTips:true,
modeBarButtonsToRemove: ['sendDataToCloud', 'autoScale2d', 'hoverClosestCartesian', 'hoverCompareCartesian', 'lasso2d', 'select2d','toImage','pan', 'pan2d','zoom2d','toggleSpikelines'],
displayLogo: false
};
for(let i=0; i< dataToPlot.length;i++){
const tempPlotDataArray=dataToPlot[i].split(';');
const plotDataArray=[];
const plotDataArrayLog2=[];
const plotDataArrayLog10=[];
let tempArray=tempPlotDataArray[2].split('|');
if (tempPlotDataArray[2] === 'NA' || tempPlotDataArray[2].trim().length == 0){
tempArray=tempPlotDataArray[1].split('|');
}
for(let j=0; j< tempArray.length;j++){
if (parseFloat(tempArray[j]) >0){
plotDataArray.push(parseFloat(tempArray[j]));
plotDataArrayLog2.push(Math.log2(parseFloat(tempArray[j])));
plotDataArrayLog10.push(Math.log10(parseFloat(tempArray[j])));
}
}
let boxPlotData={};
let boxPlotDataLog2={};
let boxPlotDataLog10={};
let boxSamLLOQData={};
let boxSamLLOQDataLog2={};
let boxSamLLOQDataLog10={};
let boxULOQData={};
let boxULOQDataLog2={};
let boxULOQDataLog10={};
let tempplotDataArray=plotDataArray.filter(value=> !Number.isNaN(value));
if (tempPlotDataArray[2] === 'NA' || tempPlotDataArray[2].trim().length == 0){
if (tempplotDataArray.length > 0){
boxPlotData={
y:plotDataArray,
name: tempPlotDataArray[0],
boxpoints: 'all',
jitter: 0,
pointpos: 0,
type:'box',
marker:{
color:'black'
},
fillcolor:'rgba(0,0,0,0)',
line:{
color:'rgba(0,0,0,0)'
},
hoverinfo:'skip'
};
boxPlotDataLog2={
y:plotDataArrayLog2,
name: tempPlotDataArray[0],
boxpoints: 'all',
jitter: 0,
pointpos: 0,
type:'box',
marker:{
color:'black'
},
fillcolor:'rgba(0,0,0,0)',
line:{
color:'rgba(0,0,0,0)'
},
hoverinfo:'skip'
};
boxPlotDataLog10={
y:plotDataArrayLog10,
name: tempPlotDataArray[0],
boxpoints: 'all',
jitter: 0,
pointpos: 0,
type:'box',
marker:{
color:'black'
},
fillcolor:'rgba(0,0,0,0)',
line:{
color:'rgba(0,0,0,0)'
},
hoverinfo:'skip'
};
}
} else {
if (tempplotDataArray.length > 0){
const tempColor=tissueColor[tempPlotDataArray[0].split('|')[tisPos]];
boxPlotData={
y:plotDataArray,
name: tempPlotDataArray[0],
boxpoints: 'all',
jitter: 0,
pointpos: 0,
boxmean:true,
marker:{
color:tempColor
},
type:'box'
};
boxPlotDataLog2={
y:plotDataArrayLog2,
name: tempPlotDataArray[0],
boxpoints: 'all',
jitter: 0,
pointpos: 0,
boxmean:true,
marker:{
color:tempColor
},
type:'box'
};
boxPlotDataLog10={
y:plotDataArrayLog10,
name: tempPlotDataArray[0],
boxpoints: 'all',
jitter: 0,
pointpos: 0,
boxmean:true,
marker:{
color:tempColor
},
type:'box'
};
}
}
if (tempplotDataArray.length > 0){
boxSamLLOQData={
x:[tempPlotDataArray[0]],
y:[parseFloat(tempPlotDataArray[3])],
text: 'Sample LLOQ',
marker:{
color:'red',
symbol:'triangle-up',
size:8
},
showlegend:false
};
boxSamLLOQDataLog2={
x:[tempPlotDataArray[0]],
y:[Math.log2(parseFloat(tempPlotDataArray[3]))],
text: 'Sample LLOQ',
marker:{
color:'red',
symbol:'triangle-up',
size:8
},
showlegend:false
};
boxSamLLOQDataLog10={
x:[tempPlotDataArray[0]],
y:[Math.log10(parseFloat(tempPlotDataArray[3]))],
text: 'Sample LLOQ',
marker:{
color:'red',
symbol:'triangle-up',
size:8
},
showlegend:false
};
boxULOQData={
x:[tempPlotDataArray[0]],
y:[parseFloat(tempPlotDataArray[4])],
text: 'ULOQ',
marker:{
color:'red',
symbol:'triangle-down',
size:8
},
showlegend:false
};
boxULOQDataLog2={
x:[tempPlotDataArray[0]],
y:[Math.log2(parseFloat(tempPlotDataArray[4]))],
text: 'ULOQ',
marker:{
color:'red',
symbol:'triangle-down',
size:8
},
showlegend:false
};
boxULOQDataLog10={
x:[tempPlotDataArray[0]],
y:[Math.log10(parseFloat(tempPlotDataArray[4]))],
text: 'ULOQ',
marker:{
color:'red',
symbol:'triangle-down',
size:8
},
showlegend:false
};
boxPlotDataArray.push(boxPlotData);
boxPlotDataArray.push(boxSamLLOQData);
boxPlotDataArray.push(boxULOQData);
boxPlotDataArrayLog2.push(boxPlotDataLog2);
boxPlotDataArrayLog2.push(boxSamLLOQDataLog2);
boxPlotDataArrayLog2.push(boxULOQDataLog2);
boxPlotDataArrayLog10.push(boxPlotDataLog10);
boxPlotDataArrayLog10.push(boxSamLLOQDataLog10);
boxPlotDataArrayLog10.push(boxULOQDataLog10);
}
}
let finalBoxPlotDataArray={
0:boxPlotDataArray,
1:boxPlotDataArrayLog2,
2:boxPlotDataArrayLog10
}
let plotlyWidth=$(window).width();
plotlyWidth=plotlyWidth-320;
const updatedDimension={
width:plotlyWidth
}
if (clickedTabName=='str'){
if(document.getElementById('myDivConcStrain')){
/* Plotly.newPlot('myDivConcStrain',finalBoxPlotDataArray[0],layout,defaultPlotlyConfiguration);
Plotly.newPlot('myDivConcStrain',finalBoxPlotDataArray[1],layout2,defaultPlotlyConfiguration);*/
Plotly.newPlot('myDivConcStrain',finalBoxPlotDataArray[2],layout10,defaultPlotlyConfiguration);
Plotly.relayout('myDivConcStrain',updatedDimension);
Plotly.purge('myDivConcSex');
Plotly.purge('myDivConcKnockout');
Plotly.purge('myDivConcBioMat');
}
if (dataToPlot.length==0){
if(document.getElementById('myDivConcStrain')){
Plotly.purge('myDivConcStrain')
}
}
} else if (clickedTabName=='sex'){
if(document.getElementById('myDivConcSex')){
/* Plotly.newPlot('myDivConcSex',finalBoxPlotDataArray[0],layout,defaultPlotlyConfiguration);
Plotly.newPlot('myDivConcSex',finalBoxPlotDataArray[1],layout2,defaultPlotlyConfiguration);*/
Plotly.newPlot('myDivConcSex',finalBoxPlotDataArray[2],layout10,defaultPlotlyConfiguration);
Plotly.relayout('myDivConcSex',updatedDimension);
Plotly.purge('myDivConcStrain');
Plotly.purge('myDivConcKnockout');
Plotly.purge('myDivConcBioMat');
}
if (dataToPlot.length==0){
if(document.getElementById('myDivConcSex')){
Plotly.purge('myDivConcSex')
}
}
} else if (clickedTabName=='knock'){
if(document.getElementById('myDivConcKnockout')){
/* Plotly.newPlot('myDivConcKnockout',finalBoxPlotDataArray[0],layout,defaultPlotlyConfiguration);
Plotly.newPlot('myDivConcKnockout',finalBoxPlotDataArray[1],layout2,defaultPlotlyConfiguration);*/
Plotly.newPlot('myDivConcKnockout',finalBoxPlotDataArray[2],layout10,defaultPlotlyConfiguration);
Plotly.relayout('myDivConcKnockout',updatedDimension);
Plotly.purge('myDivConcStrain');
Plotly.purge('myDivConcSex');
Plotly.purge('myDivConcBioMat');
}
if (dataToPlot.length==0){
if(document.getElementById('myDivConcKnockout')){
Plotly.purge('myDivConcKnockout')
}
}
} else if (clickedTabName=='biomat'){
if(document.getElementById('myDivConcBioMat')){
/* Plotly.newPlot('myDivConcBioMat',finalBoxPlotDataArray[0],layout,defaultPlotlyConfiguration);
Plotly.newPlot('myDivConcBioMat',finalBoxPlotDataArray[1],layout2,defaultPlotlyConfiguration);*/
Plotly.newPlot('myDivConcBioMat',finalBoxPlotDataArray[2],layout10,defaultPlotlyConfiguration);
Plotly.relayout('myDivConcBioMat',updatedDimension);
Plotly.purge('myDivConcStrain');
Plotly.purge('myDivConcSex');
Plotly.purge('myDivConcKnockout');
}
if (dataToPlot.length==0){
if(document.getElementById('myDivConcBioMat')){
Plotly.purge('myDivConcBioMat')
}
}
}
}
onOptionsSelected(event){
if(event.target){
let tempPlotData=this.finalPlotData['plotData'];
let tempPlotLayout=this.finalPlotData['plotLayout'];
let tempConfig=this.finalPlotData['config'];
if (this.selected.name == 'Concentration Data'){
Plotly.purge('myDivConcAll')
Plotly.newPlot('myDivConcAll',tempPlotData[0],tempPlotLayout[0],tempConfig)
}
if (this.selected.name == 'Log2(Concentration Data)'){
Plotly.purge('myDivConcAll')
Plotly.newPlot('myDivConcAll',tempPlotData[1],tempPlotLayout[1],tempConfig)
}
if (this.selected.name == 'Log10(Concentration Data)'){
Plotly.purge('myDivConcAll')
Plotly.newPlot('myDivConcAll',tempPlotData[2],tempPlotLayout[2],tempConfig)
}
}
}
private openTabsConcen(evt, tabName) {
this.prepareDataToCocenComb(tabName);
var i, tabcontent, tablinks;
tabcontent = document.getElementsByClassName("tabcontentconcen");
for (i = 0; i < tabcontent.length; i++) {
tabcontent[i].style.display = "none";
}
tablinks = document.getElementsByClassName("tablinksconcen");
for (i = 0; i < tablinks.length; i++) {
tablinks[i].className = tablinks[i].className.replace(" active", "");
}
document.getElementById(tabName).style.display = "block";
evt.currentTarget.className += " active";
}
}
<file_sep>/backend/updatefile/addSelCol.py
import os,subprocess,psutil,re,shutil,datetime,sys,glob
import csv
import ctypes
def addSelCol():
homedir = os.path.normpath(os.getcwd() + os.sep + os.pardir)
#increase the field size of CSV
csv.field_size_limit(int(ctypes.c_ulong(-1).value // 2))
filename='ReportBook_mother_file.csv'
filepath = os.path.join(homedir, 'src/qmpkbmotherfile', filename)
addselfile="addsel.csv"
aoutput= open(addselfile,'w')
with open(filepath,'r') as f:
for line in f:
info=line.rstrip().split('\t')
if 'UniProtKB Accession' in info:
info.insert(0,"sel")
aoutput.write(('\t'.join(info))+'\n')
else:
info.insert(0,"")
aoutput.write(('\t'.join(info))+'\n')
aoutput.close()
movefilepath=os.path.join(homedir, 'updatefile', filename)
os.rename(addselfile,filename)
shutil.move(movefilepath,filepath)<file_sep>/backend/src/qmpkbapp/adjustP.py
import numpy as np
def p_adjust_bh(p):
"""Benjamini-Hochberg p-value correction for multiple hypothesis testing."""
p = np.asfarray(p)
by_descend = p.argsort()[::-1]
by_orig = by_descend.argsort()
steps = float(len(p)) / np.arange(len(p), 0, -1)
q = np.minimum(1, np.minimum.accumulate(steps * p[by_descend]))
return q[by_orig]<file_sep>/client/qmpkb-app/src/app/data-submission-form/data-submission-form.component.ts
import { Component, OnInit, HostListener } from '@angular/core';
import { HttpClient,HttpErrorResponse } from '@angular/common/http';
import { FormBuilder, FormGroup, Validators, FormControl } from '@angular/forms';
@Component({
selector: 'app-data-submission-form',
templateUrl: './data-submission-form.component.html',
styleUrls: ['./data-submission-form.component.css']
})
export class DataSubmissionFormComponent implements OnInit {
submissionForm: FormGroup;
disabledSubmitButton: boolean = true;
optionsSelect: Array<any>;
@HostListener('input') oninput() {
if (this.submissionForm.valid) {
this.disabledSubmitButton = false;
}
}
constructor(
private http: HttpClient,
private fb: FormBuilder
) {
this.submissionForm = fb.group({
'submissionFormName': ['', Validators.required],
'submissionFormEmail': ['', Validators.compose([Validators.required, Validators.email])],
'submissionFormLaboratory': ['', Validators.required],
'submissionFormExperiment': ['', Validators.required],
'submissionFormPublication': [''],
'submissionFormDataRepository': ['', Validators.required],
'submissionFormDataAcessionNumber': ['', Validators.required],
'submissionFormRepositoryPassword': [''],
'submissionFormMessage': ['', Validators.required],
'submissionFormCopy': [''],
});
}
ngOnInit() {
}
onSubmit() {
if (this.submissionForm.valid) {
alert('We have received your data.');
this.http.get('/submissionapi/?submissiondetails=' + JSON.stringify(this.submissionForm.value)).subscribe(response => {},errors => {console.log(errors)});
this.submissionForm.reset();
this.disabledSubmitButton = true;
}
}
}
<file_sep>/client/qmpkb-app/src/app/human-prott-vista-view/human-prott-vista-view.component.ts
import { Component, OnInit, Input} from '@angular/core';
import * as $ from "jquery";
declare var require: any
declare var jquery: any;
@Component({
selector: 'app-human-prott-vista-view',
templateUrl: './human-prott-vista-view.component.html',
styleUrls: ['./human-prott-vista-view.component.css']
})
export class HumanProttVistaViewComponent implements OnInit {
humanPepStart:number;
humanPepEnd:number;
humanUniprotKB:any;
queryHuamanProtVistaInfo:any;
humanProtvistaQueryData:any;
constructor(
) { }
@Input()
set humanProtVistamQuery(humanProtvistaQueryInfo:any){
this.queryHuamanProtVistaInfo=humanProtvistaQueryInfo;
}
ngOnInit() {
this.humanUniprotKB=this.queryHuamanProtVistaInfo.humanUniprotKB;
this.humanPepStart=this.queryHuamanProtVistaInfo.humanPepStart;
this.humanPepEnd=this.queryHuamanProtVistaInfo.humanPepEnd;
if (this.humanPepEnd > 0){
setTimeout(() => {this.plotProtVistaHumanFunc(this.humanUniprotKB,this.humanPepStart,this.humanPepEnd)}, 100);
};
}
plotProtVistaHumanFunc(protvistaHumanUni:string,humanPreSelectStart:number,humanPreSelectEnd:number): void {
if (humanPreSelectStart >0){
var humanDiv = document.getElementById('humanDiv');
var ProtVistaHuman = require('ProtVista');
var humaninstance = new ProtVistaHuman({
el: humanDiv,
uniprotacc: protvistaHumanUni,
defaultSources: true,
//These categories will **not** be rendered at all
exclusions: ['SEQUENCE_INFORMATION', 'STRUCTURAL', 'TOPOLOGY', 'MOLECULE_PROCESSING', 'ANTIGEN'],
//Your data sources are defined here
customDataSource: {
url: 'fileapi/resultFile/jsonData/protvistadataJson/human/externalLabeledFeatures_',
source: 'MouseQuaPro',
useExtension: true
},
categoryOrder: ['TARGETED_PROTEOMICS_ASSAY_HUMAN', 'PROTEOMICS', 'DOMAINS_AND_SITES', 'PTM', 'MUTAGENESIS'],
//This feature will be preselected
selectedFeature: {
begin: humanPreSelectStart,
end: humanPreSelectEnd,
type: 'MRM'
},
});
}
}
}
<file_sep>/backend/updatefile/ncbiGeneAPI.py
import json
from Bio import Entrez
import sys,urllib3,requests,time,datetime,urllib2
import os,subprocess,psutil,re,shutil,glob
from socket import error as SocketError
import errno
import random
import csv
import requests
import ctypes
def ncbiGeneExp():
#increase the field size of CSV
print ("NCBI Gene transcription, job starts",str(datetime.datetime.now()))
csv.field_size_limit(int(ctypes.c_ulong(-1).value // 2))
homedir = os.path.normpath(os.getcwd() + os.sep + os.pardir)
filename='ReportBook_mother_file.csv'
filepath = os.path.join(homedir, 'src/qmpkbmotherfile', filename)
finalresult=[]
RETRY_TIME=20
Entrez.email = "<EMAIL>"
handleNCBI = Entrez.einfo()
recordNCBI = Entrez.read(handleNCBI)
with open(filepath) as tsvfile:
reader = csv.DictReader(tsvfile, delimiter='\t')
colName=reader.fieldnames
addNewCol=['Gene Expression Data','Gene Expression View']
colName=colName+addNewCol
finalresult.append(colName)
for row in reader:
expData='No'
maxRPKMMeanOrgan='No'
mouseUniID=row['UniProtKB Accession'].strip()
RETRY_TIME = 20.0
while True:
try:
handleIDNCBI = Entrez.esearch(db="gene",term=mouseUniID+"[Protein Accession]")
recordIDNCBI = Entrez.read(handleIDNCBI)
try:
hitIDNCBI=recordIDNCBI["IdList"][0]
httpNCBI = urllib3.PoolManager()
expNCBIURL='https://www.ncbi.nlm.nih.gov/gene/'+hitIDNCBI+'/?report=expression'
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
try:
expNCBIResponse = httpNCBI.request('GET', expNCBIURL)
expNCBIData=str(expNCBIResponse.data)
tempExpNCBIList=[]
for eData in expNCBIData.split('\n'):
if 'var tissues_data = {' in eData.strip():
organSpecExpData=str(eData.strip().replace('\\','').split('=')[1].replace('}};','}}'))
organSpecExpData=organSpecExpData.replace("'", "\"")
organSpecExpDic=json.loads(organSpecExpData)
for eKey in organSpecExpDic:
geneID=organSpecExpDic[eKey]['gene']
meanExpRPKM=organSpecExpDic[eKey]['exp_rpkm']
if int(hitIDNCBI) == int(geneID):
if float(str(meanExpRPKM).strip()) >0:
tempExpNCBIList.append([str(eKey).strip(),str(meanExpRPKM).strip()])
if len(tempExpNCBIList)>0:
expData='MeanExpressionInRPKM|Tissue'
tempData=';'.join(['|'.join(i) for i in tempExpNCBIList])
expData=expData+';'+tempData
tempExpNCBIList.sort(key=lambda x: float(x[1]))
maxRPKMMeanOrgan=str(tempExpNCBIList[-1][1])+' (Mean RPKM in '+str(tempExpNCBIList[-1][0])+')'
except urllib3.exceptions.NewConnectionError:
print('Connection failed.')
pass
except IndexError:
pass
break
except urllib2.HTTPError:
time.sleep(RETRY_TIME)
print 'Hey, I am trying again until succeeds to get data from NCBI Gene Exp!',str(datetime.datetime.now())
pass
row['Gene Expression Data']=expData
row['Gene Expression View']=maxRPKMMeanOrgan
tempList=[]
for col in colName:
tempList.append(row[col])
finalresult.append(tempList)
outputresultpeptrack=dgnosvoutputresultpeptrack=filepath
with open(outputresultpeptrack,'wb') as pf:
pwriter =csv.writer(pf,delimiter='\t')
pwriter.writerows(finalresult)
print ("NCBI Gene transcription, job done",str(datetime.datetime.now()))<file_sep>/client/qmpkb-app/src/app/dropdown-service/where.ts
export class Where {
constructor(public id: string, public selectid: string ,public name: string ) { }
}<file_sep>/backend/updatefile/presencePepSeqInHuman.py
import os,subprocess,psutil,re,shutil,datetime,sys,glob
import urllib,urllib2,urllib3
from socket import error as SocketError
import errno
from Bio import SeqIO
import random, time
import csv
import requests
import ctypes
def presencePepSeqHuman():
print ("Checking peptide sequence presence in Human homolog sequence, job starts",str(datetime.datetime.now()))
#increase the field size of CSV
csv.field_size_limit(int(ctypes.c_ulong(-1).value // 2))
homedir = os.path.normpath(os.getcwd() + os.sep + os.pardir)
filename='ReportBook_mother_file.csv'
filepath = os.path.join(homedir, 'src/qmpkbmotherfile', filename)
finalresult=[]
with open(filepath) as tsvfile:
reader = csv.DictReader(tsvfile, delimiter='\t')
colName=reader.fieldnames
addNewCol=['Present in human ortholog','Unique in human protein', 'Present in human isoforms']
colName=colName+addNewCol
finalresult.append(colName)
for row in reader:
pepSeq=row['Peptide Sequence'].strip()
humanUniId=row['Human UniProtKB Accession'].strip()
row['Present in human ortholog']='No'
row['Unique in human protein']='NA'
row['Present in human isoforms']='NA'
pepisodata=[]
humanCanoPepUnId=''
humanPepUnIdVer=''
unqStatus=False
otherProPresentStatus=False
if '-' in humanUniId:
pepUnIdInfo=humanUniId.split('-')
humanCanoPepUnId=pepUnIdInfo[0]
humanPepUnIdVer=pepUnIdInfo[-1]
else:
humanCanoPepUnId=humanUniId
try:
tempfastaseq=''
unifastaurl="https://www.uniprot.org/uniprot/"+str(humanUniId)+".fasta"
fastaresponse = urllib.urlopen(unifastaurl)
for seq in SeqIO.parse(fastaresponse, "fasta"):
tempfastaseq=(seq.seq).strip()
if len(tempfastaseq.strip()) >0 and pepSeq in tempfastaseq:
row['Present in human ortholog']='Yes'
while True:
try:
PIRpepMatrequestURLUnq ="https://research.bioinformatics.udel.edu/peptidematchapi2/match_get?peptides="+str(pepSeq)+"&taxonids=9606&swissprot=true&isoform=true&uniref100=false&leqi=false&offset=0&size=-1"
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
PIRPepMatrUnq = requests.get(PIRpepMatrequestURLUnq, headers={ "Accept" : "application/json"},verify=False)
if not PIRPepMatrUnq.ok:
PIRPepMatrUnq.raise_for_status()
sys.exit()
PIRPepMatresponseBodyUnq = PIRPepMatrUnq.json()
if len(PIRPepMatresponseBodyUnq['results'][0]['proteins'])>0:
for piritemUnq in PIRPepMatresponseBodyUnq['results'][0]['proteins']:
uniId=piritemUnq['ac'].strip()
pirRevStatUnq=piritemUnq['reviewStatus'].strip()
if 'sp' == (str(pirRevStatUnq).lower()).strip():
canoUniId=''
uniIdVer=''
if '-' in uniId:
uniIdinfo=uniId.split('-')
canoUniId=uniIdinfo[0]
uniIdVer=uniIdinfo[-1]
else:
canoUniId=uniId
for mxmatchpep in piritemUnq["matchingPeptide"]:
uimatchpeptide=mxmatchpep["peptide"]
if str(uimatchpeptide).strip() ==pepSeq:
if (canoUniId.strip()).lower() == (humanCanoPepUnId.strip()).lower():
if len(uniIdVer.strip()) ==0:
unqStatus=True
if len(uniIdVer.strip()) !=0:
unqStatus=False
pepisodata.append(str(uniId))
if (canoUniId.strip()).lower() != (humanCanoPepUnId.strip()).lower():
otherProPresentStatus=True
break
except requests.exceptions.ConnectionError:
time.sleep(RETRY_TIME)
print ('Hey, I am trying again until succeeds to get data from Peptide Match Server!',str(datetime.datetime.now()))
pass
except requests.exceptions.ChunkedEncodingError:
time.sleep(RETRY_TIME)
print ('chunked_encoding_error happened',str(datetime.datetime.now()))
pass
except IOError:
pass
if row['Present in human ortholog'] =='Yes':
if unqStatus:
if otherProPresentStatus:
row['Unique in human protein']='Not unique'
else:
row['Unique in human protein']='Yes'
else:
row['Unique in human protein']='Not unique'
if len(pepisodata)>0:
row['Present in human isoforms']=','.join(list(set(pepisodata)))
else:
row['Present in human isoforms']='No'
tempList=[]
for col in colName:
tempList.append(row[col])
finalresult.append(tempList)
outputresultpeptrack=filepath
with open(outputresultpeptrack,'wb') as pf:
pwriter =csv.writer(pf,delimiter='\t')
pwriter.writerows(finalresult)
print ("Checking peptide sequence presence in Human ortholog sequence, job done",str(datetime.datetime.now()))
<file_sep>/client/qmpkb-app/src/app/dropdown-service/select.ts
export class Select {
constructor(public id: string, public name: string) { }
}<file_sep>/client/qmpkb-app/src/app/app.routing.ts
import {NgModule} from '@angular/core';
import { RouterModule, Routes} from '@angular/router';
import { HomeComponent } from './home/home.component';
import { ResultPageComponent } from './result-page/result-page.component';
import { ResultPageUserSeqComponent } from './result-page-user-seq/result-page-user-seq.component';
import { ResultsQueryComponent } from './results-query/results-query.component';
import { HelpComponent } from './help/help.component';
import { ContactComponent } from './contact/contact.component';
import { ConcentrationComponent } from './concentration/concentration.component';
import { PathwayviewComponent } from './pathwayview/pathwayview.component';
import { PeptideuniquenessComponent } from './peptideuniqueness/peptideuniqueness.component';
import { DataLoadPageComponent } from './data-load-page/data-load-page.component';
import { NotFoundComponent } from './not-found/not-found.component';
import { DetailInformationComponent } from './detail-information/detail-information.component';
import { ProtocolComponent } from './protocol/protocol.component';
import { DataSubmissionFormComponent } from './data-submission-form/data-submission-form.component';
const appRoutes: Routes =[
{
path:"",
component:HomeComponent,
pathMatch:'full',
},
{
path:"results",
component:ResultsQueryComponent,
},
{
path:"resultsseq",
component:ResultPageUserSeqComponent,
},
{
path:"protocol",
component:ProtocolComponent,
},
{
path:"help",
component:HelpComponent,
},
{
path:"contact",
component:ContactComponent,
},
{
path:"concentration",
component:ConcentrationComponent,
},
{
path:"peptideuniqueness",
component:PeptideuniquenessComponent,
},
{
path:"detailinformation",
component:DetailInformationComponent,
},
{
path:"viewpathway",
component:PathwayviewComponent,
},
{
path:"submission",
component:DataSubmissionFormComponent,
},
{
path:"dataload/:slug",
component:DataLoadPageComponent,
},
{
path:"**",
component:NotFoundComponent,
}
]
@NgModule({
imports:[
RouterModule.forRoot(
appRoutes
)
],
exports:[
RouterModule
]
})
export class AppRoutingModule{}<file_sep>/client/qmpkb-app/src/app/pathway/pathway.component.ts
import { Component, OnInit, OnDestroy,Input} from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { Location } from '@angular/common';
import { HttpClient,HttpErrorResponse } from '@angular/common/http';
import { DataTableDirective } from 'angular-datatables';
import { NgxSpinnerService } from 'ngx-spinner';
import {QmpkbService} from '../qmpkb-service/qmpkb.service';
import * as $ from "jquery";
@Component({
selector: 'app-pathway',
templateUrl: './pathway.component.html',
styleUrls: ['./pathway.component.css']
})
export class PathwayComponent implements OnInit {
dtOptions: any = {};
errorStr:Boolean;
keggData:any;
keggDatalen:number;
pathwayInputData:any;
pathwayDataStatus=false;
queryData:any;
pathViewUniprotid:any;
pathViewUniprotname:any;
keggimagedict:any;
keggimagedictlen:number;
otherkeggcolor:any;
notpresentkeggcolor:any;
screenWidth:any;
constructor(
private route: ActivatedRoute,
private location: Location,
private http: HttpClient,
private router: Router,
private spinner: NgxSpinnerService,
private _qmpkb:QmpkbService
) { }
@Input()
set pathwaytermQuery(pathQuery:any){
this.pathwayInputData=pathQuery;
}
ngOnInit() {
this._qmpkb.receiveDataFromBackendSearch('/pathwayapi/?uniProtKb='+ this.pathwayInputData).subscribe((response: any)=>{
this.queryData=response;
this.keggData=this.queryData.pathWayList;
this.keggDatalen=Object.keys(this.keggData).length;
this.pathwayDataStatus=true;
this.dtOptions = {
processing: true,
serverSide: false,
orderCellsTop: true,
fixedHeader: true,
pageLength: 10,
pagingType: 'full_numbers',
scrollX:true,
scrollY:'650px',
scrollCollapse:true,
// Declare the use of the extension in the dom parameter
dom: 'lBfrtip',
buttons: [
{
extend:'csv',
filename: 'PathwayMouseQuaPro',
text:'Download all(CSV)'
},
{
extend:'excel',
filename: 'PathwayMouseQuaPro',
text:'Download all(Excel)'
}
],
autoWidth:true
};
}, error=>{
this.errorStr = error;
});
}
}
<file_sep>/client/qmpkb-app/src/app/disease-information/disease-information.component.ts
import { Component, OnInit, OnDestroy,Input} from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { Location } from '@angular/common';
import { HttpClient,HttpErrorResponse } from '@angular/common/http';
import { DataTableDirective } from 'angular-datatables';
import { NgxSpinnerService } from 'ngx-spinner';
import {QmpkbService} from '../qmpkb-service/qmpkb.service';
import * as $ from "jquery";
declare var jquery: any;
@Component({
selector: 'app-disease-information',
templateUrl: './disease-information.component.html',
styleUrls: ['./disease-information.component.css']
})
export class DiseaseInformationComponent implements OnInit {
disDataStatus=false;
humanDiseaseUniProt:any;
humanDiseaseDisGeNet:any;
humanDiseaseUniProtArray:any;
humanDiseaseDisGeNetArray:any;
diseaseInputData:any;
filterredHumanDiseaseUniProt:any;
filterredHumanDiseaseDisGeNet:any;
filterHumanDiseaseUniProtStatus=false;
filterHumanDiseaseDisGeNetStatus=false;
constructor(
private route: ActivatedRoute,
private location: Location,
private http: HttpClient,
private router: Router,
private spinner: NgxSpinnerService,
private _qmpkb:QmpkbService
) { }
@Input()
set diseasetermQuery(disQuery:any){
this.diseaseInputData=disQuery;
}
ngOnInit() {
this.disDataStatus=true;
this.humanDiseaseUniProtArray=this.diseaseInputData.humanDiseaseUniProt;
this.humanDiseaseUniProt=this.diseaseInputData.humanDiseaseUniProt.join('; ');
this.humanDiseaseDisGeNetArray=this.diseaseInputData.humanDiseaseDisGeNet;
this.humanDiseaseDisGeNet=this.diseaseInputData.humanDiseaseDisGeNet.join('; ');
}
ngAfterViewInit(): void {
var self= this;
$("#myInputUniProt").on("keyup", function() {
const valueUniProt = $(this).val().toString().toLowerCase();
if (valueUniProt.trim().length > 0){
self.filterHumanDiseaseUniProtStatus=true;
const textArrayUniProt=self.humanDiseaseUniProtArray;
let textContentUniProt=[];
for(let i=0; i < textArrayUniProt.length; i++){
const strUniProt = textArrayUniProt[i];
const divUniProt=document.createElement('div');
divUniProt.innerHTML=strUniProt;
if (textArrayUniProt[i] == 'NA'){
textContentUniProt.push(textArrayUniProt[i]);
} else{
textContentUniProt.push(divUniProt.children[0].textContent);
}
}
const filterredUniProt=textContentUniProt.filter(function (elem) {
return elem.toString().toLowerCase().indexOf(valueUniProt) > -1;
});
if (filterredUniProt.length >0){
const tempData=[];
for(let j=0; j < filterredUniProt.length; j++){
tempData.push(textArrayUniProt[textContentUniProt.indexOf(filterredUniProt[j])])
}
self.filterredHumanDiseaseUniProt=tempData.join('; ');
} else{
self.filterredHumanDiseaseUniProt='Oopps. No result matched with your search criteria!';
}
}
if (valueUniProt.trim().length == 0){
self.filterHumanDiseaseUniProtStatus=false;
}
});
$("#myInputDisGenNet").on("keyup", function() {
const valueDisGenNet = $(this).val().toString().toLowerCase();
if (valueDisGenNet.trim().length > 0){
self.filterHumanDiseaseDisGeNetStatus=true;
const textArrayDisGeNet=self.humanDiseaseDisGeNetArray;
let textContentDisGeNet=[];
for(let i=0; i < textArrayDisGeNet.length; i++){
const strDisGeNet = textArrayDisGeNet[i];
const divDisGeNet=document.createElement('div');
divDisGeNet.innerHTML=strDisGeNet;
if (textArrayDisGeNet[i] == 'NA'){
textContentDisGeNet.push(textArrayDisGeNet[i]);
} else{
textContentDisGeNet.push(divDisGeNet.children[0].textContent);
}
}
const filterredDisGeNet=textContentDisGeNet.filter(function (elem) {
return elem.toString().toLowerCase().indexOf(valueDisGenNet) > -1;
});
if (filterredDisGeNet.length >0){
const tempData=[];
for(let j=0; j < filterredDisGeNet.length; j++){
tempData.push(textArrayDisGeNet[textContentDisGeNet.indexOf(filterredDisGeNet[j])])
}
self.filterredHumanDiseaseDisGeNet=tempData.join('; ');
} else{
self.filterredHumanDiseaseDisGeNet='Oopps. No result matched with your search criteria!';
}
}
if (valueDisGenNet.trim().length == 0){
self.filterHumanDiseaseDisGeNetStatus=false;
}
});
}
openTabsDis(evt, tabName) {
var i, tabcontent, tablinks;
tabcontent = document.getElementsByClassName("tabcontentdisease");
for (i = 0; i < tabcontent.length; i++) {
tabcontent[i].style.display = "none";
}
tablinks = document.getElementsByClassName("tablinksdisease");
for (i = 0; i < tablinks.length; i++) {
tablinks[i].className = tablinks[i].className.replace(" active", "");
}
document.getElementById(tabName).style.display = "block";
evt.currentTarget.className += " active";
}
}
<file_sep>/client/qmpkb-app/src/app/drug-bank/drug-bank.component.ts
import { Component, OnInit, OnDestroy,Input} from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { Location } from '@angular/common';
import { HttpClient,HttpErrorResponse } from '@angular/common/http';
import {QmpkbService} from '../qmpkb-service/qmpkb.service';
import * as $ from "jquery";
declare var jquery: any;
@Component({
selector: 'app-drug-bank',
templateUrl: './drug-bank.component.html',
styleUrls: ['./drug-bank.component.css']
})
export class DrugBankComponent implements OnInit {
drugDataStatus=false;
drugBankQueryData:any;
drugBankInputData:any;
drugBankInputDataArray:any;
filterredDrugBankData:any;
filterDrugBankDataStatus=false;
constructor(
private route: ActivatedRoute,
private location: Location,
private http: HttpClient,
private router: Router,
private _qmpkb:QmpkbService
) { }
@Input()
set drugBanktermQuery(drugQuery:any){
this.drugBankQueryData=drugQuery;
}
ngOnInit() {
this.drugDataStatus=true;
this.drugBankInputDataArray=this.drugBankQueryData.drugBankDataArray;
this.drugBankInputData=this.drugBankQueryData.drugBankData;
}
ngAfterViewInit(): void {
var self= this;
$("#myInputDrug").on("keyup", function() {
const valueDrug = $(this).val().toString().toLowerCase();
if (valueDrug.trim().length > 0){
self.filterDrugBankDataStatus=true;
const textArrayDrug=self.drugBankInputDataArray;
let textContentDrug=[];
for(let i=0; i < textArrayDrug.length; i++){
const strDrug = textArrayDrug[i];
const divDrug=document.createElement('div');
divDrug.innerHTML=strDrug;
if (textArrayDrug[i] == 'NA'){
textContentDrug.push(textArrayDrug[i]);
} else{
textContentDrug.push(divDrug.children[0].textContent);
}
}
const filterredDrug=textContentDrug.filter(function (elem) {
return elem.toString().toLowerCase().indexOf(valueDrug) > -1;
});
if (filterredDrug.length >0){
const tempData=[];
for(let j=0; j < filterredDrug.length; j++){
tempData.push(textArrayDrug[textContentDrug.indexOf(filterredDrug[j])])
}
self.filterredDrugBankData=tempData.join('; ');
} else{
self.filterredDrugBankData='Oopps. No result matched with your search criteria!';
}
}
if (valueDrug.trim().length == 0){
self.filterDrugBankDataStatus=false;
}
});
}
}
<file_sep>/client/qmpkb-app/src/app/qmpkb-service/qmpkb.service.spec.ts
import { TestBed } from '@angular/core/testing';
import { QmpkbService } from './qmpkb.service';
describe('QmpkbService', () => {
beforeEach(() => TestBed.configureTestingModule({}));
it('should be created', () => {
const service: QmpkbService = TestBed.get(QmpkbService);
expect(service).toBeTruthy();
});
});
<file_sep>/client/qmpkb-app/src/app/basic-search-without-example/basic-search-without-example.component.ts
import { Component, OnInit, Input, HostListener, Renderer } from '@angular/core';
import { Router } from '@angular/router';
import { FormGroup, FormBuilder, FormControl, Validators, FormArray } from '@angular/forms';
import { HttpClient,HttpErrorResponse } from '@angular/common/http';
import {QmpkbService} from '../qmpkb-service/qmpkb.service';
import { NgxSpinnerService } from 'ngx-spinner';
@Component({
selector: 'app-basic-search-without-example',
templateUrl: './basic-search-without-example.component.html',
styleUrls: ['./basic-search-without-example.component.css']
})
export class BasicSearchWithoutExampleComponent implements OnInit {
searchQuery: string;
baseUrl;
@Input()
passedQuery: string;
errorStr:Boolean;
public alertIsVisible:boolean= false;
/* @Input() public href: string | undefined;
@HostListener('click', ['$event']) public onClick(event: Event): void{
if (!this.href || this.href === '#' || (this.href && this.href.length ===0)){
event.preventDefault();
}
}*/
constructor(
private router: Router,
private http: HttpClient,
private renderer: Renderer,
private _qmpkb:QmpkbService,
private spinner: NgxSpinnerService
) { }
ngOnInit() {
}
submitSearch(event,formData){
let searchedQuery = formData.value['searchterm']
if (searchedQuery){
this.spinner.show();
this.router.navigate(['/results'],{queryParams:{searchterm:searchedQuery}});
}
}
moveAdv(){
location.assign('/');
}
}<file_sep>/backend/updatefile/map_mouse_to_human.py
'''
this script based on jax lab pre-calculated homolog file
'''
import os,subprocess,psutil,re,shutil,datetime,sys,glob
import urllib,urllib2,urllib3,httplib
from socket import error as SocketError
import errno
from Bio import SeqIO
import random, time
import csv
import more_itertools as mit
import pickle
import cPickle
from xml.etree import cElementTree as ET
import xmltodict
from xml.dom import minidom
from xml.parsers.expat import ExpatError
from bioservices.kegg import KEGG
import pandas as pd
import ctypes
from extractDisGenData import disGenData
def mapSpecies(mousepeptrackfilename):
RETRY_TIME = 20.0
mouseTohumanfilepath = os.path.join(os.getcwd(), 'MouseToHuman.tsv')
print ("Extracting Mouse to Human Map data, job starts",str(datetime.datetime.now()))
#increase the field size of CSV
csv.field_size_limit(int(ctypes.c_ulong(-1).value // 2))
try:
urllib.urlretrieve('http://www.informatics.jax.org/downloads/reports/HOM_MouseHumanSequence.rpt',mouseTohumanfilepath)
urllib.urlcleanup()
except:
print ("Can't able to download MouseToHuman.tsv file!!")
colnameMousHu=['HomoloGene ID','Common Organism Name','NCBI Taxon ID','Symbol','EntrezGene ID','Mouse MGI ID','HGNC ID','OMIM Gene ID','Genetic Location','Genomic Coordinates (mouse: , human: )','Nucleotide RefSeq IDs','Protein RefSeq IDs','SWISS_PROT IDs']
mouseHumandata=[]
homologID=[]
with open(mouseTohumanfilepath) as mhtsvfile:
mhreader = csv.DictReader(mhtsvfile, delimiter='\t')
for mhrow in mhreader:
mhtemplist=[]
for i in colnameMousHu:
mhtempdata=str(mhrow[i]).strip()
mhtemplist.append(mhtempdata)
if len(mhtemplist[-1].strip()) >0:
homologID.append(mhtemplist[0])
mouseHumandata.append(mhtemplist)
homologID=list(set(homologID))
homologID.sort()
mousehumandic={}
for homologidItem in homologID:
tempHumanHomoUniID=''
tempMouseHomoUniID=''
for item in mouseHumandata:
if homologidItem == item[0]:
if 'mouse' in item[1].strip().lower():
tempMouseHomoUniID=item[-1].strip()
else:
tempHumanHomoUniID=item[-1].strip()
if len(tempMouseHomoUniID.strip()) >0 and len(tempHumanHomoUniID.strip()) >0 and tempHumanHomoUniID.strip().upper() !='NA':
mousehumandic[tempMouseHomoUniID]=tempHumanHomoUniID
colname=['UniProtKB Accession','Protein','Gene','Organism','Peptide Sequence','Summary Concentration Range Data','All Concentration Range Data','All Concentration Range Data-Sample LLOQ Based','Peptide ID',\
'Special Residues','Molecular Weight','GRAVY Score','Transitions','Retention Time','Analytical inofrmation',\
'Gradients','AAA Concentration','CZE Purity','Panel','Knockout','LLOQ','ULOQ','Sample LLOQ','Protocol','Trypsin','QC. Conc. Data','Human UniProtKB Accession']
finalresult=[]
finalresult.append(colname)
humanUniprotID=[]
with open(mousepeptrackfilename) as csvfile:
reader = csv.DictReader(csvfile, delimiter='\t')
for row in reader:
templist=[]
for i in colname[:-1]:
tempdata=str(row[i]).strip()
templist.append(tempdata)
if len(str(templist[0]).strip())>0:
if templist[0].split('-')[0] in mousehumandic:
humanUniprotID.append(mousehumandic[templist[0].split('-')[0]])
templist.append(mousehumandic[templist[0].split('-')[0]])
else:
templist.append('NA')
finalresult.append(templist)
with open(mousepeptrackfilename,'wb') as pf:
pwriter =csv.writer(pf,delimiter='\t')
pwriter.writerows(finalresult)
disGenDataDicName=disGenData()
#disGenDataDicName='disGen.obj'
disGenDataDic = cPickle.load(open(disGenDataDicName, 'rb'))
unqhumanUniprotID=list(set(humanUniprotID))
humanUniprotfuncinfodic={}
countProt=0
for subcode in unqhumanUniprotID:
time.sleep(2)
drugbanklist=[]
PN='NA'
GN='NA'
OG='NA'
OGID='NA'
dislist=[]
unidislist=[]
unidisURLlist=[]
disgendislist=[]
disgendisURLlist=[]
GoIDList=[]
GoNamList=[]
GoTermList=[]
GOinfo=[]
try:
countProt+=1
if countProt%1000 ==0:
print str(countProt), "th protein Protein Name, Gene, Organism Name,drug bank data,disease data job starts",str(datetime.datetime.now())
SGrequestURL="https://www.uniprot.org/uniprot/"+str(subcode)+".xml"
SGunifile=urllib.urlopen(SGrequestURL)
SGunidata= SGunifile.read()
SGunifile.close()
try:
SGunidata=minidom.parseString(SGunidata)
try:
drugdata=(SGunidata.getElementsByTagName('dbReference'))
for duItem in drugdata:
if (duItem.attributes['type'].value).upper() == 'DRUGBANK':
try:
drugname=(str(duItem.getElementsByTagName('property')[0].attributes['value'].value).strip())
drugid=str(duItem.attributes['id'].value).strip()
durl='<a target="_blank" href="https://www.drugbank.ca/drugs/'+drugid+'">'+drugname+'</a>'
drugbanklist.append(durl)
except:
pass
if (duItem.attributes['type'].value).strip() == 'NCBI Taxonomy':
try:
OGID=str(duItem.attributes['id'].value).strip()
except:
pass
except IndexError:
pass
try:
godata=(SGunidata.getElementsByTagName('dbReference'))
for gItem in godata:
if (gItem.attributes['type'].value).upper() == 'GO':
try:
gonamedetails=(str(gItem.getElementsByTagName('property')[0].attributes['value'].value).strip()).split(':')[1]
gotermdetails=(str(gItem.getElementsByTagName('property')[0].attributes['value'].value).strip()).split(':')[0]
GoNamList.append(gonamedetails)
goid=str(gItem.attributes['id'].value).strip()
GoIDList.append(goid)
tempGoTerm=None
if gotermdetails.lower()=='p':
tempGoTerm='Biological Process'
if gotermdetails.lower()=='f':
tempGoTerm='Molecular Function'
if gotermdetails.lower()=='c':
tempGoTerm='Cellular Component'
GoTermList.append(tempGoTerm)
tempGOData=gonamedetails+';'+goid+';'+tempGoTerm
GOinfo.append(tempGOData)
except:
pass
if (gItem.attributes['type'].value).strip() == 'NCBI Taxonomy':
try:
OGID=str(gItem.attributes['id'].value).strip()
except:
pass
except IndexError:
pass
try:
try:
PN=(((SGunidata.getElementsByTagName('protein')[0]).getElementsByTagName('recommendedName')[0]).getElementsByTagName('fullName')[0]).firstChild.nodeValue
except:
PN=(((SGunidata.getElementsByTagName('protein')[0]).getElementsByTagName('submittedName')[0]).getElementsByTagName('fullName')[0]).firstChild.nodeValue
except IndexError:
pass
try:
try:
GN=((SGunidata.getElementsByTagName('gene')[0]).getElementsByTagName('name')[0]).firstChild.nodeValue
except:
GN='NA'
except IndexError:
pass
try:
try:
OG=((SGunidata.getElementsByTagName('organism')[0]).getElementsByTagName('name')[0]).firstChild.nodeValue
except:
OG='NA'
except IndexError:
pass
try:
disdata=SGunidata.getElementsByTagName('disease')
for dItem in disdata:
disname=''
disshort=''
disURL=''
disID=''
try:
disname=(dItem.getElementsByTagName('name')[0]).firstChild.nodeValue
disID=(dItem.attributes['id'].value).upper()
except:
pass
try:
disshort=(dItem.getElementsByTagName('acronym')[0]).firstChild.nodeValue
except:
pass
if len(disname.strip())>0:
disURL='<a target="_blank" href="https://www.uniprot.org/diseases/'+disID+'">'+str(disname.strip())+'('+str(disshort)+')'+'</a>'
dislist.append(str(disname.strip())+'('+str(disshort)+')')
unidislist.append(str(disname.strip())+'('+str(disshort)+')')
unidisURLlist.append(disURL)
except IndexError:
pass
except ExpatError:
pass
except IOError:
pass
drugbankdata='NA'
disdata='NA'
uniDisData='NA'
uniDisURLData='NA'
disgenDisData='NA'
disgenDisURLData='NA'
goiddata='NA'
gonamedata='NA'
gotermdata='NA'
goData='NA'
if GN != 'NA' and GN in disGenDataDic:
disgendislist=disGenDataDic[GN][0]
disgendisURLlist=disGenDataDic[GN][1]
if len(dislist)>0:
dislist=dislist+disGenDataDic[GN][0]
else:
dislist=disGenDataDic[GN][0]
if len(GoIDList)>0:
goiddata='|'.join(list(set(GoIDList)))
if len(GoNamList)>0:
gonamedata='|'.join(list(set(GoNamList)))
if len(GoTermList)>0:
gotermdata='|'.join(list(set(GoTermList)))
if len(GOinfo)>0:
goData='|'.join(list(set(GOinfo)))
if len(drugbanklist)>0:
drugbankdata='|'.join(list(set(drugbanklist)))
if len(dislist)>0:
disdata='|'.join(list(set(dislist)))
if len(unidislist)>0:
uniDisData='|'.join(list(set(unidislist)))
if len(unidisURLlist)>0:
uniDisURLData='|'.join(list(set(unidisURLlist)))
if len(disgendislist)>0:
disgenDisData='|'.join(list(set(disgendislist)))
if len(disgendisURLlist)>0:
disgenDisURLData='|'.join(list(set(disgendisURLlist)))
humanUniprotfuncinfodic[subcode]=[PN,GN,OG,OGID,disdata,uniDisData,uniDisURLData,disgenDisData,disgenDisURLData,drugbankdata,goiddata,gonamedata,gotermdata,goData]
hudicfile='humanUniprotfuncinfodic.obj'
hudicf = open(hudicfile, 'wb')
pickle.dump(humanUniprotfuncinfodic, hudicf , pickle.HIGHEST_PROTOCOL)
hudicf.close()
print ("Extracting KEGG pathway name, job starts",str(datetime.datetime.now()))
hkeggdictfile={}
huniproturl = 'https://www.uniprot.org/uploadlists/'
hk = KEGG()
for hkx in range(0,len(unqhumanUniprotID),2000):
countProt+=hkx+2000
if countProt%2000 ==0:
print (str(countProt), "th protein kegg job starts",str(datetime.datetime.now()))
huniprotcodes=' '.join(unqhumanUniprotID[hkx:hkx+2000])
huniprotparams = {
'from':'ACC',
'to':'KEGG_ID',
'format':'tab',
'query':huniprotcodes
}
while True:
try:
hkuniprotdata = urllib.urlencode(huniprotparams)
hkuniprotrequest = urllib2.Request(huniproturl, hkuniprotdata)
hkuniprotresponse = urllib2.urlopen(hkuniprotrequest)
for hkuniprotline in hkuniprotresponse:
hkudata=hkuniprotline.strip()
if not hkudata.startswith("From"):
hkuinfo=hkudata.split("\t")
if len(hkuinfo[1].strip()):
hkegg=hk.get(hkuinfo[1].strip())
hkudict_data = hk.parse(hkegg)
try:
try:
if len(str(hkuinfo[0]).strip()) >5:
tempkeggData='|'.join('{};{}'.format(key, value) for key, value in hkudict_data['PATHWAY'].items())
hkeggdictfile[hkuinfo[0].strip()]=[hkudict_data['PATHWAY'].values(),tempkeggData]
except TypeError:
pass
except KeyError:
pass
break
except urllib2.HTTPError:
time.sleep(RETRY_TIME)
print ('Hey, I am trying again until succeeds to get data from KEGG!',str(datetime.datetime.now()))
pass
hkdicfile='humankeggdic.obj'
hkdicf = open(hkdicfile, 'wb')
pickle.dump(hkeggdictfile, hkdicf , pickle.HIGHEST_PROTOCOL)
hkdicf.close()<file_sep>/backend/updatefile/preloadData.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import unicodedata
import datetime,glob
import time
import os,subprocess,psutil,re,sys,shutil,datetime
import csv
import datetime
import urllib,urllib2,urllib3
import json
import numpy as np
from statistics import mean
import ctypes
def preLoadJsonData(homedir,filepath):
print ("Preload, job starts",str(datetime.datetime.now()))
#increase the field size of CSV
csv.field_size_limit(int(ctypes.c_ulong(-1).value // 2))
calfilename='preloadHomeData.json'
calmovefilepath=os.path.join(homedir, 'updatefile', calfilename)
calfilepath = os.path.join(homedir, 'src/resultFile/jsonData/preLoadData', calfilename)
prodataseries={}
pepseqdataseries={}
totalpeptideseq=''
aacountlist=[]
biomatCalDicPep={}
biomatCalDicPro={}
sexCalDicPep={}
sexCalDicPro={}
strainCalDicPep={}
strainCalDicPro={}
biopepList=[]
bioproList=[]
biomatList=[]
sexpepList=[]
sexproList=[]
sexList=[]
uniqueAssaysList=[]
strainpepList=[]
strainproList=[]
strainList=[]
meanStrainDic={}
meanBioMatDic={}
finalMeanConcDic={}
finalmeanBioMatDic={}
pepSeqPresenceHumanOrtholog=[]
pepSeqPresenceHumanOrthologUniId=[]
finalreader = csv.DictReader(open(filepath),delimiter='\t')
for frow in finalreader:
pepseq=frow['Peptide Sequence'].strip()
acccode=None
acccode=str(frow['UniProtKB Accession']).split('-')[0]
genecode=str(frow['Gene']).strip()
biomat=frow['Biological Matrix'].strip().split('|')
sex=frow['Sex'].strip().split('|')
strain=frow['Strain'].strip().split('|')
sumconcdata=str(frow["Summary Concentration Range Data"]).strip().split(';')
if acccode !=None and str(frow['UniprotKb entry status']).strip().upper()=='YES':
totalpeptideseq +=pepseq.upper()
if 'PeptideTracker' in prodataseries:
prodataseries['PeptideTracker'].append(acccode)
else:
prodataseries['PeptideTracker']=[acccode]
if 'PeptideTracker' in pepseqdataseries:
pepseqdataseries['PeptideTracker'].append(pepseq.upper())
else:
pepseqdataseries['PeptideTracker']=[pepseq.upper()]
for si in sumconcdata:
meanConc=si.split('|')[6].split('(')[0].strip()
if meanConc.upper() != 'NA':
meanConc=float(meanConc)
meanConclog10=round(np.log10(meanConc),2)
strainConc=si.split('|')[3]
matConc=si.split('|')[2]
sexConc=si.split('|')[4]
updatedAcccode='UniProtKB:'+acccode+'<br>Gene:'+genecode
if meanStrainDic.has_key(strainConc):
meanStrainDic[strainConc].append([meanConclog10,updatedAcccode,sexConc,matConc])
else:
meanStrainDic[strainConc]=[[meanConclog10,updatedAcccode,sexConc,matConc]]
if meanBioMatDic.has_key(matConc):
meanBioMatDic[matConc].append([meanConclog10,updatedAcccode])
else:
meanBioMatDic[matConc]=[[meanConclog10,updatedAcccode]]
for bi in biomat:
uniqueAssaysList.append(pepseq+bi)
if bi in biomatCalDicPep:
biomatCalDicPep[bi].append(pepseq)
else:
biomatCalDicPep[bi]=[pepseq]
if bi in biomatCalDicPro:
biomatCalDicPro[bi].append(acccode)
else:
biomatCalDicPro[bi]=[acccode]
for si in sex:
if si in sexCalDicPep:
sexCalDicPep[si].append(pepseq)
else:
sexCalDicPep[si]=[pepseq]
if si in sexCalDicPro:
sexCalDicPro[si].append(acccode)
else:
sexCalDicPro[si]=[acccode]
for sti in strain:
if sti in strainCalDicPep:
strainCalDicPep[sti].append(pepseq)
else:
strainCalDicPep[sti]=[pepseq]
if sti in strainCalDicPro:
strainCalDicPro[sti].append(acccode)
else:
strainCalDicPro[sti]=[acccode]
if str(frow['Present in human ortholog']) == 'Yes':
pepSeqPresenceHumanOrtholog.append(pepseq.upper())
pepSeqPresenceHumanOrthologUniId.append(frow['Human UniProtKB Accession'].strip().upper().split('-')[0])
for mi in meanStrainDic:
tempMeanjsonData=[]
tempMeanMatdic={}
for i in range(0,len(meanStrainDic[mi])):
if meanStrainDic[mi][i][3] in tempMeanMatdic:
tempMeanMatdic[meanStrainDic[mi][i][3]].append(meanStrainDic[mi][i][:3])
else:
tempMeanMatdic[meanStrainDic[mi][i][3]]=[meanStrainDic[mi][i][:3]]
for tmati in tempMeanMatdic:
tempMatJsonData={}
tempMeanSexDic={}
for j in range(0,len(tempMeanMatdic[tmati])):
if tempMeanMatdic[tmati][j][2] in tempMeanSexDic:
tempMeanSexDic[tempMeanMatdic[tmati][j][2]].append(tempMeanMatdic[tmati][j][:2])
else:
tempMeanSexDic[tempMeanMatdic[tmati][j][2]]=[tempMeanMatdic[tmati][j][:2]]
for tsi in tempMeanSexDic:
tempDic={}
for z in range(0,len(tempMeanSexDic[tsi])):
if tempMeanSexDic[tsi][z][1] in tempDic:
tempDic[tempMeanSexDic[tsi][z][1]].append(tempMeanSexDic[tsi][z][0])
else:
tempDic[tempMeanSexDic[tsi][z][1]]=[tempMeanSexDic[tsi][z][0]]
updatedConcData=[[mean(tempDic[k]),k] for k in tempDic]
updatedConcData.sort(key=lambda x:x[0], reverse=True)
tempMeanData='|'.join(map(str,list(zip(*updatedConcData)[0])))
tempaccData='|'.join(list(zip(*updatedConcData)[1]))
tempMatJsonData[tsi]={'MeanConcData':tempMeanData,'MeanProtein':tempaccData}
tempMeanjsonData.append({tmati:tempMatJsonData})
finalMeanConcDic[mi]=tempMeanjsonData
for biomi in meanBioMatDic:
tempDic={}
for ai in meanBioMatDic[biomi]:
if ai[1] in tempDic:
tempDic[ai[1]].append(ai[0])
else:
tempDic[ai[1]]=[ai[0]]
updatedConcData=[[round(mean(tempDic[k]),2),k] for k in tempDic]
updatedConcData.sort(key=lambda x:x[0], reverse=True)
tempMeanData='|'.join(map(str,list(zip(*updatedConcData)[0])))
tempaccData='|'.join(list(zip(*updatedConcData)[1]))
finalmeanBioMatDic[biomi]={'MeanConcData':tempMeanData,'MeanProtein':tempaccData}
prodataseries['PeptideTracker']=list(set(prodataseries['PeptideTracker']))
uniqueProtein=len(list(set(prodataseries['PeptideTracker'])))
pepseqdataseries['PeptideTracker']=list(set(pepseqdataseries['PeptideTracker']))
uniquePeptide=len(list(set(pepseqdataseries['PeptideTracker'])))
uniqueAssays=len(list(set(uniqueAssaysList)))
biomatList=biomatCalDicPro.keys()
biomatList.sort()
for bkey in biomatList:
if bkey in biomatCalDicPep and bkey in biomatCalDicPro:
bioproList.append(len(set(biomatCalDicPro[bkey])))
biopepList.append(len(set(biomatCalDicPep[bkey])))
for skey in sexCalDicPro:
if skey in sexCalDicPep:
sexList.append(skey)
sexproList.append(len(set(sexCalDicPro[skey])))
sexpepList.append(len(set(sexCalDicPep[skey])))
strainList=strainCalDicPro.keys()
strainList.sort()
for stkey in strainList:
if stkey in strainCalDicPep and stkey in strainCalDicPro:
strainproList.append(len(set(strainCalDicPro[stkey])))
strainpepList.append(len(set(strainCalDicPep[stkey])))
strainDic={'Strain':'|'.join(strainList),'PeptideSeq':'|'.join(map(str,strainpepList)),'Protein':'|'.join(map(str,strainproList))}
biomatDic={'BioMat':'|'.join(biomatList),'PeptideSeq':'|'.join(map(str,biopepList)),'Protein':'|'.join(map(str,bioproList))}
sexDic={'Sex':'|'.join(sexList),'PeptideSeq':'|'.join(map(str,sexpepList)),'Protein':'|'.join(map(str,sexproList))}
finalresultdic={}
finalresultdic['uniqueAssays']=uniqueAssays
finalresultdic['uniquePeptide']=uniquePeptide
finalresultdic['uniqueProtein']=uniqueProtein
finalresultdic['pepSeqPresenceHumanOrtholog']=len(set(pepSeqPresenceHumanOrtholog))
finalresultdic['pepSeqPresenceHumanOrthologUniId']=len(set(pepSeqPresenceHumanOrthologUniId))
finalresultlist=[]
finalresultlist.append(finalresultdic)
finalresultlist.append(biomatDic)
finalresultlist.append(strainDic)
finalresultlist.append(sexDic)
finalresultlist.append(finalMeanConcDic)
finalresultlist.append(finalmeanBioMatDic)
finalresultJson={"data":finalresultlist}
calfileoutput=open(calfilename,'w')
calfileoutput.write(json.dumps(finalresultJson))
calfileoutput.close()
shutil.move(calmovefilepath,calfilepath)
print ("Preload, job done",str(datetime.datetime.now()))<file_sep>/backend/src/qmpkbapp/appTissueInfo.py
# -*- coding: utf-8 -*-
listOfMatrix=['Plasma','Red blood cells','Brain','Skin','Testes','Eye','Heart','Liver Caudate and Right Lobe','Liver Left Lobe','Lung','Kidney','Ovary','Brown Adipose','White Adipose','Epididymis','Seminal Vesicles', 'Skeletal Muscle','Spleen','Pancreas','Salivary Gland']
unitDic={
'Plasma':' (fmol target protein/ug extracted protein)',
'RBCs':' (fmol target protein/ug extracted protein)',
'Brain':' (fmol target protein/ug extracted protein)',
'Skin':' (fmol target protein/ug extracted protein)',
'Testes':' (fmol target protein/ug extracted protein)',
'Eye':' (fmol target protein/ug extracted protein)',
'Heart':' (fmol target protein/ug extracted protein)',
'Liver Caudate and Right Lobe': ' (fmol target protein/ug extracted protein)',
'Liver Left Lobe': ' (fmol target protein/ug extracted protein)',
'Lung': ' (fmol target protein/ug extracted protein)',
'Ovary': ' (fmol target protein/ug extracted protein)',
'Kidney': ' (fmol target protein/ug extracted protein)',
'Brown Adipose': ' (fmol target protein/ug extracted protein)',
'White Adipose': ' (fmol target protein/ug extracted protein)',
'Epididymis': ' (fmol target protein/ug extracted protein)',
'Seminal Vesicles': ' (fmol target protein/ug extracted protein)',
'Skeletal Muscle': ' (fmol target protein/ug extracted protein)',
'Spleen': ' (fmol target protein/ug extracted protein)',
'Pancreas': ' (fmol target protein/ug extracted protein)',
'Salivary Gland': ' (fmol target protein/ug extracted protein)'
}<file_sep>/backend/src/qmpkbapp/colName.py
proteinInfoColname=['sel', 'UniProtKB Accession', 'Protein', 'Gene', 'Peptide Sequence', 'SubCellular','Strain',\
'Knockout','Biological Matrix','Sex','Concentration Range','Gene Expression View','Human UniProtKB Accession', \
'Human ProteinName', 'Human Gene', 'Mouse Kegg Pathway Name','Mouse Kegg Pathway','Human Kegg Pathway Name', \
'Human Kegg Pathway','Human Disease Name','Human UniProt DiseaseData','Human UniProt DiseaseData URL',\
'Human DisGen DiseaseData','Human DisGen DiseaseData URL',\
'Mouse Go ID','Mouse Go Name','Mouse Go Term','Mouse Go','Human Go ID','Human Go Name','Human Go Term','Human Go',\
'Human Drug Bank','Available assays in human ortholog']
downloadColName=['Mouse Protein name','Mouse Gene','Mouse UniProtKB accession','Peptide sequence',\
'Peptide present in isoforms','Peptide unique in proteome','Strain','Mutant','Human ortholog','Human Gene',\
'UniProtKB accession of human ortholog','Peptide present in human ortholog','Peptide unique in human protein',\
'Peptide present in human isoforms','Available assays in human ortholog','Subcellular localization',\
'Molecular pathway(s) Mouse','Molecular pathway(s) Human','Involvement in disease-Human(UniProt)','Involvement in disease-Human(DisGeNET)',\
'Go Mouse','Go Human','Drug associations-Human','Transitions','Retention Time','Analytical inofrmation',\
'Gradients','Molecular Weight','GRAVY Score','Summary Concentration Range Data',\
'All Concentration Range Data-Sample LLOQ Based','Panel','Assay LLOQ','Assay ULOQ','Sample LLOQ','Gene Expression Data']
downloadColNameUserSeq=['Mouse Protein name','Mouse Gene','Mouse UniProtKB accession','Peptide sequence',\
'Peptide present in isoforms','Peptide unique in proteome',"Peptide unique in user's database",\
"Peptide in user's database",'Strain','Mutant','Human ortholog','Human Gene','UniProtKB accession of human Ortholog',\
'Peptide present in human ortholog','Peptide unique in human protein','Peptide present in human isoforms',\
'Available assays in human ortholog','Subcellular localization','Molecular pathway(s) Mouse','Molecular pathway(s) Human',\
'Involvement in disease-Human(UniProt)','Involvement in disease-Human(DisGeNET)','Go Mouse','Go Human',\
'Drug associations-Human','Transitions','Retention Time','Analytical inofrmation','Gradients','Molecular Weight','GRAVY Score',\
'Summary Concentration Range Data','All Concentration Range Data-Sample LLOQ Based','Panel','Assay LLOQ',\
'Assay ULOQ','Sample LLOQ','Gene Expression Data']<file_sep>/backend/updatefile/generate_pre_downloadable_file.py
#!/usr/bin/env.python
# -*- coding: utf-8 -*-
# encoding: utf-8
from __future__ import unicode_literals
from django.utils.encoding import force_text
import os,subprocess,psutil,re,shutil,datetime,sys,glob
import errno
import csv
import json
import pandas as pd
import numpy as np
from statistics import mean
import ctypes
from elasticsearch import Elasticsearch,helpers,RequestsHttpConnection
from modJsonData import pepbasedInfo
from prePareDownloadFile import updateDataToDownload
def preDownloadFile():
proteinInfoColname=['sel', 'UniProtKB Accession', 'Protein', 'Gene', 'Peptide Sequence', 'SubCellular','Strain',\
'Knockout','Biological Matrix','Sex','Concentration Range','Gene Expression View','Human UniProtKB Accession', \
'Human ProteinName', 'Human Gene', 'Mouse Kegg Pathway Name','Mouse Kegg Pathway','Human Kegg Pathway Name', \
'Human Kegg Pathway','Human Disease Name','Human UniProt DiseaseData','Human UniProt DiseaseData URL','Human DisGen DiseaseData','Human DisGen DiseaseData URL',\
'Mouse Go ID','Mouse Go Name','Mouse Go Term','Mouse Go','Human Go ID','Human Go Name','Human Go Term','Human Go',\
'Human Drug Bank','Available assays in human ortholog']
downloadColName=['Mouse Protein Name','Mouse Gene','Mouse UniProtKB Accession','Peptide Sequence',\
'Peptide present in isoforms','Peptide unique in proteome','Strain','Knockout','Human Ortholog','Human Gene',\
'UniProtKB Accession of Human Ortholog','Peptide present in human ortholog','Peptide unique in human protein',\
'Peptide present in human isoforms','Available assays in human ortholog','Subcellular localization',\
'Pathway(s) Mouse','Pathway(s) Human','Involvement in disease-Human(UniProt)','Involvement in disease-Human(DisGeNET)',\
'Go Mouse','Go Human','Drug Bank-Human','Transitions','Retention Time','Analytical inofrmation',\
'Gradients','Molecular Weight','GRAVY Score','Summary Concentration Range Data',\
'All Concentration Range Data-Sample LLOQ Based','Panel','Assay LLOQ','Assay ULOQ','Sample LLOQ','Gene Expression Data']
es = Elasticsearch(
['http://xxxxx:9200/'],
connection_class=RequestsHttpConnection
)
homedir = os.path.normpath(os.getcwd() + os.sep + os.pardir)
es.indices.refresh(index="xxxxx-index")
query={"query": {
"bool": {
"must": [
{"match": {"Organism ID": "10090"}}
]
}
}
}
jsonfilename_proteincentric='all_data_proteincentric.json'
downloadFilename='Results_all.csv'
jsonfilepath_proteincentric=os.path.join(homedir, 'src/resultFile/preDownloadFile/json', jsonfilename_proteincentric)
downloadResultFilePath=os.path.join(homedir, 'src/resultFile/preDownloadFile/csv', downloadFilename)
jsonfileoutput_proteincentric= open(jsonfilepath_proteincentric,'w')
res=helpers.scan(client=es,scroll='2m',index="xxxxx-index", doc_type="xxxxx-type",query=query,request_timeout=30)
jfinaldata=[]
uniprotpepinfo={}
for i in res:
jdic=i['_source']
jdic={str(tkey):force_text(tvalue) for tkey,tvalue in jdic.items()}
if jdic["UniprotKb entry status"] =="Yes":
if uniprotpepinfo.has_key(jdic["UniProtKB Accession"]):
uniprotpepinfo[jdic["UniProtKB Accession"]].append(jdic["Peptide Sequence"])
else:
uniprotpepinfo[jdic["UniProtKB Accession"]]=[jdic["Peptide Sequence"]]
#if jdic["Retention Time"].lower() =='na' or jdic["Gradients"].lower() =='na':
if jdic["Retention Time"].lower() =='na':
jdic["Summary Concentration Range Data"]='NA'
jdic["Concentration View"]='NA'
if jdic["Human UniProtKB Accession"].lower() !='na' and jdic["Present in human ortholog"].lower() =='no':
jdic["Available assays in human ortholog"]='http://mrmassaydb.proteincentre.com/search/hyperlink/?UniProtKB Accession='+jdic["Human UniProtKB Accession"]
else:
jdic["Available assays in human ortholog"]='NA'
if len(str(jdic["Summary Concentration Range Data"]).strip()) >0 and str(jdic["Summary Concentration Range Data"]).strip().upper() !="NA":
try:
jdic["Biological Matrix"]=jdic["Biological Matrix"].replace('|','<br/>')
except KeyError:
pass
jdic["Summary Concentration Range Data"]=jdic["Summary Concentration Range Data"].replace('fmol target protein/u','fmol target protein/µ')
jdic["Summary Concentration Range Data"]=jdic["Summary Concentration Range Data"].replace('ug protein/u','µg protein/µ')
jdic["Summary Concentration Range Data"]=jdic["Summary Concentration Range Data"].replace('ug protein/mg','µg protein/mg')
jdic["All Concentration Range Data"]=jdic["All Concentration Range Data"].replace('fmol target protein/u','fmol target protein/µ')
jdic["All Concentration Range Data"]=jdic["All Concentration Range Data"].replace('ug protein/u','µg protein/µ')
jdic["All Concentration Range Data"]=jdic["All Concentration Range Data"].replace('ug protein/mg','µg protein/mg')
jdic["All Concentration Range Data-Sample LLOQ Based"]=jdic["All Concentration Range Data-Sample LLOQ Based"].replace('fmol target protein/u','fmol target protein/µ')
jdic["All Concentration Range Data-Sample LLOQ Based"]=jdic["All Concentration Range Data-Sample LLOQ Based"].replace('ug protein/u','µg protein/µ')
jdic["All Concentration Range Data-Sample LLOQ Based"]=jdic["All Concentration Range Data-Sample LLOQ Based"].replace('ug protein/mg','µg protein/mg')
jdic["Concentration View"]=jdic["Concentration View"].replace('fmol target protein/u','fmol target protein/µ')
jdic["Concentration Range"]=jdic["Concentration Range"].replace('fmol target protein/u','fmol target protein/µ')
jdic["LLOQ"]=jdic["LLOQ"].replace('fmol target protein/u','fmol target protein/µ')
jdic["ULOQ"]=jdic["ULOQ"].replace('fmol target protein/u','fmol target protein/µ')
jdic["Sample LLOQ"]=jdic["Sample LLOQ"].replace('fmol target protein/u','fmol target protein/µ')
if jdic["Unique in protein"].upper() =='NA':
jdic["Unique in protein"]=jdic["Unique in protein"].replace('NA','No')
if jdic["Present in isoforms"].upper() =='NA':
jdic["Present in isoforms"]=jdic["Present in isoforms"].replace('NA','No')
jfinaldata.append(jdic)
es.indices.refresh(index="xxxxx-index")
finalupdatedUniInfo=pepbasedInfo(jfinaldata,uniprotpepinfo,proteinInfoColname)
json.dump(finalupdatedUniInfo,jsonfileoutput_proteincentric)
jsonfileoutput_proteincentric.close()
jfinaldata=updateDataToDownload(jfinaldata)
df=pd.read_json(json.dumps(jfinaldata))
df.rename(columns ={'UniProtKB Accession':'Mouse UniProtKB Accession','Protein':'Mouse Protein Name',\
'Gene':'Mouse Gene','Present in isoforms':'Peptide present in isoforms',\
'Unique in protein':'Peptide unique in proteome','Human UniProtKB Accession': \
'UniProtKB Accession of Human ortholog','Human ProteinName': 'Human ortholog',\
'Peptide ID':'Assay ID','Present in human isoforms':'Peptide present in human isoforms',\
'Unique in human protein':'Peptide unique in human protein',\
'SubCellular':'Subcellular localization','Mouse Kegg Pathway':'Pathway(s) Mouse',\
'Present in human ortholog':'Peptide present in human ortholog',\
'Human Kegg Pathway':'Pathway(s) Human','Human UniProt DiseaseData':'Involvement in disease-Human(UniProt)',\
'Human DisGen DiseaseData':'Involvement in disease-Human(DisGeNET)','Human Drug Bank':\
'Drug Bank-Human','CZE Purity':'CZE','AAA Concentration':'AAA',\
'Mouse Go':'Go Mouse','Human Go':'Go Human','LLOQ':'Assay LLOQ','ULOQ':'Assay ULOQ'}, inplace =True)
df.to_csv(downloadResultFilePath,index=False, encoding='utf-8', columns=downloadColName)
<file_sep>/client/qmpkb-app/src/app/app.module.ts
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { HttpClientModule } from '@angular/common/http';
import { FormsModule,ReactiveFormsModule } from '@angular/forms';
// third party imports
import { Ng2OdometerModule } from 'ng2-odometer';
import { DataTablesModule } from 'angular-datatables';
import { NgxSpinnerModule } from 'ngx-spinner';
import { NgMultiSelectDropDownModule } from 'ng-multiselect-dropdown';
import { CollapseModule } from 'ngx-bootstrap/collapse';
import * as $ from "jquery";
//service
import {DropdownService} from './dropdown-service/dropdown.service';
import {QmpkbService} from './qmpkb-service/qmpkb.service';
import { AppRoutingModule } from './app.routing';
import { AppComponent } from './app.component';
import { HomeComponent } from './home/home.component';
import { HelpComponent } from './help/help.component';
import { ContactComponent } from './contact/contact.component';
import { BasicSearchComponent } from './basic-search/basic-search.component';
import { BasicSearchWithoutExampleComponent } from './basic-search-without-example/basic-search-without-example.component';
import { BasicSearchWithoutExampleResultComponent } from './basic-search-without-example-result/basic-search-without-example-result.component';
import { AdvanceSearchComponent } from './advance-search/advance-search.component';
import { ProtvistaViewComponent } from './protvista-view/protvista-view.component';
import { ResultPageComponent } from './result-page/result-page.component';
import { ResultPageUserSeqComponent } from './result-page-user-seq/result-page-user-seq.component';
import { AssayComponent } from './assay/assay.component';
import { ConcentrationComponent } from './concentration/concentration.component';
import { PathwayComponent } from './pathway/pathway.component';
import { PathwayviewComponent } from './pathwayview/pathwayview.component';
import { GotermComponent } from './goterm/goterm.component';
import { PeptideuniquenessComponent } from './peptideuniqueness/peptideuniqueness.component';
import { MouseAnatomyComponent } from './mouse-anatomy/mouse-anatomy.component';
import { DataLoadPageComponent } from './data-load-page/data-load-page.component';
import { NotFoundComponent } from './not-found/not-found.component';
import { GeneExpressionComponent } from './gene-expression/gene-expression.component';
import { FoldChangeComponent } from './fold-change/fold-change.component';
import { DetailInformationComponent } from './detail-information/detail-information.component';
import { DetailConcentrationComponent } from './detail-concentration/detail-concentration.component';
import { DiseaseInformationComponent } from './disease-information/disease-information.component';
import { DrugBankComponent } from './drug-bank/drug-bank.component';
import { SubcellLocationComponent } from './subcell-location/subcell-location.component';
import { ResultsQueryComponent } from './results-query/results-query.component';
import { ProtocolComponent } from './protocol/protocol.component';
import { HumanProttVistaViewComponent } from './human-prott-vista-view/human-prott-vista-view.component';
import { Navbar1Component } from './navbar1/navbar1.component';
import { Navbar2Component } from './navbar2/navbar2.component';
import { Navbar3Component } from './navbar3/navbar3.component';
import { DataSubmissionFormComponent } from './data-submission-form/data-submission-form.component';
import { DownloadResultComponent } from './download-result/download-result.component';
@NgModule({
declarations: [
AppComponent,
HomeComponent,
HelpComponent,
ContactComponent,
BasicSearchComponent,
BasicSearchWithoutExampleComponent,
BasicSearchWithoutExampleResultComponent,
ProtvistaViewComponent,
ResultPageComponent,
ResultPageUserSeqComponent,
AdvanceSearchComponent,
AssayComponent,
ConcentrationComponent,
PathwayComponent,
PathwayviewComponent,
GotermComponent,
PeptideuniquenessComponent,
MouseAnatomyComponent,
DataLoadPageComponent,
NotFoundComponent,
GeneExpressionComponent,
FoldChangeComponent,
DetailInformationComponent,
DetailConcentrationComponent,
DiseaseInformationComponent,
DrugBankComponent,
SubcellLocationComponent,
ResultsQueryComponent,
ProtocolComponent,
HumanProttVistaViewComponent,
Navbar1Component,
Navbar2Component,
Navbar3Component,
DataSubmissionFormComponent,
DownloadResultComponent
],
imports: [
BrowserModule,
AppRoutingModule,
HttpClientModule,
FormsModule,
ReactiveFormsModule,
Ng2OdometerModule.forRoot(),
NgMultiSelectDropDownModule.forRoot(),
DataTablesModule,
NgxSpinnerModule,
CollapseModule.forRoot()
],
providers: [
DropdownService,
QmpkbService
],
bootstrap: [AppComponent]
})
export class AppModule { }
<file_sep>/backend/src/qmpkbapp/admin.py
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.contrib import admin
# Register your models here.
from .models import IpAddressInformation
class IpAddressInformationAdmin(admin.ModelAdmin):
"""docstring for ClassName"""
list_display=["__unicode__","access_date"]
class Meta:
model=IpAddressInformation
admin.site.register(IpAddressInformation,IpAddressInformationAdmin)<file_sep>/client/qmpkb-app/src/app/assay/assay.component.ts
import { Component, OnInit, OnDestroy,Input} from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { Location } from '@angular/common';
import { HttpClient,HttpErrorResponse } from '@angular/common/http';
import { DataTableDirective } from 'angular-datatables';
import { NgxSpinnerService } from 'ngx-spinner';
import {QmpkbService} from '../qmpkb-service/qmpkb.service';
import * as $ from "jquery";
declare var jquery: any;
@Component({
selector: 'app-assay',
templateUrl: './assay.component.html',
styleUrls: ['./assay.component.css']
})
export class AssayComponent implements OnInit {
dtOptionsSummary: any = {};
dtOptionsGrad: any = {};
dtOptionsTrans:any ={};
dtOptionsLOQ:any ={};
errorStr:Boolean;
transdic: any;
transdiclen: number;
gradientlist:any;
gradientlistlen:number;
gradinfoheader:any;
loquantinfo:any;
foundHits:number;
protinfo:any
queryData:any;
assayInputData:any;
assayDataStatus=false;
userFastaStatus:number;
fastafilename:any;
assayuniProtKb:any;
constructor(
private route: ActivatedRoute,
private location: Location,
private http: HttpClient,
private router: Router,
private spinner: NgxSpinnerService,
private _qmpkb:QmpkbService
) { }
@Input()
set assaytermQuery(assayQuery:any){
this.assayInputData=assayQuery;
}
ngOnInit() {
let assayQueryArray=this.assayInputData.split('|');
this._qmpkb.receiveDataFromBackendSearch('/assaydetailsapi/?resultFilePath=' + assayQueryArray[1]+'&uniProtKb='+ assayQueryArray[0]+'&fastafilename='+assayQueryArray[2]).subscribe((response: any)=>{
this.queryData=response;
this.transdic=this.queryData.transdic;
this.gradientlist=this.queryData.gradientlist;
this.gradinfoheader=this.queryData.gradinfoheader;
this.loquantinfo=this.queryData.loquantinfo;
this.foundHits=this.queryData.foundHits;
this.userFastaStatus=this.queryData.userFastaStatus;
this.protinfo=this.queryData.protinfo;
this.fastafilename=this.queryData.fastafilename;
this.transdiclen=Object.keys(this.transdic).length;
this.gradientlistlen=Object.keys(this.gradientlist).length;
this.assayuniProtKb=assayQueryArray[0];
this.assayDataStatus=true;
this.dtOptionsSummary = {
orderCellsTop: true,
fixedHeader: true,
pageLength: 10,
pagingType: 'full_numbers',
scrollX:true,
scrollY:'650px',
scrollCollapse:true,
autoWidth:true,
dom: 'lBfrtip',
buttons: [
{
extend:'csv',
filename: 'PeptideInformationMouseQuaPro',
text:'Download all(CSV)'
},
{
extend:'excel',
filename: 'PeptideInformationMouseQuaPro',
text:'Download all(Excel)'
}
]
};
this.dtOptionsGrad = {
orderCellsTop: true,
fixedHeader: true,
pageLength: 10,
pagingType: 'full_numbers',
scrollX:true,
scrollY:'650px',
scrollCollapse:true,
autoWidth:true,
dom: 'lBfrtip',
buttons: [
{
extend:'csv',
filename: 'GradientsMouseQuaPro',
text:'Download all(CSV)'
},
{
extend:'excel',
filename: 'GradientsMouseQuaPro',
text:'Download all(Excel)'
}
],
/* columnDefs:[{
type: 'na',
targets: 3
}]*/
};
this.dtOptionsLOQ = {
orderCellsTop: true,
fixedHeader: true,
pageLength: 10,
pagingType: 'full_numbers',
scrollX:true,
scrollY:'650px',
scrollCollapse:true,
autoWidth:true,
dom: 'lBfrtip',
buttons: [
{
extend:'csv',
filename: 'LimitofquantificationMouseQuaPro',
text:'Download all(CSV)'
},
{
extend:'excel',
filename: 'LimitofquantificationMouseQuaPro',
text:'Download all(Excel)'
}
]
};
this.dtOptionsTrans = {
orderCellsTop: true,
fixedHeader: true,
pageLength: 10,
pagingType: 'full_numbers',
scrollX:true,
scrollY:'650px',
scrollCollapse:true,
autoWidth:true,
dom: 'lBfrtip',
buttons: [
{
extend:'csv',
filename: 'TransitionMouseQuaPro',
text:'Download all(CSV)'
},
{
extend:'excel',
filename: 'TransitionMouseQuaPro',
text:'Download all(Excel)'
}
]
};
}, error=>{
this.errorStr = error;
})
}
private openTabsAssay(evt, tabName) {
var i, tabcontent, tablinks;
tabcontent = document.getElementsByClassName("tabcontentassay");
for (i = 0; i < tabcontent.length; i++) {
tabcontent[i].style.display = "none";
}
tablinks = document.getElementsByClassName("tablinksassay");
for (i = 0; i < tablinks.length; i++) {
tablinks[i].className = tablinks[i].className.replace(" active", "");
}
document.getElementById(tabName).style.display = "block";
evt.currentTarget.className += " active";
}
}
<file_sep>/client/qmpkb-app/src/app/goterm/goterm.component.ts
import { Component, OnInit, OnDestroy,Input,ViewChildren, QueryList, ElementRef} from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { Location } from '@angular/common';
import { Subject } from 'rxjs';
import { HttpClient,HttpErrorResponse } from '@angular/common/http';
import { DataTableDirective } from 'angular-datatables';
import { NgxSpinnerService } from 'ngx-spinner';
import {QmpkbService} from '../qmpkb-service/qmpkb.service';
import * as $ from "jquery";
declare var jquery: any;
@Component({
selector: 'app-goterm',
templateUrl: './goterm.component.html',
styleUrls: ['./goterm.component.css']
})
export class GotermComponent implements OnInit {
dtOptions: any = {};
errorStr:Boolean;
foundHits:number;
contextgoterminfo:any
contextgoterminfolen:number;
goStat:any;
queryGoUniProtKB:any;
goDataStatus=false;
queryData:any;
constructor(
private route: ActivatedRoute,
private location: Location,
private http: HttpClient,
private router: Router,
private spinner: NgxSpinnerService,
private _qmpkb:QmpkbService
) { }
@Input()
set gotermQuery(goUniProtKB:any){
this.queryGoUniProtKB=goUniProtKB;
}
ngOnInit() {
}
ngAfterViewInit(): void {
this._qmpkb.receiveDataFromBackendSearch('/gotermapi/?uniProtKb='+ this.queryGoUniProtKB).subscribe((response: any)=>{
this.goDataStatus=true;
this.queryData=response;
this.foundHits=this.queryData.foundHits;
this.contextgoterminfo=this.queryData.contextgoterminfo;
this.contextgoterminfolen=Object.keys(this.contextgoterminfo).length;
this.goStat=this.queryData.goStat;
this.dtOptions = {
processing: true,
serverSide: false,
orderCellsTop: true,
fixedHeader: true,
pageLength: 10,
pagingType: 'full_numbers',
scrollX:true,
scrollY:'650px',
scrollCollapse:true,
// Declare the use of the extension in the dom parameter
dom: 'lBfrtip',
buttons: [
{
extend:'csv',
filename: 'GeneOntologyMouseQuaPro',
text:'Download all(CSV)'
},
{
extend:'excel',
filename: 'GeneOntologyMouseQuaPro',
text:'Download all(Excel)'
}
],
autoWidth:true
};
}, error=>{
this.errorStr = error;
})
}
}
<file_sep>/client/qmpkb-app/src/app/advance-search/advance-search.component.ts
import { Component, OnInit, Input, ElementRef, ViewChild, NgModule, Renderer, HostListener } from '@angular/core';
import { Router } from '@angular/router';
import { HttpClient,HttpErrorResponse } from '@angular/common/http';
import { FormGroup, FormBuilder, FormControl, Validators, FormArray } from '@angular/forms';
import {DropdownService} from '../dropdown-service/dropdown.service';
import { NgxSpinnerService } from 'ngx-spinner';
import {QmpkbService} from '../qmpkb-service/qmpkb.service';
import {saveAs} from 'file-saver';
@Component({
selector: 'app-advance-search',
templateUrl: './advance-search.component.html',
styleUrls: ['./advance-search.component.css']
})
export class AdvanceSearchComponent implements OnInit {
selects: any[];
@Input()
wheres;
formIndex:number = 1;
fastaFileContext:any;
fastaFileName:any;
savedfastaFileName:any;
parts = {};
errorStr:Boolean;
dropdownSettings = {};
dropdownList = [];
selectedItems = [];
public alertIsVisible:boolean= false;
fields ={
protein: 'Protein',
gene: 'Gene',
uniProtKBAccession:'UniProtKB accession',
pepSeq:'Peptide sequence',
panel:'Panel',
strain:'Strain',
mutant : 'Mutant',
sex:'Sex',
biologicalMatrix : 'Biological matrix',
subCellLoc:'Subcellular localization',
keggPathway:'Molecular pathway(s)',
disCausMut:'Involvement in disease',
goId:'GO ID',
goTerm:'GO term',
goAspects:'GO aspects',
drugId:'Drug associations ID',
fastaFile: 'Own protein sequences in FASTA format'
};
public queryForm: FormGroup;
@ViewChild('fileInput') fileInput: ElementRef;
ngOnInit(){}
public addOptionGroup(){
const fa = this.queryForm.controls["optionGroups"] as FormArray;
fa.push(this.newOptionGroup());
this.formIndex ++;
}
public removeOptionGroup(index: number){
const fa = this.queryForm.controls["optionGroups"] as FormArray;
fa.removeAt(index);
this.formIndex --;
}
public savequeryForm() {
this.spinner.show();
let advancedFormData={};
for(let i=0; i<Object.keys(this.queryForm.value.optionGroups).length;i++){
const temQParm=this.queryForm.value.optionGroups[i].selectInput;
const temQVal=this.queryForm.value.optionGroups[i].whereInput;
if (temQParm=='panel' || temQParm=='strain' ||temQParm=='mutant' || temQParm=='sex' || temQParm=='biologicalMatrix'){
advancedFormData[temQParm]=temQVal.join('|');
} else{
if (temQParm !=='fastaFile'){
advancedFormData[temQParm]=temQVal;
}
}
}
advancedFormData['fastaFileName']=this.savedfastaFileName;
this.router.navigate(['/results'],{queryParams:advancedFormData});
this.queryForm.reset();
}
openFile(event:any, selectInput: string , formIndex : number) {
if (event.target.files && event.target.files[0]) {
let fileReader = new FileReader();
fileReader.onload = (e) => {
// this 'text' is the content of the file
this.fastaFileContext = fileReader.result;
this.fastaFileName = event.target.files[0].name;
if (this.fastaFileName.length >0){
this._qmpkb.receiveDataFromBackendSearch('/fastafileapi/?fastaFileContext=' + JSON.stringify(this.fastaFileContext)).subscribe((response: any)=>{
this.savedfastaFileName=response.nameFile;
}, error=>{
this.errorStr = error;
})
}
}
fileReader.readAsText(event.target.files[0]);
};
}
constructor(
private router: Router,
public dropdownservice: DropdownService ,
private fb : FormBuilder,
private _qmpkb:QmpkbService,
private spinner: NgxSpinnerService,
private http: HttpClient
) {
this.queryForm = this.fb.group({
optionGroups : this.fb.array([
this.fb.group({
selectInput : ['', Validators.required],
whereInput : ['', Validators.required],
}),
]),
});
this.selects = this.dropdownservice.getSelect();
this.wheres=[];
}
private newOptionGroup() {
return new FormGroup({
selectInput: new FormControl(""),
whereInput: new FormControl(""),
});
}
onSelectSelect(selectInput: string , formIndex : number) : void{
this.dropdownSettings = {
singleSelection: false,
idField: 'id',
textField: 'name',
enableCheckAll:false,
allowSearchFilter: true
};
this.wheres[selectInput] = this.dropdownservice.getWhere().filter((item)=> item.selectid == selectInput);
this.parts[formIndex]=selectInput;
let keys = Object.keys(this.parts);
let values = keys.map(k => this.parts[k]);
this.dropdownList = this.wheres[selectInput];
if (values.length > 1){
let countDuplicate=0;
for(let v of values){
if (selectInput == v){
countDuplicate++;
}
if (countDuplicate > 1){
alert(this.fields[selectInput]+' already selected.');
this.queryForm.get('optionGroups')['controls'][formIndex].patchValue({ selectInput: '', whereInput: ''});
countDuplicate=0;
} else {
this.queryForm.get('optionGroups')['controls'][formIndex].patchValue({ selectInput: selectInput, whereInput: ''});
}
}
}
}
/* log(event) {
console.log(event);
}
*/
}<file_sep>/backend/requirements.txt
adium-theme-ubuntu==0.3.4
appdirs==1.4.0
beautifulsoup4==4.5.3
biopython==1.68
bioservices==1.4.14
certifi==2018.10.15
chardet==3.0.4
click==6.7
click-conf==0.0.1
click-stream==0.0.6
colorama==0.3.7
coreapi==2.3.3
coreschema==0.0.4
coverage==5.0.3
demjson==2.2.4
diff-match-patch==20121119
dj-static==0.0.6
Django==1.11.16
django-crispy-forms==1.6.1
django-filter==1.0.1
django-import-export==0.5.1
django-ipware==1.1.6
django-rest-swagger==2.2.0
djangorestframework==3.9.1
docutils==0.14
easydev==0.9.30
elasticsearch==6.1.1
elasticsearch-loader==0.2.24
future==0.18.2
gevent==1.2.0
goatools==0.7.9
greenlet==0.4.11
grequests==0.3.0
gunicorn==19.10.0
idna==2.7
itypes==1.1.0
Jinja2==2.10
Markdown==2.6.6
MarkupSafe==1.1.0
more-itertools==4.3.0
names==0.3.0
nose==1.3.7
numpy==1.11.3
openapi-codec==1.3.2
pandas==0.20.3
patsy==0.4.1
pexpect==4.2.1
psutil==5.4.5
ptyprocess==0.5.1
pyaml==18.11.0
pycrypto==2.6.1
pygobject==3.20.0
pymssql==2.1.4
python-dateutil==2.6.1
pytz==2018.7
PyYAML==3.13
requests==2.20.1
requests-cache==0.4.13
rpy2==2.7.8
schedule==0.5.0
scipy==0.19.1
scour==0.32
selenium==3.0.1
sh==1.13.1
simplejson==3.16.0
singledispatch==3.4.0.3
six==1.11.0
static3==0.7.0
statistics==1.0.3.5
statsmodels==0.8.0
suds-jurko==0.6
tablib==0.11.2
unicodecsv==0.14.1
unity-lens-photos==1.0
uritemplate==3.0.0
urllib3==1.22
virtualenv==16.0.0
wget==3.2
wrapt==1.10.8
xlrd==1.1.0
XlsxWriter==1.0.0
xmltodict==0.10.2
<file_sep>/client/qmpkb-app/src/app/concentration/concentration.component.ts
import { Component, OnInit, OnDestroy, ViewChild, Renderer, HostListener} from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { Location } from '@angular/common';
import { HttpClient,HttpErrorResponse } from '@angular/common/http';
import { DataTableDirective } from 'angular-datatables';
import { NgxSpinnerService } from 'ngx-spinner';
import {QmpkbService} from '../qmpkb-service/qmpkb.service';
import * as Plotly from 'plotly.js';
import * as $ from "jquery";
declare var jquery: any;
@Component({
selector: 'app-concentration',
templateUrl: './concentration.component.html',
styleUrls: ['./concentration.component.css']
})
export class ConcentrationComponent implements OnInit {
dtOptions: any = {};
errorStr:Boolean;
conclist:any;
conclistlen:number;
foundHits:number;
sampleConcUnit:string;
protList:any
queryData:any;
plotlyData:any=[];
lenOfConcData:any;
screenWidth:any;
finalPlotData:any={};
wildObj={
'Wild type':'WT'
};
sexObj={
'Male':'M',
'Female':'F'
};
@ViewChild(DataTableDirective)
datatableElement: DataTableDirective;
plotDataOptions=[
{num:0, name:'Concentration Data'},
{num:1, name:'Log2(Concentration Data)'},
{num:2, name:'Log10(Concentration Data)'},
];
/* this.selectedLevel=this.plotDataOptions[0];*/
selected=this.plotDataOptions[2];
@HostListener('window.resize', ['$event'])
getScreenSize(event?){
this.screenWidth=(window.innerWidth-50)+"px";
}
constructor(
private route: ActivatedRoute,
private location: Location,
private http: HttpClient,
private router: Router,
private spinner: NgxSpinnerService,
private _qmpkb:QmpkbService,
private renderer: Renderer,
) {
this.getScreenSize();
}
ngOnInit() {
this.spinner.show();
this.queryData=this._qmpkb.queryStorage;
this.conclist=this.queryData.conclist;
this.conclistlen=Object.keys(this.conclist).length
this.foundHits=this.queryData.foundHits;
this.protList=this.queryData.protList;
this.sampleConcUnit=this.queryData.concUnit;
this.lenOfConcData= this.queryData.lenOfConcData;
jQuery.extend( jQuery.fn.dataTable.ext.oSort, {
"na-asc": function (str1, str2) {
if(str1 == "NA")
return 1;
else if(str2 == "NA")
return -1;
else{
var fstr1 = parseFloat(str1);
var fstr2 = parseFloat(str2);
return ((fstr1 < str2) ? -1 : ((fstr1 > fstr2) ? 1 : 0));
}
},
"na-desc": function (str1, str2) {
if(str1 == "NA")
return 1;
else if(str2 == "NA")
return -1;
else {
var fstr1 = parseFloat(str1);
var fstr2 = parseFloat(str2);
return ((fstr1 < fstr2) ? 1 : ((fstr1 > fstr2) ? -1 : 0));
}
}
} );
this.dtOptions = {
processing: true,
serverSide: false,
orderCellsTop: true,
fixedHeader: true,
pageLength: 10,
pagingType: 'full_numbers',
scrollX:true,
scrollY:'650px',
scrollCollapse:true,
columnDefs:[
{
targets: 0,
data: null,
defaultContent: '',
orderable: false,
className: 'select-checkbox',
searchable:false
},
{
targets: 1,
searchable:false,
visible:false
},
{
targets: 2,
searchable:false,
visible:false
},
{
targets: 3,
searchable:false,
visible:false
},
{
targets: 13,
searchable:false,
visible:false
},
{
targets: 14,
searchable:false,
visible:false
},
{
targets: 15,
searchable:false,
visible:false
},
{
targets: 16,
searchable:false,
visible:false
},
{
targets: 17,
searchable:false,
visible:false
},
{type: 'na', targets: [8,9,10,11]} // define 'name' column as na type
],
select:{
style:'multi'
},
// Declare the use of the extension in the dom parameter
dom: 'lBfrtip',
buttons: [
{
extend:'csv',
filename: 'ConcentrationMouseQuaPro',
text:'Download all(CSV)',
exportOptions:{
columns:[1,2,3,4,5,6,7,8,9,10,11,12,15,16,17]
}
},
{
extend:'excel',
filename: 'ConcentrationMouseQuaPro',
text:'Download all(Excel)',
exportOptions:{
columns:[1,2,3,4,5,6,7,8,9,10,11,12,15,16,17]
}
},
'selectAll',
'selectNone'
],
order: [],
autoWidth:true
};
this.spinner.hide();
}
ngAfterViewInit(): void {
const self = this;
self.datatableElement.dtInstance.then((dtInstance:any) => {
dtInstance.rows(function(idx,data){
const plotName=data[13].split('|');
//plotName[0]=self.wildObj[plotName[0]];
plotName[2]=self.sexObj[plotName[2]];
const plotData=data[14];
const plotDataSampleLLOQ=data[15];
const sampleLLOQ=data[16];
const ULOQ=data[17];
const tempPlotArray=[plotName.join('|'),plotData,plotDataSampleLLOQ,sampleLLOQ,ULOQ];
self.plotlyData.push(tempPlotArray.join(';'));
return idx >=0;
}).select();
self.prepareDatatoPlot(self.plotlyData);
});
self.datatableElement.dtInstance.then(table => {
$('#dataTables-wrkld-concentration').on('select.dt', function (e,dt,type,indexes) {
if (self.lenOfConcData == indexes.length){
self.plotlyData=[];
for(let j=0; j< indexes.length;j++){
const plotName=dt.row(indexes[j]).data()[13].split('|');
//plotName[0]=self.wildObj[plotName[0]];
plotName[2]=self.sexObj[plotName[2]];
const plotData=dt.row(indexes[j]).data()[14];
const plotDataSampleLLOQ=dt.row(indexes[j]).data()[15];
const sampleLLOQ=dt.row(indexes[j]).data()[16];
const ULOQ=dt.row(indexes[j]).data()[17];
const tempPlotArray=[plotName.join('|'),plotData,plotDataSampleLLOQ,sampleLLOQ,ULOQ];
self.plotlyData.push(tempPlotArray.join(';'));
self.selected=self.plotDataOptions[0];
}
self.prepareDatatoPlot(self.plotlyData);
} else {
const plotName=dt.row(indexes[0]).data()[13].split('|');
//plotName[0]=self.wildObj[plotName[0]];
plotName[2]=self.sexObj[plotName[2]];
const plotData=dt.row(indexes[0]).data()[14];
const plotDataSampleLLOQ=dt.row(indexes[0]).data()[15];
const sampleLLOQ=dt.row(indexes[0]).data()[16];
const ULOQ=dt.row(indexes[0]).data()[17];
const tempPlotArray=[plotName.join('|'),plotData,plotDataSampleLLOQ,sampleLLOQ,ULOQ];
self.plotlyData.push(tempPlotArray.join(';'));
self.prepareDatatoPlot(self.plotlyData);
self.selected=self.plotDataOptions[0];
}
});
$('#dataTables-wrkld-concentration').on('deselect.dt', function (e,dt,type,indexes) {
if (self.lenOfConcData == indexes.length || indexes.length>1 || self.plotlyData == indexes.length){
self.plotlyData=[];
self.prepareDatatoPlot(self.plotlyData);
} else {
const plotName=dt.row(indexes[0]).data()[13].split('|');
//plotName[0]=self.wildObj[plotName[0]];
plotName[2]=self.sexObj[plotName[2]];
const plotData=dt.row(indexes[0]).data()[14];
const plotDataSampleLLOQ=dt.row(indexes[0]).data()[15];
const sampleLLOQ=dt.row(indexes[0]).data()[16];
const ULOQ=dt.row(indexes[0]).data()[17];
const tempPlotArray=[plotName.join('|'),plotData,plotDataSampleLLOQ,sampleLLOQ,ULOQ];
const indexOfplotlyData=self.plotlyData.indexOf(tempPlotArray.join(';'));
self.plotlyData.splice(indexOfplotlyData,1);
self.prepareDatatoPlot(self.plotlyData);
self.selected=self.plotDataOptions[0];
}
});
});
}
prepareDatatoPlot(rawData:any) {
const tissueColor= {
"Brain":"cyan",
"Brown Adipose":"olive",
"Epididymis":"slategray",
"Eye":"rosybrown",
"Heart":"darksalmon",
"Kidney":"lightcoral",
"Liver Caudate and Right Lobe":"sandybrown",
"Liver Left Lobe":"deepskyblue",
"Lung":"tan",
"Pancreas":"cadetblue",
"Plasma":"greenyellow",
"Ovary":"goldenrod",
"RBCs":"seagreen",
"Salivary Gland":"chocolate",
"Seminal Vesicles":"khaki",
"Skeletal Muscle":"indigo",
"Skin":"thistle",
"Spleen":"violet",
"Testes":"lightpink",
"White Adipose":"plum"
};
let prepareDatatoPlotDataArray=[];
let prepareDatatoPlotDataArrayLog2=[];
let prepareDatatoPlotDataArrayLog10=[];
const yAxisTile='Concentration<br>(fmol target protein/µg extracted protein)';
let layout={
yaxis:{
title:yAxisTile,
zeroline:false,
showlegend: true,
legend :{
x:rawData.length+1
}
},
xaxis:{
automargin: true
}
};
let layout2={
yaxis:{
title:'Concentration<br>in Log2 Scale',
zeroline:false,
showlegend: true,
legend :{
x:rawData.length+1
}
},
xaxis:{
automargin: true
}
};
let layout10={
yaxis:{
title:'Concentration<br>in Log10 Scale',
zeroline:false,
showlegend: true,
legend :{
x:rawData.length+1
}
},
xaxis:{
automargin: true
}
};
const d3colors = Plotly.d3.scale.category10();
for(let i=0; i< rawData.length;i++){
const tempPlotDataArray=rawData[i].split(';');
const plotDataArray=[];
const plotDataArrayLog2=[];
const plotDataArrayLog10=[];
let tempArray=tempPlotDataArray[2].split('|');
if (tempPlotDataArray[2] === 'NA' || tempPlotDataArray[2].trim().length == 0){
tempArray=tempPlotDataArray[1].split('|');
}
for(let j=0; j< tempArray.length;j++){
plotDataArray.push(parseFloat(tempArray[j]));
plotDataArrayLog2.push(Math.log2(parseFloat(tempArray[j])));
plotDataArrayLog10.push(Math.log10(parseFloat(tempArray[j])));
}
let prepareDatatoPlotData={};
let prepareDatatoPlotDataLog2={};
let prepareDatatoPlotDataLog10={};
let boxSamLLOQData={};
let boxSamLLOQDataLog2={};
let boxSamLLOQDataLog10={};
let boxULOQData={};
let boxULOQDataLog2={};
let boxULOQDataLog10={};
let tempplotDataArray=plotDataArray.filter(value=> !Number.isNaN(value));
if (tempPlotDataArray[2] === 'NA' || tempPlotDataArray[2].trim().length == 0){
if (tempplotDataArray.length > 0){
prepareDatatoPlotData={
y:plotDataArray,
name: tempPlotDataArray[0],
boxpoints: 'all',
jitter: 0,
pointpos: 0,
type:'box',
marker:{
color:'black'
},
fillcolor:'rgba(0,0,0,0)',
line:{
color:'rgba(0,0,0,0)'
},
hoverinfo:'skip'
};
prepareDatatoPlotDataLog2={
y:plotDataArrayLog2,
name: tempPlotDataArray[0],
boxpoints: 'all',
jitter: 0,
pointpos: 0,
type:'box',
marker:{
color:'black'
},
fillcolor:'rgba(0,0,0,0)',
line:{
color:'rgba(0,0,0,0)'
},
hoverinfo:'skip'
};
prepareDatatoPlotDataLog10={
y:plotDataArrayLog10,
name: tempPlotDataArray[0],
boxpoints: 'all',
jitter: 0,
pointpos: 0,
type:'box',
marker:{
color:'black'
},
fillcolor:'rgba(0,0,0,0)',
line:{
color:'rgba(0,0,0,0)'
},
hoverinfo:'skip'
};
}
} else {
if (tempplotDataArray.length > 0){
const tempColor=tissueColor[tempPlotDataArray[0].split('|')[0]];
prepareDatatoPlotData={
y:plotDataArray,
name: tempPlotDataArray[0],
boxpoints: 'all',
jitter: 0,
pointpos: 0,
boxmean:true,
marker:{
color:tempColor
},
type:'box'
};
prepareDatatoPlotDataLog2={
y:plotDataArrayLog2,
name: tempPlotDataArray[0],
boxpoints: 'all',
jitter: 0,
pointpos: 0,
boxmean:true,
marker:{
color:tempColor
},
type:'box'
};
prepareDatatoPlotDataLog10={
y:plotDataArrayLog10,
name: tempPlotDataArray[0],
boxpoints: 'all',
jitter: 0,
pointpos: 0,
boxmean:true,
marker:{
color:tempColor
},
type:'box'
};
}
}
if (tempplotDataArray.length > 0){
boxSamLLOQData={
x:[tempPlotDataArray[0]],
y:[parseFloat(tempPlotDataArray[3])],
text: 'Sample LLOQ',
marker:{
color:'red',
symbol:'triangle-up',
size:8
},
showlegend:false
};
boxSamLLOQDataLog2={
x:[tempPlotDataArray[0]],
y:[Math.log2(parseFloat(tempPlotDataArray[3]))],
text: 'Sample LLOQ',
marker:{
color:'red',
symbol:'triangle-up',
size:8
},
showlegend:false
};
boxSamLLOQDataLog10={
x:[tempPlotDataArray[0]],
y:[Math.log10(parseFloat(tempPlotDataArray[3]))],
text: 'Sample LLOQ',
marker:{
color:'red',
symbol:'triangle-up',
size:8
},
showlegend:false
};
boxULOQData={
x:[tempPlotDataArray[0]],
y:[parseFloat(tempPlotDataArray[4])],
text: 'ULOQ',
marker:{
color:'red',
symbol:'triangle-down',
size:8
},
showlegend:false
};
boxULOQDataLog2={
x:[tempPlotDataArray[0]],
y:[Math.log2(parseFloat(tempPlotDataArray[4]))],
text: 'ULOQ',
marker:{
color:'red',
symbol:'triangle-down',
size:8
},
showlegend:false
};
boxULOQDataLog10={
x:[tempPlotDataArray[0]],
y:[Math.log10(parseFloat(tempPlotDataArray[4]))],
text: 'ULOQ',
marker:{
color:'red',
symbol:'triangle-down',
size:8
},
showlegend:false
};
prepareDatatoPlotDataArray.push(prepareDatatoPlotData);
prepareDatatoPlotDataArray.push(boxSamLLOQData);
prepareDatatoPlotDataArray.push(boxULOQData);
prepareDatatoPlotDataArrayLog2.push(prepareDatatoPlotDataLog2);
prepareDatatoPlotDataArrayLog2.push(boxSamLLOQDataLog2);
prepareDatatoPlotDataArrayLog2.push(boxULOQDataLog2);
prepareDatatoPlotDataArrayLog10.push(prepareDatatoPlotDataLog10);
prepareDatatoPlotDataArrayLog10.push(boxSamLLOQDataLog10);
prepareDatatoPlotDataArrayLog10.push(boxULOQDataLog10);
}
}
let finalprepareDatatoPlotDataArray={
0:prepareDatatoPlotDataArray,
1:prepareDatatoPlotDataArrayLog2,
2:prepareDatatoPlotDataArrayLog10
}
let defaultPlotlyConfiguration={};
defaultPlotlyConfiguration ={
responsive: true,
scrollZoom: true,
showTips:true,
modeBarButtonsToRemove: ['sendDataToCloud', 'autoScale2d', 'hoverClosestCartesian', 'hoverCompareCartesian', 'lasso2d', 'select2d','toImage','pan', 'pan2d','zoom2d','toggleSpikelines'],
displayLogo: false
};
this.finalPlotData={
'plotData':finalprepareDatatoPlotDataArray,
'plotLayout':[layout,layout2,layout10],
'config':defaultPlotlyConfiguration
};
Plotly.newPlot('myDivConc',finalprepareDatatoPlotDataArray[2],layout10,defaultPlotlyConfiguration);
if (rawData.length==0){
Plotly.purge('myDivConc')
}
}
onOptionsSelected(event){
if(event.target){
let tempPlotData=this.finalPlotData['plotData'];
let tempPlotLayout=this.finalPlotData['plotLayout'];
let tempConfig=this.finalPlotData['config'];
if (this.selected.name == 'Concentration Data'){
Plotly.purge('myDivConc')
Plotly.newPlot('myDivConc',tempPlotData[0],tempPlotLayout[0],tempConfig)
}
if (this.selected.name == 'Log2(Concentration Data)'){
Plotly.purge('myDivConc')
Plotly.newPlot('myDivConc',tempPlotData[1],tempPlotLayout[1],tempConfig)
}
if (this.selected.name == 'Log10(Concentration Data)'){
Plotly.purge('myDivConc')
Plotly.newPlot('myDivConc',tempPlotData[2],tempPlotLayout[2],tempConfig)
}
}
}
}
<file_sep>/backend/updatefile/runjob.py
import schedule
import time
import subprocess,shutil
def job():
commandjob = "python generate_final_data_report_qmpkp.py"
subprocess.Popen(commandjob, shell=True).wait()
schedule.every().day.at("04:00").do(job)
while 1:
schedule.run_pending()
time.sleep(1)
<file_sep>/backend/src/qmpkbapp/api/views.py
# -*- coding: utf-8 -*-
from django.contrib.auth.models import User
from rest_framework import generics
from rest_framework.permissions import IsAdminUser
from qmpkbapp.models import IpAddressInformation
from django.shortcuts import render
from django.http import HttpResponse,HttpResponseRedirect,JsonResponse
from django.shortcuts import get_object_or_404
from rest_framework.views import APIView
from rest_framework.decorators import api_view
from rest_framework.response import Response
from rest_framework import status
from rest_framework import viewsets
from rest_framework.schemas import SchemaGenerator
from rest_framework.permissions import AllowAny
import coreapi,coreschema
from rest_framework.schemas import ManualSchema
from rest_framework_swagger import renderers
import sys,re,os,glob,shutil,subprocess,socket
from django.conf import settings
import requests
from django.views import View
from django.views.generic import TemplateView
from django.contrib.auth.decorators import login_required
def fileApi(request):
return Response()<file_sep>/backend/updatefile/maketotalassaypep.py
import os,subprocess,psutil,re,shutil,datetime,sys,glob
from socket import error as SocketError
import errno
import random, time
import csv
import json
import pandas as pd
from collections import Counter
from itertools import combinations
import operator
import collections
import ctypes
def totalAssayPep():
#increase the field size of CSV
csv.field_size_limit(int(ctypes.c_ulong(-1).value // 2))
homedir = os.path.normpath(os.getcwd() + os.sep + os.pardir)
filename='ReportBook_mother_file.csv'
pepfilepath = os.path.join(homedir, 'src/qmpkbmotherfile', filename)
pepresult = csv.DictReader(open(pepfilepath,'r'), delimiter='\t')
totalpepseq=[]
for reppeprow in pepresult:
totalpepseq.append(str(reppeprow['Peptide Sequence']).strip())
unqtotalpepseq=list(set(totalpepseq))
calfilename='totalpepassay.py'
calmovefilepath=os.path.join(homedir, 'updatefile', calfilename)
calfilepath = os.path.join(homedir, 'src/qmpkbapp', calfilename)
totalassayresult={}
totalassayresult['totalpepassay']=unqtotalpepseq
calfileoutput=open(calfilename,'w')
calfileoutput.write("totalpepassay=")
calfileoutput.write(json.dumps(totalassayresult))
calfileoutput.close()
shutil.move(calmovefilepath,calfilepath)<file_sep>/backend/src/qmkbdjangulardb/urls.py
"""qmkbdjangulardb URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-based views
1. Add an import: from other_app.views import Home
2. Add a URL to urlpatterns: url(r'^$', Home.as_view(), name='home')
Including another URLconf
1. Import the include() function: from django.conf.urls import url, include
2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls'))
"""
from django.conf.urls import include, url
from django.contrib import admin
from django.conf.urls.static import static
from django.conf import settings
from django.views.generic import TemplateView
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from rest_framework import routers
from rest_framework_swagger.views import get_swagger_view
from qmpkbapp.views import basicSearch,advancedSearch,concentration,assaydetails,protVista,\
SwaggerRestAPIView,goterm,pathway,peptideUniqueness,pathwayview,contact,geneExp,foldChange,\
detailInformation,detailConcentration,saveFastaFile,submission,generateDownload
# from django.contrib.auth.decorators import login_required
# import django_cas_ng.views
schema_view= get_swagger_view(title="Rest API Documents")
urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r'^resultsapi/$', basicSearch, name='result'),
url(r'^advanceresultsapi/$', advancedSearch, name='advanceresult'),
url(r'^seqfeaturesapi/$', protVista, name='seqfeatures'),
url(r'^concentrationapi/$', concentration, name='concentration'),
url(r'^assaydetailsapi/$', assaydetails, name='assaydetails'),
url(r'^gotermapi/$', goterm, name='goterm'),
url(r'^geneexpapi/$', geneExp, name='geneexp'),
url(r'^pathwayapi/$', pathway, name='pathway'),
url(r'^pathwayviewapi/$', pathwayview, name='pathwayview'),
url(r'^peptideuniquenessapi/$', peptideUniqueness, name='peptideUniqueness'),
url(r'^restapi/$', SwaggerRestAPIView.as_view()),
url(r'^docapi/', schema_view),
url(r'^fileapi/', include('qmpkbapp.api.urls')),
url(r'^contactapi/$', contact, name='contact'),
url(r'^foldChangeapi/$', foldChange, name='foldChange'),
url(r'^detailinformationapi/$', detailInformation, name='detailinformation'),
url(r'^detailConcentrationapi/$', detailConcentration, name='detailconcentration'),
url(r'^fastafileapi/$', saveFastaFile, name='savefastafile'),
url(r'^submissionapi/$', submission, name='submission'),
url(r'^downloadapi/$', generateDownload, name='generateDownload'),
#after login removed delete or intacivte remining url and active the inactive url
url(r'^accounts/', include('django.contrib.auth.urls')),
url(r'^.*',TemplateView.as_view(template_name="qmpkb_home.html"), name='home'),
# url(r'^.*',login_required(TemplateView.as_view(template_name="qmpkb_home.html")), name='home'),
# url(r'^accounts/login/$',cas_views.login, name='cas_ng_login'),
# url(r'^accounts/login/$',cas_views.logout, name='cas_ng_logout'),
# url(r'^accounts/login/$*',cas_views.callback, name='cas_ng_proxy_callback'),
]<file_sep>/client/qmpkb-app/src/app/subcell-location/subcell-location.component.ts
import { Component, OnInit, OnDestroy,Input} from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { Location } from '@angular/common';
import { HttpClient,HttpErrorResponse } from '@angular/common/http';
import {QmpkbService} from '../qmpkb-service/qmpkb.service';
import * as $ from "jquery";
declare var jquery: any;
@Component({
selector: 'app-subcell-location',
templateUrl: './subcell-location.component.html',
styleUrls: ['./subcell-location.component.css']
})
export class SubcellLocationComponent implements OnInit {
subCellDataStatus=false;
subCellQueryData:any;
subcellInputData:any;
subcellInputDataArray:any;
filterredSubcell:any;
filterSubCellStatus=false;
constructor(
private route: ActivatedRoute,
private location: Location,
private http: HttpClient,
private router: Router,
private _qmpkb:QmpkbService
) { }
@Input()
set subCelltermQuery(subcellLocalQuery:any){
this.subCellQueryData=subcellLocalQuery;
}
ngOnInit() {
this.subCellDataStatus=true;
this.subcellInputDataArray=this.subCellQueryData.subcellArray;
this.subcellInputData=this.subCellQueryData.subcell;
}
ngAfterViewInit(): void {
var self= this;
$("#myInputSubCell").on("keyup", function() {
const valueSubCell = $(this).val().toString().toLowerCase();
if (valueSubCell.trim().length > 0){
self.filterSubCellStatus=true;
const textArraySubCell=self.subcellInputDataArray;
const filterredSubCell=textArraySubCell.filter(function (elem) {
return elem.toString().toLowerCase().indexOf(valueSubCell) > -1;
});
if (filterredSubCell.length >0){
self.filterredSubcell=filterredSubCell.join('; ');
} else{
self.filterredSubcell='Oopps. No result matched with your search criteria!';
}
}
if (valueSubCell.trim().length == 0){
self.filterSubCellStatus=false;
}
});
}
}
<file_sep>/backend/updatefile/map_mouse_to_humanVUni.py
'''
this script based on uniprot homolog file
'''
import os,subprocess,psutil,re,shutil,datetime,sys,glob
import urllib,urllib2,urllib3,httplib
from socket import error as SocketError
import errno
from Bio import SeqIO
import random, time
import csv
import more_itertools as mit
import pickle
import cPickle
from xml.etree import cElementTree as ET
import xmltodict
from xml.dom import minidom
from xml.parsers.expat import ExpatError
from bioservices.kegg import KEGG
import pandas as pd
import ctypes
def mapSpecies(mousepeptrackfilename):
#increase the field size of CSV
csv.field_size_limit(int(ctypes.c_ulong(-1).value // 2))
uniproturl = 'https://www.uniprot.org/uploadlists/'
RETRY_TIME = 20.0
mdf= pd.read_csv(mousepeptrackfilename, delimiter='\t')
mouseGenes=list(mdf['Gene'].unique())
mouseGenes=[g for g in mouseGenes if str(g) !='nan']
mousehumandic={}
for gx in range(0,len(mouseGenes),1000):
genecodes=' '.join(mouseGenes[gx:gx+1000])
geneuniprotparams = {
'from':'GENENAME',
'to':'ACC',
'format':'tab',
'query':genecodes,
'columns':'id,genes(PREFERRED),organism-id,reviewed'
}
while True:
try:
geneuniprotdata = urllib.urlencode(geneuniprotparams)
geneuniprotrequest = urllib2.Request(uniproturl, geneuniprotdata)
geneuniprotresponse = urllib2.urlopen(geneuniprotrequest)
for guniprotline in geneuniprotresponse:
gudata=guniprotline.strip()
if not gudata.startswith("Entry"):
guinfo=gudata.split("\t")
if '9606' == guinfo[2].lower() and 'reviewed' == guinfo[3].lower() and guinfo[-1].lower() ==guinfo[1].lower() and len(guinfo[0].strip())>1:
mousehumandic[guinfo[-1].strip()]=guinfo[0].strip()
break
except urllib2.HTTPError:
time.sleep(RETRY_TIME)
print ('Hey, I am trying again until succeeds to get data from uniprot data!',str(datetime.datetime.now()))
except httplib.BadStatusLine:
time.sleep(RETRY_TIME)
print ('Hey, I am trying again until succeeds to get data from uniprot data!',str(datetime.datetime.now()))
colname=['UniProtKB Accession','Protein','Gene','Organism','Peptide Sequence','Summary Concentration Range Data','All Concentration Range Data','All Concentration Range Data-Sample LLOQ Based','Peptide ID',\
'Special Residues','Molecular Weight','GRAVY Score','Transitions','Retention Time','Analytical inofrmation',\
'Gradients','AAA Concentration','CZE Purity','Panel','Knockout','LLOQ','ULOQ','Sample LLOQ','Protocol','Trypsin','QC. Conc. Data','Human UniProtKB Accession']
finalresult=[]
finalresult.append(colname)
humanUniprotID=[]
with open(mousepeptrackfilename) as csvfile:
reader = csv.DictReader(csvfile, delimiter='\t')
for row in reader:
templist=[]
for i in colname[:-1]:
tempdata=str(row[i]).strip()
templist.append(tempdata)
if len(str(templist[2]).strip())>0:
if templist[2] in mousehumandic:
huUniId=mousehumandic[templist[2]]
humanUniprotID.append(huUniId)
templist.append(huUniId)
else:
templist.append('NA')
finalresult.append(templist)
with open(mousepeptrackfilename,'wb') as pf:
pwriter =csv.writer(pf,delimiter='\t')
pwriter.writerows(finalresult)
unqhumanUniprotID=list(set(humanUniprotID))
humanUniprotfuncinfodic={}
countProt=0
for subcode in unqhumanUniprotID:
time.sleep(2)
drugbanklist=[]
PN='NA'
GN='NA'
OG='NA'
OGID='NA'
dislist=[]
GoIDList=[]
GoNamList=[]
GoTermList=[]
try:
countProt+=1
if countProt%1000 ==0:
print str(countProt), "th protein Protein Name, Gene, Organism Name,drug bank data,disease data job starts",str(datetime.datetime.now())
SGrequestURL="https://www.uniprot.org/uniprot/"+str(subcode)+".xml"
SGunifile=urllib.urlopen(SGrequestURL)
SGunidata= SGunifile.read()
SGunifile.close()
try:
SGunidata=minidom.parseString(SGunidata)
try:
drugdata=(SGunidata.getElementsByTagName('dbReference'))
for duItem in drugdata:
if (duItem.attributes['type'].value).upper() == 'DRUGBANK':
try:
drugname=(str(duItem.getElementsByTagName('property')[0].attributes['value'].value).strip())
drugid=str(duItem.attributes['id'].value).strip()
durl='<a target="_blank" href="https://www.drugbank.ca/drugs/'+drugid+'">'+drugname+'</a>'
drugbanklist.append(durl)
except:
pass
if (duItem.attributes['type'].value).strip() == 'NCBI Taxonomy':
try:
OGID=str(duItem.attributes['id'].value).strip()
except:
pass
except IndexError:
pass
try:
godata=(SGunidata.getElementsByTagName('dbReference'))
for gItem in godata:
if (gItem.attributes['type'].value).upper() == 'GO':
try:
gonamedetails=(str(gItem.getElementsByTagName('property')[0].attributes['value'].value).strip()).split(':')[1]
gotermdetails=(str(gItem.getElementsByTagName('property')[0].attributes['value'].value).strip()).split(':')[0]
GoNamList.append(gonamedetails)
goid=str(gItem.attributes['id'].value).strip()
GoIDList.append(goid)
if gotermdetails.lower()=='p':
GoTermList.append('Biological Process')
if gotermdetails.lower()=='f':
GoTermList.append('Molecular Function')
if gotermdetails.lower()=='c':
GoTermList.append('Cellular Component')
except:
pass
if (gItem.attributes['type'].value).strip() == 'NCBI Taxonomy':
try:
OGID=str(gItem.attributes['id'].value).strip()
except:
pass
except IndexError:
pass
try:
try:
PN=(((SGunidata.getElementsByTagName('protein')[0]).getElementsByTagName('recommendedName')[0]).getElementsByTagName('fullName')[0]).firstChild.nodeValue
except:
PN=(((SGunidata.getElementsByTagName('protein')[0]).getElementsByTagName('submittedName')[0]).getElementsByTagName('fullName')[0]).firstChild.nodeValue
except IndexError:
pass
try:
try:
GN=((SGunidata.getElementsByTagName('gene')[0]).getElementsByTagName('name')[0]).firstChild.nodeValue
except:
GN='NA'
except IndexError:
pass
try:
try:
OG=((SGunidata.getElementsByTagName('organism')[0]).getElementsByTagName('name')[0]).firstChild.nodeValue
except:
OG='NA'
except IndexError:
pass
try:
disdata=SGunidata.getElementsByTagName('disease')
for dItem in disdata:
disname=''
disshort=''
try:
disname=(dItem.getElementsByTagName('name')[0]).firstChild.nodeValue
except:
pass
try:
disshort=(dItem.getElementsByTagName('acronym')[0]).firstChild.nodeValue
except:
pass
if len(disname.strip())>0:
dislist.append(str(disname.strip())+'('+str(disshort)+')')
except IndexError:
pass
except ExpatError:
pass
except IOError:
pass
drugbankdata='NA'
disdata='NA'
goiddata='NA'
gonamedata='NA'
gotermdata='NA'
if len(GoIDList)>0:
goiddata='|'.join(list(set(GoIDList)))
if len(GoNamList)>0:
gonamedata='|'.join(list(set(GoNamList)))
if len(GoTermList)>0:
gotermdata='|'.join(list(set(GoTermList)))
if len(drugbanklist)>0:
drugbankdata='|'.join(list(set(drugbanklist)))
if len(dislist)>0:
disdata='|'.join(list(set(dislist)))
humanUniprotfuncinfodic[subcode]=[PN,GN,OG,OGID,disdata,drugbankdata,goiddata,gonamedata,gotermdata]
hudicfile='humanUniprotfuncinfodic.obj'
hudicf = open(hudicfile, 'wb')
pickle.dump(humanUniprotfuncinfodic, hudicf , pickle.HIGHEST_PROTOCOL)
hudicf.close()
print ("Extracting KEGG pathway name, job starts",str(datetime.datetime.now()))
hkeggdictfile={}
hk = KEGG()
for hkx in range(0,len(unqhumanUniprotID),2000):
countProt+=hkx+2000
if countProt%2000 ==0:
print (str(countProt), "th protein kegg job starts",str(datetime.datetime.now()))
huniprotcodes=' '.join(unqhumanUniprotID[hkx:hkx+2000])
huniprotparams = {
'from':'ACC',
'to':'KEGG_ID',
'format':'tab',
'query':huniprotcodes
}
while True:
try:
hkuniprotdata = urllib.urlencode(huniprotparams)
hkuniprotrequest = urllib2.Request(uniproturl, hkuniprotdata)
hkuniprotresponse = urllib2.urlopen(hkuniprotrequest)
for hkuniprotline in hkuniprotresponse:
hkudata=hkuniprotline.strip()
if not hkudata.startswith("From"):
hkuinfo=hkudata.split("\t")
if len(hkuinfo[1].strip()):
hkegg=hk.get(hkuinfo[1].strip())
hkudict_data = hk.parse(hkegg)
try:
try:
if len(str(hkuinfo[0]).strip()) >5:
hkeggdictfile[hkuinfo[0].strip()]=hkudict_data['PATHWAY'].values()
except TypeError:
pass
except KeyError:
pass
break
except urllib2.HTTPError:
time.sleep(RETRY_TIME)
print ('Hey, I am trying again until succeeds to get data from KEGG!',str(datetime.datetime.now()))
pass
hkdicfile='humankeggdic.obj'
hkdicf = open(hkdicfile, 'wb')
pickle.dump(hkeggdictfile, hkdicf , pickle.HIGHEST_PROTOCOL)
hkdicf.close()<file_sep>/client/qmpkb-app/src/app/qmpkb-service/qmpkb.service.ts
import { Injectable, OnDestroy } from '@angular/core';
import { HttpClient,HttpErrorResponse } from '@angular/common/http';
import { map, catchError,takeUntil } from 'rxjs/operators';
import { BehaviorSubject,Subject,Observable, throwError } from 'rxjs';
const endpoint = 'http://127.0.0.1:8000'
@Injectable({
providedIn: 'root'
})
export class QmpkbService implements OnDestroy {
public queryStorage:any;
public dropDownStorage:any;
private destroy$ = new Subject();
constructor(
private http: HttpClient
) { }
receiveDataFromBackendSearch(url){
return this.http.get(url)
.pipe(
takeUntil(this.destroy$),
map(responce=>responce),
catchError(this.handleError)
)
}
private handleError(error:any, caught:any): any{
//console.log(error, caught)
if(error.status == 404){
alert("Oopps. Not found!");
} else {
alert("Something went wrong. Please try again.");
}
}
ngOnDestroy(): void{
this.destroy$.next(); // trigger the unsubscribe
this.destroy$.complete(); // finalize and clean up the subject stream
}
}<file_sep>/client/qmpkb-app/src/app/download-result/download-result.component.ts
import { Component, OnInit, OnDestroy,Input,Renderer} from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { Location } from '@angular/common';
import { HttpClient,HttpErrorResponse } from '@angular/common/http';
import {QmpkbService} from '../qmpkb-service/qmpkb.service';
import * as $ from "jquery";
@Component({
selector: 'app-download-result',
templateUrl: './download-result.component.html',
styleUrls: ['./download-result.component.css']
})
export class DownloadResultComponent implements OnInit {
downloadResultJsonPath:any;
downloadResultStatus=false;
downloadPathLink:any;
queryData:any;
errorStr:Boolean;
constructor(
private route: ActivatedRoute,
private location: Location,
private http: HttpClient,
private router: Router,
private _qmpkb:QmpkbService,
private renderer: Renderer,
) {
}
@Input()
set downloadTermQuery(dQuery:any){
this.downloadResultJsonPath=dQuery;
}
async getDownloadFileLink(){
await this._qmpkb.receiveDataFromBackendSearch('/downloadapi/?jsonfile=' + this.downloadResultJsonPath).subscribe((response: any)=>{
this.queryData=response;
this.downloadPathLink='fileapi/resultFile/downloadResult/search/'+this.queryData.downloadFileName;
this.downloadResultStatus=true;
}, error=>{
this.errorStr = error;
})
}
ngOnInit() {
this.getDownloadFileLink();
}
}
<file_sep>/client/qmpkb-app/src/app/results-query/results-query.component.ts
import { Component, OnInit, Input, Renderer } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { HttpClient,HttpErrorResponse } from '@angular/common/http';
import {QmpkbService} from '../qmpkb-service/qmpkb.service';
import { NgxSpinnerService } from 'ngx-spinner';
import * as $ from "jquery";
declare var jquery: any;
@Component({
selector: 'app-results-query',
templateUrl: './results-query.component.html',
styleUrls: ['./results-query.component.css']
})
export class ResultsQueryComponent implements OnInit {
loadQuery:any;
@Input()
inputQuery:any;
inputQueryStatus=0;
inputFastaQuery:any;
inputFastaQueryStatus=0;
errorStr:Boolean;
public alertIsVisible:boolean= false;
public alertIsVisibleValidQuery:boolean=false;
constructor(
private router: Router,
private route: ActivatedRoute,
private http: HttpClient,
private renderer: Renderer,
private _qmpkb:QmpkbService,
private spinner: NgxSpinnerService
) { }
async getQuery(){
await this.route.queryParams.subscribe(params=>{
this.loadQuery =params;
if (Object.keys(this.loadQuery).length > 0){
this.spinner.show();
setTimeout(() => {
this.getProteinData(this.loadQuery);
}, 100);
} else {
this.spinner.hide();
if(this.alertIsVisible){
return;
}
this.alertIsVisible=true;
setTimeout(()=>{
this.alertIsVisible=false;
this.router.navigate(['/']);
},5000);
}
})
}
getProteinData(queryData:any){
const queryParameters=Object.keys(this.loadQuery);
if (queryParameters[0]=='searchterm' && Object.keys(queryParameters).length) {
if (this.loadQuery.searchterm.trim().length >0 ){
this._qmpkb.receiveDataFromBackendSearch('/resultsapi/?searchterm=' +this.loadQuery.searchterm).subscribe((response: any)=>{
if (response.filename_proteincentric != null){
this.inputQuery={
searchterm: this.loadQuery.searchterm,
filepath: response.filename_proteincentric,
totallist: response.totallist,
unqisostat: response.unqisostat,
subcell:response.subcell,
humandisease:response.humandisease,
updatedgo:response.updatedgo,
querystrainData:response.querystrainData,
querybioMatData:response.querybioMatData,
querynoOfDiseaseAssProt:response.querynoOfDiseaseAssProt,
querynoOfHumanOrtholog:response.querynoOfHumanOrtholog,
keggchart:response.keggchart,
foundHits:response.foundHits
};
this.inputQueryStatus=1;
} else {
this.spinner.hide();
if(this.alertIsVisible){
return;
}
this.alertIsVisible=true;
setTimeout(()=>{
this.alertIsVisible=false;
this.router.navigate(['/']);
},5000);
}
}, error=>{
this.errorStr = error;
})
} else{
this.spinner.hide();
if(this.alertIsVisibleValidQuery){
return;
}
this.alertIsVisibleValidQuery=true;
setTimeout(()=>{
this.alertIsVisibleValidQuery=false;
this.router.navigate(['/']);
},5000);
}
} else {
let buildAdvancedFormData=[];
const advanceQueryParmsArray=['uniProtKBAccession','protein','gene','pepSeq','panel','strain','mutant','sex','biologicalMatrix','subCellLoc','keggPathway','disCausMut','goId','goTerm','goAspects','drugId','fastaFileName'];
const userAdvanceQuery=Object.keys(this.loadQuery);
for(let i=0; i<Object.keys(userAdvanceQuery).length;i++){
if (advanceQueryParmsArray.includes(userAdvanceQuery[i]) && this.loadQuery[userAdvanceQuery[i]].trim().length>0){
if (userAdvanceQuery[i]=='panel' || userAdvanceQuery[i]=='strain' ||userAdvanceQuery[i]=='mutant' || userAdvanceQuery[i]=='sex' || userAdvanceQuery[i]=='biologicalMatrix'){
buildAdvancedFormData.push({selectInput:userAdvanceQuery[i],whereInput:this.loadQuery[userAdvanceQuery[i]].split('|')});
} else{
if (userAdvanceQuery[i] =='fastaFileName'){
if(this.loadQuery[userAdvanceQuery[i]] !== undefined){
buildAdvancedFormData.push({selectInput:userAdvanceQuery[i],whereInput:this.loadQuery[userAdvanceQuery[i]]});
}
} else{
buildAdvancedFormData.push({selectInput:userAdvanceQuery[i],whereInput:this.loadQuery[userAdvanceQuery[i]]});
}
}
}
}
let advancedFormData={
queryformData:
{optionGroups:buildAdvancedFormData
}
}
if (Object.keys(buildAdvancedFormData).length>0){
this._qmpkb.receiveDataFromBackendSearch('/advanceresultsapi/?advancedFormData=' + JSON.stringify(advancedFormData)).subscribe((response: any)=>{
if (response.filename_proteincentric != null){
if (response.unqfastaseqlen >0 ){
this.inputFastaQuery={
searchterm: response.query,
filepath: response.filename_proteincentric,
totallist: response.totallist,
unqisostat: response.unqisostat,
subcell:response.subcell,
humandisease:response.humandisease,
updatedgo:response.updatedgo,
querystrainData:response.querystrainData,
querybioMatData:response.querybioMatData,
querynoOfDiseaseAssProt:response.querynoOfDiseaseAssProt,
querynoOfHumanOrtholog:response.querynoOfHumanOrtholog,
keggchart:response.keggchart,
foundHits:response.foundHits,
fastafilename:response.fastafilename
};
this.inputFastaQueryStatus=1;
} else {
this.inputQuery={
searchterm: response.query,
filepath: response.filename_proteincentric,
totallist: response.totallist,
unqisostat: response.unqisostat,
subcell:response.subcell,
humandisease:response.humandisease,
updatedgo:response.updatedgo,
querystrainData:response.querystrainData,
querybioMatData:response.querybioMatData,
querynoOfDiseaseAssProt:response.querynoOfDiseaseAssProt,
querynoOfHumanOrtholog:response.querynoOfHumanOrtholog,
keggchart:response.keggchart,
foundHits:response.foundHits
};
this.inputQueryStatus=1;
}
} else {
this.spinner.hide();
if(this.alertIsVisible){
return;
}
this.alertIsVisible=true;
setTimeout(()=>{
this.alertIsVisible=false;
this.router.navigate(['/']);
},5000);
}
}, error=>{
this.errorStr = error;
})
} else{
this.spinner.hide();
if(this.alertIsVisibleValidQuery){
return;
}
this.alertIsVisibleValidQuery=true;
setTimeout(()=>{
this.alertIsVisibleValidQuery=false;
this.router.navigate(['/']);
},5000);
}
}
}
ngOnInit() {
this.getQuery();
}
}
<file_sep>/client/qmpkb-app/src/app/fold-change/fold-change.component.ts
import { Component, OnInit, Input,ViewChildren, QueryList, ElementRef } from '@angular/core';
import { HttpClient,HttpErrorResponse } from '@angular/common/http';
import { Subject } from 'rxjs';
import {QmpkbService} from '../qmpkb-service/qmpkb.service';
import * as Plotly from 'plotly.js';
import * as $ from "jquery";
declare var jquery: any;
@Component({
selector: 'app-fold-change',
templateUrl: './fold-change.component.html',
styleUrls: ['./fold-change.component.css']
})
export class FoldChangeComponent implements OnInit {
queryData:any;
foldChangeQueryData:any;
errorStr:Boolean;
foldChangeStatus:Boolean;
plotStatus=true;
dataStatus=true;
foldchangeDataChecked:any=[];
selected:any='';
checkedValues:any;
filteredFoldData:any;
checkIfTwoAreSeleected=false;
resetButton=true;
downloadFile:string;
plotDataLength=0;
fieldArray: Array<number> = [0, 1];
selectedOptions = new Set<string>();
@ViewChildren("selectValue") selectValue: QueryList<ElementRef<HTMLSelectElement>>;
constructor(
private http: HttpClient,
private _qmpkb:QmpkbService,
) { }
@Input()
set foldChangeResult(foldData:any){
let tempQueryData=foldData;
this.downloadFile=tempQueryData['DownloadPath'];
delete tempQueryData['DownloadPath'];
this.foldChangeQueryData=tempQueryData['foldChangeQueryData'];
delete tempQueryData['foldChangeQueryData'];
this.queryData=tempQueryData;
}
ngOnInit() {
}
onOptionsSelected(event){
if(event.target){
this.foldchangeDataChecked=[];
this.checkIfTwoAreSeleected=false;
this.resetButton=true;
this.dataStatus=true;
this.plotDataLength=0;
this.selectedOptions.clear();
this.scatterplot({},0,0,0);
}
}
changed() {
this.selectedOptions.clear();
this.foldchangeDataChecked=[];
this.selectValue.forEach(j => {
const selectedVal = j.nativeElement.value;
if (selectedVal && selectedVal !== "undefined"){
this.selectedOptions.add(selectedVal);
this.foldchangeDataChecked.push(selectedVal);
}
});
if (this.foldchangeDataChecked.length==2 && this.foldchangeDataChecked[0] !=="undefined" && this.foldchangeDataChecked[1] !=="undefined") {
this.checkIfTwoAreSeleected=true;
this.resetButton=false;
this.plotStatus=false;
this.plotDataLength=1;
this._qmpkb.receiveDataFromBackendSearch('/foldChangeapi/?dropDownTerm=' +this.selected.key +'&checkBoxTerm='+ this.foldchangeDataChecked.join() +'&fileName='+ this.downloadFile +'&queryData='+ JSON.stringify(this.foldChangeQueryData)).subscribe((response: any)=>{
this.filteredFoldData=response;
this.foldChangeStatus=response.foldChangeStatus;
if (this.foldChangeStatus == true){
this.scatterplot(this.filteredFoldData.log2FoldData,this.filteredFoldData.maxAbsValLog2,this.filteredFoldData.hLine,this.filteredFoldData.maxValPval);
} else{
this.plotStatus=true;
this.dataStatus=false;
}
}, error=>{
this.errorStr = error;
})
}
}
isSelected(opt: string) {
return this.selectedOptions.has(opt);
}
scatterplot(plotData:any,maxAbsValLog2:any,hLine:any,maxValPval:any):void {
let defaultPlotlyConfiguration={};
defaultPlotlyConfiguration ={
responsive: true,
scrollZoom: true,
showTips:true,
modeBarButtonsToRemove: ['sendDataToCloud', 'autoScale2d', 'hoverClosestCartesian', 'hoverCompareCartesian', 'lasso2d', 'select2d','toImage','pan', 'pan2d','zoom2d','toggleSpikelines'],
displayLogo: false
};
const plotDataArray=[];
for(let key in plotData){
if (plotData[key][0].length >0 ){
let trace={}
if (key == 'Yes'){
trace = {
x: plotData[key][0],
y: plotData[key][1],
mode: 'markers',
type: 'scatter',
text: plotData[key][2],
marker: { size: 5,color:'red', opacity:0.5 },
hoverinfo:'x+y+text',
showlegend:false
};
} else{
trace = {
x: plotData[key][0],
y: plotData[key][1],
mode: 'markers',
type: 'scatter',
text: plotData[key][2],
marker: { size: 5,color:'blue', opacity:0.5 },
hoverinfo:'x+y+text',
showlegend:false
};
}
plotDataArray.push(trace);
}
}
let verLine1={
x: [-1,-1],
y: [0,maxValPval],
mode: 'lines',
line:{
color: 'red',
dash:'dot',
width:1.5
},
showlegend:false,
hoverinfo:'skip'
};
let verLine2={
x: [1,1],
y: [0,maxValPval],
mode: 'lines',
line:{
color: 'red',
dash:'dot',
width:1.5
},
showlegend:false,
hoverinfo:'skip'
};
let horZLine={
x: [-maxAbsValLog2-1, maxAbsValLog2+1],
y: [hLine,hLine],
mode: 'lines',
line:{
color: 'red',
dash:'dot',
width:1.5
},
showlegend:false,
hoverinfo:'skip'
}
plotDataArray.push(verLine1);
plotDataArray.push(verLine2);
plotDataArray.push(horZLine);
let layout = {
title:{text:'Note: Blue and red circle represents dataset size greater than 1 and equal to 1 respectively.<br>When dataset size is one, we replaced p-value with 1.',font:{size:12}},
xaxis: {range: [ -maxAbsValLog2-1, maxAbsValLog2+1 ],title: 'Log2 Fold Change'},
yaxis: {title:'-Log10(adjusted p-value using BH)'},
autosize:false,
width:600,
height:350,
margin:{
l:100,
r:100,
b:40,
t:90
}
};
if (Object.keys(plotData).length >0){
this.plotStatus=true;
this.checkIfTwoAreSeleected=false;
}
Plotly.newPlot('myDiv', plotDataArray, layout, defaultPlotlyConfiguration);
if (this.plotDataLength==0){
this.dataStatus=true;
this.checkIfTwoAreSeleected=false;
Plotly.purge('myDiv')
}
}
}<file_sep>/client/qmpkb-app/src/app/peptideuniqueness/peptideuniqueness.component.html
<ngx-spinner
bdOpacity = 0.9
bdColor = "#333"
size = "medium"
color = "#fff"
type = "ball-atom"
fullScreen = "true"
>
<p style="color: white" > Loading... </p>
</ngx-spinner>
<app-navbar2></app-navbar2>
<div class="container-fluid">
<div *ngIf="reachable ==true">
<table datatable [dtOptions]="dtOptions" class="display cell-border" cellspacing="0" width="100%" id="pepUnqness">
</table>
</div>
<div *ngIf="reachable !==true">
<p>This data entry is not available due to technical error in connecting to an external data resource. Please try again later.</p>
</div>
</div><file_sep>/backend/src/qmpkbapp/filterSearch.py
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from collections import Counter
from itertools import combinations
import ast
from operator import itemgetter
import operator
import json
import re,sys
import itertools
from collections import OrderedDict
import datetime
from statistics import mean
# function to generate peptidebased info into nested json format
def filterSearch(jfinaldata,searchterm,searchtype):
sexQuery=''
strainQuery=''
bioMatQuery=''
knockoutQuery=''
panelQuery=''
tempjfinaldata=[]
filteredUniProtIDs=[]
try:
sexQuery=searchterm[searchtype.index('sex')].strip()
except ValueError:
pass
try:
strainQuery=searchterm[searchtype.index('strain')].strip()
except ValueError:
pass
try:
bioMatQuery=searchterm[searchtype.index('biologicalMatrix')].strip()
except ValueError:
pass
try:
knockoutQuery=searchterm[searchtype.index('knockout')].strip()
except ValueError:
pass
try:
panelQuery=searchterm[searchtype.index('panel')].strip()
except ValueError:
pass
for jitem in jfinaldata:
sumConData=str(jitem["Summary Concentration Range Data"])
allConData=str(jitem["All Concentration Range Data"])
allConDataSampleLLOQ=str(jitem["All Concentration Range Data-Sample LLOQ Based"])
sumConDataInfo=sumConData.split(';')
allConDataInfo=allConData.split(';')
allConDataSampleLLOQInfo=allConDataSampleLLOQ.split(';')
if len(bioMatQuery.strip()) >0 and bioMatQuery.strip().lower() !='na':
sumConDataInfo=[s for s in sumConDataInfo for q in bioMatQuery.lower().split('|') if q == str(s).strip().lower().split('|')[2]]
allConDataInfo=[s for s in allConDataInfo for q in bioMatQuery.lower().split('|') if q == str(s).strip().lower().split('|')[2]]
if 'NA' != ''.join(list(set(allConDataSampleLLOQInfo))):
allConDataSampleLLOQInfo=[s for s in allConDataSampleLLOQInfo if 'NA' !=str(s).strip().upper() for q in bioMatQuery.lower().split('|') if q == str(s).strip().lower().split('|')[2]]
if len(strainQuery.strip()) >0 and strainQuery.strip().lower() !='na':
sumConDataInfo=[s for s in sumConDataInfo for q in strainQuery.lower().split('|') if q == str(s).strip().lower().split('|')[3]]
allConDataInfo=[s for s in allConDataInfo for q in strainQuery.lower().split('|') if q == str(s).strip().lower().split('|')[4]]
if 'NA' != ''.join(list(set(allConDataSampleLLOQInfo))):
allConDataSampleLLOQInfo=[s for s in allConDataSampleLLOQInfo if 'NA' !=str(s).strip().upper() for q in strainQuery.lower().split('|') if q == str(s).strip().lower().split('|')[4]]
if len(sexQuery.strip()) >0 and sexQuery.strip().lower() !='na':
sumConDataInfo=[s for s in sumConDataInfo for q in sexQuery.lower().split('|') if q==str(s).strip().lower().split('|')[4]]
allConDataInfo=[s for s in allConDataInfo for q in sexQuery.lower().split('|') if q==str(s).strip().lower().split('|')[5]]
if 'NA' != ''.join(list(set(allConDataSampleLLOQInfo))):
allConDataSampleLLOQInfo=[s for s in allConDataSampleLLOQInfo if 'NA' !=str(s).strip().upper() for q in sexQuery.lower().split('|') if q==str(s).strip().lower().split('|')[5]]
if len(knockoutQuery.strip()) >0 and knockoutQuery.strip().lower() !='na':
sumConDataInfo=[s for s in sumConDataInfo for q in knockoutQuery.lower().split('|') if q.split(' ')[0] in str(s).strip().lower().split('|')[1].split(' ')[0]]
allConDataInfo=[s for s in allConDataInfo for q in knockoutQuery.lower().split('|') if q.split(' ')[0] in str(s).strip().lower().split('|')[1].split(' ')[0]]
if 'NA' != ''.join(list(set(allConDataSampleLLOQInfo))):
allConDataSampleLLOQInfo=[s for s in allConDataSampleLLOQInfo if 'NA' !=str(s).strip().upper() for q in knockoutQuery.lower().split('|') if q.split(' ')[0] in str(s).strip().lower().split('|')[1].split(' ')[0]]
if len(panelQuery.strip()) >0 and panelQuery.strip().lower() !='na':
sumConDataInfo=[s for s in sumConDataInfo for q in panelQuery.lower().split('|') if q in str(s).strip().lower().split('|')[0]]
allConDataInfo=[s for s in allConDataInfo for q in panelQuery.lower().split('|') if q in str(s).strip().lower().split('|')[0]]
if 'NA' != ''.join(list(set(allConDataSampleLLOQInfo))):
allConDataSampleLLOQInfo=[s for s in allConDataSampleLLOQInfo if 'NA' !=str(s).strip().upper() for q in panelQuery.lower().split('|') if q in str(s).strip().lower().split('|')[0]]
if len(sumConDataInfo)>0:
jitem["Summary Concentration Range Data"]=';'.join(sumConDataInfo)
else:
jitem["Summary Concentration Range Data"]='NA'
if len(allConDataInfo)>0:
jitem["All Concentration Range Data"]=';'.join(allConDataInfo)
else:
jitem["All Concentration Range Data"]='NA'
if len(allConDataInfo)>0:
jitem["All Concentration Range Data-Sample LLOQ Based"]=';'.join(allConDataSampleLLOQInfo)
else:
jitem["All Concentration Range Data-Sample LLOQ Based"]='NA'
if len(jitem["Summary Concentration Range Data"].strip())>0 and (str(jitem["Summary Concentration Range Data"]).strip()).lower() !='na':
coninfo=(jitem["Summary Concentration Range Data"].strip()).split(';')
if len(coninfo)>0:
subconinfo=coninfo[0].split('|')
condata="Mean Conc.:"+str(subconinfo[6])+"<br/>Matix:"+str(subconinfo[2])
tempSampleLLOQInfo=str(jitem['Sample LLOQ'].strip()).split(';')
if str(subconinfo[6]) =='NA':
for samLLOQ in tempSampleLLOQInfo:
if str(subconinfo[2]) in samLLOQ.split('|'):
condata="<"+str(samLLOQ.split('|')[1].strip())+"(Sample LLOQ)<br/>Matix:"+str(subconinfo[2])
jitem["Concentration View"]=condata
strainlist=[]
sexlist=[]
matrixlist=[]
panellist=[]
knockoutlist=[]
meanConclist=[]
unitlist=[]
for i in coninfo:
l=i.split('|')
strainlist.append(l[3])
sexlist.append(l[4])
matrixlist.append(l[2])
panellist.append(l[0])
knockoutlist.append(l[1])
meanConcData=l[6]
unitlist.append(l[6].split(' (')[-1])
if meanConcData !='NA':
meanConclist.append(l[2]+':'+str(meanConcData))
else:
for samXLLOQ in tempSampleLLOQInfo:
if str(l[2]) in samXLLOQ.split('|'):
meanConclist.append("<"+str(samXLLOQ.split('|')[1].strip())+"(Sample LLOQ-"+str(l[2])+")")
if len(strainlist)>0:
jitem["Strain"]='<br>'.join(list(set(strainlist)))
jitem["Sex"]='<br>'.join(list(set(sexlist)))
jitem["Biological Matrix"]='<br>'.join(list(set(matrixlist)))
panellist=[x for p in panellist for x in p.split(',')]
jitem["Panel"]=';'.join(list(set(panellist)))
jitem["knockout"]=';'.join(list(set(knockoutlist)))
countSampleLLOQ=len([mc for mc in meanConclist if 'Sample LLOQ' in mc])
if len(meanConclist) ==countSampleLLOQ:
meanConclist=list(set(meanConclist))
jitem['Concentration Range']='<br/>'.join(meanConclist[:2])
else:
meanConclist=[m for m in meanConclist if 'Sample LLOQ' not in m]
meanConclist=list(set(meanConclist))
jitem['Concentration Range']='<br/>'.join(meanConclist[:2])
else:
jitem["Strain"]='NA'
jitem["Sex"]='NA'
jitem["Biological Matrix"]='NA'
jitem["Panel"]='NA'
jitem["knockout"]='NA'
jitem["Concentration Range"]='NA'
jitem["Summary Concentration Range Data"]=jitem["Summary Concentration Range Data"].replace('fmol target protein/u','fmol target protein/µ')
jitem["Summary Concentration Range Data"]=jitem["Summary Concentration Range Data"].replace('ug protein/u','µg protein/µ')
jitem["Summary Concentration Range Data"]=jitem["Summary Concentration Range Data"].replace('ug protein/mg','µg protein/mg')
jitem["All Concentration Range Data"]=jitem["All Concentration Range Data"].replace('fmol target protein/u','fmol target protein/µ')
jitem["All Concentration Range Data"]=jitem["All Concentration Range Data"].replace('ug protein/u','µg protein/µ')
jitem["All Concentration Range Data"]=jitem["All Concentration Range Data"].replace('ug protein/mg','µg protein/mg')
jitem["All Concentration Range Data-Sample LLOQ Based"]=jitem["All Concentration Range Data-Sample LLOQ Based"].replace('fmol target protein/u','fmol target protein/µ')
jitem["All Concentration Range Data-Sample LLOQ Based"]=jitem["All Concentration Range Data-Sample LLOQ Based"].replace('ug protein/u','µg protein/µ')
jitem["All Concentration Range Data-Sample LLOQ Based"]=jitem["All Concentration Range Data-Sample LLOQ Based"].replace('ug protein/mg','µg protein/mg')
jitem["Concentration View"]=jitem["Concentration View"].replace('fmol target protein/u','fmol target protein/µ')
jitem["Concentration Range"]=jitem["Concentration Range"].replace('fmol target protein/u','fmol target protein/µ')
tempjfinaldata.append(jitem)
else:
filteredUniProtIDs.append(jitem["UniProtKB Accession"])
return tempjfinaldata,filteredUniProtIDs
def filterConcentration(jfinaldata,searchterm,searchtype):
sexQuery=''
strainQuery=''
bioMatQuery=''
knockoutQuery=''
tempjfinaldata=[]
try:
sexQuery=searchterm[searchtype.index('sex')].strip()
except ValueError:
pass
try:
strainQuery=searchterm[searchtype.index('strain')].strip()
except ValueError:
pass
try:
bioMatQuery=searchterm[searchtype.index('biologicalMatrix')].strip()
except ValueError:
pass
try:
knockoutQuery=searchterm[searchtype.index('knockout')].strip()
except ValueError:
pass
for jitem in jfinaldata:
sumConData=str(jitem["Summary Concentration Range Data"])
allConData=str(jitem["All Concentration Range Data"])
allConDataSampleLLOQ=str(jitem["All Concentration Range Data-Sample LLOQ Based"])
sumConDataInfo=sumConData.split(';')
allConDataInfo=allConData.split(';')
allConDataSampleLLOQInfo=allConDataSampleLLOQ.split(';')
if len(bioMatQuery.strip()) >0 and bioMatQuery.strip().lower() !='na':
sumConDataInfo=[s for s in sumConDataInfo for q in bioMatQuery.lower().split('|') if q == str(s).strip().lower().split('|')[2]]
allConDataInfo=[s for s in allConDataInfo for q in bioMatQuery.lower().split('|') if q == str(s).strip().lower().split('|')[2]]
if 'NA' != ''.join(list(set(allConDataSampleLLOQInfo))):
allConDataSampleLLOQInfo=[s for s in allConDataSampleLLOQInfo if 'NA' !=str(s).strip().upper() for q in bioMatQuery.lower().split('|') if q == str(s).strip().lower().split('|')[2]]
if len(strainQuery.strip()) >0 and strainQuery.strip().lower() !='na':
sumConDataInfo=[s for s in sumConDataInfo for q in strainQuery.lower().split('|') if q == str(s).strip().lower().split('|')[3]]
allConDataInfo=[s for s in allConDataInfo for q in strainQuery.lower().split('|') if q == str(s).strip().lower().split('|')[4]]
if 'NA' != ''.join(list(set(allConDataSampleLLOQInfo))):
allConDataSampleLLOQInfo=[s for s in allConDataSampleLLOQInfo if 'NA' !=str(s).strip().upper() for q in strainQuery.lower().split('|') if q == str(s).strip().lower().split('|')[4]]
if len(sexQuery.strip()) >0 and sexQuery.strip().lower() !='na':
sumConDataInfo=[s for s in sumConDataInfo for q in sexQuery.lower().split('|') if q==str(s).strip().lower().split('|')[4]]
allConDataInfo=[s for s in allConDataInfo for q in sexQuery.lower().split('|') if q==str(s).strip().lower().split('|')[5]]
if 'NA' != ''.join(list(set(allConDataSampleLLOQInfo))):
allConDataSampleLLOQInfo=[s for s in allConDataSampleLLOQInfo if 'NA' !=str(s).strip().upper() for q in sexQuery.lower().split('|') if q==str(s).strip().lower().split('|')[5]]
if len(knockoutQuery.strip()) >0 and knockoutQuery.strip().lower() !='na':
sumConDataInfo=[s for s in sumConDataInfo for q in knockoutQuery.lower().split('|') if q.split(' ')[0] in str(s).strip().lower().split('|')[1].split(' ')[0]]
allConDataInfo=[s for s in allConDataInfo for q in knockoutQuery.lower().split('|') if q.split(' ')[0] in str(s).strip().lower().split('|')[1].split(' ')[0]]
if 'NA' != ''.join(list(set(allConDataSampleLLOQInfo))):
allConDataSampleLLOQInfo=[s for s in allConDataSampleLLOQInfo if 'NA' !=str(s).strip().upper() for q in knockoutQuery.lower().split('|') if q.split(' ')[0] in str(s).strip().lower().split('|')[1].split(' ')[0]]
if len(sumConDataInfo)>0:
jitem["Summary Concentration Range Data"]=';'.join(sumConDataInfo)
else:
jitem["Summary Concentration Range Data"]='NA'
if len(allConDataInfo)>0:
jitem["All Concentration Range Data"]=';'.join(allConDataInfo)
else:
jitem["All Concentration Range Data"]='NA'
if len(allConDataInfo)>0:
jitem["All Concentration Range Data-Sample LLOQ Based"]=';'.join(allConDataSampleLLOQInfo)
else:
jitem["All Concentration Range Data-Sample LLOQ Based"]='NA'
tempjfinaldata.append(jitem)
return tempjfinaldata<file_sep>/client/qmpkb-app/src/app/data-load-page/data-load-page.component.ts
import { Component, OnInit } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { Location } from '@angular/common';
import { NgxSpinnerService } from 'ngx-spinner';
import {QmpkbService} from '../qmpkb-service/qmpkb.service';
@Component({
selector: 'app-data-load-page',
templateUrl: './data-load-page.component.html',
styleUrls: ['./data-load-page.component.css']
})
export class DataLoadPageComponent implements OnInit {
loadQuery:string;
errorStr:Boolean;
public alertIsVisible:boolean= false;
constructor(
private route: ActivatedRoute,
private router: Router,
private spinner: NgxSpinnerService,
private location: Location,
private _qmpkb:QmpkbService
) { }
ngOnInit() {
this.spinner.show();
this.route.params.subscribe(params=>{
this.loadQuery =params['slug']
if (this.loadQuery.includes('biomat_')) {
this.location.go('/results/');
let biomatArray=this.loadQuery.split('_');
let updatedBiomatQuery=biomatArray[1]+'_mus'
this._qmpkb.receiveDataFromBackendSearch('/resultsapi/?searchterm=' + updatedBiomatQuery).subscribe((response: any)=>{
if (response.filename_proteincentric != null){
this._qmpkb.queryStorage={
searchterm: biomatArray[1],
filepath: response.filename_proteincentric,
totallist: response.totallist,
unqisostat: response.unqisostat,
subcell:response.subcell,
updatedgo:response.updatedgo,
querystrainData:response.querystrainData,
querybioMatData:response.querybioMatData,
querynoOfDiseaseAssProt:response.querynoOfDiseaseAssProt,
querynoOfHumanOrtholog:response.querynoOfHumanOrtholog,
keggchart:response.keggchart,
foundHits:response.foundHits
}
this.router.navigate(['/results/']);
} else {
this.spinner.hide();
if(this.alertIsVisible){
return;
}
this.alertIsVisible=true;
setTimeout(()=>{
this.alertIsVisible=false;
this.router.navigate(['/']);
},2000);
}
}, error=>{
this.errorStr = error;
})
} else if (this.loadQuery.includes('concentration_')) {
this.location.go('/concentration/')
let concentrationArray=this.loadQuery.split('concentration_');
this._qmpkb.receiveDataFromBackendSearch('/concentrationapi/?query=' + concentrationArray[1]).subscribe((response: any)=>{
let conclist= response.conclist
let protList= response.protList
let foundHits=response.foundHits
let concUnit = response.concUnit
let lenOfConcData= response.lenOfConcData
if (foundHits > 0){
this._qmpkb.queryStorage={
protList: protList,
conclist: conclist,
foundHits:foundHits,
concUnit: concUnit,
lenOfConcData: lenOfConcData
}
this.router.navigate(['/concentration/']);
} else {
this.spinner.hide();
if(this.alertIsVisible){
return;
}
this.alertIsVisible=true;
setTimeout(()=>{
this.alertIsVisible=false;
this.router.navigate(['/']);
},2000);
}
}, error=>{
this.errorStr = error;
})
} else if (this.loadQuery.includes('userpepseq_')) {
this.location.go('/peptideuniqueness/')
let userpepseqArray=this.loadQuery.split('_');
let filename = userpepseqArray.slice(3).join("_");
this._qmpkb.receiveDataFromBackendSearch('/peptideuniquenessapi/?Uniprotkb=' + userpepseqArray[1]+
'&pepseq='+ userpepseqArray[2]+
'&fastafile='+ filename
).subscribe((response: any)=>{
let pepunqdata= response.pepunqdata
let reachable= response.reachable
if (reachable != false) {
this._qmpkb.queryStorage={
pepunqdata:pepunqdata,
reachable :reachable
}
this.router.navigate(['/peptideuniqueness/']);
} else {
this.spinner.hide();
if(this.alertIsVisible){
return;
}
this.alertIsVisible=true;
setTimeout(()=>{
this.alertIsVisible=false;
this.router.navigate(['/']);
},2000);
}
}, error=>{
this.errorStr = error;
})
} else if (this.loadQuery.includes('advanceSearchData_')) {
/*this.location.go('/results/')*/
let advanceSearchDataArray=this.loadQuery.split('_');
let advancedFormData={
queryformData:
{optionGroups:
[
{selectInput:"gene",whereInput:advanceSearchDataArray[1]}
]
}
}
this._qmpkb.receiveDataFromBackendSearch('/advanceresultsapi/?advancedFormData=' + JSON.stringify(advancedFormData)).subscribe((response: any)=>{
if (response.filename_proteincentric != null){
this._qmpkb.queryStorage={
searchterm: response.query,
filepath: response.filename_proteincentric,
totallist: response.totallist,
unqisostat: response.unqisostat,
subcell:response.subcell,
querystrainData:response.querystrainData,
querybioMatData:response.querybioMatData,
querynoOfDiseaseAssProt:response.querynoOfDiseaseAssProt,
querynoOfHumanOrtholog:response.querynoOfHumanOrtholog,
updatedgo:response.updatedgo,
keggchart:response.keggchart,
foundHits:response.foundHits,
fastafilename:response.fastafilename
}
this.router.navigate(['/results/']);
} else {
this.spinner.hide();
if(this.alertIsVisible){
return;
}
this.alertIsVisible=true;
setTimeout(()=>{
this.alertIsVisible=false;
this.router.navigate(['/']);
},2000);
}
}, error=>{
this.errorStr = error;
})
} else if (this.loadQuery.includes('googleChartData_')) {
/*this.location.go('/results/')*/
let googleChartDataArray=this.loadQuery.split('_');
let advancedFormData:any={};
let tempinputArrayArray=[];
if (googleChartDataArray[2]=='strain' || googleChartDataArray[2]=='biologicalMatrix'){
tempinputArrayArray.push(googleChartDataArray[1]);
advancedFormData={
queryformData:
{optionGroups:
[
{selectInput:googleChartDataArray[2],whereInput:tempinputArrayArray}
]
}
}
} else {
advancedFormData={
queryformData:
{optionGroups:
[
{selectInput:googleChartDataArray[2],whereInput:googleChartDataArray[1]}
]
}
}
}
this._qmpkb.receiveDataFromBackendSearch('/advanceresultsapi/?advancedFormData=' + JSON.stringify(advancedFormData)).subscribe((response: any)=>{
if (response.filename_proteincentric != null){
this._qmpkb.queryStorage={
searchterm: response.query,
filepath: response.filename_proteincentric,
totallist: response.totallist,
unqisostat: response.unqisostat,
subcell:response.subcell,
querystrainData:response.querystrainData,
querybioMatData:response.querybioMatData,
querynoOfDiseaseAssProt:response.querynoOfDiseaseAssProt,
querynoOfHumanOrtholog:response.querynoOfHumanOrtholog,
updatedgo:response.updatedgo,
keggchart:response.keggchart,
foundHits:response.foundHits,
fastafilename:response.fastafilename
}
this.router.navigate(['/results/']);
} else {
this.spinner.hide();
if(this.alertIsVisible){
return;
}
this.alertIsVisible=true;
setTimeout(()=>{
this.alertIsVisible=false;
this.router.navigate(['/']);
},2000);
}
}, error=>{
this.errorStr = error;
})
} else if (this.loadQuery.includes('detailinformation_')) {
this.location.go('/detailinformation/')
let userQuery=this.loadQuery.split('_');
let resFile=userQuery.slice(3,).join('_');
this._qmpkb.receiveDataFromBackendSearch('/detailinformationapi/?uniProtKb=' + userQuery[2]+
'&fileName='+ resFile +'&fastafilename='+userQuery[1]
).subscribe((response: any)=>{
let resultFilePath= response.resultFilePath;
let proteinName=response.proteinName;
let geneName=response.geneName;
let uniprotkb=response.uniprotkb;
let foundHits=response.foundHits;
let orthologData=response.orthologData;
let subcell=response.subcell;
let humanDiseaseUniProt = response.humanDiseaseUniProt;
let humanDiseaseDisGeNet = response.humanDiseaseDisGeNet;
let drugBankData = response.drugBankData;
let fastafilename = response.fastafilename;
let orgID = response.orgID;
if (foundHits > 0){
this._qmpkb.queryStorage={
resultFilePath:resultFilePath,
proteinName:proteinName,
geneName:geneName,
uniprotkb:uniprotkb,
foundHits:foundHits,
orthologData:orthologData,
subcell:subcell,
humanDiseaseUniProt:humanDiseaseUniProt,
humanDiseaseDisGeNet:humanDiseaseDisGeNet,
drugBankData:drugBankData,
fastafilename:fastafilename,
orgID:orgID
}
this.router.navigate(['/detailinformation/']);
} else {
this.spinner.hide();
if(this.alertIsVisible){
return;
}
this.alertIsVisible=true;
setTimeout(()=>{
this.alertIsVisible=false;
this.router.navigate(['/']);
},2000);
}
}, error=>{
this.errorStr = error;
})
} else if (this.loadQuery.includes('pathwayview_')) {
this.location.go('/pathwayview/')
let pathwayviewArray=this.loadQuery.split('_');
this._qmpkb.receiveDataFromBackendSearch('/pathwayviewapi/?Uniprotkb=' + pathwayviewArray[1]+
'&organismid='+ pathwayviewArray[3]+
'&pathwayid='+ pathwayviewArray[2]+
'&pathwayname='+ pathwayviewArray[4]
).subscribe((response: any)=>{
let uniprotid= response.uniprotid
let uniprotname= response.uniprotname
let keggimagedict=response.keggimagedict
let otherkeggcolor = response.otherkeggcolor
let notpresentkeggcolor = response.notpresentkeggcolor
let reachable = response.reachable
if (reachable != false) {
this._qmpkb.queryStorage={
uniprotid:uniprotid,
uniprotname:uniprotname,
keggimagedict:keggimagedict,
otherkeggcolor:otherkeggcolor,
notpresentkeggcolor:notpresentkeggcolor,
reachable :reachable
}
this.router.navigate(['/pathwayview/']);
} else {
this.spinner.hide();
if(this.alertIsVisible){
return;
}
this.alertIsVisible=true;
setTimeout(()=>{
this.alertIsVisible=false;
this.router.navigate(['/']);
},2000);
}
}, error=>{
this.errorStr = error;
})
}
})
}
}<file_sep>/client/qmpkb-app/src/app/mouse-anatomy/mouse-anatomy.component.ts
import { Component, OnInit, HostListener } from '@angular/core';
@Component({
selector: 'app-mouse-anatomy',
templateUrl: './mouse-anatomy.component.html',
styleUrls: ['./mouse-anatomy.component.css']
})
export class MouseAnatomyComponent implements OnInit {
screenWidth:any;
screenHeight:any;
@HostListener('window.resize', ['$event'])
getScreenSize(event?){
this.screenWidth=Math.round(window.innerWidth/4)+"px";
this.screenHeight=Math.round(window.innerWidth/2)+"px";
}
constructor() {
this.getScreenSize();
}
ngOnInit() {
}
}
<file_sep>/client/qmpkb-app/src/app/gene-expression/gene-expression.component.ts
import { Component, OnInit, OnDestroy, ViewChild, Renderer, HostListener,Input} from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { Location } from '@angular/common';
import { HttpClient,HttpErrorResponse } from '@angular/common/http';
import { DataTableDirective } from 'angular-datatables';
import { NgxSpinnerService } from 'ngx-spinner';
import {QmpkbService} from '../qmpkb-service/qmpkb.service';
import * as Plotly from 'plotly.js';
import { Subject } from 'rxjs';
import * as $ from "jquery";
declare var jquery: any;
@Component({
selector: 'app-gene-expression',
templateUrl: './gene-expression.component.html',
styleUrls: ['./gene-expression.component.css']
})
export class GeneExpressionComponent implements OnInit {
dtOptions: any = {};
errorStr:Boolean;
geneExplist:any;
geneExplistlen:number;
foundHits:number;
protList:any
queryData:any;
plotlyData:any=[];
screenWidth:any;
lenOfGeneExpData:any;
queryGeneExpUniProtKB:any;
geneExpDataStatus=false;
@ViewChild(DataTableDirective)
datatableElement: DataTableDirective;
plotDataOptions=[
{num:0, name:'Concentration Data'},
{num:1, name:'Log2(Concentration Data)'},
{num:2, name:'Log10(Concentration Data)'},
];
selectedLevel=this.plotDataOptions[0];
@HostListener('window.resize', ['$event'])
getScreenSize(event?){
this.screenWidth=(window.innerWidth-50)+"px";
}
constructor(
private route: ActivatedRoute,
private location: Location,
private http: HttpClient,
private router: Router,
private spinner: NgxSpinnerService,
private _qmpkb:QmpkbService,
private renderer: Renderer,
) {
this.getScreenSize();
}
@Input()
set geneexptermQuery(geneExpUniProtKB:any){
this.queryGeneExpUniProtKB=geneExpUniProtKB;
}
async generateTable(){
await this._qmpkb.receiveDataFromBackendSearch('/geneexpapi/?uniProtKb=' + this.queryGeneExpUniProtKB).subscribe((response: any)=>{
this.queryData=response;
this.geneExplist=this.queryData.geneExplist;
this.geneExplistlen=Object.keys(this.geneExplist).length
this.foundHits=this.queryData.foundHits;
this.protList=this.queryData.protList;
this.lenOfGeneExpData= this.queryData.lenOfGeneExpData;
this.dtOptions = {
processing: true,
serverSide: false,
orderCellsTop: true,
fixedHeader: true,
pageLength: 10,
pagingType: 'full_numbers',
scrollX:true,
scrollY:'650px',
scrollCollapse:true,
columnDefs:[
{
targets: 0,
data: null,
defaultContent: '',
orderable: false,
className: 'select-checkbox',
searchable:false
},
{
targets: 1,
searchable:false,
visible:false
},
{
targets: 2,
searchable:false,
visible:false
}
],
select:{
style:'multi'
},
// Declare the use of the extension in the dom parameter
dom: 'lBfrtip',
buttons: [
{
extend:'csv',
filename: 'GeneExpressionMouseQuaPro',
text:'Download all(CSV)',
exportOptions:{
columns:[1,2,3,4]
}
},
{
extend:'excel',
filename: 'GeneExpressionQMPKB',
text:'Download all(Excel)',
exportOptions:{
columns:[1,2,3,4]
}
},
'selectAll',
'selectNone'
],
order: [],
autoWidth:true
};
if (this.lenOfGeneExpData > 0){
setTimeout(() => {this.dataTableGenerated()}, 100);
}
this.geneExpDataStatus=true;
}, error=>{
this.errorStr = error;
})
}
ngOnInit() {
this.generateTable();
}
dataTableGenerated(): void {
const self = this;
self.datatableElement.dtInstance.then((dtInstance:any) => {
dtInstance.rows(function(idx,data){
const plotName=data[3];
const plotData=data[4];
const tempPlotArray=[plotName,plotData];
self.plotlyData.push(tempPlotArray.join(';'));
return idx >=0;
}).select();
self.barplot(self.plotlyData);
});
self.datatableElement.dtInstance.then(table => {
$('#dataTables-wrkld-geneExp').on('select.dt', function (e,dt,type,indexes) {
if (self.lenOfGeneExpData == indexes.length){
self.plotlyData=[];
for(let j=0; j< indexes.length;j++){
const plotName=dt.row(indexes[j]).data()[3];
const plotData=dt.row(indexes[j]).data()[4];
const tempPlotArray=[plotName,plotData];
self.plotlyData.push(tempPlotArray.join(';'));
}
self.barplot(self.plotlyData);
} else {
const plotName=dt.row(indexes[0]).data()[3];
const plotData=dt.row(indexes[0]).data()[4];
const tempPlotArray=[plotName,plotData];
self.plotlyData.push(tempPlotArray.join(';'));
self.barplot(self.plotlyData);
}
});
$('#dataTables-wrkld-geneExp').on('deselect.dt', function (e,dt,type,indexes) {
if (self.lenOfGeneExpData == indexes.length || indexes.length>1 || self.plotlyData == indexes.length){
self.plotlyData=[];
self.barplot(self.plotlyData);
} else {
const plotName=dt.row(indexes[0]).data()[3];
const plotData=dt.row(indexes[0]).data()[4];
const tempPlotArray=[plotName,plotData];
const indexOfplotlyData=self.plotlyData.indexOf(tempPlotArray.join(';'));
self.plotlyData.splice(indexOfplotlyData,1);
self.barplot(self.plotlyData);
}
});
});
}
barplot(dataToPlot:any):void {
let defaultPlotlyConfiguration:any={};
defaultPlotlyConfiguration ={
scrollZoom: true, // lets us scroll to zoom in and out - works
showTips:true,
modeBarButtonsToRemove: ['sendDataToCloud', 'autoScale2d', 'hoverClosestCartesian', 'hoverCompareCartesian', 'lasso2d', 'select2d','toImage','pan', 'pan2d','zoom2d','toggleSpikelines'],
//modeBarButtonsToAdd: ['lasso2d'],
displayLogo: false, // this one also seems to not work
};
let xAxisData=[];
let yAxisData=[];
for(let i=0; i< dataToPlot.length;i++){
const tempPlotDataArray=dataToPlot[i].split(';');
xAxisData.push(tempPlotDataArray[0])
yAxisData.push(tempPlotDataArray[1])
}
let expPlotData=[];
const expTraceData={
x:xAxisData,
y:yAxisData,
type:'bar',
marker:{
color:'rgb(142,124,195)'
}
}
expPlotData=[expTraceData];
const layout={
title:'Gene Expression',
font:{
family:'Raleway, sans-serif'
},
showlegend:false,
xaxis:{
tickangle:-45
},
yaxis:{
title:'Mean RPKM',
zeroline:false,
gridwidth:2
},
bargap:0.05
}
Plotly.newPlot('myDivGeneExp',expPlotData,layout,defaultPlotlyConfiguration);
if (dataToPlot.length==0){
Plotly.purge('myDivGeneExp')
}
}
}
<file_sep>/backend/updatefile/compileSkylineDataToFit.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import unicodedata
import datetime,glob
import time
import os,subprocess,psutil,re,sys,shutil
import csv
from map_mouse_to_human import mapSpecies
import datetime
from Bio.SeqUtils.ProtParam import molecular_weight,ProteinAnalysis
import urllib,urllib2,urllib3,datetime
import more_itertools as mit
import pickle
import cPickle
from xml.etree import cElementTree as ET
import xmltodict
from xml.dom import minidom
from xml.parsers.expat import ExpatError
from statistics import mean
from tissueInfo import *
import ctypes
def compileSkylineFile():
print ("Skyline Data compilation, job starts",str(datetime.datetime.now()))
curr_dir=os.getcwd()
colname=['UniProtKB Accession','Protein','Gene','Organism','Peptide Sequence','Summary Concentration Range Data','All Concentration Range Data','All Concentration Range Data-Sample LLOQ Based','Peptide ID',\
'Special Residues','Molecular Weight','GRAVY Score','Transitions','Retention Time','Analytical inofrmation',\
'Gradients','AAA Concentration','CZE Purity','Panel','Knockout','LLOQ','ULOQ','Sample LLOQ','Protocol','Trypsin','QC. Conc. Data']
gradData='Time[min]|A[%]|B[%];0.00|98.00|2.00;2.00|93.00|7.00;50.00|70.00|30.00;53.00|55.00|45.00;53.00|20.00|80.00;55.00|20.00|80.00;56.00|98.00|2.00'
skylineMouseConcfile=''
pathwayConcenRes='/home/bioinf/datastoreageiv/bioinformatics/mouse_concen_results/data'
listOfFileConcen=[]
if os.path.exists(pathwayConcenRes):
listOfFileConcen=os.listdir(pathwayConcenRes)
else:
mountsCMD='echo "xxxxx" | sudo -S mount -t cifs -o username=xxxxx,password=<PASSWORD> //datastorage /yourlocalDIR/'
subprocess.Popen(mountsCMD,shell=True).wait()
listOfFileConcen=os.listdir(pathwayConcenRes)
updatedConcenDataList=[]
onlyUpdatedConcenFileList=[]
currentdate=datetime.datetime.now().strftime("%B-%d-%Y")
#increase the field size of CSV
csv.field_size_limit(int(ctypes.c_ulong(-1).value // 2))
updatedConcenDatafilename='updatedConcenDataInfo.txt'
with open(updatedConcenDatafilename,'r') as f:
for l in f:
d=l.strip()
updatedConcenDataList.append(d)
onlyUpdatedConcenFileList.append(d.split(' ')[0])
for c in listOfFileConcen:
if c not in onlyUpdatedConcenFileList:
skylineMouseConcfile=c
updatedConcenDataList.append(c+' '+currentdate)
if len(skylineMouseConcfile.strip())>0:
mouseConcDic={}
finalresult=[]
finalresult.append(colname)
skylineMouseConcfilePath=pathwayConcenRes+'/'+skylineMouseConcfile
with open(skylineMouseConcfilePath,'r') as skMCfile:
skMCcsvreader = csv.DictReader(skMCfile)
headers = skMCcsvreader.fieldnames
for skMCrow in skMCcsvreader:
skylineMouseConcDic={}
sex=str(skMCrow['Sex']).strip()
if sex=='M':
sex='Male'
if sex=='F':
sex='Female'
knockout=str(skMCrow['Knockout']).strip()
panel=str(skMCrow['Panel']).strip()
panel=panel.replace(';',',')
strain=str(skMCrow['Strain']).strip()
concData=str(skMCrow['Conc. Data']).strip()
sampleConcData=str(skMCrow['Conc. Data SampleLLOQ-Based']).strip()
updatedMatrix=str(skMCrow['Matrix']).strip()
sampleProteinContent=[]
calculatedProteinContent=[]
allConcentrationRange=[]
concDataInfo=concData.split(';')
sampleCountWithoutSampleLLOQ=0
for conItem in concDataInfo[1:]:
sampleCountWithoutSampleLLOQ+=1
tempallConcentrationRange=[str(sampleCountWithoutSampleLLOQ),strain,sex]
subConInfo=conItem.split('|')
for ukey in unitDic:
if ukey in skMCrow['Matrix'].strip().lower():
tempallConcentrationRange.append(str(subConInfo[0])+unitDic[ukey][0])
tempallConcentrationRange.append(str(subConInfo[1])+unitDic[ukey][1])
tempallConcentrationRange.append(str(subConInfo[2])+unitDic[ukey][2])
tempallConcentrationRange.insert(0,updatedMatrix)
tempallConcentrationRange.insert(0,knockout)
tempallConcentrationRange.insert(0,panel)
allConcentrationRange.append('|'.join(map(str,tempallConcentrationRange)))
sampleCountWithoutSampleLLOQ=0
allSampleConcentrationRange=[]
sampleConcDataInfo=sampleConcData.split(';')
sampleCountWithSampleLLOQ=0
if len(sampleConcDataInfo) > 1:
for sconItem in sampleConcDataInfo[1:]:
sampleCountWithSampleLLOQ+=1
sampleTempallConcentrationRange=[str(sampleCountWithSampleLLOQ),strain,sex]
subSampleConInfo=sconItem.split('|')
for ukey in unitDic:
if ukey in skMCrow['Matrix'].strip().lower():
sampleTempallConcentrationRange.append(str(subSampleConInfo[0])+unitDic[ukey][0])
sampleTempallConcentrationRange.append(str(subSampleConInfo[1])+unitDic[ukey][1])
sampleTempallConcentrationRange.append(str(subSampleConInfo[2])+unitDic[ukey][2])
sampleTempallConcentrationRange.insert(0,updatedMatrix)
sampleTempallConcentrationRange.insert(0,knockout)
sampleTempallConcentrationRange.insert(0,panel)
sampleProteinContent.append(float(subSampleConInfo[1]))
calculatedProteinContent.append(float(subSampleConInfo[0]))
allSampleConcentrationRange.append('|'.join(map(str,sampleTempallConcentrationRange)))
sampleCountWithSampleLLOQ=0
minsampleProteinContent='NA'
maxsampleProteinContent='NA'
meansampleProteinContent='NA'
if len(sampleProteinContent)>0:
minsampleProteinContent=str(min(sampleProteinContent))
maxsampleProteinContent=str(max(sampleProteinContent))
meansampleProteinContent=str(round(mean(sampleProteinContent),2))
mincalculatedProteinContent='NA'
maxcalculatedProteinContent='NA'
meancalculatedProteinContent='NA'
if len(calculatedProteinContent)>0:
mincalculatedProteinContent=str(min(calculatedProteinContent))
maxcalculatedProteinContent=str(max(calculatedProteinContent))
meancalculatedProteinContent=str(round(mean(calculatedProteinContent),2))
sumConcentrationRange=[]
for ukey in unitDic:
if ukey in skMCrow['Matrix'].strip().lower():
if len(str(skMCrow['Mean Conc.']).strip()) >0 and str(skMCrow['Mean Conc.']).strip().upper() !='NA':
skMCrow['Mean Conc.']=str(skMCrow['Mean Conc.']).strip()+unitDic[ukey][2]
if len(str(skMCrow['Min Conc.']).strip()) >0 and str(skMCrow['Min Conc.']).strip().upper() !='NA':
skMCrow['Min Conc.']=str(skMCrow['Min Conc.']).strip()+unitDic[ukey][2]
if len(str(skMCrow['Max Conc.']).strip()) >0 and str(skMCrow['Max Conc.']).strip().upper() !='NA':
skMCrow['Max Conc.']=str(skMCrow['Max Conc.']).strip()+unitDic[ukey][2]
if len(str(skMCrow['LLOQ']).strip()) >0 and str(skMCrow['LLOQ']).strip().upper() !='NA':
skMCrow['LLOQ']=str(skMCrow['LLOQ']).strip()+unitDic[ukey][0]
if len(str(skMCrow['ULOQ']).strip()) >0 and str(skMCrow['ULOQ']).strip().upper() !='NA':
skMCrow['ULOQ']=str(skMCrow['ULOQ']).strip()+unitDic[ukey][0]
if len(str(skMCrow['Sample LLOQ']).strip()) >0 and str(skMCrow['Sample LLOQ']).strip().upper() !='NA':
skMCrow['Sample LLOQ']=str(skMCrow['Sample LLOQ']).strip()+unitDic[ukey][0]
if len(sampleProteinContent) >0:
minsampleProteinContent=minsampleProteinContent+unitDic[ukey][1]
maxsampleProteinContent=maxsampleProteinContent+unitDic[ukey][1]
meansampleProteinContent=meansampleProteinContent+unitDic[ukey][1]
if len(calculatedProteinContent) >0:
mincalculatedProteinContent=mincalculatedProteinContent+unitDic[ukey][0]
maxcalculatedProteinContent=maxcalculatedProteinContent+unitDic[ukey][0]
meancalculatedProteinContent=meancalculatedProteinContent+unitDic[ukey][0]
LLOQ=str(skMCrow['LLOQ']).strip()
sampleLLOQ=str(skMCrow['Sample LLOQ']).strip()
ULOQ=str(skMCrow['ULOQ']).strip()
meanConc=str(skMCrow['Mean Conc.']).strip()
minConc=str(skMCrow['Min Conc.']).strip()
maxConc=str(skMCrow['Max Conc.']).strip()
tempnrSamples=str(skMCrow['Nr. samples']).strip()
nrSamples=str(tempnrSamples.split('/')[-1])+'/'+str(tempnrSamples.split('/')[0])
sumConcentrationRange=[panel,knockout,updatedMatrix,strain,sex,nrSamples,meancalculatedProteinContent,meansampleProteinContent,meanConc,mincalculatedProteinContent,minsampleProteinContent,minConc,maxcalculatedProteinContent,maxsampleProteinContent,maxConc]
if len(sumConcentrationRange)>0:
skylineMouseConcDic['Summary Concentration Range Data']='|'.join(sumConcentrationRange)
else:
skylineMouseConcDic['Summary Concentration Range Data']='NA'
if len(allConcentrationRange)>0:
skylineMouseConcDic['All Concentration Range Data']=';'.join(allConcentrationRange)
else:
skylineMouseConcDic['All Concentration Range Data']='NA'
if len(allSampleConcentrationRange)>0:
skylineMouseConcDic['All Concentration Range Data-Sample LLOQ Based']=';'.join(allSampleConcentrationRange)
else:
skylineMouseConcDic['All Concentration Range Data-Sample LLOQ Based']='NA'
skylineMouseConcDic['Special Residues']= 'NA'
molw=molecular_weight(str(skMCrow['Peptide Sequence']).strip().upper(), "protein", monoisotopic=True)
molw=round(molw,2)
skylineMouseConcDic['Molecular Weight']= str(molw)
protanalys=ProteinAnalysis(str(skMCrow['Peptide Sequence']).strip().upper())
gravScore=round((protanalys.gravy()),2)
skylineMouseConcDic['GRAVY Score']= str(gravScore)
transitionData=str(skMCrow['Transition Data']).strip()
instrument=str(skMCrow['Instrument']).strip()
transitionDataList=[]
if len(transitionData)>0 and transitionData.upper() !='NA':
subTransDataInfo=transitionData.split(';')
subTransDataHeader='Instrument|'+subTransDataInfo[0]
transitionDataList.append(subTransDataHeader)
for t in subTransDataInfo[1:]:
subTDInfo=t.split('|')
subTDInfo.insert(0,instrument)
transitionDataList.append('|'.join(subTDInfo))
if len(transitionDataList)>0:
skylineMouseConcDic['Transitions']= ';'.join(list(set(transitionDataList)))
else:
skylineMouseConcDic['Transitions']= 'NA'
skylineMouseConcDic['Retention Time']= str(skMCrow['Retention Time']).strip()
skylineMouseConcDic['Analytical inofrmation']= 'Agilent Zorbax Eclipse Plus C18 RRHD 2.1 x 150mm 1.8um'
skylineMouseConcDic['Gradients']= gradData
skylineMouseConcDic['AAA Concentration']= 'NA'
skylineMouseConcDic['CZE Purity']= 'NA'
panel=panel.replace(',',';')
skylineMouseConcDic['Panel']= panel
skylineMouseConcDic['Knockout']= knockout
skylineMouseConcDic['LLOQ']= updatedMatrix+'|'+LLOQ
skylineMouseConcDic['ULOQ']= updatedMatrix+'|'+ULOQ
skylineMouseConcDic['Sample LLOQ']= updatedMatrix+'|'+sampleLLOQ
skylineMouseConcDic['Protocol']= str(skMCrow['Protocol']).strip()
skylineMouseConcDic['Trypsin']= str(skMCrow['Trypsin']).strip()
skylineMouseConcDic['QC. Conc. Data']= str(skMCrow['QC. Conc. Data']).strip()
skylineConcKey=str(skMCrow['Accession Number']).strip()+'_'+str(skMCrow['Peptide Sequence']).strip().upper()
if mouseConcDic.has_key(skylineConcKey):
mouseConcDic[skylineConcKey].append(skylineMouseConcDic)
else:
mouseConcDic[skylineConcKey]=[skylineMouseConcDic]
countProt=0
for mckey in mouseConcDic:
tempConcDic={}
tempConcDic['UniProtKB Accession']=mckey.split('_')[0]
tempConcDic['Peptide Sequence']=mckey.split('_')[1]
currdate=str(datetime.datetime.now())
currdate=currdate.replace('-','')
currdate=currdate.replace(' ','')
currdate=currdate.replace(':','')
currdate=currdate.replace('.','')
generatePepid='PEP'+currdate+'FAKE'
tempConcDic['Peptide ID']= generatePepid
subDickey=['Summary Concentration Range Data','All Concentration Range Data','All Concentration Range Data-Sample LLOQ Based',\
'Special Residues','Molecular Weight','GRAVY Score','Transitions','Retention Time','Analytical inofrmation',\
'Gradients','AAA Concentration','CZE Purity','Panel','Knockout','LLOQ','ULOQ','Sample LLOQ','Protocol','Trypsin','QC. Conc. Data']
sumConcData=[]
allConcData=[]
sampleAllConcData=[]
spRes=[]
molW=[]
gravScore=[]
transData=[]
retTime=[]
analytInfo=[]
grad=[]
aaConc=[]
czePur=[]
panel=[]
lloq=[]
uloq=[]
samlloq=[]
protocol=[]
tryps=[]
qcConcData=[]
knockoutData=[]
for item in mouseConcDic[mckey]:
sumConcData.append(item['Summary Concentration Range Data'])
for ac in item['All Concentration Range Data'].split(';'):
allConcData.append(ac)
for s in item['All Concentration Range Data-Sample LLOQ Based'].split(';'):
sampleAllConcData.append(s)
spRes.append(item['Special Residues'])
molW.append(item['Molecular Weight'])
gravScore.append(item['GRAVY Score'])
for t in item['Transitions'].split(';'):
transData.append(t)
for r in item['Retention Time'].split(';'):
retTime.append(r)
analytInfo.append(item['Analytical inofrmation'])
grad.append(item['Gradients'])
aaConc.append(item['AAA Concentration'])
czePur.append(item['CZE Purity'])
for p in item['Panel'].split(';'):
panel.append(p)
lloq.append(item['LLOQ'])
uloq.append(item['ULOQ'])
samlloq.append(item['Sample LLOQ'])
protocol.append(item['Protocol'])
tryps.append(item['Trypsin'])
qcConcData.append(item['QC. Conc. Data'])
knockoutData.append(item['Knockout'])
panel =list(set(panel))
if len(panel)>1:
panel=[y for x in panel for y in x.split(';') if 'na' != y.lower()]
knockoutData =list(set(knockoutData))
if len(knockoutData)>1:
knockoutData=[x for x in knockoutData if 'na' != x.lower()]
transHeader='Instrument|Isotope Label Type|Precursor Mz|Collision Energy|Fragment Ion|Product Charge|Product Mz'
transData=list(set(transData))
transData.sort()
del transData[transData.index(transHeader)]
retTime.sort()
sampleAllConcData.sort()
allConcData.sort()
panel.sort()
tempConcDic['Summary Concentration Range Data']=';'.join(map(str,list(set(sumConcData))))
tempConcDic['All Concentration Range Data']=';'.join(map(str,list(set(allConcData))))
tempConcDic['All Concentration Range Data-Sample LLOQ Based']=';'.join(map(str,list(set(sampleAllConcData))))
tempConcDic['Special Residues']=';'.join(map(str,list(set(spRes))))
tempConcDic['Molecular Weight']=';'.join(map(str,list(set(molW))))
tempConcDic['GRAVY Score']=';'.join(map(str,list(set(gravScore))))
tempConcDic['Transitions']=transHeader+';'+';'.join(map(str,list(set(transData))))
tempConcDic['Retention Time']=';'.join(map(str,list(set(retTime))))
tempConcDic['Analytical inofrmation']=';'.join(map(str,list(set(analytInfo))))
tempConcDic['Gradients']=';'.join(map(str,list(set(grad))))
tempConcDic['AAA Concentration']=';'.join(map(str,list(set(aaConc))))
tempConcDic['CZE Purity']=';'.join(map(str,list(set(czePur))))
tempConcDic['Panel']=';'.join(map(str,list(set(panel))))
tempConcDic['LLOQ']=';'.join(map(str,list(set(lloq))))
tempConcDic['ULOQ']=';'.join(map(str,list(set(uloq))))
tempConcDic['Sample LLOQ']=';'.join(map(str,list(set(samlloq))))
tempConcDic['Protocol']=';'.join(map(str,list(set(protocol))))
tempConcDic['Trypsin']=';'.join(map(str,list(set(tryps))))
tempConcDic['QC. Conc. Data']=';'.join(map(str,list(set(qcConcData))))
tempConcDic['Knockout']=';'.join(map(str,list(set(knockoutData))))
time.sleep(2)
PN='NA'
GN='NA'
OG='NA'
uacc=str(mckey.split('_')[0]).strip()
subcode=uacc.split('-')[0]
try:
countProt+=1
if countProt%1000 ==0:
print str(countProt), "th protein Protein Name, Gene, Organism Name job starts",str(datetime.datetime.now())
SGrequestURL="https://www.uniprot.org/uniprot/"+str(subcode)+".xml"
SGunifile=urllib.urlopen(SGrequestURL)
SGunidata= SGunifile.read()
SGunifile.close()
try:
SGunidata=minidom.parseString(SGunidata)
try:
try:
PN=(((SGunidata.getElementsByTagName('protein')[0]).getElementsByTagName('recommendedName')[0]).getElementsByTagName('fullName')[0]).firstChild.nodeValue
except:
PN=(((SGunidata.getElementsByTagName('protein')[0]).getElementsByTagName('submittedName')[0]).getElementsByTagName('fullName')[0]).firstChild.nodeValue
except IndexError:
pass
try:
try:
GN=((SGunidata.getElementsByTagName('gene')[0]).getElementsByTagName('name')[0]).firstChild.nodeValue
except:
GN='NA'
except IndexError:
pass
try:
try:
OG=((SGunidata.getElementsByTagName('organism')[0]).getElementsByTagName('name')[0]).firstChild.nodeValue
except:
OG='NA'
except IndexError:
pass
except ExpatError:
pass
except IOError:
pass
tempConcDic['Protein']=str(PN)
tempConcDic['Gene']=str(GN)
tempConcDic['Organism']=str(OG)
tempList=[]
for col in colname:
tempList.append(tempConcDic[col])
finalresult.append(tempList)
outputresultpeptrack='mouse_report_peptrack_data.csv'
with open(outputresultpeptrack,'wb') as pf:
pwriter =csv.writer(pf,delimiter='\t')
pwriter.writerows(finalresult)
with open(updatedConcenDatafilename,'w') as ufile:
for i in updatedConcenDataList:
ufile.write(i+"\n")
mapSpecies(outputresultpeptrack)
print ("Skyline Data compilation, job done",str(datetime.datetime.now()))
return 1
else:
return 0<file_sep>/client/qmpkb-app/src/app/pathwayview/pathwayview.component.ts
import { Component, OnInit, OnDestroy, HostListener } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { Location } from '@angular/common';
import { HttpClient,HttpErrorResponse } from '@angular/common/http';
import { DataTableDirective } from 'angular-datatables';
import { NgxSpinnerService } from 'ngx-spinner';
import {QmpkbService} from '../qmpkb-service/qmpkb.service';
import * as $ from "jquery";
declare var jquery: any;
@Component({
selector: 'app-pathwayview',
templateUrl: './pathwayview.component.html',
styleUrls: ['./pathwayview.component.css']
})
export class PathwayviewComponent implements OnInit {
errorStr:Boolean;
uniprotid:any;
uniprotname:any;
keggimagedict:any;
keggimagedictlen:number;
keggurl:any;
reachable:Boolean;
queryData:any;
screenWidth:any;
loadQuery:any;
public alertIsVisible:boolean= false;
@HostListener('window.resize', ['$event'])
getScreenSize(event?){
this.screenWidth=Math.round(window.innerWidth-50)+"px";
}
constructor(
private route: ActivatedRoute,
private location: Location,
private http: HttpClient,
private router: Router,
private spinner: NgxSpinnerService,
private _qmpkb:QmpkbService
) {
this.getScreenSize();
}
async getQuery(){
await this.route.queryParams.subscribe(params=>{
this.loadQuery =params;
if (Object.keys(this.loadQuery).length > 0){
this.spinner.show();
setTimeout(() => {
this.getPathwayData(this.loadQuery);
}, 100);
} else {
this.spinner.hide();
if(this.alertIsVisible){
return;
}
this.alertIsVisible=true;
setTimeout(()=>{
this.alertIsVisible=false;
this.router.navigate(['/']);
},5000);
}
})
}
getPathwayData(queryData:any){
const queryParameters=Object.keys(this.loadQuery);
let qUniProtKB='NA';
let qOrgID='NA';
let qPathWayID='NA';
let qPathWayName='NA';
for(let i=0; i< queryParameters.length ;i++){
if (queryParameters[i]=='Uniprotkb'){
qUniProtKB=queryData[queryParameters[i]];
} else if (queryParameters[i]=='organismid'){
qOrgID=queryData[queryParameters[i]];
} else if (queryParameters[i]=='pathwayid'){
qPathWayID=queryData[queryParameters[i]];
} else if (queryParameters[i]=='pathwayname'){
qPathWayName=queryData[queryParameters[i]];
}
}
if (qUniProtKB.trim().length <6 || qUniProtKB.trim() =='NA' || qOrgID.trim() !=='10090' || qOrgID.trim() =='NA' || !qPathWayID.includes('mmu')){
this.spinner.hide();
if(this.alertIsVisible){
return;
}
this.alertIsVisible=true;
setTimeout(()=>{
this.alertIsVisible=false;
this.router.navigate(['/']);
},5000);
} else {
this._qmpkb.receiveDataFromBackendSearch('/pathwayviewapi/?Uniprotkb=' + qUniProtKB+
'&organismid='+ qOrgID+
'&pathwayid='+ qPathWayID+
'&pathwayname='+ qPathWayName
).subscribe((response: any)=>{
this.queryData=response;
this.reachable =this.queryData.reachable;
if (this.reachable != false){
this.uniprotid=this.queryData.uniprotid;
this.uniprotname=this.queryData.uniprotname;
this.keggimagedict=this.queryData.keggimagedict;
this.keggurl= this.queryData.keggurl;
this.keggimagedictlen=Object.keys(this.keggimagedict).length;
this.spinner.hide();
} else {
this.spinner.hide();
if(this.alertIsVisible){
return;
}
this.alertIsVisible=true;
setTimeout(()=>{
this.alertIsVisible=false;
this.router.navigate(['/']);
},5000);
}
}, error=>{
this.errorStr = error;
});
}
}
ngOnInit() {
this.getQuery();
}
}<file_sep>/backend/src/qmpkbapp/summaryStat.py
#!/usr/bin/env.python
# -*- coding: utf-8 -*-
# encoding: utf-8
from __future__ import unicode_literals
from collections import Counter
from itertools import combinations
import ast
from operator import itemgetter
from summaryKeggCoverage import *
import operator
import json
import re
import itertools
from collections import OrderedDict
import datetime
from functools import partial
# function to generate stat based on user search result
def summaryStatcal(pepresult):
specieslist=[]
unqisostat=[]
subcell={}
godic={}
diseasedic={}
statKeggDic={}
prodataseries={}
pepseqdataseries={}
strainData=[]
bioMatData=[]
noOfHumanOrtholog=0
noOfDiseaseAssProt=0
databaseNameList=['Peptide ID']
pattern = re.compile(r"-\d+")
mouseQuaReplace=('<br/>','|'),('<br>','|')
utf8 = partial(unicode.encode, encoding="utf8")
listOfSubcell=list((object['SubCellular'] for object in pepresult)) #reading subcellular data from result
listOfSubcell=filter(None, listOfSubcell) #filter out empty value
if len(listOfSubcell)>0:
listOfSubcell=filter(lambda k: 'NA' != k.upper(), listOfSubcell) #filter out NA value
if len(listOfSubcell)>0:
subcellcount=Counter((('|'.join(listOfSubcell)).split('|'))) #split subcellular location then count the occurance
tempsortedsubcell=OrderedDict(sorted(dict(subcellcount).items(), key=lambda x: x[1],reverse=True)) #sorting dictionary based on number of unique items in dict and reverse order
listOfSubcell=(dict(itertools.islice(tempsortedsubcell.items(), 0, 50))).keys() # only top 50 restult will be displayed
listOfSpecies=list((object['Organism'] for object in pepresult)) #reading organism data from result
listOfSpecies=list(set(filter(None, listOfSpecies))) #filter out empty value
listOfGoName=list((object['Mouse Go Name'] for object in pepresult)) #reading GO name data from result
listOfGoName=filter(None, listOfGoName) #filter out empty value
if len(listOfGoName)>0:
listOfGoName=filter(lambda k: 'NA' != k.upper(), listOfGoName) #filter out NA value
if len(listOfGoName)>0:
listOfGoNamecount=Counter((('|'.join(listOfGoName)).split('|'))) #split data then count the occurance
tempsortedgo=OrderedDict(sorted(dict(listOfGoNamecount).items(), key=lambda x: x[1],reverse=True)) #sorting dictionary based on number of unique items in dict and reverse order
listOfGoName=(dict(itertools.islice(tempsortedgo.items(), 0, 50))).keys() # only top 50 restult will be displayed
listOfKeggName=list((object['Mouse Kegg Pathway Name'] for object in pepresult)) #reading kegg data from result
listOfKeggName=filter(None, listOfKeggName) #filter out empty value
if len(listOfKeggName)>0:
listOfKeggName=filter(lambda k: 'NA' != k.upper(), listOfKeggName) #filter out NA value
if len(listOfKeggName)>0:
listOfKeggNamecount=Counter((('|'.join(listOfKeggName)).split('|'))) #split data then count the occurance
tempsortedkegg=OrderedDict(sorted(dict(listOfKeggNamecount).items(), key=lambda x: x[1],reverse=True)) #sorting dictionary based on number of unique items in dict and reverse order
listOfKeggName=(dict(itertools.islice(tempsortedkegg.items(), 0, 20))).keys()# only top 20 restult will be displayed
listOfHumanOrtholog=list((object['Human UniProtKB Accession'] for object in pepresult)) #reading human homolog data from result
listOfHumanOrtholog=filter(None, listOfHumanOrtholog) #filter out empty value
listOfHumanOrtholog=list(set(listOfHumanOrtholog))
if 'NA' in listOfHumanOrtholog:
listOfHumanOrtholog.remove('NA')
noOfHumanOrtholog=len(listOfHumanOrtholog)
listOfHumanAssocDis=list((object['Human Disease Name'] for object in pepresult)) #reading disease data from result
listOfHumanAssocDis=filter(None, listOfHumanAssocDis) #filter out empty value
listOfHumanAssocDis='|'.join(listOfHumanAssocDis)
listOfHumanAssocDis=list(set(listOfHumanAssocDis.split('|')))
if 'NA' in listOfHumanAssocDis:
listOfHumanAssocDis.remove('NA')
noOfDiseaseAssProt=len(listOfHumanAssocDis)
if len(listOfHumanAssocDis)>0:
listOfHumanAssocDiscount=Counter(listOfHumanAssocDis)
tempsortedHumanDis=OrderedDict(sorted(dict(listOfHumanAssocDiscount).items(), key=lambda x: x[1],reverse=True)) #sorting dictionary based on number of unique items in dict and reverse order
listOfHumanAssocDis=(dict(itertools.islice(tempsortedHumanDis.items(), 0, 20))).keys()# only top 20 restult will be displayed
listOfBiomatrix=list((object['Biological Matrix'] for object in pepresult)) #reading tissues data from result
listOfBiomatrix=filter(None, listOfBiomatrix) #filter out empty value
listOfBiomatrix='|'.join(listOfBiomatrix)
listOfBiomatrix=reduce(lambda a,kv: a.replace(*kv), mouseQuaReplace, listOfBiomatrix)
listOfBiomatrix=list(set(listOfBiomatrix.split('|')))
listOfStrain=list((object['Strain'] for object in pepresult)) #reading strain data from result
listOfStrain=filter(None, listOfStrain) #filter out empty value
listOfStrain='|'.join(listOfStrain)
listOfStrain=reduce(lambda a,kv: a.replace(*kv), mouseQuaReplace, listOfStrain)
listOfStrain=list(set(listOfStrain.split('|')))
for i in listOfBiomatrix:
subdatafilter=filter(lambda pepdata: str(i).strip().lower() in (str(pepdata["Biological Matrix"]).strip()).lower(), pepresult)
subdataprot=list((object['UniProtKB Accession'] for object in subdatafilter))
subdatapep=list((object['Peptide Sequence'] for object in subdatafilter))
subdataprot=list(set([pattern.sub("", item) for item in subdataprot]))
subdatapep=list(set([pattern.sub("", item) for item in subdatapep]))
#bioMatData.append([i,len(subdataprot),len(subdatapep)])
bioMatData.append([i,len(subdataprot)])
for i in listOfStrain:
subdatafilter=filter(lambda pepdata: str(i).strip().lower() in (str(pepdata["Strain"]).strip()).lower(), pepresult)
subdataprot=list((object['UniProtKB Accession'] for object in subdatafilter))
subdatapep=list((object['Peptide Sequence'] for object in subdatafilter))
subdataprot=list(set([pattern.sub("", item) for item in subdataprot]))
subdatapep=list(set([pattern.sub("", item) for item in subdatapep]))
strainData.append([i,len(subdataprot),len(subdatapep)])
for i in listOfSubcell:
subdatafilter=filter(lambda pepdata: (str(i).strip()).lower() in (str(pepdata['SubCellular']).strip()).lower().split('|'), pepresult)
subdata=list((object['UniProtKB Accession'] for object in subdatafilter))
subcell[str(i).strip()]=len(list(set([pattern.sub("", item) for item in subdata])))
for i in listOfSpecies:
subdatafilter=filter(lambda pepdata: str(i).strip().lower() in (str(pepdata["Organism"]).strip()).lower(), pepresult)
subdataprot=list((object['UniProtKB Accession'] for object in subdatafilter))
subdatapep=list((object['Peptide Sequence'] for object in subdatafilter))
subdataprot=list(set([pattern.sub("", item) for item in subdataprot]))
subdatapep=list(set([pattern.sub("", item) for item in subdatapep]))
specieslist.append([i,len(subdataprot),len(subdatapep)])
for i in listOfKeggName:
subdatafilter=filter(lambda pepdata: str(i).strip().lower() in (str(pepdata["Mouse Kegg Pathway Name"]).strip()).lower().split('|'), pepresult)
subdata=list((object['UniProtKB Accession'] for object in subdatafilter))
statKeggDic[str(i).strip()]=list(set([pattern.sub("", item) for item in subdata]))
for i in listOfGoName:
subdatafilter=filter(lambda pepdata: str(i).strip().lower() in (str(pepdata["Mouse Go Name"]).strip()).lower().split('|'), pepresult)
subdata=list((object['UniProtKB Accession'] for object in subdatafilter))
godic[str(i).strip()]=len(list(set([pattern.sub("", item) for item in subdata])))
for i in listOfHumanAssocDis:
subdatafilter=filter(lambda pepdata: str(i).strip().lower() in map(str,map(utf8,pepdata["Human Disease Name"].strip().lower().split('|'))), pepresult)
subdata=list((object['UniProtKB Accession'] for object in subdatafilter))
diseasedic[str(i).strip()]=len(list(set([pattern.sub("", item) for item in subdata])))
for i in databaseNameList:
subdatafilter=filter(lambda pepdata: ((str(pepdata[i]).strip()).lower() !='na' and len(str(pepdata[i]).strip()) >0), pepresult)
subdataprot=list((object['UniProtKB Accession'] for object in subdatafilter))
subdatapep=list((object['Peptide Sequence'] for object in subdatafilter))
prodataseries[(str(i).strip()).split(' ')[0]]=list(set([pattern.sub("", item) for item in subdataprot]))
pepseqdataseries[(str(i).strip()).split(' ')[0]]=list(set([pattern.sub("", item) for item in subdatapep]))
isostatus=list((object['Present in isoforms'] for object in subdatafilter))
unqstatus=list((object['Unique in protein'] for object in subdatafilter))
tempcalunq='0.0%'
tempcaliso='0.0%'
if len(isostatus)>0:
isostatus = map(lambda x: 'NA' if x.strip() == '' else x, isostatus)
tempcaliso=str(100-(round((100.00-(float(isostatus.count('NA'))/float(len(isostatus)))*100),2)))+'%'
if len(unqstatus)>0:
tempcalunq=str(round(((float(unqstatus.count('Yes'))/float(len(unqstatus)))*100),2))+'%'
unqisostat.append([(str(i).strip()).split(' ')[0],tempcalunq,tempcaliso])
sortedKeggStatdic=OrderedDict(sorted(statKeggDic.items(), key=lambda x: len(x[1]), reverse=True))
top10keggdict=dict(itertools.islice(sortedKeggStatdic.items(), 0, 10))
keggchart=summarykeggcal(top10keggdict,prodataseries)
statfinalresult={}
statfinalresult['total']=[len(set(reduce(operator.concat, prodataseries.values()))),len(set(reduce(operator.concat, pepseqdataseries.values())))]
statfinalresult['pepseqdataseries']=pepseqdataseries
statfinalresult['prodataseries']=prodataseries
statfinalresult['specieslist']=specieslist
statfinalresult['unqisostat']=unqisostat
statfinalresult['keggchart']=keggchart
#statfinalresult['BioMat']=[['Biological Matrix','Total unique proteins','Total unique peptide']]+bioMatData
statfinalresult['BioMat']=[['Biological Matrix','No. of assays']]+bioMatData
statfinalresult['Strain']=[['Strain','Total unique proteins', 'Total unique peptide']]+strainData
statfinalresult['noOfHumanortholog']=noOfHumanOrtholog
statfinalresult['noOfDiseaseAssProt']=noOfDiseaseAssProt
sortedGodic=OrderedDict(sorted(godic.items(), key=lambda x: x[1],reverse=True))
sortedSubcelldic=OrderedDict(sorted(subcell.items(), key=lambda x: x[1],reverse=True))
sortedDiseasedic=OrderedDict(sorted(diseasedic.items(), key=lambda x: x[1],reverse=True))
statfinalresult['subcell']=[['SubCellular localization','No. of proteins covered']]+map(list,(sorted(list(sortedSubcelldic.items()),key=lambda l:l[1], reverse=True))[:10])
statfinalresult['godic']=[['GO Term Name','No. of proteins covered']]+map(list,(sorted(sortedGodic.items(),key=lambda l:l[1], reverse=True))[:10])
statfinalresult['disdic']=[['Disease Name','No. of proteins associated']]+map(list,(sorted(sortedDiseasedic.items(),key=lambda l:l[1], reverse=True))[:10])
return statfinalresult<file_sep>/backend/src/qmkbdjangulardb/settings/store_password.py
SECRET_KEY = 'xxxxx'
EMAIL_HOST="smtp.gmail.com"
DEFAULT_FROM_EMAIL = '<EMAIL>'
DJANGO_ADMIN_USERNAME="xxxxx"
DJANGO_ADMIN_PASSWORD="<PASSWORD>"
EMAIL_HOST_USER="<EMAIL>"
EMAIL_HOST_PASSWORD="<PASSWORD>"<file_sep>/client/qmpkb-app/src/app/peptideuniqueness/peptideuniqueness.component.ts
import { Component, OnInit, OnDestroy, ViewChild} from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { Location } from '@angular/common';
import { HttpClient,HttpErrorResponse } from '@angular/common/http';
import { DataTableDirective } from 'angular-datatables';
import { NgxSpinnerService } from 'ngx-spinner';
import {QmpkbService} from '../qmpkb-service/qmpkb.service';
import * as $ from "jquery";
declare var require: any
declare var jquery: any;
@Component({
selector: 'app-peptideuniqueness',
templateUrl: './peptideuniqueness.component.html',
styleUrls: ['./peptideuniqueness.component.css']
})
export class PeptideuniquenessComponent implements OnInit {
private routeSub:any;
dtOptions: any = {};
pepunqdata:any;
errorStr:Boolean;
reachable:Boolean;
queryData:any;
@ViewChild(DataTableDirective)
datatableElement: DataTableDirective;
constructor(
private route: ActivatedRoute,
private location: Location,
private http: HttpClient,
private router: Router,
private spinner: NgxSpinnerService,
private _qmpkb:QmpkbService
) { }
ngOnInit() {
this.spinner.show();
this.location.go('/peptideuniqueness/')
this.queryData=this._qmpkb.queryStorage;
this.pepunqdata=JSON.parse(this.queryData.pepunqdata)
this.reachable=this.queryData.reachable
this.dtOptions = {
data: this.pepunqdata.data,
columns: [
{ title: 'Show Highlighted Peptide Sequence',
className: 'details-control',
orderable: false,
data: null,
defaultContent: '',
render: function () {
return '<i class="fa fa-plus-square" aria-hidden="true"></i>';
},
width:"15px"
},
{
title: 'Protein ID',
data: "proteinID"
},
{
title: 'Peptide Sequence',
data: "peptideSequence"
},
{
title: 'Start',
data: "start"
},
{
title: 'End',
data: "end"
},
{
title: 'Sequence Length',
data: "seqlen"
},
{
title: 'Peptide unique in protein',
data: "peptideuniqueinprotein"
},
{
title: 'Data source',
data: "datasource"
}
],
autoWidth:true
};
this.spinner.hide();
}
private format(d){
// `d` is the original data object for the row
return '<table cellpadding="5" cellspacing="0" border="0" style="padding-left:50px;">' +
'<tr>' +
'<td>Fasta:</td>' +
'<td>' + d.highlightedpepseq + '</td>' +
'</tr>' +
'</table>';
}
ngAfterViewInit(): void {
const self = this;
this.datatableElement.dtInstance.then(table => {
// Add event listener for opening and closing details
$('#pepUnqness tbody').on('click', 'td.details-control', function () {
var tr = $(this).closest('tr');
var tdi = tr.find("i.fa");
var row = table.row(tr);
if (row.child.isShown()) {
// This row is already open - close it
row.child.hide();
tr.removeClass('shown');
tdi.first().removeClass('fa-minus-square');
tdi.first().addClass('fa-plus-square');
}
else {
// Open this row
row.child(self.format(row.data())).show();
tr.addClass('shown');
tdi.first().removeClass('fa-plus-square');
tdi.first().addClass('fa-minus-square');
}
});
table.on("user-select", function (e, dt, type, cell, originalEvent) {
if ($(cell.node()).hasClass("details-control")) {
e.preventDefault();
}
});
});
}
}
<file_sep>/client/qmpkb-app/src/app/detail-information/detail-information.component.ts
import { Component, OnInit, OnDestroy, ViewChild, Renderer, HostListener} from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { Location } from '@angular/common';
import { HttpClient,HttpErrorResponse } from '@angular/common/http';
import { DataTableDirective } from 'angular-datatables';
import { NgxSpinnerService } from 'ngx-spinner';
import {QmpkbService} from '../qmpkb-service/qmpkb.service';
import * as $ from "jquery";
declare var jquery: any;
@Component({
selector: 'app-detail-information',
templateUrl: './detail-information.component.html',
styleUrls: ['./detail-information.component.css']
})
export class DetailInformationComponent implements OnInit {
loadQuery:any;
dtOptionsortholog:any ={};
dtOptionsSubCell: any = {};
dtOptionsDisease: any = {};
dtOptionsDrugBank: any = {};
diseaseQuery:any;
errorStr:Boolean;
proteinName:any;
geneName:any;
uniprotkb:any;
foundHits:number;
orthologData:any;
subcell:any;
subcellArray:any;
subCellQuery:any;
humanDiseaseUniProt:any;
humanDiseaseDisGeNet:any;
drugBankData:any;
drugbankQuery:any;
drugBankDataArray:any;
queryData:any;
plotlyData:any=[];
screenWidth:any;
lenOfGeneExpData:any;
goUniProtKB:any;
geneExpUniProtKB:any;
protVistaUniProtKB:any;
assayQuery:any;
concenQuery:any;
resultFilePath:any;
fastafilename:any;
pathwayQueryTerm:any;
orgID:any;
filterredDrugBankData:any;
filterredSubcell:any;
filterDrugBankDataStatus=false;
filterSubCellStatus=false;
qsideBar:string;
sideBarLink:string;
strainStat:number;
bioMatStat:number;
assayStat:number;
availableOtherAssayStatus=0;
public alertIsVisible:boolean= false;
@ViewChild(DataTableDirective)
datatableElement: DataTableDirective;
@HostListener('window.resize', ['$event'])
getScreenSize(event?){
this.screenWidth=(window.innerWidth-50)+"px";
}
constructor(
private route: ActivatedRoute,
private location: Location,
private http: HttpClient,
private router: Router,
private spinner: NgxSpinnerService,
private _qmpkb:QmpkbService,
private renderer: Renderer,
) {
this.getScreenSize();
}
async getQuery(){
await this.route.queryParams.subscribe(params=>{
this.loadQuery =params;
if (Object.keys(this.loadQuery).length > 0){
this.spinner.show();
setTimeout(() => {
this.getProteinData(this.loadQuery);
}, 100);
} else {
this.spinner.hide();
if(this.alertIsVisible){
return;
}
this.alertIsVisible=true;
setTimeout(()=>{
this.alertIsVisible=false;
this.router.navigate(['/']);
},5000);
}
})
}
getProteinData(queryData:any){
const queryParameters=Object.keys(this.loadQuery);
let qUniProtKB='NA';
let qresultID='NA';
let qseqID='NA';
for(let i=0; i< queryParameters.length ;i++){
if (queryParameters[i]=='uniProtKb'){
qUniProtKB=queryData[queryParameters[i]];
} else if (queryParameters[i]=='resultID'){
qresultID=queryData[queryParameters[i]];
} else if (queryParameters[i]=='seqID'){
qseqID=queryData[queryParameters[i]];
}
}
if (this.router.url.includes('#')){
this.qsideBar=this.router.url.split('#')[1];
this.sideBarLink=this.router.url.split('#')[0].split('?')[1];
} else{
this.qsideBar='NA';
this.sideBarLink=this.router.url.split('?')[1];
}
if (qUniProtKB.trim().length <6 || qUniProtKB.trim() =='NA'){
this.spinner.hide();
if(this.alertIsVisible){
return;
}
this.alertIsVisible=true;
setTimeout(()=>{
this.alertIsVisible=false;
this.router.navigate(['/']);
},5000);
} else {
this._qmpkb.receiveDataFromBackendSearch('/detailinformationapi/?uniProtKb=' + qUniProtKB+'&fileName='+ qresultID +'&fastafilename='+qseqID).subscribe((response: any)=>{
this.queryData=response;
this.foundHits=this.queryData.foundHits;
if (this.foundHits > 0){
this.resultFilePath=this.queryData.resultFilePath;
this.proteinName=this.queryData.proteinName;
this.geneName=this.queryData.geneName;
this.uniprotkb=this.queryData.uniprotkb;
this.orthologData=this.queryData.orthologData;
this.subcellArray=this.queryData.subcell;
this.subcell=this.queryData.subcell.join("; ");
this.subCellQuery={
subcell:this.subcell,
subcellArray:this.subcellArray
}
this.humanDiseaseUniProt=this.queryData.humanDiseaseUniProt;
this.humanDiseaseDisGeNet=this.queryData.humanDiseaseDisGeNet;
this.drugBankDataArray=this.queryData.drugBankData;
this.drugBankData=this.queryData.drugBankData.join("; ");
this.drugbankQuery={
drugBankDataArray:this.drugBankDataArray,
drugBankData:this.drugBankData
}
this.fastafilename=this.queryData.fastafilename;
this.goUniProtKB=this.uniprotkb;
this.geneExpUniProtKB=this.uniprotkb;
this.protVistaUniProtKB=this.uniprotkb;
this.orgID=this.queryData.orgID;
this.assayQuery=this.uniprotkb+'|'+this.resultFilePath+'|'+this.fastafilename;
this.concenQuery=this.uniprotkb+'|'+this.resultFilePath;
this.pathwayQueryTerm=this.uniprotkb;
this.diseaseQuery={
humanDiseaseUniProt:this.humanDiseaseUniProt,
humanDiseaseDisGeNet:this.humanDiseaseDisGeNet
}
if(this.orthologData[0].pepPresentInHumanortholog == 'No' && this.orthologData[0].availableAssayInHumanortholog !='NA') {
this.availableOtherAssayStatus=1;
}
this.assayStat=this.queryData.assayStat;
this.bioMatStat=this.queryData.bioMatStat;
this.strainStat=this.queryData.strainStat;
let datatableElement = this.datatableElement;
this.dtOptionsortholog = {
searching: false,
info: false,
ordering: false,
paging: false,
autoWidth:true
};
if (!this.router.url.includes('#')){
this.spinner.hide();
}
} else {
this.spinner.hide();
if(this.alertIsVisible){
return;
}
this.alertIsVisible=true;
setTimeout(()=>{
this.alertIsVisible=false;
this.router.navigate(['/']);
},5000);
}
}, error=>{
this.errorStr = error;
});
}
}
ngOnInit() {
this.getQuery();
if (this.router.url.includes('#')){
const link=this.router.url.split('#')[1];
if (link.length >0){
this.preCSS(link);
}
}
}
preCSS(hashLink:any):void {
var self= this;
setTimeout(()=>{
if ($('#'+hashLink).length){
$('#'+hashLink).css({'padding-top':'51px'});
location.href=self.router.url;
this.spinner.hide();
}
},2000);
/* if (hashLink=='subcell' || hashLink=='pathway' || hashLink=='go' || hashLink=='disease' || hashLink=='drug'){
setTimeout(()=>{
if ($('#'+hashLink).length){
$('#'+hashLink).css({'padding-top':'51px'});
location.href=self.router.url;
this.spinner.hide();
}
},5000);
} else{
setTimeout(()=>{
if ($('#'+hashLink).length){
$('#'+hashLink).css({'padding-top':'51px'});
location.href=self.router.url;
this.spinner.hide();
}
},2000);
}*/
}
gethref(evt, linkName) {
const hrefIDArray=['protein','assay','concentration','genExp','protvista','subcell','pathway','go','disease','drug']
$('#'+linkName).css({'padding-top':'51px'});
for(let i=0; i<hrefIDArray.length;i++){
if(hrefIDArray[i] !==linkName){
$('#'+hrefIDArray[i]).css({'padding-top':''});
}
}
}
}
<file_sep>/client/qmpkb-app/src/app/result-page-user-seq/result-page-user-seq.component.ts
import { Component, OnInit, OnDestroy, ViewChild, Renderer,HostListener,Input } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { Location } from '@angular/common';
import { DataTableDirective } from 'angular-datatables';
import { HttpClient,HttpErrorResponse } from '@angular/common/http';
import { Subject } from 'rxjs';
import {QmpkbService} from '../qmpkb-service/qmpkb.service';
import { NgxSpinnerService } from 'ngx-spinner';
import * as Plotly from 'plotly.js';
import * as $ from "jquery";
declare var jquery: any;
declare let google: any;
@Component({
selector: 'app-result-page-user-seq',
templateUrl: './result-page-user-seq.component.html',
styleUrls: ['./result-page-user-seq.component.css']
})
export class ResultPageUserSeqComponent implements OnInit,OnDestroy {
dtOptions: any = {};
dtOptionssummarystatUnq:any={};
dtOptionsOther:any={};
queryResPath: string;
private routeSub:any;
private req:any;
errorStr:Boolean;
uniprotacc:string;
fileDownloadUrl;
totallist:any;
unqisostat:any;
subcell:any;
humandisease:any;
querystrainData:any;
querybioMatData:any;
querynoOfDiseaseAssProt:any;
querynoOfHumanOrtholog:any;
updatedgo:any;
keggchart:any;
foundHits:number;
fastafilename:any;
queryData:any;
mProtVal:any;
mGenVal:any;
mUKBVal:any;
mPepassVal:any;
mStrVal:any;
mKoutVal:any;
mBioTisVal:any;
mGenderVal:any;
mGenExpVal:any;
hProtVal:any;
hUKBVal:any;
hPresPepVal:any;
mSCellVal:any;
mPathVal:any;
hDisVal:any;
mGOVal:any;
hDrugVal:any;
query: string;
screenWidth:any;
plotlyData:any=[];
plotDataUnit: string;
userQueryFastaResult:any;
downloadResultQuery:any;
@ViewChild(DataTableDirective)
datatableElement: DataTableDirective;
plotDataOptions=[
{num:0, name:'Concentration Data'},
{num:1, name:'Log2(Concentration Data)'},
{num:2, name:'Log10(Concentration Data)'},
];
selectedLevel=this.plotDataOptions[0];
@HostListener('window.resize', ['$event'])
getScreenSize(event?){
this.screenWidth=(window.innerWidth-50)+"px";
}
constructor(
private route: ActivatedRoute,
private location: Location,
private http: HttpClient,
private renderer: Renderer,
private router: Router,
private _qmpkb:QmpkbService,
private spinner: NgxSpinnerService,
){
this.getScreenSize();
}
@Input()
set resultFastaTermQuery(resultFastaQuery:any){
this.userQueryFastaResult=resultFastaQuery;
}
ngOnInit() {
this.spinner.show();
//this.location.go('/resultsseq/')
this.queryData=this.userQueryFastaResult;
this.query = this.queryData.searchterm;
this.queryResPath=this.queryData.filepath;
this.totallist=this.queryData.totallist;
this.unqisostat=this.queryData.unqisostat;
this.subcell=this.queryData.subcell;
this.humandisease=this.queryData.humandisease;
this.querystrainData=this.queryData.querystrainData;
this.querybioMatData=this.queryData.querybioMatData;
this.querynoOfDiseaseAssProt=this.queryData.querynoOfDiseaseAssProt;
this.querynoOfHumanOrtholog=this.queryData.querynoOfHumanOrtholog;
this.updatedgo=this.queryData.updatedgo;
this.keggchart=this.queryData.keggchart;
this.foundHits=this.queryData.foundHits;
this.fastafilename=this.queryData.fastafilename;
this.downloadResultQuery=this.queryResPath+'|Fasta';
this.barplot(this.querybioMatData,this.querystrainData,this.subcell,this.updatedgo,this.humandisease);
let destPath='fileapi/resultFile/jsonData/resultJson/'+this.queryResPath;
let queryfastafilename=this.fastafilename;
//let destPath='assets/'+this.queryResPath
let detailResFile=this.queryResPath.split('/')[2].split('_search')[0];
let datatableElement = this.datatableElement;
this.dtOptions = {
processing: true,
serverSide: false,
orderCellsTop: true,
fixedHeader: true,
pageLength: 10,
pagingType: 'full_numbers',
ajax: destPath,
columns: [
{
title: 'Protein',
render: function (data, type, row) {
if ((row["Protein"].trim()).length > 0){
return row["Protein"].trim();
} else {
return 'NA';
}
}
},
{
title: 'Gene',
data: 'Gene'
},
{
title: 'UniProtKB accession',
render: function (data, type, row) {
return '<a target="_blank" routerLinkActive="active" href="/detailinformation?uniProtKb=' + row["UniProtKB Accession"].trim() + '&resultID=' + detailResFile +'&seqID=' + queryfastafilename +'#protein">' + row["UniProtKB Accession"].trim() + '</a>';
}
},
{
title: 'Peptide assay',
className: 'details-control-pep',
orderable: true,
data: null,
defaultContent: '',
render: function (data: any, type: any, row: any, meta) {
if (row["Peptide Sequence"].trim().length > 0 ){
const tempPepseq=row["Peptide Sequence"].trim();
const tempURL ='<a target="_blank" routerLinkActive="active" href="/detailinformation?uniProtKb=' + row["UniProtKB Accession"].trim() + '&resultID=' + detailResFile +'&seqID=' + queryfastafilename +'#assay"><i class="fa fa-plus-square" aria-hidden="true"></i></a>';
const temprowdata=[tempPepseq,tempURL];
return temprowdata.join("<br>");
} else {
('<font color="black">No</font>');
}
},
width:"15px"
},
{
title: 'Strain',
className: 'details-control-strainCol',
orderable: true,
data: null,
defaultContent: '',
render: function (data, type, row) {
if ((row["Strain"].trim()).length > 0 && (row["Strain"].trim()) != "NA"){
const array =(row["Strain"].trim()).split('|');
const tempURL ='<a target="_blank" routerLinkActive="active" href="/detailinformation?uniProtKb=' + row["UniProtKB Accession"].trim() + '&resultID=' + detailResFile +'&seqID=' + queryfastafilename +'#concentration"><i class="fa fa-plus-square" aria-hidden="true"></i></a>';
const temprowdata=[array.join("<br>"),tempURL];
return temprowdata.join("<br>");
} else {
return ('<font color="black">NA</font>');
}
},
width:"15px"
},
{
title: 'Mutant',
className: 'details-control-knockoutCol',
orderable: true,
data: null,
defaultContent: '',
render: function (data, type, row) {
if ((row["Knockout"].trim()).length > 0 && (row["Knockout"].trim()) != "NA"){
const array =(row["Knockout"].trim()).split(';');
const tempURL ='<a target="_blank" routerLinkActive="active" href="/detailinformation?uniProtKb=' + row["UniProtKB Accession"].trim() + '&resultID=' + detailResFile +'&seqID=' + queryfastafilename +'#concentration"><i class="fa fa-plus-square" aria-hidden="true"></i></a>';
const temprowdata=[array.join("<br>"),tempURL];
return temprowdata.join("<br>");
} else {
return ('<font color="black">NA</font>');
}
},
width:"15px"
},
{
title: 'Biological matrix',
className: 'details-control-biomatrix',
orderable: true,
data: null,
defaultContent: '',
render: function (data: any, type: any, row: any, meta) {
if (row["Biological Matrix"].trim() != "NA" ){
const tempbiomat=row["Biological Matrix"].trim();
const tempURL ='<a target="_blank" routerLinkActive="active" href="/detailinformation?uniProtKb=' + row["UniProtKB Accession"].trim() + '&resultID=' + detailResFile +'&seqID=' + queryfastafilename +'#concentration"><i class="fa fa-plus-square" aria-hidden="true"></i></a>';
const temprowdata=[tempbiomat,tempURL];
return temprowdata.join("<br>");
} else {
return ('<font color="black">NA</font>');
}
},
width:"15px"
},
{
title: 'Sex',
className: 'details-control-sexCol',
orderable: true,
data: null,
defaultContent: '',
render: function (data, type, row) {
if ((row["Sex"].trim()).length > 0 && (row["Sex"].trim()) != "NA"){
const array =(row["Sex"].trim()).split('|');
const tempURL ='<a target="_blank" routerLinkActive="active" href="/detailinformation?uniProtKb=' + row["UniProtKB Accession"].trim() + '&resultID=' + detailResFile +'&seqID=' + queryfastafilename +'#concentration"><i class="fa fa-plus-square" aria-hidden="true"></i></a>';
const temprowdata=[array.join("<br>"),tempURL];
return temprowdata.join("<br>");
} else {
return ('<font color="black">NA</font>');
}
},
width:"15px"
},
{
title: 'Gene expression',
className: 'details-control-expCol',
orderable: true,
data: null,
defaultContent: '',
render: function (data, type, row) {
if ((row["Gene Expression View"].trim()).length > 0 && (row["Gene Expression View"].trim()) != "No"){
const tempURL ='<a target="_blank" routerLinkActive="active" href="/detailinformation?uniProtKb=' + row["UniProtKB Accession"].trim() + '&resultID=' + detailResFile +'&seqID=' + queryfastafilename +'#genExp">....more</a>';
const tempdata=row["Gene Expression View"].trim();
//const temprowdata=[tempdata,tempURL];
const temprowdata=[tempURL];
return temprowdata.join("<br>");
} else {
return 'No';
}
},
width:"15px"
},
{
title: 'Human ortholog',
render: function (data, type, row) {
if ((row["Human ProteinName"].trim()).length > 0 && (row["Human ProteinName"].trim()) != "NA"){
const array =(row["Human ProteinName"].trim()).split('|');
return array.join("<br>");
} else {
return 'NA';
}
}
},
{
title: 'UniProtKB accession human ortholog',
render: function (data, type, row) {
if ((row["Human UniProtKB Accession"].trim()).length > 0 && (row["Human UniProtKB Accession"].trim()) != "NA"){
const array =(row["Human UniProtKB Accession"].trim()).split(',');
array.forEach(function(element, index) {
array[index] = '<a target="_blank" routerLinkActive="active" href="https://www.uniprot.org/uniprot/' + element+'">'+element+ '</a>';
});
return array.join("<br>");
} else {
return 'NA';
}
}
},
{
title: 'Peptide present in human ortholog',
render: function (data, type, row) {
return row["Present in human ortholog"];
}
},
{
title: 'Subcellular localization',
render: function (data, type, row) {
if ((row["SubCellular"].trim()).length > 0){
return (row["SubCellular"].trim()).split('|').join("<br>");
} else {
return 'NA';
}
}
},
{
title: 'Involvement in pathways',
render: function (data, type, row) {
if ((row["Mouse Kegg Pathway Name"].trim()).length > 0 && (row["Mouse Kegg Pathway Name"].trim()) != "NA"){
const tempURL ='<a target="_blank" routerLinkActive="active" href="/detailinformation?uniProtKb=' + row["UniProtKB Accession"].trim() + '&resultID=' + detailResFile +'&seqID=' + queryfastafilename +'#pathway"><i class="fa fa-plus-square" aria-hidden="true"></i></a>';
const tempdata=(row["Mouse Kegg Pathway Name"].trim()).split("|").slice(0, 3).join("<br>");
const temprowdata=[tempdata,tempURL];
return temprowdata.join("<br>");
} else {
return 'NA';
}
}
},
{
title: 'Go term associations',
render: function (data, type, row) {
if ((row["Mouse Go Name"].trim()).length > 0 && (row["Mouse Go Name"].trim()) != "NA"){
const tempURL ='<a target="_blank" routerLinkActive="active" href="/detailinformation?uniProtKb=' + row["UniProtKB Accession"].trim() + '&resultID=' + detailResFile +'&seqID=' + queryfastafilename +'#go"><i class="fa fa-plus-square" aria-hidden="true"></i></a>';
const tempdata=(row["Mouse Go Name"].trim()).split("|").slice(0, 3).join("<br>");
const temprowdata=[tempdata,tempURL];
return temprowdata.join("<br>");
} else {
return 'NA';
}
}
},
{
title: 'Involvement in disease',
render: function (data, type, row) {
if ((row["Human Disease Name"].trim()).length > 0 && (row["Human Disease Name"].trim()) != "NA"){
const tempURL ='<a target="_blank" routerLinkActive="active" href="/detailinformation?uniProtKb=' + row["UniProtKB Accession"].trim() + '&resultID=' + detailResFile +'&seqID=' + queryfastafilename +'#disease"><i class="fa fa-plus-square" aria-hidden="true"></i></a>';
const tempdata=(row["Human Disease Name"].trim()).split("|").slice(0, 3).join("<br>");
const temprowdata=[tempdata,tempURL];
return temprowdata.join("<br>");
} else {
return 'NA';
}
}
},
{
title: 'Drug associations',
render: function (data, type, row) {
if ((row["Human Drug Bank"].trim()).length > 0 && (row["Human Drug Bank"].trim()) != "NA"){
const tempURL ='<a target="_blank" routerLinkActive="active" href="/detailinformation?uniProtKb=' + row["UniProtKB Accession"].trim() + '&resultID=' + detailResFile +'&seqID=' + queryfastafilename +'#drug"><i class="fa fa-plus-square" aria-hidden="true"></i></a>';
const tempdata=(row["Human Drug Bank"].trim()).split('|').slice(0, 3).join("<br>");
const temprowdata=[tempdata,tempURL];
return temprowdata.join("<br>");
}else {
return 'NA';
}
}
},
{
title: 'Search Pathway(s) Mouse',
className: 'noVis',
render: function (data, type, row) {
if ((row["Mouse Kegg Pathway Name"].trim()).length > 0 && (row["Mouse Kegg Pathway Name"].trim()) != "NA"){
const tempdata=(row["Mouse Kegg Pathway Name"].trim()).split("|").join("<br>");
return tempdata;
} else {
return 'NA';
}
},
visible:false
},
{
title: 'Search Go Term Name-Mouse',
className: 'noVis',
render: function (data, type, row) {
if ((row["Mouse Go Name"].trim()).length > 0 && (row["Mouse Go Name"].trim()) != "NA"){
const tempdata=(row["Mouse Go Name"].trim()).split("|").join("<br>");
return tempdata;
} else {
return 'NA';
}
},
visible:false
},
{
title: 'Search Involvement in disease-ortholog',
className: 'noVis',
render: function (data, type, row) {
if ((row["Human Disease Name"].trim()).length > 0 && (row["Human Disease Name"].trim()) != "NA"){
const tempdata=(row["Human Disease Name"].trim()).split("|").join("<br>");
return tempdata;
} else {
return 'NA';
}
},
visible:false
},
{
title: 'Search Drug Bank-ortholog',
className: 'noVis',
render: function (data, type, row) {
if ((row["Human Drug Bank"].trim()).length > 0 && (row["Human Drug Bank"].trim()) != "NA"){
const tempdata=(row["Human Drug Bank"].trim()).split('|').join("<br>");
return tempdata;
}else {
return 'NA';
}
},
visible:false
}
],
scrollX:true,
scrollY:'650px',
scrollCollapse:true,
// Declare the use of the extension in the dom parameter
dom: 'lBrtip',
// Configure the buttons
buttons: [
{
extend:'colvis',
columns:':not(.noVis)'
}
],
autoWidth:true
};
if (Object.keys(this.keggchart).length >0 ){
this.drawChart(this.keggchart);
}
this.dtOptionssummarystatUnq = {
searching: false,
info: false,
ordering: false,
paging: false,
autoWidth:true
};
this.dtOptionsOther = {
order:[[1,'desc']],
autoWidth:true
};
this.spinner.hide();
}
ngAfterViewInit(): void {
const self = this;
this.datatableElement.dtInstance.then((dtInstance: DataTables.Api) => {
dtInstance.columns().every(function () {
const that = this;
$( 'table thead' ).on( 'keyup', ".column_search",function () {
let colIndex:any;
colIndex=$(this).parent().index();
console.log(colIndex,this['value']);
if (colIndex == 13){
self.datatableElement['dt'].columns( 17 ).search(this['value']).draw();
} else if (colIndex == 14){
self.datatableElement['dt'].columns( 18 ).search(this['value']).draw();
} else if (colIndex == 15){
self.datatableElement['dt'].columns( 19 ).search(this['value']).draw();
} else if (colIndex == 16){
self.datatableElement['dt'].columns( 20 ).search(this['value']).draw();
} else {
self.datatableElement['dt'].columns( colIndex ).search(this['value']).draw();
}
});
});
});
}
drawChart(keggchart) {
const self = this;
google.charts.load('current', {packages: ['corechart', 'bar']});
google.charts.setOnLoadCallback(drawKeggChart);
function drawKeggChart() {
var tempdatakegg=keggchart;
var dataPlot = google.visualization.arrayToDataTable(tempdatakegg);
const options = {
'height':400,
bar: {groupWidth: "100%"},
legend: {position: 'none'},
hAxis: {
title: 'No. of proteins covered',
minValue: 0,
textStyle : {
fontSize: 16 // or the number you want
},
},
axes: {
x: {
0: { side: 'top'}
}
},
vAxis: {
title: 'KEGG pathway',
textStyle : {
fontSize: 16 // or the number you want
},
},
bars: 'horizontal'
};
const chart = new google.charts.Bar(document.getElementById('chart_div_pathway'));
const container = document.getElementById('chart_div_pathway');
var axislabels:any=[];
google.visualization.events.addListener(chart, 'onmouseover', uselessHandler);
function uselessHandler() {
$('#chart_div_pathway path').css('cursor','pointer')
$('#chart_div_pathway text').css('cursor','pointer')
}
google.visualization.events.addListener(chart, 'select', selectHandler);
google.visualization.events.addListener(chart, 'onmouseover', onmouseoverHandler);
google.visualization.events.addListener(chart, 'onmouseout', onmouseoutHandler);
// use the 'ready' event to modify the chart once it has been drawn
google.visualization.events.addListener(chart, 'ready', function () {
axislabels = container.getElementsByTagName('text');
});
function selectHandler(e) {
var selection = chart.getSelection();
if (selection.length > 0) {
var colLabelSelect = dataPlot.getColumnLabel(selection[0].column);
var mydataSelect= dataPlot.getValue(selection[0].row,0);
var tempGoogleDataURL='/dataload/googleChartData_'+mydataSelect+'_keggPathway';
$('tfoot input').val('');
self.datatableElement['dt'].columns().search('').draw();
self.datatableElement['dt'].search('').draw();
//window.open(tempGoogleDataURL,'_blank');
self.mPathVal=mydataSelect;
self.datatableElement['dt'].columns( 17 ).search(mydataSelect).draw();
chart.setSelection([])
}
}
function onmouseoverHandler(propertiesOver) {
var hooverOverSelection= propertiesOver;
if (Object.keys(hooverOverSelection).length > 0 && typeof hooverOverSelection.column !== "undefined") {
var colLabelOver=dataPlot.getColumnLabel(hooverOverSelection.column);
var mydataOver =dataPlot.getValue(hooverOverSelection.row,0);
for (var i = 0; i < axislabels.length; i++) {
if (axislabels[i].textContent == mydataOver) {
axislabels[i].setAttribute('font-weight', 'bold');
}
}
}
}
function onmouseoutHandler(propertiesOut) {
var hooverOutSelection= propertiesOut;
if (Object.keys(hooverOutSelection).length > 0 && typeof hooverOutSelection.column !== "undefined") {
var mydataOut =dataPlot.getValue(hooverOutSelection.row,0);
for (var i = 0; i < axislabels.length; i++) {
if (axislabels[i].textContent == mydataOut) {
axislabels[i].removeAttribute('font-weight', 'bold');
}
}
}
}
container.addEventListener('click', clickHandlerLabel);
container.addEventListener("mouseover", mouseOverLabel);
container.addEventListener("mouseout", mouseOutrLabel);
function mouseOverLabel(propertiesLabel) {
if (propertiesLabel.target.tagName === 'text') {
for (var i = 0; i < axislabels.length; i++) {
if (axislabels[i].textContent == propertiesLabel.target.textContent) {
axislabels[i].setAttribute('font-weight', 'bold');
const findArray =tempdatakegg.filter(p => p[0] == propertiesLabel.target.textContent);
var textY=propertiesLabel.target.getAttribute("y");
var textX=propertiesLabel.target.getAttribute("x");
var customTextToolTip='<b>'+propertiesLabel.target.textContent+'</b>'+'<br>'+tempdatakegg[0][1]+':'+'<br>'+findArray[0][1];
var bars = container.getElementsByTagName('path');
for(var j = 0; j<bars.length; j++){
if(dataPlot.getValue(j,0) == propertiesLabel.target.textContent){
bars[j].setAttribute('fill','#3871cf');
$('.tooltiptextLabel').css('visibility','visible');
$('.tooltiptextLabel').css('position', 'absolute');
$('.tooltiptextLabel').css('top',textY+'px');
$('.tooltiptextLabel').css('left',textX+'px');
$('.tooltiptextLabel').html(customTextToolTip);
}
}
}
}
}
}
function mouseOutrLabel(propertiesOutLabel) {
if (propertiesOutLabel.target.tagName === 'text') {
for (var i = 0; i < axislabels.length; i++) {
if (axislabels[i].textContent == propertiesOutLabel.target.textContent) {
axislabels[i].removeAttribute('font-weight', 'bold');
var bars = container.getElementsByTagName('path');
for(var j = 0; j<bars.length; j++){
if(dataPlot.getValue(j,0) == propertiesOutLabel.target.textContent){
bars[j].setAttribute('fill','#4285f4');
$('.tooltiptextLabel').html('');
$('.tooltiptextLabel').css('visibility','hidden');
$('.tooltiptextLabel').css('top',0);
$('.tooltiptextLabel').css('left',0);
}
}
}
}
}
}
function clickHandlerLabel(e) {
if (e.target.tagName === 'text') {
const findArray =tempdatakegg.filter(p => p[0] == e.target.textContent);
if (typeof findArray[0] != "undefined"){
if (tempdatakegg.indexOf(findArray[0])){
var tempGoogleDataURL='/dataload/googleChartData_'+e.target.textContent+'_keggPathway';
$('tfoot input').val('');
self.datatableElement['dt'].columns().search('').draw();
self.datatableElement['dt'].search('').draw();
self.mPathVal=e.target.textContentt;
self.datatableElement['dt'].columns( 17 ).search(e.target.textContent).draw();
//window.open(tempGoogleDataURL,'_blank');
}
}
}
}
chart.draw(dataPlot, google.charts.Bar.convertOptions(options));
}
$(document).ready(function() {
$(window).resize(function() {
drawKeggChart();
})
})
}
barplot(matrixData:any,mouseStrainData:any,subCellData:any,goData:any,humanDiseaseData:any):void {
const self = this;
google.charts.load('current', {packages: ['bar']});
google.charts.setOnLoadCallback(drawMatrixChart);
google.charts.setOnLoadCallback(drawStrainChart);
google.charts.setOnLoadCallback(drawSubCellChart);
google.charts.setOnLoadCallback(drawGOChart);
google.charts.setOnLoadCallback(drawDisChart);
function drawMatrixChart() {
var tempdatamatrix=matrixData;
var dataPlot = google.visualization.arrayToDataTable(tempdatamatrix);
const options = {
'height':400,
bar: {groupWidth: "100%"},
legend: {position: 'none'},
hAxis: {
title: 'No. of assays',
minValue: 0,
textStyle : {
fontSize: 16 // or the number you want
},
},
vAxis: {
title: 'Biological Matrix',
textStyle : {
fontSize: 16 // or the number you want
},
},
bars: 'horizontal'
};
const chart = new google.charts.Bar(document.getElementById('chart_div_matrix'));
const container = document.getElementById('chart_div_matrix');
var axislabels:any=[];
google.visualization.events.addListener(chart, 'onmouseover', uselessHandler);
function uselessHandler() {
$('#chart_div_matrix path').css('cursor','pointer')
$('#chart_div_matrix text').css('cursor','pointer')
}
google.visualization.events.addListener(chart, 'select', selectHandler);
google.visualization.events.addListener(chart, 'onmouseover', onmouseoverHandler);
google.visualization.events.addListener(chart, 'onmouseout', onmouseoutHandler);
// use the 'ready' event to modify the chart once it has been drawn
google.visualization.events.addListener(chart, 'ready', function () {
axislabels = container.getElementsByTagName('text');
});
function selectHandler(e) {
var selection = chart.getSelection();
if (selection.length > 0) {
var colLabelSelect = dataPlot.getColumnLabel(selection[0].column);
var mydataSelect= dataPlot.getValue(selection[0].row,0);
var tempGoogleDataURL='/dataload/googleChartData_'+mydataSelect+'_biologicalMatrix';
//window.open(tempGoogleDataURL,'_blank');
$('tfoot input').val('');
self.datatableElement['dt'].columns().search('').draw();
self.datatableElement['dt'].search('').draw();
self.mBioTisVal=mydataSelect;
self.datatableElement['dt'].columns( 6 ).search(mydataSelect).draw();
chart.setSelection([]);
}
}
function onmouseoverHandler(propertiesOver) {
var hooverOverSelection= propertiesOver;
if (Object.keys(hooverOverSelection).length > 0 && typeof hooverOverSelection.column !== "undefined") {
var colLabelOver=dataPlot.getColumnLabel(hooverOverSelection.column);
var mydataOver =dataPlot.getValue(hooverOverSelection.row,0);
for (var i = 0; i < axislabels.length; i++) {
if (axislabels[i].textContent == mydataOver) {
axislabels[i].setAttribute('font-weight', 'bold');
}
}
}
}
function onmouseoutHandler(propertiesOut) {
var hooverOutSelection= propertiesOut;
if (Object.keys(hooverOutSelection).length > 0 && typeof hooverOutSelection.column !== "undefined") {
var mydataOut =dataPlot.getValue(hooverOutSelection.row,0);
for (var i = 0; i < axislabels.length; i++) {
if (axislabels[i].textContent == mydataOut) {
axislabels[i].removeAttribute('font-weight', 'bold');
}
}
}
}
container.addEventListener('click', clickHandlerLabel);
container.addEventListener("mouseover", mouseOverLabel);
container.addEventListener("mouseout", mouseOutrLabel);
function mouseOverLabel(propertiesLabel) {
if (propertiesLabel.target.tagName === 'text') {
for (var i = 0; i < axislabels.length; i++) {
if (axislabels[i].textContent == propertiesLabel.target.textContent) {
axislabels[i].setAttribute('font-weight', 'bold');
const findArray =tempdatamatrix.filter(p => p[0] == propertiesLabel.target.textContent);
var textY=propertiesLabel.target.getAttribute("y");
var textX=propertiesLabel.target.getAttribute("x");
var customTextToolTip='<b>'+propertiesLabel.target.textContent+'</b>'+'<br>'+tempdatamatrix[0][1]+':'+'<br>'+findArray[0][1]+'<br>'+tempdatamatrix[0][2]+':'+'<br>'+findArray[0][2];
var bars = container.getElementsByTagName('path');
for(var j = 0; j<bars.length; j++){
if(dataPlot.getValue(j,0) == propertiesLabel.target.textContent){
bars[j].setAttribute('fill','#3871cf');
$('.tooltiptextLabel').css('visibility','visible');
$('.tooltiptextLabel').css('position', 'absolute');
$('.tooltiptextLabel').css('top',textY+'px');
$('.tooltiptextLabel').css('left',textX+'px');
$('.tooltiptextLabel').html(customTextToolTip);
}
}
//this block of code for proteins and peptide
/* for(var j = 0; j<bars.length; j+=2){
if(dataPlot.getValue(j/2,0) == propertiesLabel.target.textContent){
bars[j].setAttribute('fill','#3871cf');
bars[j+1].setAttribute('fill','#ba3a2f');
$('.tooltiptextLabel').css('visibility','visible');
$('.tooltiptextLabel').css('position', 'absolute');
$('.tooltiptextLabel').css('top',textY+'px');
$('.tooltiptextLabel').css('left',textX+'px');
$('.tooltiptextLabel').html(customTextToolTip);
}
} */
}
}
}
}
function mouseOutrLabel(propertiesOutLabel) {
if (propertiesOutLabel.target.tagName === 'text') {
for (var i = 0; i < axislabels.length; i++) {
if (axislabels[i].textContent == propertiesOutLabel.target.textContent) {
axislabels[i].removeAttribute('font-weight', 'bold');
var bars = container.getElementsByTagName('path');
for(var j = 0; j<bars.length; j++){
if(dataPlot.getValue(j,0) == propertiesOutLabel.target.textContent){
bars[j].setAttribute('fill','#4285f4');
$('.tooltiptextLabel').html('');
$('.tooltiptextLabel').css('visibility','hidden');
$('.tooltiptextLabel').css('top',0);
$('.tooltiptextLabel').css('left',0);
}
}
//this block of code for proteins and peptide
/* for(var j = 0; j<bars.length; j+=2){
if(dataPlot.getValue(j/2,0) == propertiesOutLabel.target.textContent){
bars[j].setAttribute('fill','#4285f4');
bars[j+1].setAttribute('fill','#db4437');
$('.tooltiptextLabel').html('');
$('.tooltiptextLabel').css('visibility','hidden');
$('.tooltiptextLabel').css('top',0);
$('.tooltiptextLabel').css('left',0);
}
} */
}
}
}
}
function clickHandlerLabel(e) {
if (e.target.tagName === 'text') {
const findArray =tempdatamatrix.filter(p => p[0] == e.target.textContent);
if (typeof findArray[0] != "undefined"){
if (tempdatamatrix.indexOf(findArray[0])){
var tempGoogleDataURL='/dataload/googleChartData_'+e.target.textContent+'_biologicalMatrix';
$('tfoot input').val('');
self.datatableElement['dt'].columns().search('').draw();
self.datatableElement['dt'].search('').draw();
self.mBioTisVal=e.target.textContent;
self.datatableElement['dt'].columns( 6 ).search(e.target.textContent).draw();
//window.open(tempGoogleDataURL,'_blank');
}
}
}
}
chart.draw(dataPlot, google.charts.Bar.convertOptions(options));
}
function drawStrainChart() {
var tempdatastrain=mouseStrainData;
var dataPlot = google.visualization.arrayToDataTable(tempdatastrain);
const options = {
'height':400,
bar: {groupWidth: "100%"},
legend: {position: 'none'},
hAxis: {
title: 'No. of assays',
minValue: 0,
textStyle : {
fontSize: 16 // or the number you want
},
},
vAxis: {
title: 'Strain',
textStyle : {
fontSize: 16 // or the number you want
},
},
bars: 'horizontal'
};
const chart = new google.charts.Bar(document.getElementById('chart_div_strain'));
const container = document.getElementById('chart_div_strain');
var axislabels:any=[];
google.visualization.events.addListener(chart, 'onmouseover', uselessHandler);
function uselessHandler() {
$('#chart_div_strain path').css('cursor','pointer')
$('#chart_div_strain text').css('cursor','pointer')
}
google.visualization.events.addListener(chart, 'select', selectHandler);
google.visualization.events.addListener(chart, 'onmouseover', onmouseoverHandler);
google.visualization.events.addListener(chart, 'onmouseout', onmouseoutHandler);
// use the 'ready' event to modify the chart once it has been drawn
google.visualization.events.addListener(chart, 'ready', function () {
axislabels = container.getElementsByTagName('text');
});
function selectHandler(e) {
var selection = chart.getSelection();
if (selection.length > 0) {
var colLabelSelect = dataPlot.getColumnLabel(selection[0].column);
var mydataSelect= dataPlot.getValue(selection[0].row,0);
var tempGoogleDataURL='/dataload/googleChartData_'+mydataSelect+'_strain';
//window.open(tempGoogleDataURL,'_blank');
chart.setSelection([])
}
}
function onmouseoverHandler(propertiesOver) {
var hooverOverSelection= propertiesOver;
if (Object.keys(hooverOverSelection).length > 0 && typeof hooverOverSelection.column !== "undefined") {
var colLabelOver=dataPlot.getColumnLabel(hooverOverSelection.column);
var mydataOver =dataPlot.getValue(hooverOverSelection.row,0);
for (var i = 0; i < axislabels.length; i++) {
if (axislabels[i].textContent == mydataOver) {
axislabels[i].setAttribute('font-weight', 'bold');
}
}
}
}
function onmouseoutHandler(propertiesOut) {
var hooverOutSelection= propertiesOut;
if (Object.keys(hooverOutSelection).length > 0 && typeof hooverOutSelection.column !== "undefined") {
var mydataOut =dataPlot.getValue(hooverOutSelection.row,0);
for (var i = 0; i < axislabels.length; i++) {
if (axislabels[i].textContent == mydataOut) {
axislabels[i].removeAttribute('font-weight', 'bold');
}
}
}
}
container.addEventListener('click', clickHandlerLabel);
container.addEventListener("mouseover", mouseOverLabel);
container.addEventListener("mouseout", mouseOutrLabel);
function mouseOverLabel(propertiesLabel) {
if (propertiesLabel.target.tagName === 'text') {
for (var i = 0; i < axislabels.length; i++) {
if (axislabels[i].textContent == propertiesLabel.target.textContent) {
axislabels[i].setAttribute('font-weight', 'bold');
const findArray =tempdatastrain.filter(p => p[0] == propertiesLabel.target.textContent);
var textY=propertiesLabel.target.getAttribute("y");
var textX=propertiesLabel.target.getAttribute("x");
var customTextToolTip='<b>'+propertiesLabel.target.textContent+'</b>'+'<br>'+tempdatastrain[0][1]+':'+'<br>'+findArray[0][1]+'<br>'+tempdatastrain[0][2]+':'+'<br>'+findArray[0][2];
var bars = container.getElementsByTagName('path');
for(var j = 0; j<bars.length; j+=2){
if(dataPlot.getValue(j/2,0) == propertiesLabel.target.textContent){
bars[j].setAttribute('fill','#3871cf');
bars[j+1].setAttribute('fill','#ba3a2f');
$('.tooltiptextLabel').css('visibility','visible');
$('.tooltiptextLabel').css('position', 'absolute');
$('.tooltiptextLabel').css('top',textY+'px');
$('.tooltiptextLabel').css('left',textX+'px');
$('.tooltiptextLabel').html(customTextToolTip);
}
}
}
}
}
}
function mouseOutrLabel(propertiesOutLabel) {
if (propertiesOutLabel.target.tagName === 'text') {
for (var i = 0; i < axislabels.length; i++) {
if (axislabels[i].textContent == propertiesOutLabel.target.textContent) {
axislabels[i].removeAttribute('font-weight', 'bold');
var bars = container.getElementsByTagName('path');
for(var j = 0; j<bars.length; j+=2){
if(dataPlot.getValue(j/2,0) == propertiesOutLabel.target.textContent){
bars[j].setAttribute('fill','#4285f4');
bars[j+1].setAttribute('fill','#db4437');
$('.tooltiptextLabel').html('');
$('.tooltiptextLabel').css('visibility','hidden');
$('.tooltiptextLabel').css('top',0);
$('.tooltiptextLabel').css('left',0);
}
}
}
}
}
}
function clickHandlerLabel(e) {
if (e.target.tagName === 'text') {
const findArray =tempdatastrain.filter(p => p[0] == e.target.textContent);
if (typeof findArray[0] != "undefined"){
if (tempdatastrain.indexOf(findArray[0])){
var tempGoogleDataURL='/dataload/googleChartData_'+e.target.textContent+'_strain';
//window.open(tempGoogleDataURL,'_blank');
}
}
}
}
chart.draw(dataPlot, google.charts.Bar.convertOptions(options));
}
function drawSubCellChart() {
var tempdatasubCell=subCellData;
var dataPlot = google.visualization.arrayToDataTable(tempdatasubCell);
const options = {
'height':300,
bar: {groupWidth: "100%"},
legend: {position: 'none'},
hAxis: {
title: 'No. of proteins covered',
minValue: 0,
textStyle : {
fontSize: 16 // or the number you want
},
},
vAxis: {
title: 'SubCellular localization',
textStyle : {
fontSize: 16 // or the number you want
},
},
bars: 'horizontal'
};
const chart = new google.charts.Bar(document.getElementById('chart_div_subcell'));
const container = document.getElementById('chart_div_subcell');
var axislabels:any=[];
google.visualization.events.addListener(chart, 'onmouseover', uselessHandler);
function uselessHandler() {
$('#chart_div_subcell path').css('cursor','pointer')
$('#chart_div_subcell text').css('cursor','pointer')
}
google.visualization.events.addListener(chart, 'select', selectHandler);
google.visualization.events.addListener(chart, 'onmouseover', onmouseoverHandler);
google.visualization.events.addListener(chart, 'onmouseout', onmouseoutHandler);
// use the 'ready' event to modify the chart once it has been drawn
google.visualization.events.addListener(chart, 'ready', function () {
axislabels = container.getElementsByTagName('text');
});
function selectHandler(e) {
var selection = chart.getSelection();
if (selection.length > 0) {
var colLabelSelect = dataPlot.getColumnLabel(selection[0].column);
var mydataSelect= dataPlot.getValue(selection[0].row,0);
var tempGoogleDataURL='/dataload/googleChartData_'+mydataSelect+'_subCellLoc';
$('tfoot input').val('');
self.datatableElement['dt'].columns().search('').draw();
self.datatableElement['dt'].search('').draw();
self.mSCellVal=mydataSelect;
self.datatableElement['dt'].columns( 12 ).search(mydataSelect).draw();
//window.open(tempGoogleDataURL,'_blank');
chart.setSelection([])
}
}
function onmouseoverHandler(propertiesOver) {
var hooverOverSelection= propertiesOver;
if (Object.keys(hooverOverSelection).length > 0 && typeof hooverOverSelection.column !== "undefined") {
var colLabelOver=dataPlot.getColumnLabel(hooverOverSelection.column);
var mydataOver =dataPlot.getValue(hooverOverSelection.row,0);
for (var i = 0; i < axislabels.length; i++) {
if (axislabels[i].textContent == mydataOver) {
axislabels[i].setAttribute('font-weight', 'bold');
}
}
}
}
function onmouseoutHandler(propertiesOut) {
var hooverOutSelection= propertiesOut;
if (Object.keys(hooverOutSelection).length > 0 && typeof hooverOutSelection.column !== "undefined") {
var mydataOut =dataPlot.getValue(hooverOutSelection.row,0);
for (var i = 0; i < axislabels.length; i++) {
if (axislabels[i].textContent == mydataOut) {
axislabels[i].removeAttribute('font-weight', 'bold');
}
}
}
}
container.addEventListener('click', clickHandlerLabel);
container.addEventListener("mouseover", mouseOverLabel);
container.addEventListener("mouseout", mouseOutrLabel);
function mouseOverLabel(propertiesLabel) {
if (propertiesLabel.target.tagName === 'text') {
for (var i = 0; i < axislabels.length; i++) {
if (axislabels[i].textContent == propertiesLabel.target.textContent) {
axislabels[i].setAttribute('font-weight', 'bold');
const findArray =tempdatasubCell.filter(p => p[0] == propertiesLabel.target.textContent);
var textY=propertiesLabel.target.getAttribute("y");
var textX=propertiesLabel.target.getAttribute("x");
var customTextToolTip='<b>'+propertiesLabel.target.textContent+'</b>'+'<br>'+tempdatasubCell[0][1]+':'+'<br>'+findArray[0][1];
var bars = container.getElementsByTagName('path');
for(var j = 0; j<bars.length; j++){
if(dataPlot.getValue(j,0) == propertiesLabel.target.textContent){
bars[j].setAttribute('fill','#3871cf');
$('.tooltiptextLabel').css('visibility','visible');
$('.tooltiptextLabel').css('position', 'absolute');
$('.tooltiptextLabel').css('top',textY+'px');
$('.tooltiptextLabel').css('left',textX+'px');
$('.tooltiptextLabel').html(customTextToolTip);
}
}
}
}
}
}
function mouseOutrLabel(propertiesOutLabel) {
if (propertiesOutLabel.target.tagName === 'text') {
for (var i = 0; i < axislabels.length; i++) {
if (axislabels[i].textContent == propertiesOutLabel.target.textContent) {
axislabels[i].removeAttribute('font-weight', 'bold');
var bars = container.getElementsByTagName('path');
for(var j = 0; j<bars.length; j++){
if(dataPlot.getValue(j,0) == propertiesOutLabel.target.textContent){
bars[j].setAttribute('fill','#4285f4');
$('.tooltiptextLabel').html('');
$('.tooltiptextLabel').css('visibility','hidden');
$('.tooltiptextLabel').css('top',0);
$('.tooltiptextLabel').css('left',0);
}
}
}
}
}
}
function clickHandlerLabel(e) {
if (e.target.tagName === 'text') {
const findArray =tempdatasubCell.filter(p => p[0] == e.target.textContent);
if (typeof findArray[0] != "undefined"){
if (tempdatasubCell.indexOf(findArray[0])){
var tempGoogleDataURL='/dataload/googleChartData_'+e.target.textContent+'_subCellLoc';
$('tfoot input').val('');
self.datatableElement['dt'].columns().search('').draw();
self.datatableElement['dt'].search('').draw();
self.mSCellVal=e.target.textContent;
self.datatableElement['dt'].columns( 12 ).search(e.target.textContent).draw();
//window.open(tempGoogleDataURL,'_blank');
}
}
}
}
chart.draw(dataPlot, google.charts.Bar.convertOptions(options));
}
function drawGOChart() {
var tempdataGO=goData;
var dataPlot = google.visualization.arrayToDataTable(tempdataGO);
const options = {
'height':300,
bar: {groupWidth: "100%"},
legend: {position: 'none'},
hAxis: {
title: 'No. of proteins covered',
minValue: 0,
textStyle : {
fontSize: 16 // or the number you want
},
},
vAxis: {
title: 'GO Term Name',
textStyle : {
fontSize: 16 // or the number you want
},
},
bars: 'horizontal'
};
const chart = new google.charts.Bar(document.getElementById('chart_div_GO'));
const container = document.getElementById('chart_div_GO');
var axislabels:any=[];
google.visualization.events.addListener(chart, 'onmouseover', uselessHandler);
function uselessHandler() {
$('#chart_div_GO path').css('cursor','pointer')
$('#chart_div_GO text').css('cursor','pointer')
}
google.visualization.events.addListener(chart, 'select', selectHandler);
google.visualization.events.addListener(chart, 'onmouseover', onmouseoverHandler);
google.visualization.events.addListener(chart, 'onmouseout', onmouseoutHandler);
// use the 'ready' event to modify the chart once it has been drawn
google.visualization.events.addListener(chart, 'ready', function () {
axislabels = container.getElementsByTagName('text');
});
function selectHandler(e) {
var selection = chart.getSelection();
if (selection.length > 0) {
var colLabelSelect = dataPlot.getColumnLabel(selection[0].column);
var mydataSelect= dataPlot.getValue(selection[0].row,0);
var tempGoogleDataURL='/dataload/googleChartData_'+mydataSelect+'_goTermName';
$('tfoot input').val('');
self.datatableElement['dt'].columns().search('').draw();
self.datatableElement['dt'].search('').draw();
self.mGOVal=mydataSelect;
self.datatableElement['dt'].columns( 18 ).search(mydataSelect).draw();
//window.open(tempGoogleDataURL,'_blank');
chart.setSelection([])
}
}
function onmouseoverHandler(propertiesOver) {
var hooverOverSelection= propertiesOver;
if (Object.keys(hooverOverSelection).length > 0 && typeof hooverOverSelection.column !== "undefined") {
var colLabelOver=dataPlot.getColumnLabel(hooverOverSelection.column);
var mydataOver =dataPlot.getValue(hooverOverSelection.row,0);
for (var i = 0; i < axislabels.length; i++) {
if (axislabels[i].textContent == mydataOver) {
axislabels[i].setAttribute('font-weight', 'bold');
}
}
}
}
function onmouseoutHandler(propertiesOut) {
var hooverOutSelection= propertiesOut;
if (Object.keys(hooverOutSelection).length > 0 && typeof hooverOutSelection.column !== "undefined") {
var mydataOut =dataPlot.getValue(hooverOutSelection.row,0);
for (var i = 0; i < axislabels.length; i++) {
if (axislabels[i].textContent == mydataOut) {
axislabels[i].removeAttribute('font-weight', 'bold');
}
}
}
}
container.addEventListener('click', clickHandlerLabel);
container.addEventListener("mouseover", mouseOverLabel);
container.addEventListener("mouseout", mouseOutrLabel);
function mouseOverLabel(propertiesLabel) {
if (propertiesLabel.target.tagName === 'text') {
for (var i = 0; i < axislabels.length; i++) {
if (axislabels[i].textContent == propertiesLabel.target.textContent) {
axislabels[i].setAttribute('font-weight', 'bold');
const findArray =tempdataGO.filter(p => p[0] == propertiesLabel.target.textContent);
var textY=propertiesLabel.target.getAttribute("y");
var textX=propertiesLabel.target.getAttribute("x");
var customTextToolTip='<b>'+propertiesLabel.target.textContent+'</b>'+'<br>'+tempdataGO[0][1]+':'+'<br>'+findArray[0][1];
var bars = container.getElementsByTagName('path');
for(var j = 0; j<bars.length; j++){
if(dataPlot.getValue(j,0) == propertiesLabel.target.textContent){
bars[j].setAttribute('fill','#3871cf');
$('.tooltiptextLabel').css('visibility','visible');
$('.tooltiptextLabel').css('position', 'absolute');
$('.tooltiptextLabel').css('top',textY+'px');
$('.tooltiptextLabel').css('left',textX+'px');
$('.tooltiptextLabel').html(customTextToolTip);
}
}
}
}
}
}
function mouseOutrLabel(propertiesOutLabel) {
if (propertiesOutLabel.target.tagName === 'text') {
for (var i = 0; i < axislabels.length; i++) {
if (axislabels[i].textContent == propertiesOutLabel.target.textContent) {
axislabels[i].removeAttribute('font-weight', 'bold');
var bars = container.getElementsByTagName('path');
for(var j = 0; j<bars.length; j++){
if(dataPlot.getValue(j,0) == propertiesOutLabel.target.textContent){
bars[j].setAttribute('fill','#4285f4');
$('.tooltiptextLabel').html('');
$('.tooltiptextLabel').css('visibility','hidden');
$('.tooltiptextLabel').css('top',0);
$('.tooltiptextLabel').css('left',0);
}
}
}
}
}
}
function clickHandlerLabel(e) {
if (e.target.tagName === 'text') {
const findArray =tempdataGO.filter(p => p[0] == e.target.textContent);
if (typeof findArray[0] != "undefined"){
if (tempdataGO.indexOf(findArray[0])){
var tempGoogleDataURL='/dataload/googleChartData_'+e.target.textContent+'_goTermName';
$('tfoot input').val('');
self.datatableElement['dt'].columns().search('').draw();
self.datatableElement['dt'].search('').draw();
self.mGOVal=e.target.textContent;
self.datatableElement['dt'].columns( 18 ).search(e.target.textContent).draw();
//window.open(tempGoogleDataURL,'_blank');
}
}
}
}
chart.draw(dataPlot, google.charts.Bar.convertOptions(options));
}
function drawDisChart() {
var tempdataDis=humanDiseaseData;
var dataPlot = google.visualization.arrayToDataTable(tempdataDis);
const options = {
'height':400,
bar: {groupWidth: "100%"},
legend: {position: 'none'},
hAxis: {
title: 'No. of proteins associated',
minValue: 0,
textStyle : {
fontSize: 16 // or the number you want
},
},
vAxis: {
title: 'Disease Name',
textStyle : {
fontSize: 16 // or the number you want
},
},
bars: 'horizontal'
};
const chart = new google.charts.Bar(document.getElementById('chart_div_disease'));
const container = document.getElementById('chart_div_disease');
var axislabels:any=[];
google.visualization.events.addListener(chart, 'onmouseover', uselessHandler);
function uselessHandler() {
$('#chart_div_disease path').css('cursor','pointer')
$('#chart_div_disease text').css('cursor','pointer')
}
google.visualization.events.addListener(chart, 'select', selectHandler);
google.visualization.events.addListener(chart, 'onmouseover', onmouseoverHandler);
google.visualization.events.addListener(chart, 'onmouseout', onmouseoutHandler);
// use the 'ready' event to modify the chart once it has been drawn
google.visualization.events.addListener(chart, 'ready', function () {
axislabels = container.getElementsByTagName('text');
});
function selectHandler(e) {
var selection = chart.getSelection();
if (selection.length > 0) {
var colLabelSelect = dataPlot.getColumnLabel(selection[0].column);
var mydataSelect= dataPlot.getValue(selection[0].row,0);
var tempDisogleDataURL='/dataload/googleChartData_'+mydataSelect+'_disTermName';
//window.open(tempDisogleDataURL,'_blank');
$('tfoot input').val('');
self.datatableElement['dt'].columns().search('').draw();
self.datatableElement['dt'].search('').draw();
self.hDisVal=mydataSelect;
self.datatableElement['dt'].columns( 19 ).search(mydataSelect).draw();
chart.setSelection([])
}
}
function onmouseoverHandler(propertiesOver) {
var hooverOverSelection= propertiesOver;
if (Object.keys(hooverOverSelection).length > 0 && typeof hooverOverSelection.column !== "undefined") {
var colLabelOver=dataPlot.getColumnLabel(hooverOverSelection.column);
var mydataOver =dataPlot.getValue(hooverOverSelection.row,0);
for (var i = 0; i < axislabels.length; i++) {
if (axislabels[i].textContent == mydataOver) {
axislabels[i].setAttribute('font-weight', 'bold');
}
}
}
}
function onmouseoutHandler(propertiesOut) {
var hooverOutSelection= propertiesOut;
if (Object.keys(hooverOutSelection).length > 0 && typeof hooverOutSelection.column !== "undefined") {
var mydataOut =dataPlot.getValue(hooverOutSelection.row,0);
for (var i = 0; i < axislabels.length; i++) {
if (axislabels[i].textContent == mydataOut) {
axislabels[i].removeAttribute('font-weight', 'bold');
}
}
}
}
container.addEventListener('click', clickHandlerLabel);
container.addEventListener("mouseover", mouseOverLabel);
container.addEventListener("mouseout", mouseOutrLabel);
function mouseOverLabel(propertiesLabel) {
if (propertiesLabel.target.tagName === 'text') {
for (var i = 0; i < axislabels.length; i++) {
if (axislabels[i].textContent == propertiesLabel.target.textContent) {
axislabels[i].setAttribute('font-weight', 'bold');
const findArray =tempdataDis.filter(p => p[0] == propertiesLabel.target.textContent);
var textY=propertiesLabel.target.getAttribute("y");
var textX=propertiesLabel.target.getAttribute("x");
var customTextToolTip='<b>'+propertiesLabel.target.textContent+'</b>'+'<br>'+tempdataDis[0][1]+':'+'<br>'+findArray[0][1];
var bars = container.getElementsByTagName('path');
for(var j = 0; j<bars.length; j++){
if(dataPlot.getValue(j,0) == propertiesLabel.target.textContent){
bars[j].setAttribute('fill','#3871cf');
$('.tooltiptextLabel').css('visibility','visible');
$('.tooltiptextLabel').css('position', 'absolute');
$('.tooltiptextLabel').css('top',textY+'px');
$('.tooltiptextLabel').css('left',textX+'px');
$('.tooltiptextLabel').html(customTextToolTip);
}
}
}
const findArray =tempdataDis.filter(p => p[0] == propertiesLabel.target.textContent);
}
}
}
function mouseOutrLabel(propertiesOutLabel) {
if (propertiesOutLabel.target.tagName === 'text') {
for (var i = 0; i < axislabels.length; i++) {
if (axislabels[i].textContent == propertiesOutLabel.target.textContent) {
axislabels[i].removeAttribute('font-weight', 'bold');
var bars = container.getElementsByTagName('path');
for(var j = 0; j<bars.length; j++){
if(dataPlot.getValue(j,0) == propertiesOutLabel.target.textContent){
bars[j].setAttribute('fill','#4285f4');
$('.tooltiptextLabel').html('');
$('.tooltiptextLabel').css('visibility','hidden');
$('.tooltiptextLabel').css('top',0);
$('.tooltiptextLabel').css('left',0);
}
}
}
}
}
}
function clickHandlerLabel(e) {
if (e.target.tagName === 'text') {
const findArray =tempdataDis.filter(p => p[0] == e.target.textContent);
if (typeof findArray[0] != "undefined"){
if (tempdataDis.indexOf(findArray[0])){
var tempDisogleDataURL='/dataload/googleChartData_'+e.target.textContent+'_disTermName';
$('tfoot input').val('');
self.datatableElement['dt'].columns().search('').draw();
self.datatableElement['dt'].search('').draw();
self.hDisVal=e.target.textContent;
self.datatableElement['dt'].columns( 19 ).search(e.target.textContent).draw();
//window.open(tempGoogleDataURL,'_blank');
}
}
}
}
chart.draw(dataPlot, google.charts.Bar.convertOptions(options));
}
$(document).ready(function() {
$(window).resize(function() {
drawMatrixChart();
drawStrainChart();
drawSubCellChart();
drawGOChart();
drawDisChart();
})
})
}
toggleAccordian(event) {
var element = event.target;
element.classList.toggle("active");
var panel = element.nextElementSibling;
if (panel.style.maxHeight) {
panel.style.maxHeight = null;
} else {
panel.style.maxHeight = panel.scrollHeight + "px";
}
}
clearFilterSearch(){
$('tfoot input').val('');
this.mProtVal='';
this.mGenVal='';
this.mUKBVal='';
this.mPepassVal='';
this.mStrVal='';
this.mKoutVal='';
this.mBioTisVal='';
this.mGenderVal='';
this.mGenExpVal='';
this.hProtVal='';
this.hUKBVal='';
this.hPresPepVal='';
this.mSCellVal='';
this.mPathVal='';
this.hDisVal='';
this.mGOVal='';
this.hDrugVal='';
this.datatableElement['dt'].columns().search('').draw();
this.datatableElement['dt'].search('').draw();
}
ngOnDestroy(){
this.routeSub.unsubscribe();
}
}
<file_sep>/client/qmpkb-app/src/app/home/home.component.ts
import { Component, OnInit, OnDestroy, HostListener, ChangeDetectorRef } from '@angular/core';
import { Router } from '@angular/router';
import { HttpClient } from '@angular/common/http';
import { Observable, Observer } from 'rxjs';
import { share } from 'rxjs/operators';
import {QmpkbService} from '../qmpkb-service/qmpkb.service';
import * as Plotly from 'plotly.js';
import { NgxSpinnerService } from 'ngx-spinner';
import * as $ from "jquery";
declare var jquery: any;
@Component({
selector: 'app-home',
templateUrl: './home.component.html',
styleUrls: ['./home.component.css']
})
export class HomeComponent implements OnInit,OnDestroy {
private queryRes:any;
private advReq:any;
unqProteins;
unqpeptides;
unqassays;
pepSeqPresenceHumanOrtholog;
pepSeqPresenceHumanOrthologUniId;
screenWidth:any;
plotlyData:any=[];
allBioMat:any;
allStrain:any;
interval:any;
autoPlotStatus:boolean= false;
plotIndex:number=0;
progress:number=0;
finalPlotData:any={};
public show:boolean = false;
public buttonName:any = 'Advanced search';
public number: number = 0;
public observable: Observable<boolean>;
private observer: Observer<boolean>;
qmpkbLogoImage ='static/ang/assets/images/logo/logo.png'
isCollapsed:boolean=true;
plotDataOptions=[
{num:0, name:'Brain'},
{num:1, name:'Brown Adipose'},
{num:2, name:'Epididymis'},
{num:3, name:'Eye'},
{num:4, name:'Heart'},
{num:5, name:'Kidney'},
{num:6, name:'Liver Caudate and Right Lobe'},
{num:7, name:'Liver Left Lobe'},
{num:8, name:'Lung'},
{num:9, name:'Ovary'},
{num:10, name:'Pancreas'},
{num:11, name:'Plasma'},
{num:12, name:'RBCs'},
{num:13, name:'Salivary Gland'},
{num:14, name:'Seminal Vesicles'},
{num:15, name:'Skeletal Muscle'},
{num:16, name:'Skin'},
{num:17, name:'Spleen'},
{num:18, name:'Testes'},
{num:19, name:'White Adipose'}
];
unitDic={
'Brain':' (fmol target protein/µg extracted protein)',
'Brown Adipose': ' (fmol target protein/µg extracted protein)',
'Eye':' (fmol target protein/µg extracted protein)',
'Epididymis':' (fmol target protein/µg extracted protein)',
'Heart':' (fmol target protein/µg extracted protein)',
'Kidney': ' (fmol target protein/µg extracted protein)',
'Liver Caudate and Right Lobe':' (fmol target protein/µg extracted protein)',
'Liver Left Lobe':' (fmol target protein/µg extracted protein)',
'Lung':' (fmol target protein/µg extracted protein)',
'Ovary': ' (fmol target protein/µg extracted protein)',
'Pancreas':' (fmol target protein/µg extracted protein)',
'Plasma':' (fmol target protein/µg extracted protein)',
'RBCs':' (fmol target protein/µg extracted protein)',
'Salivary Gland': ' (fmol target protein/µg extracted protein)',
'Seminal Vesicles':' (fmol target protein/µg extracted protein)',
'Skeletal Muscle':' (fmol target protein/µg extracted protein)',
'Skin':' (fmol target protein/µg extracted protein)',
'Spleen':' (fmol target protein/µg extracted protein)',
'Testes':' (fmol target protein/µg extracted protein)',
'White Adipose': ' (fmol target protein/µg extracted protein)'
};
defaultPlotlyConfiguration ={
responsive: true,
scrollZoom: true,
showTips:true,
modeBarButtonsToRemove: ['sendDataToCloud', 'autoScale2d', 'hoverClosestCartesian', 'hoverCompareCartesian', 'lasso2d', 'select2d','toImage','pan', 'pan2d','zoom2d','toggleSpikelines'],
displayLogo: false
};
selected=this.plotDataOptions[0];
@HostListener('window.resize', ['$event'])
getScreenSize(event?){
this.screenWidth=Math.round(window.innerWidth/2)+"px";
}
constructor(private router:Router, private http:HttpClient,private _qmpkb:QmpkbService,private spinner: NgxSpinnerService, private cdRef:ChangeDetectorRef) {
this.observable = new Observable<boolean>((observer: any) => this.observer = observer);
this.getScreenSize();
// For auto mode
//setTimeout(() => this.number += this.number, 5000); // Update on 5 seconds
}
ngOnInit() {
this.spinner.show();
this.queryRes=this.http.get('/fileapi/resultFile/jsonData/preLoadData/preloadHomeData.json')
.subscribe((resp:any) => {
this.allBioMat=resp.data[1]["BioMat"].split('|');
this.allStrain=resp.data[2]["Strain"].split('|');
this.unqassays=resp.data[0]["uniqueAssays"];
this.unqProteins=resp.data[0]["uniqueProtein"];
this.unqpeptides=resp.data[0]["uniquePeptide"];
this.pepSeqPresenceHumanOrtholog=resp.data[0]["pepSeqPresenceHumanOrtholog"];
this.pepSeqPresenceHumanOrthologUniId=resp.data[0]["pepSeqPresenceHumanOrthologUniId"];
this.plotlyData.push(resp.data[1]);
this.plotlyData.push(resp.data[3]);
this.plotlyData.push(resp.data[2]);
let rawData = resp.data[4];
let bioMatData = resp.data[5];
let finalData:any={};
for (let x in this.allBioMat){
finalData[this.allBioMat[x]]=[];
}
let bioMatKey=Object.keys(bioMatData).sort();
for (let z in bioMatKey){
let plotDataArrayTrace:any={};
plotDataArrayTrace={
y:bioMatData[bioMatKey[z]]['MeanConcData'].split('|'),
x:bioMatData[bioMatKey[z]]['MeanProtein'].split('|'),
name:'Mean Concentration',
type:'Scatter',
mode:'markers',
marker:{
size:6,
symbol:Array(bioMatData[bioMatKey[z]]['MeanProtein'].length).fill("diamond-open-dot"),
},
//text:bioMatData[bioMatKey[z]]['MeanProtein'].split('|') //name of Uniprot ID and Gene
};
finalData[bioMatKey[z]].push(plotDataArrayTrace);
}
let number=0;
let tempKey=Object.keys(rawData).sort()
for (let i in tempKey){
number++;
for (let j=0; j<rawData[tempKey[i]].length; j++){
let tempBioMat=rawData[tempKey[i]][j];
let tempBioMatKey=(Object.keys(tempBioMat))[0];
let tempBioMatVal=(Object.values(tempBioMat))[0];
let plotDataArrayMaleTrace:any={};
let plotDataArrayFemaleTrace:any={};
try{
plotDataArrayMaleTrace={
y:tempBioMatVal['Male']['MeanConcData'].split('|'),
x:tempBioMatVal['Male']['MeanProtein'].split('|'),
name:'Male '+tempKey[i],
type:'Scatter',
mode:'markers',
marker:{
size:6,
symbol:Array(tempBioMatVal['Male']['MeanProtein'].length).fill("circle-open-dot"),
},
//text:tempBioMatVal['Male']['MeanProtein'].split('|') //name of Uniprot ID and Gene
};
finalData[tempBioMatKey].push(plotDataArrayMaleTrace);
} catch (e){
}
try{
plotDataArrayFemaleTrace={
y:tempBioMatVal['Female']['MeanConcData'].split('|'),
x:tempBioMatVal['Female']['MeanProtein'].split('|'),
name:'Female '+tempKey[i],
type:'Scatter',
mode:'markers',
marker:{
size:6,
symbol:Array(tempBioMatVal['Female']['MeanProtein'].length).fill("square-open-dot"),
},
//text:tempBioMatVal['Female']['MeanProtein'].split('|') //name of Uniprot ID and Gene
};
finalData[tempBioMatKey].push(plotDataArrayFemaleTrace);
} catch (e){
}
}
}
let finalLayout:any=[]
//this.cdRef.detectChanges();
for (let y in bioMatKey){
let layout={
title:{text:'Protein concentration ranges in '+bioMatKey[y],font:{size:14}},
xaxis: {showticklabels:false,title:'Protein',font:{size:14}},
yaxis: {title:this.unitDic[bioMatKey[y]]+'<br>in Log10 Scale',font:{size:14}},
};
finalLayout.push(layout);
}
this.finalPlotData={
'plotData':finalData,
'plotLayout':finalLayout,
'config':this.defaultPlotlyConfiguration
};
this.barplot(this.plotlyData);
this.preparerawData(this.autoPlotStatus);
});
this.advReq=this.http.get('/fileapi/resultFile/jsonData/preLoadData/advanceSearchOptions.json')
.subscribe((resp:any) => {
this._qmpkb.dropDownStorage=resp.data;
});
}
preparerawData(plotStatus:any){
let tempTissueList=[
'Brain',
'Brown Adipose',
'Epididymis',
'Eye',
'Heart',
'Kidney',
'Liver Caudate and Right Lobe',
'Liver Left Lobe',
'Lung',
'Ovary',
'Pancreas',
'Plasma',
'RBCs',
'Salivary Gland',
'Seminal Vesicles',
'Skeletal Muscle',
'Skin',
'Spleen',
'Testes',
'White Adipose'
];
let tempPlotDataInitial=this.finalPlotData['plotData'];
let tempPlotLayoutInitial=this.finalPlotData['plotLayout'];
let tempConfigInitial=this.finalPlotData['config'];
if(document.getElementById('myDivHome')){
Plotly.newPlot('myDivHome',tempPlotDataInitial['Brain'],tempPlotLayoutInitial[0],tempConfigInitial);
}
const self =this;
let timeleft=3;
if ( !plotStatus){
this.interval = setInterval(() => {
if(this.progress>= 3){
this.plotIndex++;
if(this.plotIndex==20){
this.plotIndex=0;
}
this.selected=this.plotDataOptions[this.plotIndex];
if(document.getElementById('myDivHome')){
Plotly.newPlot('myDivHome',tempPlotDataInitial[tempTissueList[this.plotIndex]],tempPlotLayoutInitial[this.plotIndex],tempConfigInitial);
}
this.progress=0;
} else{
this.progress++;
}
}, 1000);
}
$('#myDivHome').hover(function(ev){
$("#progressBar").hide();
self.progress=0;
clearInterval(self.interval);
}, function(ev){
self.interval = setInterval(() => {
$("#progressBar").show();
if(self.progress>= 3){
self.plotIndex++;
if(self.plotIndex==20){
self.plotIndex=0;
}
self.selected=self.plotDataOptions[self.plotIndex];
if(document.getElementById('myDivHome')){
Plotly.newPlot('myDivHome',tempPlotDataInitial[tempTissueList[self.plotIndex]],tempPlotLayoutInitial[self.plotIndex],tempConfigInitial);
}
self.progress=0;
} else{
self.progress++;
}
},1000);
});
this.spinner.hide();
}
barplot(rawData:any):void {
let layout:any={};
layout = {
xaxis: {domain: [0, 0.25]},
xaxis2: {domain: [0.35, .60]},
xaxis3: {domain: [.70, 1.0]},
yaxis: {domain: [0, .9]},
yaxis2: {anchor: 'x2',domain: [0, .9]},
yaxis3: {anchor: 'x3',domain: [0, .9]},
annotations: [
{
text: "Biological Matrix",
font: {
size: 16
},
showarrow: false,
align: 'center',
x: 0.13,
y: 1,
xref: 'paper',
yref: 'paper',
},
{
text: "Sex",
font: {
size: 16
},
showarrow: false,
align: 'center',
x: 0.48,
y: 1,
xref: 'paper',
yref: 'paper',
},
{
text: "Strain",
font: {
size: 16
},
showarrow: false,
align: 'center',
x: 0.85,
y: 1,
xref: 'paper',
yref: 'paper',
}
],
showlegend: false
};
const d3colors = Plotly.d3.scale.category10();
let defaultPlotlyConfiguration={};
defaultPlotlyConfiguration ={
responsive: true,
scrollZoom: true,
showTips:true,
modeBarButtonsToRemove: ['sendDataToCloud', 'autoScale2d', 'hoverClosestCartesian', 'hoverCompareCartesian', 'lasso2d', 'select2d','toImage','pan', 'pan2d','zoom2d','toggleSpikelines'],
displayLogo: false
};
let plotDataArrayMatTrace1:any={};
let plotDataArrayMatTrace2:any={};
plotDataArrayMatTrace1={
y:rawData[0]["BioMat"].split('|'),
x:rawData[0]["PeptideSeq"].split('|'),
name:'Assays',
type:'bar',
orientation:'h'
};
plotDataArrayMatTrace2={
y:rawData[0]["BioMat"].split('|'),
x:rawData[0]["Protein"].split('|'),
name:'Protein',
type:'bar',
orientation:'h'
};
let plotDataArraySexTrace1:any={};
let plotDataArraySexTrace2:any={};
plotDataArraySexTrace1={
y:rawData[1]["Sex"].split('|'),
x:rawData[1]["PeptideSeq"].split('|'),
xaxis:'x2',
yaxis:'y2',
name:'Assays',
type:'bar',
orientation:'h'
};
plotDataArraySexTrace2={
y:rawData[1]["Sex"].split('|'),
x:rawData[1]["Protein"].split('|'),
xaxis:'x2',
yaxis:'y2',
name:'Protein',
type:'bar',
orientation:'h'
};
let plotDataArrayStrainTrace1:any={};
let plotDataArrayStrainTrace2:any={};
plotDataArrayStrainTrace1={
y:rawData[2]["Strain"].split('|'),
x:rawData[2]["PeptideSeq"].split('|'),
xaxis:'x3',
yaxis:'y3',
name:'Assays',
type:'bar',
orientation:'h'
};
plotDataArrayStrainTrace2={
y:rawData[2]["Strain"].split('|'),
x:rawData[2]["Protein"].split('|'),
xaxis:'x3',
yaxis:'y3',
name:'Protein',
type:'bar',
orientation:'h'
};
const finalData=[plotDataArrayMatTrace1,plotDataArrayMatTrace2,plotDataArraySexTrace1,plotDataArraySexTrace2,plotDataArrayStrainTrace1,plotDataArrayStrainTrace2];
//Plotly.newPlot('myDiv',finalData,layout,defaultPlotlyConfiguration);
}
onOptionsSelected(event){
if(event.target){
$("#progressBar").hide();
let tempPlotData=this.finalPlotData['plotData'];
let tempPlotLayout=this.finalPlotData['plotLayout'];
let tempConfig=this.finalPlotData['config'];
this.autoPlotStatus = true;
this.preparerawData(this.autoPlotStatus);
clearInterval(this.interval);
if(document.getElementById('myDivHome')){
Plotly.purge('myDivHome');
Plotly.newPlot('myDivHome',tempPlotData[this.selected.name],tempPlotLayout[this.selected.num],tempConfig);
}
}
}
toggle() {
this.show = !this.show;
// CHANGE THE NAME OF THE BUTTON.
if(this.show)
this.buttonName = "Basic search";
else
this.buttonName = "Advanced search";
}
ngOnDestroy(){
this.queryRes.unsubscribe();
this.advReq.unsubscribe();
}
}
<file_sep>/client/qmpkb-app/src/app/protvista-view/protvista-view.component.ts
import { Component, OnInit, OnDestroy, HostListener, ViewChild,Input} from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { Location } from '@angular/common';
import { HttpClient,HttpErrorResponse } from '@angular/common/http';
import { DataTableDirective } from 'angular-datatables';
import { NgxSpinnerService } from 'ngx-spinner';
import {QmpkbService} from '../qmpkb-service/qmpkb.service';
import * as $ from "jquery";
declare var require: any
declare var jquery: any;
@Component({
selector: 'app-protvista-view',
templateUrl: './protvista-view.component.html',
styleUrls: ['./protvista-view.component.css']
})
export class ProtvistaViewComponent implements OnInit,OnDestroy {
private routeSub:any;
dtOptionsProtVista: any = {};
mousePepStart:number;
humanPepStart:number;
mousePepEnd:number;
humanPepEnd:number;
mouseUniprotKB:any;
humanUniprotKB:any;
pepseq:any;
protname:any;
errorStr:Boolean;
queryData:any;
queryProtVistaUniProtKB:any;
pepSeqMatchList:any;
humanProtvistaQueryData:any;
protVistaDataStatus=false;
@Input() public href: string | undefined;
@HostListener('click', ['$event']) public onClick(event: Event): void{
if (!this.href || this.href === '#' || (this.href && this.href.length ===0)){
event.preventDefault();
}
}
@ViewChild(DataTableDirective)
datatableElement: DataTableDirective;
constructor(
private route: ActivatedRoute,
private location: Location,
private http: HttpClient,
private router: Router,
private spinner: NgxSpinnerService,
private _qmpkb:QmpkbService
) { }
@Input()
set protVistatermQuery(protVistaUniProtKB:any){
this.queryProtVistaUniProtKB=protVistaUniProtKB;
}
async getProtVistaData(){
await this._qmpkb.receiveDataFromBackendSearch('/seqfeaturesapi/?uniProtKb='+ this.queryProtVistaUniProtKB).subscribe((response: any)=>{
this.queryData=response;
this.pepseq=this.queryData.pepseq;
this.mouseUniprotKB=this.queryProtVistaUniProtKB;
this.humanUniprotKB=this.queryData.humanUniprotKB;
this.mousePepStart=this.queryData.seqStart;
this.humanPepStart=this.queryData.humanPepStart;
this.mousePepEnd=this.queryData.seqEnd;
this.humanPepEnd=this.queryData.humanPepEnd;
this.protname= this.queryData.protname;
this.pepSeqMatchList=this.queryData.pepSeqMatchList;
this.humanProtvistaQueryData={
humanUniprotKB:this.humanUniprotKB,
humanPepStart:this.humanPepStart,
humanPepEnd:this.humanPepEnd
}
this.dtOptionsProtVista = {
searching: false,
info: false,
ordering: false,
paging: false,
autoWidth:true
};
if (this.mousePepEnd > 0){
setTimeout(() => {this.plotProtVistaMouseFunc(this.mouseUniprotKB,this.mousePepStart,this.mousePepEnd)}, 100);
};
this.protVistaDataStatus=true;
}, error=>{
this.errorStr = error;
})
}
ngOnInit() {
this.getProtVistaData();
}
plotProtVistaMouseFunc(protvistaMouseUni:string,mousePreSelectStart:number,mousePreSelectEnd:number): void {
if (mousePreSelectStart >0){
var mouseDiv = document.getElementById('mouseDiv');
var ProtVistaMouse = require('ProtVista');
var mouseinstance = new ProtVistaMouse({
el: mouseDiv,
uniprotacc: protvistaMouseUni,
defaultSources: true,
//These categories will **not** be rendered at all
exclusions: ['SEQUENCE_INFORMATION', 'STRUCTURAL', 'TOPOLOGY', 'MOLECULE_PROCESSING', 'ANTIGEN'],
//Your data sources are defined here
customDataSource: {
url: 'fileapi/resultFile/jsonData/protvistadataJson/mouse/externalLabeledFeatures_',
source: 'MouseQuaPro',
useExtension: true
},
categoryOrder: ['TARGETED_PROTEOMICS_ASSAY_MOUSE', 'PROTEOMICS', 'DOMAINS_AND_SITES', 'PTM', 'MUTAGENESIS'],
//This feature will be preselected
selectedFeature: {
begin: mousePreSelectStart,
end: mousePreSelectEnd,
type: 'MRM'
}
});
}
}
ngOnDestroy(){
this.routeSub.unsubscribe()
}
}
<file_sep>/backend/src/qmpkbapp/models.py
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from datetime import datetime
from django.db import models
# Create your models here.
class IpAddressInformation(models.Model):
ip_address=models.CharField(max_length=1200,blank=False)
access_date=models.DateTimeField(auto_now_add=True,auto_now=False)
def __unicode__(self):
return self.ip_address<file_sep>/client/qmpkb-app/src/app/help/help.component.ts
import { Component, OnInit } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import * as $ from "jquery";
declare var jquery: any;
@Component({
selector: 'app-help',
templateUrl: './help.component.html',
styleUrls: ['./help.component.css']
})
export class HelpComponent implements OnInit {
baseUrl;
constructor(
private router: Router
) { }
ngOnInit() {
this.baseUrl = window.location.origin;
if (this.router.url.includes('#')){
const link=this.router.url.split('#')[1];
this.preCSS(link);
}
}
preCSS(hashLink:any):void {
var self= this;
/* $('#'+hashLink).trigger('click');*/
$('#'+hashLink).css({'padding-top':'51px'});
}
gethref(evt, linkName) {
const hrefIDArray=['searching','update','cite','result','submission','implementation'];
$('#'+linkName).css({'padding-top':'51px'});
for(let i=0; i<hrefIDArray.length;i++){
if(hrefIDArray[i] !==linkName){
$('#'+hrefIDArray[i]).css({'padding-top':''});
}
}
}
}<file_sep>/client/qmpkb-app/src/app/basic-search/basic-search.component.ts
import { Component, OnInit, Input, Renderer } from '@angular/core';
import { Router } from '@angular/router';
import { FormGroup, FormBuilder, FormControl, Validators, FormArray } from '@angular/forms';
import { HttpClient,HttpErrorResponse } from '@angular/common/http';
import {QmpkbService} from '../qmpkb-service/qmpkb.service';
import { NgxSpinnerService } from 'ngx-spinner';
import * as $ from "jquery";
declare var jquery: any;
@Component({
selector: 'app-basic-search',
templateUrl: './basic-search.component.html',
styleUrls: ['./basic-search.component.css']
})
export class BasicSearchComponent implements OnInit {
searchQuery: string;
baseUrl;
@Input()
passedQuery: string;
selectedExampleValue: string;
selectedExampleName: string;
errorStr:Boolean;
public alertIsVisible:boolean= false;
submitButtonClickStatus:boolean = false;
public fields: any[] = [
[
{
name:'Protein name',
value:'Vinculin'
},
{
name:'Gene',
value:'Vcl'
},
{
name:'UniProtKB accession',
value:'Q64727'
}
],[
{
name:'Peptide sequence',
value:'ALASQLQDSLK'
},
{
name:'Strain',
value:'NODSCID'
},
{
name:'Mutant',
value:'Wild'
}
],[
{
name:'Sex',
value:'Male'
},
{
name:'Biological matrix',
value:'Plasma'
},
{
name:'Subcellular localization',
value:'Secreted'
}
],[
{
name:'Molecular pathway(s)',
value:'Complement and coagulation cascades'
},
{
name:'Involvement in disease',
value:'Adiponectin deficiency(ADPND)'
},
{
name:'GO ID',
value:'GO:0008015'
}
],[
{
name:'GO Term',
value:'blood circulation'
},
{
name:'GO Aspects',
value:'Biological Process'
},
{
name:'Drug associations ID',
value:'DB05202'
}
]
];
constructor(
private router: Router,
private http: HttpClient,
private renderer: Renderer,
private _qmpkb:QmpkbService,
private spinner: NgxSpinnerService
) { }
ngOnInit() {
this.spinner.show();
this.fields;
this.selectedExampleName='';
this.selectedExampleValue='';
this.spinner.hide();
}
ngAfterViewInit(): void {
/* window.onclick = function(event) {
if (!event.target.matches('#bt')) {
var dropdowns = document.getElementsByClassName("dropdown-content");
var i;
for (i = 0; i < dropdowns.length; i++) {
var openDropdown = dropdowns[i];
if (openDropdown.classList.contains('show')) {
openDropdown.classList.remove('show');
}
}
}
}*/
}
getValue(item : any) {
this.selectedExampleName=item.name;
this.selectedExampleValue=item.value;
}
exampleFunction() {
document.getElementById("myDropdown").classList.toggle("show");
}
exampleDisplay(){
document.getElementById("myDropdown").classList.toggle("show");
}
submitFunction(){
this.submitButtonClickStatus=true;
}
submitSearch(event,formData){
let searchedQuery = formData.value['searchterm']
if (searchedQuery){
if (this.submitButtonClickStatus){
this.spinner.show();
this.router.navigate(['/results'],{queryParams:{searchterm:searchedQuery}});
}
}
}
}<file_sep>/backend/src/qmpkbapp/modifiedJsondata.py
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from collections import Counter
from itertools import combinations
import ast
from operator import itemgetter
import operator
import json
import re,sys
import itertools
from collections import OrderedDict
import datetime
from statistics import mean
from appTissueInfo import *
from django.contrib.admin.utils import flatten
# function to generate peptidebased info into nested json format
def pepbasedInfo(jfinaldata,uniprotpepinfo,matchingpepseqquery,proteininfoColname,querybiomatrix):
pepetidebasedinfoCol=['UniProtKB Accession','Peptide ID','Peptide Sequence','Summary Concentration Range Data',\
'All Concentration Range Data','All Concentration Range Data-Sample LLOQ Based','Special Residues','Molecular Weight',\
'GRAVY Score','Transitions','Retention Time','Percent Organic Solution','Gradients','AAA Concentration','CZE Purity',\
'Unique in protein','Present in isoforms','PeptideTracker TransView',"Peptide unique in user's database",\
"Peptide in user's database","Peptide ID","Concentration View"]
updatedUniInfo=[]
biomatrixContainUniId=[]
finalupdatedUniInfo={}
tempdiffcol=proteininfoColname
updatedpepinfocol=['UniProtKB Accession','Peptide Sequence',"Unique in protein",'Present in isoforms',\
'Present in human ortholog','Unique in human protein','Present in human isoforms',\
"Peptide unique in user's database", "Peptide in user's database","Panel",'LLOQ','ULOQ','Sample LLOQ']
assaydinfocol=['Special Residues','Molecular Weight','GRAVY Score','AAA Concentration','CZE Purity']
tempdiffcol.append('Organism ID')
foldchangeData={}
sexData=[]
strainData=[]
biomatrixData=[]
for uniprotid in uniprotpepinfo:
tempupdatedUniDic={}
peptidebasedinfo=[]
tempmatchingpepseq=''
tempepepseqlist=[]
biologicalmatrix=[]
biologicalmatrixdetails=[]
sexdetails=[]
straindetails=[]
knockoutdetails=[]
meanconcdic={}
concendataAll=[]
concendataALLSampleLLOQ=[]
pepSeqPresence=[]
for pepseq in list(set(uniprotpepinfo[uniprotid])):
tempassaydic={}
tempconcenlist=[]
tempassaydinfo=[]
tempgradients=[]
temptransition=[]
tempconcendata=[]
geneExpData='NA'
concenQuery='NA'
concenView={}
for jd in jfinaldata:
if uniprotid in jd['UniProtKB Accession'] and pepseq in jd['Peptide Sequence']:
if jd['Gene Expression Data'] != 'NA':
geneExpData=jd['Gene Expression Data'].split(';')[1:]
geneExpData.sort(key=lambda g: g.upper())
concendataAll.append([jd['Peptide Sequence'],jd['All Concentration Range Data']])
concendataALLSampleLLOQ.append([jd['Peptide Sequence'],jd['All Concentration Range Data-Sample LLOQ Based']])
biologicalmatrix.append(jd["Biological Matrix"])
tempepepseqlist.append(jd['Peptide Sequence'])
tempjfinalkeys=jd.keys()
subpepinfodic={}
for i in pepetidebasedinfoCol:
try:
subpepinfodic[i]=jd[i]
except KeyError:
subpepinfodic[i]='NA'
for j in updatedpepinfocol:
try:
tempassaydic[j]=jd[j]
except KeyError:
tempassaydic[j]='NA'
try:
tempassaydinfo.append({a:jd[a] for a in assaydinfocol})
except KeyError:
pass
try:
tempgradients.append(jd['Gradients'])
except KeyError:
tempgradients.append('NA')
try:
temptransition.append(jd['Transitions'])
except KeyError:
temptransition.append('NA')
pepSeqPresence.append(jd['Present in human ortholog'])
try:
if 'NA' != jd["Biological Matrix"].upper():
tempPlotSampleLLOQ=str(jd['Sample LLOQ'].encode('ascii','ignore').strip())
tempPlotSampleLLOQ=tempPlotSampleLLOQ.replace(' (fmol target protein/g extracted protein)','')
tempPlotSampleLLOQ=dict([tempval.split('|') for tempval in tempPlotSampleLLOQ.split(';')])
tempPlotULOQ=str(jd['ULOQ'].encode('ascii','ignore').strip())
tempPlotULOQ=tempPlotULOQ.replace(' (fmol target protein/g extracted protein)','')
tempPlotULOQ=dict([tempval.split('|') for tempval in tempPlotULOQ.split(';')])
tempSampleLLOQInfo=str(jd['Sample LLOQ'].encode('ascii','ignore').strip()).split(';')
tempSampleLLOQInfo=dict([tempval.split('|') for tempval in tempSampleLLOQInfo])
tempULOQInfo=str(jd['ULOQ'].encode('ascii','ignore').strip()).split(';')
tempULOQInfo=dict([tempval.split('|') for tempval in tempULOQInfo])
tempSampleAllLLOQ=jd['All Concentration Range Data-Sample LLOQ Based']
tempSampleAllData=jd['All Concentration Range Data']
tempMinMaxConDic={}
tempConVal=[[str(al.split('|')[2]),float(al.split('|')[6].encode('ascii','ignore').strip().replace(' (fmol target protein/g extracted protein)',''))] for al in tempSampleAllData.split(';')]
for ali in tempConVal:
if ali[0] in tempMinMaxConDic:
tempMinMaxConDic[ali[0]].append(ali[1])
else:
tempMinMaxConDic[ali[0]]=[ali[1]]
if jd['All Concentration Range Data-Sample LLOQ Based'] != 'NA':
for sal in tempSampleAllLLOQ.split(';'):
tempSampleAllLLOQInfo=sal.split('|')
if tempSampleAllLLOQInfo[-1].upper() !='NA' and len(tempSampleAllLLOQInfo)>1:
if concenView.has_key(tempSampleAllLLOQInfo[2]):
concenView[tempSampleAllLLOQInfo[2]].append(float(tempSampleAllLLOQInfo[-3].split('(')[0].strip()))
else:
concenView[tempSampleAllLLOQInfo[2]]=[float(tempSampleAllLLOQInfo[-3].split('(')[0].strip())]
else:
for sampL in tempSampleLLOQInfo:
if (max(tempMinMaxConDic[str(sampL)]) < float(tempSampleLLOQInfo[str(sampL)].split('(')[0].strip())) and (min(tempMinMaxConDic[str(sampL)]) < float(tempSampleLLOQInfo[str(sampL)].split('(')[0].strip())):
concenView[sampL]="<"+str(tempSampleLLOQInfo[sampL]).split('(')[0].strip()+"(Sample LLOQ-"+str(sampL)+")"
elif (max(tempMinMaxConDic[str(sampL)]) > float(tempSampleLLOQInfo[str(sampL)].split('(')[0].strip())) and (min(tempMinMaxConDic[str(sampL)]) > float(tempSampleLLOQInfo[str(sampL)].split('(')[0].strip())):
concenView[sampL]=">"+str(tempULOQInfo[sampL]).split('(')[0].strip()+"(ULOQ-"+str(sampL)+")"
else:
concenView[sampL]="<"+str(tempSampleLLOQInfo[sampL]).split('(')[0].strip()+"(Sample LLOQ-"+str(sampL)+")<br>"+">"+str(tempULOQInfo[sampL]).split('(')[0].strip()+"(ULOQ-"+str(sampL)+")"
tempMatrix=str(jd["Biological Matrix"]).split('<br/>')
if '<br>' in str(jd["Biological Matrix"]):
tempMatrix=str(jd["Biological Matrix"]).split('<br>')
conQSeq=str(jd["Sex"]).split('<br/>')
if '<br>' in str(jd["Sex"]):
conQSeq=str(jd["Sex"]).split('<br>')
conQStrain=str(jd["Strain"]).split('<br/>')
if '<br>' in str(jd["Strain"]):
conQStrain=str(jd["Strain"]).split('<br>')
concenQuery='|'.join(conQSeq)+'@'+'|'.join(conQStrain)+'@'+'|'.join(tempMatrix)+'@'+str(jd["Knockout"])+'@'+pepseq+'@'+uniprotid
concenQuery=concenQuery.replace('/','!')
coninfo=(jd['Summary Concentration Range Data'].strip()).split(';')
addedType=[]
tempdetailslist=[]
typeOfbiomat=[]
typeOfsex=[]
typeOfstrain=[]
typeOfknocout=[]
if len(coninfo)>0:
for c in coninfo:
subconinfo=c.split('|')
dataAdded=str(subconinfo[4])+'@'+str(subconinfo[3])+'@'+str(subconinfo[2])+'@'+str(subconinfo[0])+'@'+str(subconinfo[1])+'@'+pepseq+'@'+uniprotid
if 'NA' in subconinfo[6] and str(subconinfo[2]) in tempSampleLLOQInfo:
if (max(tempMinMaxConDic[str(subconinfo[2])]) < float(tempSampleLLOQInfo[subconinfo[2]].split('(')[0].strip())) and (min(tempMinMaxConDic[str(subconinfo[2])]) < float(tempSampleLLOQInfo[subconinfo[2]].split('(')[0].strip())):
subconinfo[6]="<"+str(tempSampleLLOQInfo[subconinfo[2]]).split('(')[0].strip()+"(Sample LLOQ-"+str(subconinfo[2])+")"
elif (max(tempMinMaxConDic[str(subconinfo[2])]) > float(tempSampleLLOQInfo[subconinfo[2]].split('(')[0].strip())) and (min(tempMinMaxConDic[str(subconinfo[2])]) > float(tempSampleLLOQInfo[subconinfo[2]].split('(')[0].strip())):
subconinfo[6]= ">"+str(tempULOQInfo[subconinfo[2]]).split('(')[0].strip()+"(ULOQ-"+str(subconinfo[2])+")"
else:
subconinfo[6]= "<"+str(tempSampleLLOQInfo[subconinfo[2]]).split('(')[0].strip()+"(Sample LLOQ-"+str(subconinfo[2])+")<br>" + ">"+str(tempULOQInfo[subconinfo[2]]).split('(')[0].strip()+"(ULOQ-"+str(subconinfo[2])+")"
tempconlist=[subconinfo[6],subconinfo[4],pepseq,uniprotid,str(subconinfo[2]),str(subconinfo[3]),str(subconinfo[0]),str(subconinfo[1])]
if dataAdded not in addedType:
typeOfbiomat.append(tempconlist[4])
typeOfsex.append(tempconlist[1])
typeOfstrain.append(tempconlist[5])
typeOfknocout.append(tempconlist[7])
addedType.append(dataAdded)
tempdetailslist.append(tempconlist)
typeOfbiomat=list(set(typeOfbiomat))
typeOfsex=list(set(typeOfsex))
typeOfstrain=list(set(typeOfstrain))
typeOfknocout=list(set(typeOfknocout))
for b in typeOfbiomat:
templist=[]
tempsex=[]
tempstrain=[]
tempknockout=[]
temppanel=[]
concenVal={}
ukb=''
temppepseq=''
tempUnit=''
for i in tempdetailslist:
if b == i[4]:
tempsex.append(i[1])
tempstrain.append(i[5])
tempknockout.append(i[7])
temppanel.append(i[6])
if concenVal.has_key(i[4]):
concenVal[i[4]].append(i[0].split('(')[0].strip())
else:
concenVal[i[4]]=[i[0].split('(')[0].strip()]
if '<' in i[0] or '>' in i[0]:
tempUnit=''.join(i[0].split('(')[1:-1]).strip()
else:
tempUnit=i[0].split('(')[-1].strip()
ukb=i[3]
temppepseq=i[2]
tempQuery='|'.join(list(set(tempsex)))+'@'+'|'.join(list(set(tempstrain)))+'@'+b+'@'+'|'.join(list(set(tempknockout)))+'@'+temppepseq+'@'+ukb
tempQuery=tempQuery.replace('/','!')
tempconcenVal='NA'
tempUnit=tempUnit.replace('fmol target protein/u','fmol target protein/µ')
tempUnit=tempUnit.replace('fmol target protein/g','fmol target protein/µg')
countSampleLLOQ=len([mc for mc in concenVal[b] if '<' in mc or '>' in mc])
if len(concenVal[b]) ==countSampleLLOQ:
if len(list(set(concenVal[b])))==1:
if '<' in list(set(concenVal[b]))[0]:
tempconcenVal=list(set(concenVal[b]))[0]+"(Sample LLOQ-"+str(b)+")"
else:
tempconcenVal=list(set(concenVal[b]))[0]+"(ULOQ-"+str(b)+")"
else:
tempconcenVal='<br>'.join([ul+"(Sample LLOQ-"+str(b)+")" if '<' in ul else ul+"(ULOQ-"+str(b)+")" for ul in concenVal[b]])
else:
tempVal=[float(j) for j in concenVal[b] if '<' not in str(j) and '>' not in str(j)]
if len(tempVal)>0:
tempconcenVal=str(mean(tempVal))
templist=[tempconcenVal,'<br>'.join(list(set(tempsex))),temppepseq,ukb,b,'<br>'.join(list(set(tempstrain))),'<br>'.join(list(set(tempknockout))),tempQuery,tempPlotSampleLLOQ[b],tempPlotULOQ[b]]
biologicalmatrixdetails.append(templist)
for s in typeOfsex:
templist=[]
tempbiomat=[]
tempstrain=[]
tempknockout=[]
temppanel=[]
concenVal={}
ukb=''
temppepseq=''
tempUnit=''
for i in tempdetailslist:
if s == i[1]:
tempbiomat.append(i[4])
tempstrain.append(i[5])
tempknockout.append(i[7])
temppanel.append(i[6])
if concenVal.has_key(i[4]):
concenVal[i[4]].append(i[0].split('(')[0].strip())
else:
concenVal[i[4]]=[i[0].split('(')[0].strip()]
if '<' in i[0] or '>' in i[0]:
tempUnit=''.join(i[0].split('(')[1:-1]).strip()
else:
tempUnit=i[0].split('(')[-1].strip()
ukb=i[3]
temppepseq=i[2]
tempQuery=s+'@'+'|'.join(list(set(tempstrain)))+'@'+'|'.join(list(set(tempbiomat)))+'@'+'|'.join(list(set(tempknockout)))+'@'+temppepseq+'@'+ukb
tempQuery=tempQuery.replace('/','!')
for tbm in list(set(tempbiomat)):
tempconcenVal='NA'
tempUnit=tempUnit.replace('fmol target protein/u','fmol target protein/µ')
tempUnit=tempUnit.replace('fmol target protein/g','fmol target protein/µg')
countSampleLLOQ=len([mc for mc in concenVal[tbm] if '<' in mc or '>' in mc])
if len(concenVal[tbm]) ==countSampleLLOQ:
if len(list(set(concenVal[tbm])))==1:
if '<' in list(set(concenVal[tbm]))[0]:
tempconcenVal=list(set(concenVal[tbm]))[0]+"(Sample LLOQ-"+str(tbm)+")"
else:
tempconcenVal=list(set(concenVal[tbm]))[0]+"(ULOQ-"+str(tbm)+")"
else:
tempconcenVal='<br>'.join([ul+"(Sample LLOQ-"+str(tbm)+")" if '<' in ul else ul+"(ULOQ-"+str(tbm)+")" for ul in concenVal[tbm]])
else:
tempVal=[float(j) for j in concenVal[tbm] if '<' not in str(j) and '>' not in str(j)]
if len(tempVal)>0:
tempconcenVal=str(mean(tempVal))
templist=[tempconcenVal,s,temppepseq,ukb,tbm,'<br>'.join(list(set(tempstrain))),'<br>'.join(list(set(tempknockout))),tempQuery,tempPlotSampleLLOQ[tbm],tempPlotULOQ[tbm]]
sexdetails.append(templist)
for st in typeOfstrain:
templist=[]
tempbiomat=[]
tempsex=[]
tempknockout=[]
temppanel=[]
concenVal={}
ukb=''
temppepseq=''
tempUnit=''
for i in tempdetailslist:
if st == i[5]:
tempbiomat.append(i[4])
tempsex.append(i[1])
tempknockout.append(i[7])
temppanel.append(i[6])
if concenVal.has_key(i[4]):
concenVal[i[4]].append(i[0].split('(')[0].strip())
else:
concenVal[i[4]]=[i[0].split('(')[0].strip()]
if '<' in i[0] or '>' in i[0]:
tempUnit=''.join(i[0].split('(')[1:-1]).strip()
else:
tempUnit=i[0].split('(')[-1].strip()
ukb=i[3]
temppepseq=i[2]
tempQuery='|'.join(list(set(tempsex)))+'@'+st+'@'+'|'.join(list(set(tempbiomat)))+'@'+'|'.join(list(set(tempknockout)))+'@'+temppepseq+'@'+ukb
tempQuery=tempQuery.replace('/','!')
for tbm in list(set(tempbiomat)):
tempconcenVal='NA'
tempUnit=tempUnit.replace('fmol target protein/u','fmol target protein/µ')
tempUnit=tempUnit.replace('fmol target protein/g','fmol target protein/µg')
countSampleLLOQ=len([mc for mc in concenVal[tbm] if '<' in mc or '>' in mc])
if len(concenVal[tbm]) ==countSampleLLOQ:
if len(list(set(concenVal[tbm])))==1:
if '<' in list(set(concenVal[tbm]))[0]:
tempconcenVal=list(set(concenVal[tbm]))[0]+"(Sample LLOQ-"+str(tbm)+")"
else:
tempconcenVal=list(set(concenVal[tbm]))[0]+"(ULOQ-"+str(tbm)+")"
else:
tempconcenVal='<br>'.join([ul+"(Sample LLOQ-"+str(tbm)+")" if '<' in ul else ul+"(ULOQ-"+str(tbm)+")" for ul in concenVal[tbm]])
else:
tempVal=[float(j) for j in concenVal[tbm] if '<' not in str(j) and '>' not in str(j)]
if len(tempVal)>0:
tempconcenVal=str(mean(tempVal))
templist=[tempconcenVal,'<br>'.join(list(set(tempsex))),temppepseq,ukb,tbm,st,'<br>'.join(list(set(tempknockout))),tempQuery,tempPlotSampleLLOQ[tbm],tempPlotULOQ[tbm]]
straindetails.append(templist)
for k in typeOfknocout:
templist=[]
tempbiomat=[]
tempsex=[]
tempstrain=[]
temppanel=[]
concenVal={}
ukb=''
temppepseq=''
tempUnit=''
for i in tempdetailslist:
if k == i[7]:
tempbiomat.append(i[4])
tempsex.append(i[1])
tempstrain.append(i[5])
temppanel.append(i[6])
if concenVal.has_key(i[4]):
concenVal[i[4]].append(i[0].split('(')[0].strip())
else:
concenVal[i[4]]=[i[0].split('(')[0].strip()]
if '<' in i[0] or '>' in i[0]:
tempUnit=''.join(i[0].split('(')[1:-1]).strip()
else:
tempUnit=i[0].split('(')[-1].strip()
ukb=i[3]
temppepseq=i[2]
tempQuery='|'.join(list(set(tempsex)))+'@'+'|'.join(list(set(tempstrain)))+'@'+'|'.join(list(set(tempbiomat)))+'@'+k+'@'+temppepseq+'@'+ukb
tempQuery=tempQuery.replace('/','!')
for tbm in list(set(tempbiomat)):
tempconcenVal='NA'
tempUnit=tempUnit.replace('fmol target protein/u','fmol target protein/µ')
tempUnit=tempUnit.replace('fmol target protein/g','fmol target protein/µg')
countSampleLLOQ=len([mc for mc in concenVal[tbm] if '<' in mc or '>' in mc])
if len(concenVal[tbm]) ==countSampleLLOQ:
if len(list(set(concenVal[tbm])))==1:
if '<' in list(set(concenVal[tbm]))[0]:
tempconcenVal=list(set(concenVal[tbm]))[0]+"(Sample LLOQ-"+str(tbm)+")"
else:
tempconcenVal=list(set(concenVal[tbm]))[0]+"(ULOQ-"+str(tbm)+")"
else:
tempconcenVal='<br>'.join([ul+"(Sample LLOQ-"+str(tbm)+")" if '<' in ul else ul+"(ULOQ-"+str(tbm)+")" for ul in concenVal[tbm]])
else:
tempVal=[float(j) for j in concenVal[tbm] if '<' not in str(j) and '>' not in str(j)]
if len(tempVal)>0:
tempconcenVal=str(mean(tempVal))
templist=[tempconcenVal,'<br>'.join(list(set(tempsex))),temppepseq,ukb,tbm,'<br>'.join(list(set(tempstrain))),k,tempQuery,tempPlotSampleLLOQ[tbm],tempPlotULOQ[tbm]]
knockoutdetails.append(templist)
tempconcendata.append(jd['Summary Concentration Range Data'])
except KeyError:
tempconcendata.append('NA')
subpepinfodic.pop('Peptide ID', None)
try:
tempmean=[]
tempMin=[]
tempMax=[]
if len(concenView)>0:
for c in concenView:
if "<" not in concenView[c]:
tmean=c+':'+str(round(mean(concenView[c]),2))+unitDic[c]
tmean=tmean.encode('ascii','ignore')
tempmean.append(tmean)
tmin=c+':'+str(round(min(concenView[c]),2))+unitDic[c]
tmin=tmin.encode('ascii','ignore')
tempMin.append(tmin)
tmax=c+':'+str(round(max(concenView[c]),2))+unitDic[c]
tmax=tmax.encode('ascii','ignore')
tempMax.append(tmax)
else:
concenView[c]=concenView[c].replace('fmol target protein/u','fmol target protein/µ')
concenView[c]=concenView[c].replace('fmol target protein/g','fmol target protein/µg')
tempmean.append(concenView[c])
tempMin.append(concenView[c])
tempMax.append(concenView[c])
subpepinfodic["Concentration View"]='<br/>'.join(tempmean)+'|'+'<br/>'.join(tempMin)+'|'+'<br/>'.join(tempMax)
subpepinfodic["Concentration View"]=subpepinfodic["Concentration View"].replace('(fmol target protein/µg extracted protein)','')
tempconcenlist.append(subpepinfodic["Concentration View"])
except KeyError:
tempconcenlist.append('NA')
if len(tempdiffcol) >0:
tempupdatedUniDic={key: jd[key] for key in tempdiffcol}
tempassaydic['concenQuery']=concenQuery
tempassaydic['Assay Information']=tempassaydinfo
tempgradients=list(set(tempgradients))
tempassaydic['Gradients']=tempgradients
temptransition=list(set(temptransition))
tempassaydic['Transitions']=temptransition
tempassaydic['Transitions']=temptransition
tempconcendata=list(set(tempconcendata))
tempassaydic['Summary Concentration Range Data']=tempconcendata
tempconcenlist=list(set(tempconcenlist))
if len(tempconcenlist)>1:
tempconcenlist.remove('NA')
try:
tempassaydic['Concentration View']=tempconcenlist[0]
tempassaydic['Concentration View']=tempassaydic['Concentration View'].replace('(fmol target protein/µg extracted protein)','')
tempassaydic['Concentration View']=tempassaydic['Concentration View'].replace('(fmol target protein/ug extracted protein)','')
except IndexError:
tempassaydic['Concentration View']='NA'
peptidebasedinfo.append(tempassaydic)
biologicalmatrix=[x for i in biologicalmatrix for x in i.split('<br/>')]
biologicalmatrix=list(set(biologicalmatrix))
if len(biologicalmatrix) >0:
if 'NA' in biologicalmatrix:
biologicalmatrix.remove('NA')
biologicalmatrix='<br/>'.join(biologicalmatrix)
try:
tempupdatedUniDic["Biological Matrix"]=biologicalmatrix
except IndexError:
tempupdatedUniDic["Biological Matrix"]='NA'
pepSeqPresence=list(set(pepSeqPresence))
if len(pepSeqPresence) >1:
if 'No' in pepSeqPresence:
pepSeqPresence.remove('No')
tempmatchingpepseq=list(set(tempepepseqlist))
tempupdatedUniDic['Concentration Range']=tempupdatedUniDic['Concentration Range'].replace('(fmol target protein/µg extracted protein)','')
tempupdatedUniDic['Concentration Range']=tempupdatedUniDic['Concentration Range'].replace('Mean Conc.:','')
if ':' in tempupdatedUniDic['Concentration Range']:
tempConcRange=tempupdatedUniDic['Concentration Range'].split('<br/>')
tempConcRange=[str(fI).strip() for fI in tempConcRange if len(str(fI).strip())>0]
tempConcRangeDic={}
for cR in tempConcRange:
crInfo=cR.split(':')
tempConcRangeDic[crInfo[0]]=crInfo[1]
newtempConcRange=[]
for fK in tempConcRangeDic:
newtempConcRange.append(fK+':'+tempConcRangeDic[fK])
tempupdatedUniDic['Concentration Range']='<br/>'.join(newtempConcRange)
tempupdatedUniDic['Peptide Sequence']='<br>'.join(map(str,tempmatchingpepseq))
tempupdatedUniDic['Peptide Based Info']=peptidebasedinfo
tempupdatedUniDic['Gene Expression Data']=geneExpData
tempupdatedUniDic['All Concentration Range Data']=concendataAll
tempupdatedUniDic['All Concentration Range Data-Sample LLOQ Based']=concendataALLSampleLLOQ
tempupdatedUniDic['Assay Info']=','.join(map(str, peptidebasedinfo))
tempupdatedUniDic['Assay Info']=tempupdatedUniDic['Assay Info'].replace('Peptide ID','Assay ID')
biologicalmatrixdetails=[list(tupl) for tupl in {tuple(item) for item in biologicalmatrixdetails}]
tempupdatedUniDic['Biological Matrix Details']=biologicalmatrixdetails
sexdetails=[list(tupl) for tupl in {tuple(item) for item in sexdetails}]
tempupdatedUniDic['Sex Details']=sexdetails
straindetails=[list(tupl) for tupl in {tuple(item) for item in straindetails}]
tempupdatedUniDic['Strain Details']=straindetails
knockoutdetails=[list(tupl) for tupl in {tuple(item) for item in knockoutdetails}]
tempupdatedUniDic['Knockout Details']=knockoutdetails
tempupdatedUniDic['Present in human ortholog']=pepSeqPresence
tempupdatedUniDic['Sex']=tempupdatedUniDic['Sex'].replace('|','<br>')
tempupdatedUniDic['Sex']=tempupdatedUniDic['Sex'].replace('<br/>','<br>')
tempupdatedUniDic['Strain']=tempupdatedUniDic['Strain'].replace('|','<br>')
tempupdatedUniDic['Strain']=tempupdatedUniDic['Strain'].replace('<br/>','<br>')
tempupdatedUniDic['Biological Matrix']=tempupdatedUniDic['Biological Matrix'].replace('|','<br>')
tempupdatedUniDic['Biological Matrix']=tempupdatedUniDic['Biological Matrix'].replace('<br/>','<br>')
if '<br>' in tempupdatedUniDic['Sex']:
sexData.append(tempupdatedUniDic['Sex'].split('<br>'))
else:
sexData.append(tempupdatedUniDic['Sex'])
if '<br>' in tempupdatedUniDic['Strain']:
strainData.append(tempupdatedUniDic['Strain'].split('<br>'))
else:
strainData.append(tempupdatedUniDic['Strain'])
if '<br>' in tempupdatedUniDic['Biological Matrix']:
biomatrixData.append(tempupdatedUniDic['Biological Matrix'].split('<br>'))
else:
biomatrixData.append(tempupdatedUniDic['Biological Matrix'])
updatedUniInfo.append(tempupdatedUniDic)
if len(querybiomatrix) >0:
if querybiomatrix in str(tempupdatedUniDic["Biological Matrix"]).lower():
biomatrixContainUniId.append(tempupdatedUniDic["UniProtKB Accession"])
foldChangeQueryData={
'Biological Matrix':sorted(list(set(flatten(biomatrixData)))),
'Sex':sorted(list(set(flatten(sexData)))),
'Strain':sorted(list(set(flatten(strainData))))
}
if len(sorted(list(set(flatten(biomatrixData)))))>1:
foldchangeData['Biological Matrix']=sorted(list(set(flatten(biomatrixData))))
if len(sorted(list(set(flatten(sexData)))))>1:
foldchangeData['Sex']=sorted(list(set(flatten(sexData))))
if len(sorted(list(set(flatten(strainData)))))>1:
foldchangeData['Strain']=sorted(list(set(flatten(strainData))))
foldchangeData['foldChangeQueryData']=foldChangeQueryData
finalupdatedUniInfo["data"]=updatedUniInfo[:10000]
return finalupdatedUniInfo,biomatrixContainUniId,foldchangeData
# function to generate peptidebased info into nested json format
def pepbasedInfoRESTAPI(updatedresult,uniprotpepinfo):
restApiColname=['Mouse UniProtKB accession','Mouse Protein name','Mouse Gene','Organism','Subcellular localization',\
'Strain','Mutant','Biological Matrix','UniProtKB accession of human ortholog','Human ortholog','Human Gene',\
'Available assays in human ortholog','Molecular pathway(s) Mouse','Molecular pathway(s) Human',\
'Involvement in disease-Human(UniProt)','Involvement in disease-Human(DisGeNET)',\
'GO Mouse','GO Human','Drug associations-Human','Gene Expression Data']
pepetidebasedinfoCol=['Assay ID','Peptide sequence','Summary Concentration Range Data',\
'All Concentration Range Data-Sample LLOQ Based','Labeled Residues','Molecular Weight',\
'GRAVY Score','Transitions','Retention Time','Percent Organic Solution',\
'Gradients','LLOQ','ULOQ','Sample LLOQ','Unique in protein','Present in isoforms']
updatedpepinfocol=['Peptide sequence',"Unique in protein",'Present in isoforms',\
'Present in human ortholog','Unique in human protein','Present in human isoforms',\
"Peptide unique in user's database", "Peptide in user's database","Panel"]
assaydinfocol=['Molecular Weight','GRAVY Score','LLOQ','ULOQ','Sample LLOQ']
updatedUniInfo=[]
for uniprotid in uniprotpepinfo:
tempupdatedUniDic={}
peptidebasedinfo=[]
tempmatchingpepseq=''
tempepepseqlist=[]
biologicalmatrix=[]
for pepseq in list(set(uniprotpepinfo[uniprotid])):
tempassaydic={}
tempconcenlist=[]
tempassaydinfo=[]
tempgradients=[]
tempAnalytInfo=[]
tempRetTimeInfo=[]
temptransition=[]
sumtempconcendata=[]
alltempconcendata=[]
alltempconcendataSampleLLOQ=[]
for jd in updatedresult:
if uniprotid in jd['Mouse UniProtKB accession'] and pepseq in jd['Peptide sequence']:
biologicalmatrix.append(jd["Biological Matrix"])
tempepepseqlist.append(jd['Peptide sequence'])
tempjfinalkeys=jd.keys()
subpepinfodic={}
for i in pepetidebasedinfoCol:
try:
subpepinfodic[i]=jd[i]
except KeyError:
subpepinfodic[i]='NA'
for j in updatedpepinfocol:
try:
tempassaydic[j]=jd[j]
except KeyError:
tempassaydic[j]='NA'
try:
tempassaydinfo.append({a:jd[a] for a in assaydinfocol})
except KeyError:
pass
try:
tempgradients.append(jd['Gradients'])
except KeyError:
tempgradients.append('NA')
try:
tempAnalytInfo.append(jd['Analytical inofrmation'])
except KeyError:
tempAnalytInfo.append('NA')
try:
tempRetTimeInfo.append(jd['Retention Time'])
except KeyError:
tempRetTimeInfo.append('NA')
try:
temptransition.append(jd['Transitions'])
except KeyError:
temptransition.append('NA')
try:
sumtempconcendata.append(jd['Summary Concentration Range Data'])
except KeyError:
sumtempconcendata.append('NA')
try:
alltempconcendata.append(jd['All Concentration Range Data'])
except KeyError:
alltempconcendata.append('NA')
try:
alltempconcendataSampleLLOQ.append(jd['All Concentration Range Data-Sample LLOQ Based'])
except KeyError:
alltempconcendataSampleLLOQ.append('NA')
subpepinfodic.pop('Peptide ID', None)
if len(restApiColname) >0:
tempupdatedUniDic={key: jd[key] for key in restApiColname}
tempassaydic['Assay Information']=tempassaydinfo
tempgradients=list(set(tempgradients))
tempAnalytInfo=list(set(tempAnalytInfo))
tempassaydic['Gradients']=tempgradients
tempassaydic['Analytical inofrmation']=tempAnalytInfo
tempRetTimeInfo=list(set(tempRetTimeInfo))
tempassaydic['Retention Time']=tempRetTimeInfo
temptransition=list(set(temptransition))
temptransition=[x for item in temptransition for x in item.split(';')]
tempassaydic['Transitions']=temptransition
sumtempconcendata=list(set(sumtempconcendata))
sumtempconcendata=['|'.join(x.split('|')[1:]) for item in sumtempconcendata for x in item.split(';')]
alltempconcendata=list(set(alltempconcendata))
alltempconcendata=['|'.join(x.split('|')[1:]) for item in alltempconcendata for x in item.split(';')]
alltempconcendataSampleLLOQ=list(set(alltempconcendataSampleLLOQ))
alltempconcendataSampleLLOQ=['|'.join(x.split('|')[1:]) for item in alltempconcendataSampleLLOQ for x in item.split(';')]
tempassaydic['Summary Concentration Range Data']=sumtempconcendata
#tempassaydic['All Concentration Range Data']=alltempconcendata
tempassaydic['All Concentration Range Data-Sample LLOQ Based']=alltempconcendataSampleLLOQ
tempconcenlist=list(set(tempconcenlist))
peptidebasedinfo.append(tempassaydic)
biologicalmatrix=[x for i in biologicalmatrix for x in i.split('<br/>')]
biologicalmatrix=list(set(biologicalmatrix))
if len(biologicalmatrix) >0:
if 'NA' in biologicalmatrix:
biologicalmatrix.remove('NA')
try:
tempupdatedUniDic["Biological Matrix"]=biologicalmatrix[0]
except IndexError:
tempupdatedUniDic["Biological Matrix"]='NA'
tempupdatedUniDic['Peptide Assay']=peptidebasedinfo
updatedUniInfo.append(tempupdatedUniDic)
return updatedUniInfo<file_sep>/backend/updatefile/addModCol.py
import urllib,urllib2
from bioservices.kegg import KEGG
import os,subprocess,psutil,re,shutil,datetime,sys,glob
from operator import itemgetter
import numpy as np
import random, time
from itertools import count, groupby
import pandas as pd
import csv
import json
import ctypes
def addModCol():
print ("Adding or updating data, job starts",str(datetime.datetime.now()))
mousepeptrackfilename='mouse_report_peptrack_data.csv'
#increase the field size of CSV
csv.field_size_limit(int(ctypes.c_ulong(-1).value // 2))
mousePeptrackData=[]
with open(mousepeptrackfilename) as csvfile:
reader = csv.DictReader(csvfile, delimiter='\t')
for row in reader:
mousePeptrackData.append(row)
homedir = os.path.normpath(os.getcwd() + os.sep + os.pardir)
filename='ReportBook_mother_file.csv'
filepath = os.path.join(homedir, 'src/qmpkbmotherfile', filename)
columns=['UniProtKB Accession','Protein','Gene','Organism','Organism ID','SubCellular','Peptide Sequence',\
'Summary Concentration Range Data','All Concentration Range Data','All Concentration Range Data-Sample LLOQ Based',\
'Peptide ID','Special Residues','Molecular Weight','GRAVY Score','Transitions','Retention Time',\
'Analytical inofrmation','Gradients','AAA Concentration','CZE Purity','Panel','Knockout','LLOQ','ULOQ','Sample LLOQ',\
'Protocol','Trypsin','QC. Conc. Data','Unique in protein','Present in isoforms',\
'Mouse Kegg Pathway Name','Mouse Kegg Pathway','Human Disease Name','Human UniProt DiseaseData','Human UniProt DiseaseData URL',\
'Human DisGen DiseaseData','Human DisGen DiseaseData URL','Mouse Go ID','Mouse Go Name','Mouse Go Term','Mouse Go','Human Drug Bank',\
'Human UniProtKB Accession','Human ProteinName','Human Gene','Human Kegg Pathway Name','Human Kegg Pathway',\
'Human Go ID','Human Go Name','Human Go Term','Human Go','UniprotKb entry status','Concentration View','Strain','Sex',\
'Biological Matrix','Concentration Range']
finalSexData=[]
finalStrainData=[]
finalknockoutData=[]
finalBioMatData=[]
finalPanelData=[]
finalResultData=[]
finalResultData.append(columns)
modrepfile="modreprot.csv"
with open(filepath,'r') as f:
repreader = csv.DictReader(f,delimiter="\t")
for row in repreader:
if len(row['UniProtKB Accession'].strip())>0:
if len(row['Summary Concentration Range Data'].strip())>0 and (str(row['Summary Concentration Range Data']).strip()).lower() !='na':
coninfo=(row['Summary Concentration Range Data'].strip()).split(';')
if len(coninfo)>0:
subconinfo=coninfo[0].split('|')
condata="Mean Conc.:"+str(subconinfo[6])+"<br/>Matix:"+str(subconinfo[2])
tempSampleLLOQInfo=str(row['Sample LLOQ'].strip()).split(';')
if str(subconinfo[6]) =='NA':
for samLLOQ in tempSampleLLOQInfo:
if str(subconinfo[2]) in samLLOQ.split('|'):
condata="<"+str(samLLOQ.split('|')[1].strip())+"(Sample LLOQ-"+str(subconinfo[2])+")"
row['Concentration View']=condata
strainlist=[]
sexlist=[]
matrixlist=[]
meanConclist=[]
unitlist=[]
for i in coninfo:
l=i.split('|')
finalSexData.append(l[4])
finalStrainData.append(l[3])
finalBioMatData.append(l[2])
strainlist.append(l[3])
sexlist.append(l[4])
matrixlist.append(l[2])
meanConcData=l[6]
unitlist.append(l[6].split(' (')[-1])
if meanConcData.upper() !='NA':
meanConclist.append(l[2]+':'+str(meanConcData))
else:
for samXLLOQ in tempSampleLLOQInfo:
if str(l[2]) in samXLLOQ.split('|'):
meanConclist.append("<"+str(samXLLOQ.split('|')[1].strip())+"(Sample LLOQ-"+str(l[2])+")")
if len(strainlist)>0:
strainlist =list(set(strainlist))
if len(strainlist)>1:
strainlist=[x for x in strainlist if 'na' != x.lower()]
sexlist =list(set(sexlist))
if len(sexlist)>1:
sexlist=[x for x in sexlist if 'na' != x.lower()]
matrixlist =list(set(matrixlist))
if len(matrixlist)>1:
matrixlist=[x for x in matrixlist if 'na' != x.lower()]
row['Strain']='|'.join(list(set(strainlist)))
row['Sex']='|'.join(list(set(sexlist)))
row['Biological Matrix']='|'.join(list(set(matrixlist)))
countSampleLLOQ=len([mc for mc in meanConclist if 'Sample LLOQ' in mc])
if len(meanConclist) ==countSampleLLOQ:
meanConclist=list(set(meanConclist))
row['Concentration Range']='<br/>'.join(meanConclist[:2])
else:
meanConclist=[m for m in meanConclist if 'Sample LLOQ' not in m]
meanConclist=list(set(meanConclist))
row['Concentration Range']= 'Mean Conc.:'+'<br/>'+'<br/>'.join(meanConclist[:2])
#row['Concentration Range']="Max. Mean Conc.:"+str(max(meanConclist))+' ('+str(unitlist[meanConclist.index(max(meanConclist))])+"<br/>Min. Mean Conc.:"+str(min(meanConclist))+' ('+str(unitlist[meanConclist.index(min(meanConclist))])
else:
row['Strain']='NA'
row['Sex']='NA'
row['Biological Matrix']='NA'
row['Concentration Range']='NA'
if len(row['Panel'].strip())>0 and (str(row['Panel']).strip()).lower() !='na':
panelinfo=(row['Panel'].strip()).split(';')
for i in panelinfo:
finalPanelData.append(i)
if len(row['Knockout'].strip())>0 and (str(row['Knockout']).strip()).lower() !='na':
knockoutinfo=(row['Knockout'].strip()).split(';')
for i in knockoutinfo:
finalknockoutData.append(i)
templist=[]
for c in columns:
templist.append(row[c])
finalResultData.append(templist)
#finalknockoutData.append('Mutant type')
finalSexData=list(set(finalSexData))
if len(finalSexData)>1:
finalSexData=[x for x in finalSexData if 'na' != x.lower()]
finalknockoutData=list(set(finalknockoutData))
if len(finalknockoutData)>1:
finalknockoutData=[x for x in finalknockoutData if 'na' != x.lower()]
finalStrainData=list(set(finalStrainData))
if len(finalStrainData)>1:
finalStrainData=[x for x in finalStrainData if 'na' != x.lower()]
finalBioMatData=list(set(finalBioMatData))
if len(finalBioMatData)>1:
finalBioMatData=[x for x in finalBioMatData if 'na' != x.lower()]
finalPanelData=list(set(finalPanelData))
if len(finalPanelData)>1:
finalPanelData=[x for x in finalPanelData if 'na' != x.lower()]
finalresultlist=[]
finalSexData.sort()
finalStrainData.sort()
finalBioMatData.sort()
finalknockoutData.sort()
finalPanelData=sorted(finalPanelData, key=lambda p: int(p.split('-')[1]))
for s in finalSexData:
finalresultdic={}
finalresultdic["id"]=s
finalresultdic["selectid"]="sex"
finalresultdic["name"]=s
finalresultlist.append(finalresultdic)
for k in finalknockoutData:
finalresultdic={}
finalresultdic["id"]=k
finalresultdic["selectid"]="mutant"
finalresultdic["name"]=k
finalresultlist.append(finalresultdic)
for st in finalStrainData:
finalresultdic={}
finalresultdic["id"]=st
finalresultdic["selectid"]="strain"
finalresultdic["name"]=st
finalresultlist.append(finalresultdic)
for bm in finalBioMatData:
finalresultdic={}
finalresultdic["id"]=bm
finalresultdic["selectid"]="biologicalMatrix"
finalresultdic["name"]=bm
finalresultlist.append(finalresultdic)
for p in finalPanelData:
finalresultdic={}
finalresultdic["id"]=p
finalresultdic["selectid"]="panel"
finalresultdic["name"]=p
finalresultlist.append(finalresultdic)
finalresultJson={"data":finalresultlist}
adsearchopfilename='advanceSearchOptions.json'
adsearchopmovefilepath=os.path.join(homedir, 'updatefile', adsearchopfilename)
adsearchopfilepath = os.path.join(homedir, 'src/resultFile/jsonData/preLoadData', adsearchopfilename)
adsearchopfileoutput=open(adsearchopfilename,'w')
adsearchopfileoutput.write(json.dumps(finalresultJson))
adsearchopfileoutput.close()
with open(modrepfile,'wb') as mf:
mwriter =csv.writer(mf,delimiter='\t')
mwriter.writerows(finalResultData)
movefilepath=os.path.join(homedir, 'updatefile', filename)
os.rename(modrepfile,filename)
shutil.move(movefilepath,filepath)
shutil.move(adsearchopmovefilepath,adsearchopfilepath)
print ("Adding or updating data, job done",str(datetime.datetime.now()))
<file_sep>/backend/src/qmpkbapp/summaryKeggCoverage.py
import os,sys
from operator import itemgetter
import numpy as np
from itertools import count, groupby
import pandas as pd
import ast
from operator import itemgetter
def summarykeggcal(top10keggdict,prodataseries):
keggpathwaycoverage=[]
for kskey in top10keggdict:
keggpathwayname=(kskey.strip()).split('|')[0]
tempUniqKeggUniIDList=list(set(top10keggdict[kskey]))
peptrack=[]
for ckey in prodataseries:
if "peptidetracker" in ckey.lower():
peptrack=list(set(prodataseries[ckey]).intersection(tempUniqKeggUniIDList))
temppeptrack=len(list(set(peptrack)))
tempTotal=len(list(set(tempUniqKeggUniIDList)))
templist=[keggpathwayname,tempTotal,temppeptrack]
keggpathwaycoverage.append(templist)
unqkeggpathwaycoverage=[list(tupl) for tupl in {tuple(item) for item in keggpathwaycoverage }]
keggchart=[]
if len(unqkeggpathwaycoverage)>0:
sortedkeggpathwaycoverage=sorted(unqkeggpathwaycoverage, key= itemgetter(1), reverse=True)
keggchart=[['Pathway Name', 'Total unique proteins', 'PeptideTracker']]
keggchart=keggchart+sortedkeggpathwaycoverage
return keggchart<file_sep>/backend/src/qmpkbapp/views.py
#!/usr/bin/env.python
# -*- coding: utf-8 -*-
# encoding: utf-8
from __future__ import unicode_literals
from django.utils.encoding import force_text
from django.shortcuts import render
from django.contrib.auth.models import User
from rest_framework import generics
from rest_framework.permissions import IsAdminUser
from qmpkbapp.models import IpAddressInformation
from django.http import HttpResponse,HttpResponseRedirect,JsonResponse
from django.shortcuts import get_object_or_404
from rest_framework.views import APIView
from rest_framework.decorators import api_view
from rest_framework.response import Response
from rest_framework import status
from rest_framework import viewsets
from rest_framework.schemas import SchemaGenerator
from rest_framework.permissions import AllowAny
import coreapi,coreschema
from rest_framework.schemas import ManualSchema
from rest_framework_swagger import renderers
import sys,re,os,glob,shutil,subprocess,socket
import urllib,urllib3
import fileinput
from ipware.ip import get_ip
from time import gmtime, strftime,sleep
import csv
import hashlib, random
import datetime
from django.conf import settings
from django.core.mail import send_mail
from django.contrib import messages
from django.core.mail import EmailMultiAlternatives
from django.template import RequestContext
import json,demjson
import uuid
import json as simplejson
import calendar
from django.contrib import auth
from bioservices.kegg import KEGG
from xml.etree import cElementTree as ET
import xmltodict
from xml.dom import minidom
from xml.parsers.expat import ExpatError
from Bio.PDB.Polypeptide import *
from Bio import SeqIO
from requests.exceptions import ConnectionError
import requests
from django.utils.datastructures import MultiValueDictKeyError
from Bio.SeqUtils import seq1
from goatools import obo_parser
from elasticsearch import Elasticsearch,helpers,RequestsHttpConnection
import pandas as pd
from .colName import *
from summaryStat import summaryStatcal
from .calculationprog import *
from .totalpepassay import *
from .modifiedJsondata import *
from .filterSearch import *
from .downLoadData import *
import random
import names
from operator import itemgetter
import ast
from collections import OrderedDict
from itertools import combinations
import pandas as pd
import numpy as np
import operator
from .appTissueInfo import *
#delete after publication
from django.contrib.auth.decorators import login_required
from django.contrib.auth.views import login,logout
import math
from .adjustP import p_adjust_bh
from scipy.stats import mannwhitneyu
# Import Biopython modules to interact with KEGG
from Bio.KEGG import REST
from Bio.KEGG.KGML import KGML_parser
# from rpy2.robjects.packages import importr
# from rpy2.robjects.vectors import FloatVector
# statsR= importr('stats')
searchFields=["UniProtKB Accession.ngram","Protein.ngram","Gene.ngram","Organism.ngram",\
"Organism ID.ngram","SubCellular.ngram","Peptide Sequence.ngram",\
"Mouse Kegg Pathway Name.ngram","Human Disease Name.ngram","Mouse Go ID.ngram",\
"Mouse Go Name.ngram","Mouse Go Term.ngram","Human Drug Bank.ngram","Strain.ngram","Knockout.ngram","Panel.ngram","Sex.ngram","Biological Matrix.ngram"]
es = Elasticsearch(
['http://xxxxx:9200/'],
connection_class=RequestsHttpConnection
)
# Create your views here.
def basicSearch(request):
ip = get_ip(request, right_most_proxy=True)
IpAddressInformation.objects.create(ip_address=ip)
if request.method=='GET':
searchterm=request.GET.get("searchterm")# user input for searching result
searchterm= str(searchterm).strip()
querybiomatrix=''
if '_' in searchterm:
tempsearchterm=searchterm.split('_')
querybiomatrix=tempsearchterm[0]
searchterm=str(tempsearchterm[1]).strip()
response_data = {'filename_proteincentric': None,'downloadResultFilePath': None}
countUnqprot=[]
if searchterm.lower() !='none':
#build elasticsearch query to search data
query={
"query":{
"bool":{
"should":[{
"multi_match":{
"query":searchterm,
"type":"best_fields",
"fields":searchFields,
"minimum_should_match":"100%"
}
}]
}
}
}
#generate random file name to store search result in json format
currdate=str(datetime.datetime.now())
currdate=currdate.replace('-','_')
currdate=currdate.replace(' ','_')
currdate=currdate.replace(':','_')
currdate=currdate.replace('.','_')
nameFIle=str(uuid.uuid4())
jsonfilename_proteincentric=nameFIle+'_search_proteincentric.json'
jsonfilepath_proteincentric=os.path.join(settings.BASE_DIR, 'resultFile', 'jsonData','resultJson', 'search', 'results', jsonfilename_proteincentric)
jsonfilepath_proteincentric_download=os.path.join(settings.BASE_DIR, 'resultFile', 'jsonData','resultJson', 'search', 'downloadversion', jsonfilename_proteincentric)
jsonfileoutput_proteincentric= open(jsonfilepath_proteincentric,'w')
jfinaldata=[]
es.indices.refresh(index="xxxxxxxxx-index")
#elasticsearch will search data
res=helpers.scan(client=es,scroll='2m',index="xxxxxxxxx-index", doc_type="xxxxxxxx-type",query=query,request_timeout=30)
jfinaldata=[]
uniprotpepinfo={}
#if data is valid based on uniprotkb release then it will display
for i in res:
jdic=i['_source']
jdic={str(tkey):force_text(tvalue) for tkey,tvalue in jdic.items()}
panelFilter=True
if 'panel' in searchterm.lower():
if searchterm.lower() in (jdic['Panel'].lower()).split(';') and 'panel' in searchterm.lower():
panelFilter=True
else:
panelFilter=False
if jdic["UniprotKb entry status"] =="Yes" and panelFilter:
countUnqprot.append(jdic["UniProtKB Accession"].split('-')[0].upper())
if uniprotpepinfo.has_key(jdic["UniProtKB Accession"]):
uniprotpepinfo[jdic["UniProtKB Accession"]].append(jdic["Peptide Sequence"])
else:
uniprotpepinfo[jdic["UniProtKB Accession"]]=[jdic["Peptide Sequence"]]
#if jdic["Retention Time"].lower() =='na' or jdic["Gradients"].lower() =='na':
if jdic["Retention Time"].lower() =='na':
jdic["Summary Concentration Range Data"]='NA'
jdic["Concentration View"]='NA'
if jdic["Human UniProtKB Accession"].lower() !='na' and jdic["Present in human ortholog"].lower() =='no':
jdic["Available assays in human ortholog"]='http://mrmassaydb.proteincentre.com/search/hyperlink/?UniProtKB Accession='+jdic["Human UniProtKB Accession"]
else:
jdic["Available assays in human ortholog"]='NA'
if len(str(jdic["Summary Concentration Range Data"]).strip()) >0 and str(jdic["Summary Concentration Range Data"]).strip().upper() !="NA":
try:
jdic["Biological Matrix"]=jdic["Biological Matrix"].replace('|','<br/>')
except KeyError:
pass
# try:
# if '<br/>' in jdic["Concentration View"]:
# tempmatrix=jdic["Concentration View"].split()[-1]
# jdic["Concentration View"]=jdic["Concentration View"].replace('tissue',tempmatrix)
# except KeyError:
# pass
jdic["Summary Concentration Range Data"]=jdic["Summary Concentration Range Data"].replace('fmol target protein/u','fmol target protein/µ')
jdic["Summary Concentration Range Data"]=jdic["Summary Concentration Range Data"].replace('ug protein/u','µg protein/µ')
jdic["Summary Concentration Range Data"]=jdic["Summary Concentration Range Data"].replace('ug protein/mg','µg protein/mg')
jdic["All Concentration Range Data"]=jdic["All Concentration Range Data"].replace('fmol target protein/u','fmol target protein/µ')
jdic["All Concentration Range Data"]=jdic["All Concentration Range Data"].replace('ug protein/u','µg protein/µ')
jdic["All Concentration Range Data"]=jdic["All Concentration Range Data"].replace('ug protein/mg','µg protein/mg')
jdic["All Concentration Range Data-Sample LLOQ Based"]=jdic["All Concentration Range Data-Sample LLOQ Based"].replace('fmol target protein/u','fmol target protein/µ')
jdic["All Concentration Range Data-Sample LLOQ Based"]=jdic["All Concentration Range Data-Sample LLOQ Based"].replace('ug protein/u','µg protein/µ')
jdic["All Concentration Range Data-Sample LLOQ Based"]=jdic["All Concentration Range Data-Sample LLOQ Based"].replace('ug protein/mg','µg protein/mg')
jdic["Concentration View"]=jdic["Concentration View"].replace('fmol target protein/u','fmol target protein/µ')
jdic["Concentration Range"]=jdic["Concentration Range"].replace('fmol target protein/u','fmol target protein/µ')
jdic["LLOQ"]=jdic["LLOQ"].replace('fmol target protein/u','fmol target protein/µ')
jdic["ULOQ"]=jdic["ULOQ"].replace('fmol target protein/u','fmol target protein/µ')
jdic["Sample LLOQ"]=jdic["Sample LLOQ"].replace('fmol target protein/u','fmol target protein/µ')
if jdic["Unique in protein"].upper() =='NA':
jdic["Unique in protein"]=jdic["Unique in protein"].replace('NA','No')
if jdic["Present in isoforms"].upper() =='NA':
jdic["Present in isoforms"]=jdic["Present in isoforms"].replace('NA','No')
jfinaldata.append(jdic)
es.indices.refresh(index="xxxxxxxxx-index")
#checking any result generated by database
foundHits=len(jfinaldata)
#storing only 10000 rows in json format
matchingpepseqquery=[searchterm]
finalupdatedUniInfo,biomatrixContainUniId,foldchangeData=pepbasedInfo(jfinaldata,uniprotpepinfo,matchingpepseqquery,proteinInfoColname,querybiomatrix)
biomatrixContainUniId=list(set(biomatrixContainUniId))
if len(querybiomatrix) >0:
jfinaldata = [x for x in jfinaldata if x["UniProtKB Accession"] in biomatrixContainUniId]
finalupdatedUniInfo["data"]=[k for k in finalupdatedUniInfo["data"] if k["UniProtKB Accession"] in biomatrixContainUniId]
json.dump(finalupdatedUniInfo,jsonfileoutput_proteincentric)
jsonfileoutput_proteincentric.close()
# if result found then do other job
if foundHits >0:
statsummary=summaryStatcal(jfinaldata) # sent data to this funcation for generating stat
keggchart=statsummary['keggchart']
keggchart=[i[:2] for i in keggchart]
specieslist=statsummary['specieslist']
totallist=statsummary['total']
subcell=statsummary['subcell']
sortedgodic=statsummary['godic']
querybioMatData=statsummary['BioMat']
querystrainData=statsummary['Strain']
querynoOfHumanortholog=statsummary['noOfHumanortholog']
querynoOfDiseaseAssProt=statsummary['noOfDiseaseAssProt']
humandisease=statsummary['disdic']
pepseqdataseries=ast.literal_eval(json.dumps(statsummary['pepseqdataseries'])) #dumping data into json format
prodataseries=statsummary['prodataseries']
unqisostat=statsummary['unqisostat']
urlname_proteincentric="search/results/"+jsonfilename_proteincentric
foldchangeLength=len(foldchangeData)
with open(jsonfilepath_proteincentric_download,'w') as downloadJsonFile:
json.dump(jfinaldata,downloadJsonFile)
response_data={
"filename_proteincentric":urlname_proteincentric,'query': searchterm,'foundHits':foundHits,
'keggchart':keggchart[:11],'specieslist':specieslist,
'totallist':totallist,'subcell':subcell,'querybioMatData':querybioMatData,'querystrainData':querystrainData,'querynoOfHumanOrtholog':querynoOfHumanortholog,'querynoOfDiseaseAssProt':querynoOfDiseaseAssProt,
'updatedgo':sortedgodic,'pepseqdataseries':pepseqdataseries,'humandisease':humandisease,
'prodataseries':prodataseries,'unqisostat':unqisostat
}
return HttpResponse(json.dumps(response_data), content_type="application/json")
def advancedSearch(request):
"""
This is advance search function, based on given search parameters it will generate result datatable along with stat
from database.
"""
ip = get_ip(request, right_most_proxy=True)
IpAddressInformation.objects.create(ip_address=ip)
if request.method=='GET':
advancesearchFields={
'protein':'Protein',
'gene':'Gene',
'uniProtKBAccession':'UniProtKB Accession',
'pepSeq':'Peptide Sequence',
'panel':'Panel',
'strain':'Strain',
'mutant':'Knockout',
'sex':'Sex',
'biologicalMatrix': 'Biological Matrix',
'subCellLoc':'SubCellular',
'keggPathway':'Mouse Kegg Pathway Name',
'disCausMut':'Human Disease Name',
'goId':'Mouse Go ID',
'goTerm':'Mouse Go Name',
'goAspects':'Mouse Go Term',
'drugId':'Human Drug Bank',
'fastaFileName':'Own protein sequences in FASTA format'
}
multiOptions=['panel','strain','mutant','sex','biologicalMatrix']
filtersearchStatus=0
response_data={'filename_proteincentric': None,'downloadResultFilePath': None}
searchterm=[] # list of search term value associated with searchtype
searchtype =[] # list of search parameter
searchtermlist=[]
panelQuery=''
advanceFormDetails=json.loads(request.GET.get('advancedFormData'))
queryformData=advanceFormDetails["queryformData"]
optionGroups=queryformData["optionGroups"]
for opItem in optionGroups:
searchterm.append(str(opItem["whereInput"]).strip())
searchtype.append(str(opItem["selectInput"]).strip())
userInputFastaFileName=''
userInputFastaFileContext=''
if "fastaFileName" in searchtype:
userInputFastaFileName=str(searchterm[searchtype.index("fastaFileName")]).strip()
nameFIle=str(uuid.uuid4()) # generate random file name to store user search result
fastaseq=[]
finalsearhdata=''
if len(userInputFastaFileName)>0:
try:
finalsearhdata+='File'+':'+'Fasta Sequence'+' '
#storing user provided fasta file
fastafilepath=os.path.join(settings.BASE_DIR, 'resultFile', 'fastaFile', userInputFastaFileName+'.fasta')
#reading fasta file
for useq_record in SeqIO.parse(fastafilepath, 'fasta'):
seqheader = useq_record.id
sequniID = seqheader.split(' ')[0]
sequniID=sequniID.replace('>','')
tempseqs = str(useq_record.seq).strip()
fastaseq.append(str(sequniID)+'_'+tempseqs.upper())
except MultiValueDictKeyError:
pass
try:
fastafileindex=searchtype.index("fastaFileName")
#delete data based on index from list
del searchtype[fastafileindex]
del searchterm[fastafileindex]
except ValueError:
pass
matchingpepseqquery=[]
for i in range(0,len(searchtype)):
subsearchtype=searchtype[i]
subsearchterm=searchterm[i]
if subsearchtype in multiOptions:
subsearchterm=map(str,ast.literal_eval(subsearchterm))
subsearchterm='|'.join(subsearchterm)
searchterm[i]=subsearchterm
#build elasticsearch query for all except organism to search data
if '|' in subsearchterm:
if 'Peptide Sequence' == subsearchtype:
for p in (subsearchterm.strip()).split('|'):
matchingpepseqquery.append(str(p).strip())
subsearchterm=(subsearchterm.strip()).split('|')
else:
if 'Peptide Sequence' == subsearchtype:
for p in (subsearchterm.strip()).split('\n'):
matchingpepseqquery.append(str(p).strip())
subsearchterm=(subsearchterm.strip()).split('\n')
subsearchterm=map(str, subsearchterm)
subsearchterm=map(lambda j: j.strip(), subsearchterm)
subsearchterm=filter(None, subsearchterm)
if subsearchtype=='mutant':
finalsearhdata+=''.join('Mutant')+':'+';'.join(subsearchterm)+' '
elif subsearchtype=='goTerm':
finalsearhdata+=''.join('Mouse GO Term')+':'+';'.join(subsearchterm)+' '
elif subsearchtype=='goAspects':
finalsearhdata+=''.join('Mouse GO Aspects')+':'+';'.join(subsearchterm)+' '
else:
finalsearhdata+=''.join(advancesearchFields[str(subsearchtype)])+':'+';'.join(subsearchterm)+' '
if len(subsearchterm)>0:
subsearchterm=[(item.strip()).lower() for item in subsearchterm] #converting into lower case
shouldlist=[]
for x in subsearchterm:
tempquery={
"multi_match":{
"query":x.strip(),
"type":"best_fields",
"fields":[advancesearchFields[str(subsearchtype)]+".ngram"],
"minimum_should_match":"100%"
}
}
shouldlist.append(tempquery)
booldic={}
booldic["bool"]={"should":shouldlist,"minimum_should_match": 1}
searchtermlist.append(booldic)
unqfastaseq=list(set(fastaseq))
if len(searchtermlist)>0 or len(unqfastaseq)>0:
es.indices.refresh(index="xxxxxxxxx-index")
query=""
if len(searchtermlist)>0:
query={
"query": {
"bool": {
"must":searchtermlist
}
}
}
if len(searchtermlist)==0:
query={
"query": {
"match_all": {}
}
}
try:
if searchtype.index('sex') >=0:
filtersearchStatus=1
except ValueError:
pass
try:
if searchtype.index('strain') >=0:
filtersearchStatus=1
except ValueError:
pass
try:
if searchtype.index('biologicalMatrix') >=0:
filtersearchStatus=1
except ValueError:
pass
try:
if searchtype.index('panel') >=0:
panelQuery=searchterm[searchtype.index('panel')].strip()
filtersearchStatus=1
except ValueError:
pass
try:
if searchtype.index('mutant') >=0:
filtersearchStatus=1
except ValueError:
pass
#storing user search result into json format
currdate=str(datetime.datetime.now())
currdate=currdate.replace('-','_')
currdate=currdate.replace(' ','_')
currdate=currdate.replace(':','_')
currdate=currdate.replace('.','_')
jsonfilename_proteincentric=nameFIle+'_search_proteincentric.json'
jsonfilepath_proteincentric=os.path.join(settings.BASE_DIR, 'resultFile', 'jsonData','resultJson', 'search', 'results', jsonfilename_proteincentric)
jsonfilepath_proteincentric_download=os.path.join(settings.BASE_DIR, 'resultFile', 'jsonData','resultJson', 'search', 'downloadversion', jsonfilename_proteincentric)
jsonfileoutput_proteincentric= open(jsonfilepath_proteincentric,'w')
jfinaldata=[]
res=helpers.scan(client=es,scroll='2m',index="xxxxxxxxx-index", doc_type="xxxxxxxx-type",query=query,request_timeout=30)
jfinaldata=[]
uniprotpepinfo={}
usersequnq=[]
for i in res:
jdic=i['_source']
jdic={str(tkey):force_text(tvalue) for tkey,tvalue in jdic.items()}
panelFilter=True
if len(panelQuery) >0:
for q in panelQuery.lower().split('|'):
if q in (jdic['Panel'].lower()).split(';'):
panelFilter=True
break
else:
panelFilter=False
#if jdic["Retention Time"].lower() =='na' or jdic["Gradients"].lower() =='na':
if panelFilter:
if jdic["Retention Time"].lower() =='na':
jdic["Summary Concentration Range Data"]='NA'
jdic["Concentration View"]='NA'
if jdic["Human UniProtKB Accession"].lower() !='na' and jdic["Present in human ortholog"].lower() =='no':
jdic["Available assays in human ortholog"]='http://mrmassaydb.proteincentre.com/search/hyperlink/?UniProtKB Accession='+jdic["Human UniProtKB Accession"]
else:
jdic["Available assays in human ortholog"]='NA'
jdic["PPI"] ="View"
if len(str(jdic["Summary Concentration Range Data"]).strip()) >0 and str(jdic["Summary Concentration Range Data"]).strip().upper() !="NA":
try:
jdic["Biological Matrix"]=jdic["Biological Matrix"].replace('|','<br/>')
except KeyError:
pass
# try:
# if '<br/>' in jdic["Concentration View"]:
# tempmatrix=jdic["Concentration View"].split()[-1]
# jdic["Concentration View"]=jdic["Concentration View"].replace('tissue',tempmatrix)
# except KeyError:
# pass
if filtersearchStatus==0:
jdic["Summary Concentration Range Data"]=jdic["Summary Concentration Range Data"].replace('fmol target protein/u','fmol target protein/µ')
jdic["Summary Concentration Range Data"]=jdic["Summary Concentration Range Data"].replace('ug protein/u','µg protein/µ')
jdic["Summary Concentration Range Data"]=jdic["Summary Concentration Range Data"].replace('ug protein/mg','µg protein/mg')
jdic["All Concentration Range Data"]=jdic["All Concentration Range Data"].replace('fmol target protein/u','fmol target protein/µ')
jdic["All Concentration Range Data"]=jdic["All Concentration Range Data"].replace('ug protein/u','µg protein/µ')
jdic["All Concentration Range Data"]=jdic["All Concentration Range Data"].replace('ug protein/mg','µg protein/mg')
jdic["All Concentration Range Data-Sample LLOQ Based"]=jdic["All Concentration Range Data-Sample LLOQ Based"].replace('fmol target protein/u','fmol target protein/µ')
jdic["All Concentration Range Data-Sample LLOQ Based"]=jdic["All Concentration Range Data-Sample LLOQ Based"].replace('ug protein/u','µg protein/µ')
jdic["All Concentration Range Data-Sample LLOQ Based"]=jdic["All Concentration Range Data-Sample LLOQ Based"].replace('ug protein/mg','µg protein/mg')
jdic["Concentration View"]=jdic["Concentration View"].replace('fmol target protein/u','fmol target protein/µ')
jdic["Concentration Range"]=jdic["Concentration Range"].replace('fmol target protein/u','fmol target protein/µ')
jdic["LLOQ"]=jdic["LLOQ"].replace('fmol target protein/u','fmol target protein/µ')
jdic["ULOQ"]=jdic["ULOQ"].replace('fmol target protein/u','fmol target protein/µ')
jdic["Sample LLOQ"]=jdic["Sample LLOQ"].replace('fmol target protein/u','fmol target protein/µ')
if jdic["Unique in protein"].upper() =='NA':
jdic["Unique in protein"]=jdic["Unique in protein"].replace('NA','No')
if jdic["Present in isoforms"].upper() =='NA':
jdic["Present in isoforms"]=jdic["Present in isoforms"].replace('NA','No')
seqhit=0
# checking any peptide present in user provided fasta sequence
# classified into 3 catagories
if len(unqfastaseq)>0:
pepseq=str(jdic['Peptide Sequence']).strip()
indices = [i for i, s in enumerate(fastaseq) if pepseq.upper() in s]
seqhit=len(indices)
tempuserseqheadermatch='NA'
tempmatchlist=[]
if len(indices)>0:
for i in indices:
tempmatchlist.append('_'.join(fastaseq[i].split('_')[:-1]))
if len(tempmatchlist)>0:
tempuserseqheadermatch='<br/>'.join(tempmatchlist)
jdic["Peptide in user's database"] =str(tempuserseqheadermatch)
if len(indices)==0:
jdic["Peptide unique in user's database"] ="Not present"
elif len(indices) > 1:
jdic["Peptide unique in user's database"] ="Present but not unique"
else:
jdic["Peptide unique in user's database"] ="Present and unique"
usersequnq.append("Present and unique")
if len(searchtermlist)==0:
if seqhit >0:
if uniprotpepinfo.has_key(jdic["UniProtKB Accession"]):
uniprotpepinfo[jdic["UniProtKB Accession"]].append(jdic["Peptide Sequence"])
else:
uniprotpepinfo[jdic["UniProtKB Accession"]]=[jdic["Peptide Sequence"]]
jfinaldata.append(jdic)
else:
if jdic["UniprotKb entry status"] =="Yes":
if uniprotpepinfo.has_key(jdic["UniProtKB Accession"]):
uniprotpepinfo[jdic["UniProtKB Accession"]].append(jdic["Peptide Sequence"])
else:
uniprotpepinfo[jdic["UniProtKB Accession"]]=[jdic["Peptide Sequence"]]
jfinaldata.append(jdic)
es.indices.refresh(index="xxxxxxxxx-index")
#jfinaldata=jfinaldata[0]
#storing only 10000 rows in json format
if filtersearchStatus >0:
jfinaldata,filteredUniProtIDs=filterSearch(jfinaldata,searchterm,searchtype)
#checking any result generated by database
foundHits=len(jfinaldata)
# if result found then do other job
if foundHits >0:
querybiomatrix=''
try:
if len(filteredUniProtIDs) >0:
for delKey in filteredUniProtIDs:
del uniprotpepinfo[delKey]
except UnboundLocalError:
pass
finalupdatedUniInfo,biomatrixContainUniId,foldchangeData=pepbasedInfo(jfinaldata,uniprotpepinfo,matchingpepseqquery,proteinInfoColname,querybiomatrix)
json.dump(finalupdatedUniInfo,jsonfileoutput_proteincentric)
jsonfileoutput_proteincentric.close()
statsummary=summaryStatcal(jfinaldata) # sent data to this funcation for generating stat
keggchart=statsummary['keggchart']
keggchart=[i[:2] for i in keggchart]
specieslist=statsummary['specieslist']
totallist=statsummary['total']
subcell=statsummary['subcell']
sortedgodic=statsummary['godic']
querybioMatData=statsummary['BioMat']
querystrainData=statsummary['Strain']
querynoOfHumanortholog=statsummary['noOfHumanortholog']
querynoOfDiseaseAssProt=statsummary['noOfDiseaseAssProt']
humandisease=statsummary['disdic']
pepseqdataseries=ast.literal_eval(json.dumps(statsummary['pepseqdataseries'])) #dumping data into json format
prodataseries=statsummary['prodataseries']
unqisostat=statsummary['unqisostat']
urlname_proteincentric="search/results/"+jsonfilename_proteincentric
with open(jsonfilepath_proteincentric_download,'w') as downloadJsonFile:
json.dump(jfinaldata,downloadJsonFile)
unqfastaseqlen=0
unqfastaseqlen=len(unqfastaseq)
if len(unqfastaseq)>0:
tempcalunq=str(round(((float(usersequnq.count('Present and unique'))/float(len(jfinaldata)))*100),2))+'%'
unqisostat.append(["User data",tempcalunq,"NA"])
#df.to_csv(downloadResultFilePath,index=False, encoding='utf-8', columns=downloadColName)
response_data={
"filename_proteincentric":urlname_proteincentric,
'query': finalsearhdata,'foundHits':foundHits,
'keggchart':keggchart[:11],'humandisease':humandisease,
'totallist':totallist,'subcell':subcell,'querybioMatData':querybioMatData,'querystrainData':querystrainData,'querynoOfHumanOrtholog':querynoOfHumanortholog,'querynoOfDiseaseAssProt':querynoOfDiseaseAssProt,
'updatedgo':sortedgodic,'unqfastaseqlen':unqfastaseqlen,
'unqisostat':unqisostat,'fastafilename':userInputFastaFileName
}
elif len(unqfastaseq)==0:
#df.to_csv(downloadResultFilePath,index=False, encoding='utf-8',columns=downloadColNameUserSeq)
response_data={
"filename_proteincentric":urlname_proteincentric,
'query': finalsearhdata,'foundHits':foundHits,
'keggchart':keggchart[:11],'humandisease':humandisease,
'totallist':totallist,'subcell':subcell,'querybioMatData':querybioMatData,'querystrainData':querystrainData,'querynoOfHumanOrtholog':querynoOfHumanortholog,'querynoOfDiseaseAssProt':querynoOfDiseaseAssProt,
'updatedgo':sortedgodic,'unqfastaseqlen':unqfastaseqlen,
'unqisostat':unqisostat
}
return HttpResponse(json.dumps(response_data), content_type="application/json")
def protVista(request):
'''
This function will display result for Mutation,PTM & Domain.
'''
ip = get_ip(request, right_most_proxy=True)
IpAddressInformation.objects.create(ip_address=ip)
if request.method=='GET':
uniprotkb=str(request.GET.get("uniProtKb")).strip()
response_data = {'seqStart':None,'seqEnd':None}
pepSeqMatchList=[]
pepSeqMatchDic={}
domainplotscript=[]
valid=False
humanValid=False
contextpep={}
humanContextPep={}
proseq=''
humanProSeq=''
match_info=[]
human_match_info=[]
fasthead=''
humanFastHead=''
fastasq=''
humanFastaSq=''
fastalen=0
humanFastaLen=0
reachable=True
humanReachable=True
pepfilepath = os.path.join(settings.BASE_DIR, 'qmpkbmotherfile', 'ReportBook_mother_file.csv')
presentunidpepseqstat=False
listOfPeptide=[]
listOfHumanPeptide=[]
pepstart=0
humanPepStart=0
pepend=0
humanPepEnd=0
jsonprotvistastatus=False
humanJsonProtvistaStatus=False
protname=None
humanUniprotKB='NA'
es.indices.refresh(index="xxxxxxxxx-index")
query={"query": {
"bool": {
"must": [
{"match": {"UniProtKB Accession": uniprotkb}},
{"match": {"UniprotKb entry status": "Yes"}}
]
}
}
}
res=helpers.scan(client=es,scroll='2m',index="xxxxxxxxx-index", doc_type="xxxxxxxx-type",query=query,request_timeout=30)
for hit in res:
jdic=hit["_source"]
jdic={str(tkey):force_text(tvalue) for tkey,tvalue in jdic.items()}
if str(jdic["Present in human ortholog"]).strip() == 'Yes':
humanUniprotKB=str(jdic["Human UniProtKB Accession"]).strip()
listOfHumanPeptide.append(str(jdic["Peptide Sequence"]).strip())
listOfPeptide.append(str(jdic["Peptide Sequence"]).strip())
es.indices.refresh(index="xxxxxxxxx-index")
foundHits=len(listOfPeptide)
if '-' not in uniprotkb:
code=(str(uniprotkb).strip()).upper()
try:
sleep(random.randint(5,10))
requests.get("https://www.uniprot.org/", timeout=1)
unidatafasta = urllib.urlopen("https://www.uniprot.org/uniprot/" + code + ".fasta")
for mseq in SeqIO.parse(unidatafasta, "fasta"):
fasthead=str((mseq.id).strip())
proseq=str((mseq.seq).strip())
fastasq=str((mseq.seq).strip())
unidatafasta.close()
except ConnectionError as e:
reachable=False
if reachable:
jsonfilestatus=False
jsonfilename='externalLabeledFeatures_'+uniprotkb+'.json'
jsonfilepath=os.path.join(settings.BASE_DIR, 'resultFile','jsonData', 'protvistadataJson', 'mouse',jsonfilename)
if os.path.exists(jsonfilepath):
if datetime.datetime.fromtimestamp(os.path.getmtime(pepfilepath))< datetime.datetime.fromtimestamp(os.path.getmtime(jsonfilepath)):
jsonfilestatus=True
jsonprotvistastatus=True
else:
os.remove(jsonfilepath)
jsonfilestatus=False
else:
jsonfilestatus=False
jsonpepdata={}
for pepseqitem in listOfPeptide:
peptide_pattern = re.compile(pepseqitem,re.IGNORECASE)
for match in re.finditer(peptide_pattern,proseq):
jsonpepdata[pepseqitem.upper()] =[(int(match.start())+1),match.end()]
pepstart=int(match.start())+1
pepend=int(match.end())
if pepseqitem in pepSeqMatchDic:
pepSeqMatchDic[pepseqitem].append([pepstart,pepend,'Mouse'])
else:
pepSeqMatchDic[pepseqitem]=[[pepstart,pepend,'Mouse']]
match_info.append([(int(match.start())+1),match.group(),match.end()])
contextpep[uniprotkb]=[list(x) for x in set(tuple(x) for x in match_info)]
fastalen=len(fastasq)
if not jsonfilestatus:
jsonfileoutput= open(jsonfilepath,'w')
jsonformatdataprotvista={}
jsonformatdataprotvista["sequence"]=str(proseq)
tempfearures=[]
for jsonkey in jsonpepdata.keys():
tempdicjsondic={}
tempdicjsondic["type"]="MRM"
tempdicjsondic["category"]="Targeted_Proteomics_Assay_Mouse"
tempdicjsondic["description"]="Suitable MRM Assay for Mouse"
tempdicjsondic["begin"]=str(jsonpepdata[jsonkey][0])
tempdicjsondic["end"]=str(jsonpepdata[jsonkey][1])
tempdicjsondic["color"]="#00B88A"
tempdicjsondic["accession"]=uniprotkb
tempfearures.append(tempdicjsondic)
jsonformatdataprotvista["features"]=tempfearures
json.dump(jsonformatdataprotvista,jsonfileoutput)
jsonfileoutput.close()
jsonprotvistastatus=True
if ('-' not in humanUniprotKB and humanUniprotKB !='NA'):
try:
sleep(random.randint(5,10))
requests.get("https://www.uniprot.org/", timeout=1)
humanUniDataFasta = urllib.urlopen("https://www.uniprot.org/uniprot/" + humanUniprotKB + ".fasta")
for hseq in SeqIO.parse(humanUniDataFasta, "fasta"):
humanFastHead=str((hseq.id).strip())
humanProSeq=str((hseq.seq).strip())
humanFastaSq=str((hseq.seq).strip())
humanUniDataFasta.close()
except ConnectionError as e:
humanReachable=False
if humanReachable:
humanJsonFileStatus=False
humanJsonFileName='externalLabeledFeatures_'+humanUniprotKB+'.json'
humanJsonFilePath=os.path.join(settings.BASE_DIR, 'resultFile','jsonData', 'protvistadataJson','human', humanJsonFileName)
if os.path.exists(humanJsonFilePath):
if datetime.datetime.fromtimestamp(os.path.getmtime(pepfilepath))< datetime.datetime.fromtimestamp(os.path.getmtime(humanJsonFilePath)):
humanJsonFileStatus=True
humanJsonProtvistaStatus=True
else:
os.remove(jsonfilepath)
humanJsonFileStatus=False
else:
humanJsonFileStatus=False
humanJsonPepData={}
for hPepSeqItem in listOfHumanPeptide:
human_peptide_pattern = re.compile(hPepSeqItem,re.IGNORECASE)
for hmatch in re.finditer(human_peptide_pattern,humanProSeq):
humanJsonPepData[hPepSeqItem.upper()] =[(int(hmatch.start())+1),hmatch.end()]
humanPepStart=int(hmatch.start())+1
humanPepEnd=int(hmatch.end())
if hPepSeqItem in pepSeqMatchDic:
pepSeqMatchDic[hPepSeqItem].append([humanPepStart,humanPepEnd,'Human'])
else:
pepSeqMatchDic[hPepSeqItem]=[[humanPepStart,humanPepEnd,'Human']]
human_match_info.append([(int(hmatch.start())+1),hmatch.group(),hmatch.end()])
humanContextPep[humanUniprotKB]=[list(x) for x in set(tuple(x) for x in human_match_info)]
humanFastaLen=len(humanFastaSq)
if not humanJsonFileStatus:
humanJsonFileOutput= open(humanJsonFilePath,'w')
humanJsonFormatDataProtvista={}
humanJsonFormatDataProtvista["sequence"]=str(humanProSeq)
htempfearures=[]
for jsonkey in humanJsonPepData.keys():
htempdicjsondic={}
htempdicjsondic["type"]="MRM"
htempdicjsondic["category"]="Targeted_Proteomics_Assay_Human"
htempdicjsondic["description"]="Suitable MRM Assay for Human"
htempdicjsondic["begin"]=str(humanJsonPepData[jsonkey][0])
htempdicjsondic["end"]=str(humanJsonPepData[jsonkey][1])
htempdicjsondic["color"]="#00B88A"
htempdicjsondic["accession"]=humanUniprotKB
htempfearures.append(htempdicjsondic)
humanJsonFormatDataProtvista["features"]=htempfearures
json.dump(humanJsonFormatDataProtvista,humanJsonFileOutput)
humanJsonFileOutput.close()
humanJsonProtvistaStatus=True
for pepMKey in pepSeqMatchDic:
tempMatchList=[pepMKey,'NA','NA','NA','NA']
for pepMItem in pepSeqMatchDic[pepMKey]:
if pepMItem[-1]=='Mouse':
tempMatchList[1]=pepMItem[0]
tempMatchList[2]=pepMItem[1]
else:
tempMatchList[3]=pepMItem[0]
tempMatchList[4]=pepMItem[1]
pepSeqMatchList.append(tempMatchList)
response_data={'contextpep':contextpep,'humanContextPep':humanContextPep,'fastalen':fastalen,'humanFastaLen':humanFastaLen,'uniprotkb':uniprotkb,'humanUniprotKB':humanUniprotKB,\
'seqStart':pepstart,'humanPepStart':humanPepStart,'seqEnd':pepend,'humanPepEnd':humanPepEnd,'jsonprotvistastatus':jsonprotvistastatus,'humanJsonProtvistaStatus':humanJsonProtvistaStatus,\
'pepSeqMatchList':pepSeqMatchList,'reachable':reachable}
return HttpResponse(json.dumps(response_data), content_type="application/json")
def assaydetails(request):
"""
This function is searching information for tranisition, based on intrument type
in database.
"""
ip = get_ip(request, right_most_proxy=True)
IpAddressInformation.objects.create(ip_address=ip)
if request.method=='GET':
uniprotkb=str(request.GET.get("uniProtKb")).strip()
resultFilePath= request.GET['resultFilePath']
resultFilePath= str(request.GET.get("resultFilePath")).strip()
fastafilename=request.GET.get("fastafilename")
fastafilename= str(fastafilename).strip()
es.indices.refresh(index="xxxxxxxxx-index")
#build elasticsearch query based on peptide seq and uniprotkb acc
query={"query": {
"bool": {
"must": [
{"match": {"UniProtKB Accession": uniprotkb}},
{"match": {"UniprotKb entry status": "Yes"}}
]
}
}
}
res = es.search(index="xxxxxxxxx-index", doc_type="xxxxxxxx-type", body=query)
bioMatProtInfo={}
transdic={}
temptransdic={}
gradientlist=[]
gradinfoheader=[]
loquantinfo=[]
foundHits=res["hits"]["total"]
userFastaStatus=0
if fastafilename !='NA':
userFastaStatus=1
protinfo={}
with open(resultFilePath) as rjf:
for resitem in json.load(rjf)['data']:
if resitem["UniProtKB Accession"]==uniprotkb:
pepinfo =resitem["Peptide Based Info"]
for pepItem in pepinfo:
tempPepSeq=pepItem["Peptide Sequence"].strip()
panData="NA"
pepiso="NA"
huPepiso="NA"
pepUnq=pepItem["Unique in protein"].strip()
pepHumanortholog=pepItem["Present in human ortholog"].strip()
unqInHumanortholog=pepItem["Unique in human protein"].strip()
if len(pepItem["Concentration View"].strip()) > 0 and pepItem["Concentration View"].strip().upper() !="NA":
conqueryArray=pepItem["concenQuery"].strip().split('@')
bioMatProtInfo[tempPepSeq]=conqueryArray[2]
if len(pepItem["Present in isoforms"].strip()) > 0 and pepItem["Present in isoforms"].strip().upper() != "NA" and pepItem["Present in isoforms"].strip().upper() != "NO":
tempLst =pepItem["Present in isoforms"].strip().split(',')
for idx, val in enumerate(tempLst):
tempLst[idx] = '<a target="_blank" routerLinkActive="active" href="https://www.uniprot.org/uniprot/' + val+'.fasta">'+val+ '</a>'
pepiso="<br>".join(tempLst)
if len(pepItem["Present in human isoforms"].strip()) > 0 and pepItem["Present in human isoforms"].strip() != "NA" and pepItem["Present in human isoforms"].strip().upper() != "NO":
tempLst =pepItem["Present in human isoforms"].strip().split(',')
for idx, val in enumerate(tempLst):
tempLst[idx] = '<a target="_blank" routerLinkActive="active" href="https://www.uniprot.org/uniprot/' + val+'.fasta">'+val+ '</a>'
huPepiso="<br>".join(tempLst)
if len(pepItem["Panel"].strip()) > 0 and pepItem["Panel"].strip().upper() != "NA" :
panview=pepItem["Panel"].strip().split(';')
panData="<br>".join(panview)
if userFastaStatus==0:
protinfo[tempPepSeq]=[pepUnq,pepiso,pepHumanortholog,unqInHumanortholog,huPepiso,panData]
if userFastaStatus==1:
pepuserfo=None
pepInUserDB=pepItem["Peptide in user's database"]
if pepItem["Peptide unique in user's database"].strip() == "Not present":
pepuserfo= pepItem["Peptide unique in user's database"].strip()
else:
pepuserfo= '<a target="_blank" routerLinkActive="active" routerLinkActive="active" href="/dataload/userpepseq_' + pepItem["UniProtKB Accession"].strip() +'_'+pepItem["Peptide Sequence"].strip() +'_'+fastafilename + '">' + pepItem["Peptide unique in user's database"].strip() + '</a>'
protinfo[tempPepSeq]=[pepUnq,pepiso,pepHumanortholog,unqInHumanortholog,huPepiso,pepuserfo,pepInUserDB,panData]
break
for hit in res['hits']['hits']:
jdic=hit["_source"]
jdic={str(tkey):force_text(tvalue) for tkey,tvalue in jdic.items()}
jdic["Concentration Range"]=jdic["Concentration Range"].replace('fmol target protein/u','fmol target protein/µ')
if str(jdic["UniProtKB Accession"]).strip() == uniprotkb and str(jdic["Peptide Sequence"]).strip() in protinfo:
meanRetentime=0.0
fragIon=[]
temploquantinfo={}
jdic["LLOQ"]=str(jdic["LLOQ"]).strip().replace('fmol target protein/u','fmol target protein/µ')
jdic["ULOQ"]=str(jdic["ULOQ"]).strip().replace('fmol target protein/u','fmol target protein/µ')
jdic["Sample LLOQ"]=str(jdic["Sample LLOQ"]).strip().replace('fmol target protein/u','fmol target protein/µ')
templistOfMatrix=bioMatProtInfo[str(jdic["Peptide Sequence"]).strip()]
for i in listOfMatrix:
if i.lower() in templistOfMatrix.lower():
tmepKey=i+str(jdic["Peptide Sequence"]).strip()
for l in jdic["LLOQ"].split(';'):
if i.lower() in l.lower():
if i in temploquantinfo:
temploquantinfo[i].append(l.split('|')[1].split('(')[0].strip())
else:
temploquantinfo[i]=[l.split('|')[1].split('(')[0].strip()]
for u in jdic["ULOQ"].split(';'):
if i.lower() in u.lower():
if i in temploquantinfo:
temploquantinfo[i].append(u.split('|')[1].split('(')[0].strip())
else:
temploquantinfo[i]=[u.split('|')[1].split('(')[0].strip()]
for s in jdic["Sample LLOQ"].split(';'):
if i.lower() in s.lower():
if i in temploquantinfo:
temploquantinfo[i].append(s.split('|')[1].split('(')[0].strip())
else:
temploquantinfo[i]=[s.split('|')[1].split('(')[0].strip()]
for bk in temploquantinfo:
tempList=[str(jdic["Peptide Sequence"]).strip(),bk]+temploquantinfo[bk]
loquantinfo.append(tempList)
if (str(jdic["Transitions"]).strip()) >0 and (str(jdic["Transitions"]).strip()).lower() !='na':
transdata=str(jdic["Transitions"]).strip()
transinfo=transdata.split(';')
for titem in transinfo[1:]:
subtransinfo=titem.split('|')
if 'instrument' not in titem.lower():
subtransinfo=[str(x) for x in subtransinfo]
subtransinfo=[str(jdic["Peptide Sequence"]).strip()]+subtransinfo
fragIon.append(subtransinfo[5])
if temptransdic.has_key(subtransinfo[1].strip()):
temptransdic[subtransinfo[1].strip()].append(subtransinfo)
else:
temptransdic[subtransinfo[1].strip()]=[subtransinfo]
if (str(jdic["Gradients"]).strip()) >0 and (str(jdic["Gradients"]).strip()).lower() !='na':
graddata=str(jdic["Gradients"]).strip()
#graddata='Time[min]|A[%]|B[%];0.00|98.00|2.00;2.00|93.00|7.00;50.00|70.00|30.00;53.00|55.00|45.00;53.00|20.00|80.00;55.00|20.00|80.00;56.00|98.00|2.00'
gradinfo=graddata.split(';')
retentioninfo=str(jdic["Retention Time"]).strip().split(';')
for i,j in enumerate(retentioninfo):
try:
float(j)
except ValueError:
del retentioninfo[i]
analytdata=str(jdic["Analytical inofrmation"]).strip()
#analytdata='Agilent Zorbax Eclipse Plus C18 RRHD 2.1 x 150mm 1.8um'
gradinfoheader=[x for x in (gradinfo[0].strip()).split('|')]
templist=[x.split('|') for x in gradinfo[1:]]
tempRetentionTime=[]
for ritem in range(0,len(retentioninfo)):
if ritem != 0:
if (float(ritem)%5.0)==0.0:
tempRetentionTime.append(' '+retentioninfo[ritem])
else:
tempRetentionTime.append(retentioninfo[ritem])
else:
tempRetentionTime.append(retentioninfo[ritem])
gradientlist.append([str(jdic["Peptide Sequence"]).strip(),','.join(tempRetentionTime),analytdata,'Gradient 1',templist])
# for ritem in range(0,len(retentioninfo)):
# gradientlist.append([retentioninfo[ritem],analytdata,'Gradient '+str(ritem+1),templist])
retentioninfo=map(float,retentioninfo)
meanRetentime=round(np.mean(retentioninfo),2)
protinfo[str(jdic["Peptide Sequence"]).strip()]=[str(jdic["Molecular Weight"]).strip(),str(jdic["GRAVY Score"]).strip()]+protinfo[str(jdic["Peptide Sequence"]).strip()]+['<br>'.join(list(set(fragIon))),meanRetentime]
if len(temptransdic)>0:
transdic["Transitions"]=temptransdic
es.indices.refresh(index="xxxxxxxxx-index")
response_data ={'transdic':transdic,'foundHits':foundHits,'protinfo':protinfo,\
'gradientlist': gradientlist, 'gradinfoheader':gradinfoheader,'loquantinfo':loquantinfo,\
'userFastaStatus':userFastaStatus,'fastafilename':fastafilename
}
return HttpResponse(json.dumps(response_data), content_type="application/json")
def concentration(request):
ip = get_ip(request, right_most_proxy=True)
IpAddressInformation.objects.create(ip_address=ip)
if request.method=='GET':
tempQuery=str(request.GET.get("query")).strip()
tempQuery=tempQuery.replace('!','/')
queryInfo=tempQuery.split('@')
uniprotkb=queryInfo[-1]
pepseq= queryInfo[-2]
filterSearchTerm=[str(queryInfo[0]),str(queryInfo[1]),str(queryInfo[2]),str(queryInfo[3])]
filterSearchType=[str('sex'),str('strain'),str('biologicalMatrix'),str('knockout')]
concUnit=[]
summaryConcData=[]
es.indices.refresh(index="xxxxxxxxx-index")
query={"query": {
"bool": {
"must": [
{"match": {"UniProtKB Accession": uniprotkb}},
{"match": {"Peptide Sequence": pepseq}},
{"match": {"UniprotKb entry status": "Yes"}}
]
}
}
}
res = es.search(index="xxxxxxxxx-index", doc_type="xxxxxxxx-type", body=query)
sumconclist=[]
foundHits=res["hits"]["total"]
protList=[]
jfinaldata=[]
sampleLLOQ=''
ULOQ=''
for hit in res['hits']['hits']:
jdic=hit["_source"]
jdic={str(tkey):force_text(tvalue) for tkey,tvalue in jdic.items()}
if (str(jdic["Summary Concentration Range Data"]).strip()) >0 and (str(jdic["Summary Concentration Range Data"]).strip()).lower() !='na':
sampleLLOQ=str(jdic["Sample LLOQ"]).strip()
ULOQ=str(jdic["ULOQ"]).strip()
jfinaldata.append(jdic)
es.indices.refresh(index="xxxxxxxxx-index")
jfinaldata=filterConcentration(jfinaldata,filterSearchTerm,filterSearchType)
sampleLLOQ=sampleLLOQ.replace(' (fmol target protein/ug extracted protein)','')
sampleLLOQ=dict([samval.split('|') for samval in sampleLLOQ.split(';')])
ULOQ=ULOQ.replace(' (fmol target protein/ug extracted protein)','')
ULOQ=dict([uval.split('|') for uval in ULOQ.split(';')])
sumconcdata=str(jfinaldata[0]["Summary Concentration Range Data"]).strip()
allconcdata=str(jfinaldata[0]["All Concentration Range Data"]).strip()
allconcdataSampleLLOQ=str(jfinaldata[0]["All Concentration Range Data-Sample LLOQ Based"]).strip()
sumconcdata=sumconcdata.replace('fmol target protein/u','fmol target protein/µ')
sumconcdata=sumconcdata.replace('ug extracted protein/uL','µg extracted protein/µL')
sumconcdata=sumconcdata.replace('ug extracted protein/mg','µg extracted protein/mg')
allconcdata=allconcdata.replace('fmol target protein/u','fmol target protein/µ')
allconcdata=allconcdata.replace('ug extracted protein/u','µg protein/µ')
allconcdata=allconcdata.replace('ug extracted protein/mg','µg extracted protein/mg')
allconcdataSampleLLOQ=allconcdataSampleLLOQ.replace('fmol target protein/u','fmol target protein/µ')
allconcdataSampleLLOQ=allconcdataSampleLLOQ.replace('ug extracted protein/u','µg extracted protein/µ')
sumconcinfo=sumconcdata.split(';')
allconinfo=allconcdata.split(';')
allconinfoSampleLLOQ=allconcdataSampleLLOQ.split(';')
for scitem in sumconcinfo:
scinfo =scitem.split('|')
tempSampleLLOQ=sampleLLOQ[scinfo[2]]
tempULOQ=ULOQ[scinfo[2]]
stempid='|'.join(map(str,scinfo[2:5]))
tempMatchConcList=[]
for acitem in allconinfo:
acinfo =acitem.split('|')
del acinfo[3]
atempid='|'.join(map(str,acinfo[2:5]))
if stempid.lower() ==atempid.lower():
concUnit.append('(' + acinfo[-2].strip().split(' (')[-1].strip())
if float(acinfo[-3].strip().split(' ')[0].strip()) >0:
tempMatchConcList.append(acinfo[-3].strip().split(' ')[0].strip())
tempMatchConcData='|'.join(map(str,tempMatchConcList))
tempMatchConcDataSampleLLOQ='NA'
templen=1
try:
templen=len(filter(None,map(str,list(set(allconinfoSampleLLOQ)))))
except UnicodeEncodeError:
pass
if 'NA' != ''.join(list(set(allconinfoSampleLLOQ))) and templen>0:
tempMatchConcListSampleLLOQ=[]
for slacitem in allconinfoSampleLLOQ:
if slacitem.upper().strip() !='NA':
slacinfo =slacitem.split('|')
del slacinfo[3]
slatempid='|'.join(map(str,slacinfo[2:5]))
if stempid.lower() ==slatempid.lower():
tempMatchConcListSampleLLOQ.append(slacinfo[-3].strip().split(' ')[0].strip())
tempMatchConcDataSampleLLOQ='|'.join(map(str,tempMatchConcListSampleLLOQ))
scinfo.append(str(jfinaldata[0]["UniProtKB Accession"]).strip())
scinfo.append(str(jfinaldata[0]["Protein"]).strip())
scinfo.append(str(jfinaldata[0]["Peptide Sequence"]).strip())
scinfo.append(stempid)
scinfo.append(tempMatchConcData)
scinfo.append(tempMatchConcDataSampleLLOQ)
scinfo.append(tempSampleLLOQ)
scinfo.append(tempULOQ)
scinfo=[scI.split('(')[0].strip() if '(' in scI else scI for scI in scinfo]
sumconclist.append(scinfo)
summaryConcData.insert(0,str(jfinaldata[0]["Peptide Sequence"]).strip())
summaryConcData.insert(0,str(jfinaldata[0]["Protein"]).strip())
summaryConcData.insert(0,str(jfinaldata[0]["UniProtKB Accession"]).strip())
protList=summaryConcData
concUnit=list(set(concUnit))
lenOfConcData=len(sumconclist)
concUnit='&'.join(concUnit)
sumconclist=sorted(sumconclist,key=lambda l:l[4])
sumconclist=sorted(sumconclist,key=lambda l:l[3])
sumconclist=sorted(sumconclist,key=lambda l:l[2])
response_data ={'conclist':sumconclist,'foundHits':foundHits,'protList':protList,'concUnit':concUnit,'lenOfConcData':lenOfConcData}
return HttpResponse(json.dumps(response_data), content_type="application/json")
def pathway(request):
'''
This function will display result for KEGG pathways and STRING PPI.
'''
ip = get_ip(request, right_most_proxy=True)
IpAddressInformation.objects.create(ip_address=ip)
if request.method=='GET':
uniprotkb=str(request.GET.get("uniProtKb")).strip()
if len(uniprotkb)>0:
pathwayDic={}
pathWayList=[]
es.indices.refresh(index="xxxxxxxxx-index")
query={"query": {
"bool": {
"must": [
{"match": {"UniProtKB Accession": uniprotkb}},
{"match": {"UniprotKb entry status": "Yes"}}
]
}
}
}
res = es.search(index="xxxxxxxxx-index", doc_type="xxxxxxxx-type", body=query)
foundHits=res["hits"]["total"]
for hit in res['hits']['hits']:
jdic=hit["_source"]
jdic={str(tkey):force_text(tvalue) for tkey,tvalue in jdic.items()}
mousePathway=str(jdic["Mouse Kegg Pathway"]).strip()
humanPathway=str(jdic["Human Kegg Pathway"]).strip()
if str(mousePathway).strip().lower() != 'na' and len(str(mousePathway).strip()) >0:
mousePathwayInfo=mousePathway.split('|')
for i in mousePathwayInfo:
submousePathwayInfo=i.split(';')
if submousePathwayInfo[1] in pathwayDic:
pathwayDic[submousePathwayInfo[1]].append(submousePathwayInfo[0])
else:
pathwayDic[submousePathwayInfo[1]]=[submousePathwayInfo[0]]
if str(humanPathway).strip().lower() != 'na' and len(str(humanPathway).strip()) >0:
humanPathwayInfo=humanPathway.split('|')
for i in humanPathwayInfo:
subhumanPathwayInfo=i.split(';')
if subhumanPathwayInfo[1] in pathwayDic:
pathwayDic[subhumanPathwayInfo[1]].append(subhumanPathwayInfo[0])
else:
pathwayDic[subhumanPathwayInfo[1]]=[subhumanPathwayInfo[0]]
es.indices.refresh(index="xxxxxxxxx-index")
if foundHits >0 :
if len(pathwayDic)>0:
for pathKey in pathwayDic:
tempList=['NA']*4
tempList[0]=pathKey
tempPathList=[]
for j in pathwayDic[pathKey]:
if 'hsa' in j:
tempList[2]=j
tempURL='<a target="_blank" href="https://www.kegg.jp/kegg-bin/show_pathway?'+j+'">'+j+' <i class="fa fa-external-link" aria-hidden="true"></i></a>'
tempPathList.append(tempURL)
if 'mmu' in j:
tempList[1]=j
tempURL='<a target="_blank" href="https://www.kegg.jp/kegg-bin/show_pathway?'+j+'">'+j+' <i class="fa fa-external-link" aria-hidden="true"></i></a>'
tempPathList.append(tempURL)
tempList[3]='<br>'.join(list(set(tempPathList)))
pathWayList.append(tempList)
response_data ={'pathWayList':pathWayList}
return HttpResponse(json.dumps(response_data), content_type="application/json")
def pathwayview(request):
'''
This function will display result for KEGG pathways.
'''
ip = get_ip(request, right_most_proxy=True)
IpAddressInformation.objects.create(ip_address=ip)
if request.method=='GET':
uniprotkb=str(request.GET.get("Uniprotkb")).strip()
uniprotid=''
uniprotname=''
unikeggid=''
nodesscript=[]
edgesscript=[]
keggurl=''
reachable=True
presentunidstat=False
OSid=str(request.GET.get("organismid")).strip()
pathwayid=str(request.GET.get("pathwayid")).strip()
pathwayname=str(request.GET.get("pathwayname")).strip()
homeURL=str((request.build_absolute_uri()).split('pathwayview')[0]).strip()
uniProtGeneDic={}
if len(uniprotkb)>0:
pepfilegenidlistOther=[]
es.indices.refresh(index="xxxxxxxxx-index")
query={"query": {
"bool": {
"must": [
{"match": {"UniProtKB Accession": uniprotkb}},
{"match": {"Organism ID": OSid}},
{"match": {"UniprotKb entry status": "Yes"}}
]
}
}
}
res = es.search(index="xxxxxxxxx-index", doc_type="xxxxxxxx-type", body=query)
foundHits=res["hits"]["total"]
es.indices.refresh(index="xxxxxxxxx-index")
if foundHits >0 :
presentunidstat=True
if presentunidstat:
viewquery={"query": {
"bool": {
"must": [
{"match": {"Mouse Kegg Pathway Name": pathwayname}},
{"match": {"Organism ID": OSid}},
{"match": {"UniprotKb entry status": "Yes"}}
]
}
}
}
resOrg = helpers.scan(client=es,scroll='2m',index="xxxxxxxxx-index", doc_type="xxxxxxxx-type",query=viewquery)
jfinaldata=[]
for i in resOrg:
jdic=i['_source']
jdic={str(tkey):force_text(tvalue) for tkey,tvalue in jdic.items()}
pepfilegenidlistOther.append(jdic['Gene'])
uniProtGeneDic[str(jdic['Gene']).strip().lower()]=str(jdic['UniProtKB Accession']).strip()
jfinaldata.append(jdic)
es.indices.refresh(index="xxxxxxxxx-index")
pepfilegenidlistOther=list(set(pepfilegenidlistOther))
pepfilegenidlistOther=[x.lower() for x in pepfilegenidlistOther]
code=None
if '-' in uniprotkb:
code=(str(uniprotkb).split('-'))[0]
else:
code=str(uniprotkb.strip())
try:
sleep(random.randint(5,10))
requests.get("https://www.uniprot.org/", timeout=5)
unitxtdata = urllib.urlopen("https://www.uniprot.org/uniprot/" + code + ".txt")
for uline in unitxtdata:
udata=uline.strip()
if udata.startswith('ID') and '_' in udata:
idinfo = udata.split()
uniprotid=idinfo[1].strip()
if udata.startswith('GN Name='):
uniprotname= (((udata.split()[1]).split('='))[-1]).strip()
if ';' in uniprotname:
uniprotname= uniprotname.replace(';','')
if udata.startswith('DR KEGG'):
unikeggid =(udata.split(';'))[1].strip()
unitxtdata.close()
except ConnectionError as e:
reachable=False
keggimagedict={}
if len(unikeggid) >0 and reachable:
k = KEGG()
kegg=k.get(unikeggid)
dict_data = k.parse(kegg)
try:
keggpathwayid= (dict_data['PATHWAY'].keys())
for kegpathidietm in keggpathwayid:
keggentryid = (unikeggid.split(':'))[1].strip()
subkeggmapid=str(kegpathidietm)+'+'+str(keggentryid)
if len(subkeggmapid) >0 and str(kegpathidietm).lower() == pathwayid.lower():
keggpresentgeneIdlist=[]=[]
notpresentkegggeneid=[]
updatedcorddatalist=[]
keggimagepath=''
pathway = KGML_parser.read(REST.kegg_get(kegpathidietm, "kgml"))
pathwayName=(str(pathway)).split('\n')[0].split(':')[1].strip()
listUnqGene=[]
keggOrgInitial=''
getGeneList=[]
pathwayGeneCoord={}
for g in pathway.genes:
tempGInfo=(g.name).split( )
for tg in tempGInfo:
geneID=tg.split(':')[1].strip()
keggOrgInitial=tg.split(':')[0].strip()
getGeneList.append(tg.strip())
listUnqGene.append(geneID)
for kgraphic in g.graphics:
if kgraphic.type=='rectangle':
kcoord=str(kgraphic.x)+','+str(kgraphic.y)+','+str(kgraphic.width)+','+str(kgraphic.height)
tempGId=[x.split(':')[1].strip() for x in g.name.split(' ')]
pathwayGeneCoord[kcoord]=tempGId
listUnqGene=list(set(listUnqGene))
getGeneList=list(set(getGeneList))
geneKeggIdDics={}
for gI in range(0,len(getGeneList),100):
keggRESTURL='http://rest.kegg.jp/list/'+'+'.join(getGeneList[gI:gI+100])
keggResponseREST = requests.get(keggRESTURL,verify=False)
if not keggResponseREST.ok:
keggResponseREST.raise_for_status()
sys.exit()
keggResponseBodyREST = keggResponseREST.text
for gN in keggResponseBodyREST.split('\n')[:-1]:
gnInfo=gN.split('\t')
tempGeneList=[i.strip().lower() for i in gnInfo[1].split(';')[0].split(',')]
tempKeggGeneID=gnInfo[0].split(':')[1]
geneKeggIdDics[tempKeggGeneID]=[i.strip() for i in gnInfo[1].split(';')[0].split(',')]
if gnInfo[0] != unikeggid:
for tg in tempGeneList:
if tg in pepfilegenidlistOther:
keggpresentgeneIdlist.append(tempKeggGeneID)
keggpresentgeneIdlist=list(set(keggpresentgeneIdlist))
notpresentkegggeneid=set(geneKeggIdDics.keys())-set(keggpresentgeneIdlist+[unikeggid.split(':')[1]])
notpresentkegggeneid=list(notpresentkegggeneid)
presentKeggGeneIDList=set(keggpresentgeneIdlist+[unikeggid.split(':')[1]])
presentKeggGeneIDList=list(presentKeggGeneIDList)
presentGeneList=list(set(pepfilegenidlistOther+[uniprotname.lower()]))
keggurl = "https://www.kegg.jp/kegg-bin/show_pathway?" + str(kegpathidietm)
keggurl += "/%s%%20%s/" % (unikeggid.split(':')[1],'violet')
if len(keggpresentgeneIdlist)>0:
for pgc in keggpresentgeneIdlist:
keggurl += "/%s%%20%s/" % (pgc,'maroon')
if len(notpresentkegggeneid)>0:
for ngc in notpresentkegggeneid:
keggurl += "/%s%%20%s/" % (ngc,'#ffffff')
try:
sleep(random.randint(5,10))
requests.get("https://www.kegg.jp/", timeout=1)
kegghttp=urllib3.PoolManager()
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
keggurlreq = kegghttp.request('GET',keggurl)
keggurldata =keggurlreq.data
keggurldata=keggurldata.decode('utf-8')
keggurldata=keggurldata.replace('\t','')
for kline in keggurldata.split('\n'):
kline=kline.lstrip()
try:
if '<area' in kline.lower() and 'href='.lower() in kline.lower() and 'title=' in kline.lower() and 'shape=' in kline.lower():
kline=kline.replace('"','')
kshape=kline.split('shape=')[1].split(' ')[0]
kcoords=kline.split('coords=')[1].split(' ')[0]
khref=''
ktitle=kline.split('title=')[1].replace('/>','').replace('class=module','')
ktitleData=ktitle.lstrip()
if kshape=='rect':
ktitleInfo=ktitleData.split(',')
ktitleInfoID=[k.strip().split(' ')[0] for k in ktitleInfo]
commonKeggGeneIDList=list(set(ktitleInfoID)&set(presentKeggGeneIDList))
if len(commonKeggGeneIDList)>0:
tempTitle=[]
commonKeggGeneList=[]
for ki in ktitleInfoID:
if ki in geneKeggIdDics:
keggGeneList=geneKeggIdDics[ki]
tempcommonKeggGeneList=[str(cg) for cg in keggGeneList if cg.lower() in presentGeneList]
tempTitle.extend([ki+' ('+str(x)+')' for x in tempcommonKeggGeneList])
commonKeggGeneList.extend(tempcommonKeggGeneList)
ktitleData=','.join(tempTitle)
khref='/results/?gene='+str('|'.join(commonKeggGeneList))+'&Organismid='+OSid
updatedcorddatalist.append([kshape,kcoords,str(khref),ktitleData])
if kline.startswith('<img src="/tmp/mark_pathway'):
kinfo=kline.split('name=')
keggimagepath=(kinfo[0].split('"'))[1].strip()
except UnicodeDecodeError:
pass
except ConnectionError as e:
reachable=False
except urllib3.exceptions.MaxRetryError:
reachable=False
keggimagedict[subkeggmapid]=[keggimagepath,pathwayName,updatedcorddatalist]
except KeyError:
pass
response_data ={
'uniprotid':uniprotid,'uniprotname':uniprotname,
'keggimagedict':keggimagedict,'keggurl':keggurl,
'reachable':reachable
}
return HttpResponse(json.dumps(response_data), content_type="application/json")
def goterm(request):
'''
This function will display result for Go term.
'''
ip = get_ip(request, right_most_proxy=True)
IpAddressInformation.objects.create(ip_address=ip)
if request.method=='GET':
uniprotkb=str(request.GET.get("uniProtKb")).strip()
contextgoterm =[]
reachable=True
jvenndataseries=[]
response_data = {}
if len(uniprotkb)>0:
uniprotkblist=[]
code=None
gene=None
protname=None
goDic={}
mouseUniData=[]
humanUniData=[]
goStatBioP=[]
goStatMolF=[]
goStatCellC=[]
es.indices.refresh(index="xxxxxxxxx-index")
#build elasticsearch query based provided uniprotkb acc
query={"query": {
"bool": {
"must": [
{"match": {"UniProtKB Accession": uniprotkb}},
{"match": {"UniprotKb entry status": "Yes"}}
]
}
}
}
res = es.search(index="xxxxxxxxx-index", doc_type="xxxxxxxx-type", body=query)
foundHits=res["hits"]["total"]
for hit in res['hits']['hits']:
jdic=hit["_source"]
jdic={str(tkey):force_text(tvalue) for tkey,tvalue in jdic.items()}
mouseGo=str(jdic["Mouse Go"]).strip()
humanGo=str(jdic["Human Go"]).strip()
if str(mouseGo).strip().lower() != 'na' and len(str(mouseGo).strip()) >0:
mouseGoInfo=mouseGo.split('|')
for i in mouseGoInfo:
submouseGoInfo=i.split(';')
if submouseGoInfo[1] in goDic:
goDic[submouseGoInfo[1]].append([submouseGoInfo[0],submouseGoInfo[2],'Mouse'])
else:
goDic[submouseGoInfo[1]]=[[submouseGoInfo[0],submouseGoInfo[2],'Mouse']]
if str(humanGo).strip().lower() != 'na' and len(str(humanGo).strip()) >0:
humanGoInfo=mouseGo.split('|')
for i in humanGoInfo:
subhumanGoInfo=i.split(';')
if subhumanGoInfo[1] in goDic:
goDic[subhumanGoInfo[1]].append([subhumanGoInfo[0],subhumanGoInfo[2],'Human'])
else:
goDic[subhumanGoInfo[1]]=[[subhumanGoInfo[0],subhumanGoInfo[2],'Human']]
es.indices.refresh(index="xxxxxxxxx-index")
if foundHits >0:
if len(goDic)>0:
for goKey in goDic:
tempList=['NA']*4
tempList[0]=goKey
tempList[1]=goDic[goKey][0][0]
tempList[2]=goDic[goKey][0][1]
orgList=[]
for j in goDic[goKey]:
orgList.append(j[2])
tempList[3]='<br>'.join(list(set(orgList)))
if tempList[2].lower()=='biological process':
goStatBioP.append(tempList[0])
if tempList[2].lower()=='molecular function':
goStatMolF.append(tempList[0])
if tempList[2].lower()=='cellular component':
goStatCellC.append(tempList[0])
contextgoterm.append(tempList)
goStat=[]
if len(goStatBioP)>0:
goStat.append('Number of Biological Process GO Aspects:'+str(len(set(goStatBioP))))
if len(goStatMolF)>0:
goStat.append('Number of Molecular Function GO Aspects:'+str(len(set(goStatMolF))))
if len(goStatCellC)>0:
goStat.append('Number of Cellular Component GO Aspects:'+str(len(set(goStatCellC))))
response_data ={'foundHits': foundHits,'contextgoterminfo': contextgoterm,'goStat':'<br>'.join(goStat)}
return HttpResponse(json.dumps(response_data), content_type="application/json")
def geneExp(request):
'''
This function will display result for Gene Expression.
'''
ip = get_ip(request, right_most_proxy=True)
IpAddressInformation.objects.create(ip_address=ip)
if request.method=='GET':
uniprotkb=str(request.GET.get("uniProtKb")).strip()
gene=None
protname=None
geneExpData=None
geneExplist=[]
if len(uniprotkb)>0:
es.indices.refresh(index="xxxxxxxxx-index")
#build elasticsearch query based provided uniprotkb acc
query={"query": {
"bool": {
"must": [
{"match": {"UniProtKB Accession": uniprotkb}},
{"match": {"UniprotKb entry status": "Yes"}}
]
}
}
}
res = es.search(index="xxxxxxxxx-index", doc_type="xxxxxxxx-type", body=query)
foundHits=res["hits"]["total"]
for hit in res['hits']['hits']:
jdic=hit["_source"]
jdic={str(tkey):force_text(tvalue) for tkey,tvalue in jdic.items()}
gene=str(jdic["Gene"]).strip()
protname=str(jdic["Protein"]).strip()
geneExpData=str(jdic["Gene Expression Data"]).strip()
es.indices.refresh(index="xxxxxxxxx-index")
if foundHits >0:
tempgeneExplist=geneExpData.split(';')[1:]
tempgeneExplist.sort(key=lambda g: g.upper())
for i in tempgeneExplist:
tempListExp=[uniprotkb,protname,i.split('|')[0],i.split('|')[1]]
geneExplist.append(tempListExp)
protList=[uniprotkb,protname]
response_data ={'geneExplist':geneExplist,'foundHits':foundHits,'protList':protList,'lenOfGeneExpData':len(geneExplist)}
return HttpResponse(json.dumps(response_data), content_type="application/json")
class SwaggerRestAPIView(APIView):
'''
Creation of Manual schema for REST API
'''
schema=ManualSchema(fields=[
coreapi.Field(
name="UniProtKB accession",
required=False,
location="query",
schema=coreschema.String(),
description='Example:O89020'
),
coreapi.Field(
name="Protein",
required=False,
location="query",
schema=coreschema.String(),
description='Example:Afamin'
),
coreapi.Field(
name="Gene",
required=False,
location="query",
schema=coreschema.String(),
description='Example:Afm'
),
coreapi.Field(
name="Peptide sequence",
required=False,
location="query",
schema=coreschema.String(),
description='Example:AAPITQYLK'
),
coreapi.Field(
name="Panel",
required=False,
location="query",
schema=coreschema.String(),
description='Example:Panel-1'
),
coreapi.Field(
name="Strain",
required=False,
location="query",
schema=coreschema.String(),
description='Example:NODSCID'
),
coreapi.Field(
name="Mutant",
required=False,
location="query",
schema=coreschema.String(),
description='Example:Wild'
),
coreapi.Field(
name="Sex",
required=False,
location="query",
schema=coreschema.String(),
description='Example:Male'
),
coreapi.Field(
name="Biological matrix",
required=False,
location="query",
schema=coreschema.String(),
description='Example:Plasma'
),
coreapi.Field(
name="Subcellular localization",
required=False,
location="query",
schema=coreschema.String(),
description='Example:Secreted'
),
coreapi.Field(
name="Molecular pathway(s)",
required=False,
location="query",
schema=coreschema.String(),
description='Example:Complement and coagulation cascades'
),
coreapi.Field(
name="Involvement in disease",
required=False,
location="query",
schema=coreschema.String(),
description='Example:Adiponectin deficiency(ADPND)'
),
coreapi.Field(
name="GO ID",
required=False,
location="query",
schema=coreschema.String(),
description='Example:GO:0008015'
),
coreapi.Field(
name="GO Term",
required=False,
location="query",
schema=coreschema.String(),
description='Example:blood circulation'
),
coreapi.Field(
name="GO Aspects",
required=False,
location="query",
schema=coreschema.String(),
description='Example:Biological Process'
),
coreapi.Field(
name="Drug associations ID",
required=False,
location="query",
schema=coreschema.String(),
description='Example:DB05202'
)
])
def get(self, request):
"""
This function is searching results, based on given multi search parameters
in database.
"""
ip = get_ip(request, right_most_proxy=True)
IpAddressInformation.objects.create(ip_address=ip)
useruniprotkb =""
userprotein =""
usergeneid =""
userorg=""
userorgid=""
usersubcell =""
userpepseq =""
userkegg =""
userdis =""
usergoid =""
usergotn =""
usergot=""
userdrug=""
userstrain=""
userknockout=""
userpanel=""
usersex=""
userbioMatrix=""
filterSearchTerm=[]
filterSearchType=[]
filtersearchStatus=0
try:
useruniprotkb = request.GET["UniProtKB accession"]
except MultiValueDictKeyError:
pass
if '|' in useruniprotkb:
useruniprotkb=(useruniprotkb.strip()).split('|')
else:
useruniprotkb=(useruniprotkb.strip()).split('\n')
useruniprotkb=[(item.strip()).lower() for item in useruniprotkb]
useruniprotkb=map(str, useruniprotkb)
useruniprotkb=filter(None, useruniprotkb)
try:
userprotein = request.GET["Protein"]
except MultiValueDictKeyError:
pass
if '|' in userprotein:
userprotein=(userprotein.strip()).split('|')
else:
userprotein=(userprotein.strip()).split('\\n')
userprotein=[(item.strip()).lower() for item in userprotein]
userprotein=map(str, userprotein)
userprotein=filter(None, userprotein)
try:
usergeneid = request.GET["Gene"]
except MultiValueDictKeyError:
pass
if '|' in usergeneid:
usergeneid=(usergeneid.strip()).split('|')
else:
usergeneid=(usergeneid.strip()).split('\\n')
usergeneid=[(item.strip()).lower() for item in usergeneid]
usergeneid=map(str, usergeneid)
usergeneid=filter(None, usergeneid)
try:
userorg = request.GET["Organism"]
except MultiValueDictKeyError:
pass
if '|' in userorg:
userorg=(userorg.strip()).split('|')
else:
userorg=(userorg.strip()).split('\\n')
userorg=[(item.strip()).lower() for item in userorg]
userorg=map(str, userorg)
userorg=filter(None, userorg)
try:
userorgid = request.GET["Organism ID"]
except MultiValueDictKeyError:
pass
if '|' in userorgid:
userorgid=(userorgid.strip()).split('|')
else:
userorgid=(userorgid.strip()).split('\\n')
userorgid=[(item.strip()).lower() for item in userorgid]
userorgid=map(str, userorgid)
userorgid=filter(None, userorgid)
try:
usersubcell = request.GET["Subcellular localization"]
except MultiValueDictKeyError:
pass
if '|' in usersubcell:
usersubcell=(usersubcell.strip()).split('|')
else:
usersubcell=(usersubcell.strip()).split('\\n')
usersubcell=[(item.strip()).lower() for item in usersubcell]
usersubcell=map(str, usersubcell)
usersubcell=filter(None, usersubcell)
try:
userpepseq = request.GET["Peptide sequence"]
except MultiValueDictKeyError:
pass
if '|' in userpepseq:
userpepseq=(userpepseq.strip()).split('|')
else:
userpepseq=(userpepseq.strip()).split('\\n')
userpepseq=[(item.strip()).lower() for item in userpepseq]
userpepseq=map(str, userpepseq)
userpepseq=filter(None, userpepseq)
try:
userkegg = request.GET["Molecular pathway(s)"]
except MultiValueDictKeyError:
pass
if '|' in userkegg:
userkegg=(userkegg.strip()).split('|')
else:
userkegg=(userkegg.strip()).split('\\n')
userkegg=[(item.strip()).lower() for item in userkegg]
userkegg=map(str, userkegg)
userkegg=filter(None, userkegg)
try:
userdis = request.GET["Involvement in disease"]
except MultiValueDictKeyError:
pass
if '|' in userdis:
userdis=(userdis.strip()).split('|')
else:
userdis=(userdis.strip()).split('\\n')
userdis=[(item.strip()).lower() for item in userdis]
userdis=map(str, userdis)
userdis=filter(None, userdis)
try:
usergoid = request.GET["GO ID"]
except MultiValueDictKeyError:
pass
if '|' in usergoid:
usergoid=(usergoid.strip()).split('|')
else:
usergoid=(usergoid.strip()).split('\\n')
usergoid=[(item.strip()).lower() for item in usergoid]
usergoid=map(str, usergoid)
usergoid=filter(None, usergoid)
try:
usergotn = request.GET["GO Term"]
except MultiValueDictKeyError:
pass
if '|' in usergotn:
usergotn=(usergotn.strip()).split('|')
else:
usergotn=(usergotn.strip()).split('\\n')
usergotn=[(item.strip()).lower() for item in usergotn]
usergotn=map(str, usergotn)
usergotn=filter(None, usergotn)
try:
usergot = request.GET["GO Aspects"]
except MultiValueDictKeyError:
pass
if '|' in usergot:
usergot=(usergot.strip()).split('|')
else:
usergot=(usergot.strip()).split('\\n')
usergot=[(item.strip()).lower() for item in usergot]
usergot=map(str, usergot)
usergot=filter(None, usergot)
try:
userdrug = request.GET["Drug associations ID"]
except MultiValueDictKeyError:
pass
if '|' in userdrug:
userdrug=(userdrug.strip()).split('|')
else:
userdrug=(userdrug.strip()).split('\\n')
userdrug=[(item.strip()).lower() for item in userdrug]
userdrug=map(str, userdrug)
userdrug=filter(None, userdrug)
try:
userstrain = request.GET["Strain"]
except MultiValueDictKeyError:
pass
if '|' in userstrain:
userstrain=(userstrain.strip()).split('|')
else:
userstrain=(userstrain.strip()).split('\\n')
userstrain=[(item.strip()).lower() for item in userstrain]
userstrain=map(str, userstrain)
userstrain=filter(None, userstrain)
try:
userknockout = request.GET["Mutant"]
except MultiValueDictKeyError:
pass
if '|' in userknockout:
userknockout=(userknockout.strip()).split('|')
else:
userknockout=(userknockout.strip()).split('\\n')
userknockout=[(item.strip()).lower() for item in userknockout]
userknockout=map(str, userknockout)
userknockout=filter(None, userknockout)
try:
userpanel = request.GET["Panel"]
except MultiValueDictKeyError:
pass
if '|' in userpanel:
userpanel=(userpanel.strip()).split('|')
else:
userpanel=(userpanel.strip()).split('\\n')
userpanel=[(item.strip()).lower() for item in userpanel]
userpanel=map(str, userpanel)
userpanel=filter(None, userpanel)
try:
usersex = request.GET["Sex"]
except MultiValueDictKeyError:
pass
if '|' in usersex:
usersex=(usersex.strip()).split('|')
else:
usersex=(usersex.strip()).split('\\n')
usersex=[(item.strip()).lower() for item in usersex]
usersex=map(str, usersex)
usersex=filter(None, usersex)
try:
userbioMatrix = request.GET["Biological matrix"]
except MultiValueDictKeyError:
pass
if '|' in userbioMatrix:
userbioMatrix=(userbioMatrix.strip()).split('|')
else:
userbioMatrix=(userbioMatrix.strip()).split('\\n')
userbioMatrix=[(item.strip()).lower() for item in userbioMatrix]
userbioMatrix=map(str, userbioMatrix)
userbioMatrix=filter(None, userbioMatrix)
spquerylist =[]
searchtermlist=[]
if len(useruniprotkb) >0:
shouldlist=[]
for x in useruniprotkb:
tempquery={
"multi_match":{
"query":x.strip(),
"type":"best_fields",
"fields":["UniProtKB Accession.ngram"],
"minimum_should_match":"100%"
}
}
shouldlist.append(tempquery)
booldic={}
booldic["bool"]={"should":shouldlist,"minimum_should_match": 1}
searchtermlist.append(booldic)
if len(userprotein)> 0:
shouldlist=[]
for x in userprotein:
tempquery={
"multi_match":{
"query":x.strip(),
"type":"best_fields",
"fields":["Protein.ngram"],
"minimum_should_match":"100%"
}
}
shouldlist.append(tempquery)
booldic={}
booldic["bool"]={"should":shouldlist,"minimum_should_match": 1}
searchtermlist.append(booldic)
if len(usergeneid) >0:
shouldlist=[]
for x in usergeneid:
tempquery={
"multi_match":{
"query":x.strip(),
"type":"best_fields",
"fields":["Gene.ngram"],
"minimum_should_match":"100%"
}
}
shouldlist.append(tempquery)
booldic={}
booldic["bool"]={"should":shouldlist,"minimum_should_match": 1}
searchtermlist.append(booldic)
if len(userorg) > 0:
shouldlist=[]
for x in userorg:
tempquery={
"multi_match":{
"query":x.strip(),
"type":"best_fields",
"fields":["Organism.ngram"],
"minimum_should_match":"100%"
}
}
shouldlist.append(tempquery)
booldic={}
booldic["bool"]={"should":shouldlist,"minimum_should_match": 1}
searchtermlist.append(booldic)
if len(userorgid) > 0:
shouldlist=[]
for x in userorgid:
tempquery={
"multi_match":{
"query":x.strip(),
"type":"best_fields",
"fields":["Organism ID.ngram"],
"minimum_should_match":"100%"
}
}
shouldlist.append(tempquery)
booldic={}
booldic["bool"]={"should":shouldlist,"minimum_should_match": 1}
searchtermlist.append(booldic)
if len(usersubcell) >0:
shouldlist=[]
for x in usersubcell:
tempquery={
"multi_match":{
"query":x.strip(),
"type":"best_fields",
"fields":["SubCellular.ngram"],
"minimum_should_match":"100%"
}
}
shouldlist.append(tempquery)
booldic={}
booldic["bool"]={"should":shouldlist,"minimum_should_match": 1}
searchtermlist.append(booldic)
if len(userpepseq) >0:
shouldlist=[]
for x in userpepseq:
tempquery={
"multi_match":{
"query":x.strip(),
"type":"best_fields",
"fields":["Peptide Sequence.ngram"],
"minimum_should_match":"100%"
}
}
shouldlist.append(tempquery)
booldic={}
booldic["bool"]={"should":shouldlist,"minimum_should_match": 1}
searchtermlist.append(booldic)
if len(userkegg) >0:
shouldlist=[]
for x in userkegg:
tempquery={
"multi_match":{
"query":x.strip(),
"type":"best_fields",
"fields":["Mouse Kegg Pathway Name.ngram"],
"minimum_should_match":"100%"
}
}
shouldlist.append(tempquery)
booldic={}
booldic["bool"]={"should":shouldlist,"minimum_should_match": 1}
searchtermlist.append(booldic)
if len(userdis) >0:
shouldlist=[]
for x in userdis:
tempquery={
"multi_match":{
"query":x.strip(),
"type":"best_fields",
"fields":["Human Disease Name.ngram"],
"minimum_should_match":"100%"
}
}
shouldlist.append(tempquery)
booldic={}
booldic["bool"]={"should":shouldlist,"minimum_should_match": 1}
searchtermlist.append(booldic)
if len(usergoid) >0:
sdict={}
sdict["Mouse Go ID.ngram"]=[i.split(' ')[0] for i in usergoid]
tdict={}
tdict["terms"]=sdict
searchtermlist.append(tdict)
shouldlist=[]
for x in usergoid:
tempquery={
"multi_match":{
"query":x.strip(),
"type":"best_fields",
"fields":["Mouse Go ID.ngram"],
"minimum_should_match":"100%"
}
}
shouldlist.append(tempquery)
booldic={}
booldic["bool"]={"should":shouldlist,"minimum_should_match": 1}
searchtermlist.append(booldic)
if len(usergotn) >0:
shouldlist=[]
for x in usergotn:
tempquery={
"multi_match":{
"query":x.strip(),
"type":"best_fields",
"fields":["Mouse Go Name.ngram"],
"minimum_should_match":"100%"
}
}
shouldlist.append(tempquery)
booldic={}
booldic["bool"]={"should":shouldlist,"minimum_should_match": 1}
searchtermlist.append(booldic)
if len(usergot) > 0:
shouldlist=[]
for x in usergot:
tempquery={
"multi_match":{
"query":x.strip(),
"type":"best_fields",
"fields":["Mouse Go Term.ngram"],
"minimum_should_match":"100%"
}
}
shouldlist.append(tempquery)
booldic={}
booldic["bool"]={"should":shouldlist,"minimum_should_match": 1}
searchtermlist.append(booldic)
if len(userdrug) > 0:
shouldlist=[]
for x in userdrug:
tempquery={
"multi_match":{
"query":x.strip(),
"type":"best_fields",
"fields":["Human Drug Bank.ngram"],
"minimum_should_match":"100%"
}
}
shouldlist.append(tempquery)
booldic={}
booldic["bool"]={"should":shouldlist,"minimum_should_match": 1}
searchtermlist.append(booldic)
if len(userstrain) > 0:
filterSearchType.append('strain')
filterSearchTerm.append('|'.join(userstrain))
shouldlist=[]
for x in userstrain:
tempquery={
"multi_match":{
"query":x.strip(),
"type":"best_fields",
"fields":["Strain.ngram"],
"minimum_should_match":"100%"
}
}
shouldlist.append(tempquery)
booldic={}
booldic["bool"]={"should":shouldlist,"minimum_should_match": 1}
searchtermlist.append(booldic)
if len(userknockout) > 0:
shouldlist=[]
for x in userknockout:
tempquery={
"multi_match":{
"query":x.strip(),
"type":"best_fields",
"fields":["Knockout.ngram"],
"minimum_should_match":"100%"
}
}
shouldlist.append(tempquery)
booldic={}
booldic["bool"]={"should":shouldlist,"minimum_should_match": 1}
searchtermlist.append(booldic)
if len(userpanel) > 0:
shouldlist=[]
for x in userpanel:
tempquery={
"multi_match":{
"query":x.strip(),
"type":"best_fields",
"fields":["Panel.ngram"],
"minimum_should_match":"100%"
}
}
shouldlist.append(tempquery)
booldic={}
booldic["bool"]={"should":shouldlist,"minimum_should_match": 1}
searchtermlist.append(booldic)
if len(usersex) > 0:
filterSearchType.append('sex')
filterSearchTerm.append('|'.join(usersex))
shouldlist=[]
for x in usersex:
tempquery={
"multi_match":{
"query":x.strip(),
"type":"best_fields",
"fields":["Sex.ngram"],
"minimum_should_match":"100%"
}
}
shouldlist.append(tempquery)
booldic={}
booldic["bool"]={"should":shouldlist,"minimum_should_match": 1}
searchtermlist.append(booldic)
if len(userbioMatrix) > 0:
filterSearchType.append('biologicalMatrix')
filterSearchTerm.append('|'.join(userbioMatrix))
shouldlist=[]
for x in userbioMatrix:
tempquery={
"multi_match":{
"query":x.strip(),
"type":"best_fields",
"fields":["Biological Matrix.ngram"],
"minimum_should_match":"100%"
}
}
shouldlist.append(tempquery)
booldic={}
booldic["bool"]={"should":shouldlist,"minimum_should_match": 1}
searchtermlist.append(booldic)
if not searchtermlist or len(searchtermlist)==0:
return Response({"error": "No information passed!"}, status=status.HTTP_400_BAD_REQUEST)
es.indices.refresh(index="xxxxxxxxx-index")
query={
"query": {
"bool": {
"must":searchtermlist
}
}
}
try:
if filterSearchType.index('sex') >=0:
filtersearchStatus=1
except ValueError:
pass
try:
if filterSearchType.index('strain') >=0:
filtersearchStatus=1
except ValueError:
pass
try:
if filterSearchType.index('biologicalMatrix') >=0:
filtersearchStatus=1
except ValueError:
pass
try:
if filterSearchType.index('panel') >=0:
filtersearchStatus=1
except ValueError:
pass
try:
if filterSearchType.index('knockout') >=0:
filtersearchStatus=1
except ValueError:
pass
jfinaldata=[]
res=helpers.scan(client=es,scroll='2m',index="xxxxxxxxx-index", doc_type="xxxxxxxx-type",query=query,request_timeout=30)
jfinaldata=[]
uniprotpepinfo={}
for i in res:
jdic=i['_source']
jdic={str(tkey):force_text(tvalue) for tkey,tvalue in jdic.items()}
panelFilter=True
if len(userpanel) >0:
for q in userpanel:
if q.lower() in (jdic['Panel'].lower()).split(';'):
panelFilter=True
break
else:
panelFilter=False
#if jdic["Retention Time"].lower() =='na' or jdic["Gradients"].lower() =='na':
if jdic["UniprotKb entry status"] =="Yes" and panelFilter:
if uniprotpepinfo.has_key(jdic["UniProtKB Accession"]) and panelFilter:
uniprotpepinfo[jdic["UniProtKB Accession"]].append(jdic["Peptide Sequence"])
else:
uniprotpepinfo[jdic["UniProtKB Accession"]]=[jdic["Peptide Sequence"]]
if jdic["Human UniProtKB Accession"].lower() !='na' and jdic["Present in human ortholog"].lower() =='no':
jdic["Available assays in human ortholog"]='http://mrmassaydb.proteincentre.com/search/hyperlink/?UniProtKB Accession='+jdic["Human UniProtKB Accession"]
else:
jdic["Available assays in human ortholog"]='NA'
#if jdic["Retention Time"].lower() =='na' or jdic["Gradients"].lower() =='na':
if jdic["Retention Time"].lower() =='na':
jdic["Summary Concentration Range Data"]='NA'
jdic["Concentration View"]='NA'
if filtersearchStatus==0:
jdic["Summary Concentration Range Data"]=jdic["Summary Concentration Range Data"].replace('fmol target protein/u','fmol target protein/µ')
jdic["Summary Concentration Range Data"]=jdic["Summary Concentration Range Data"].replace('ug protein/u','µg protein/µ')
jdic["Summary Concentration Range Data"]=jdic["Summary Concentration Range Data"].replace('ug protein/mg','µg protein/mg')
jdic["All Concentration Range Data"]=jdic["All Concentration Range Data"].replace('fmol target protein/u','fmol target protein/µ')
jdic["All Concentration Range Data"]=jdic["All Concentration Range Data"].replace('ug protein/u','µg protein/µ')
jdic["All Concentration Range Data"]=jdic["All Concentration Range Data"].replace('ug protein/mg','µg protein/mg')
jdic["All Concentration Range Data-Sample LLOQ Based"]=jdic["All Concentration Range Data-Sample LLOQ Based"].replace('fmol target protein/u','fmol target protein/µ')
jdic["All Concentration Range Data-Sample LLOQ Based"]=jdic["All Concentration Range Data-Sample LLOQ Based"].replace('ug protein/u','µg protein/µ')
jdic["All Concentration Range Data-Sample LLOQ Based"]=jdic["All Concentration Range Data-Sample LLOQ Based"].replace('ug protein/mg','µg protein/mg')
jdic["Concentration View"]=jdic["Concentration View"].replace('fmol target protein/u','fmol target protein/µ')
jdic["Concentration Range"]=jdic["Concentration Range"].replace('fmol target protein/u','fmol target protein/µ')
jdic["LLOQ"]=jdic["LLOQ"].replace('fmol target protein/u','fmol target protein/µ')
jdic["ULOQ"]=jdic["ULOQ"].replace('fmol target protein/u','fmol target protein/µ')
jdic["Sample LLOQ"]=jdic["Sample LLOQ"].replace('fmol target protein/uL','fmol target protein/µ')
if jdic["Unique in protein"].upper() =='NA':
jdic["Unique in protein"]=jdic["Unique in protein"].replace('NA','No')
if jdic["Present in isoforms"].upper() =='NA':
jdic["Present in isoforms"]=jdic["Present in isoforms"].replace('NA','No')
jfinaldata.append(jdic)
foundHits=len(jfinaldata)
if foundHits <= 0:
return Response({"error": "No information found!"}, status=status.HTTP_400_BAD_REQUEST)
es.indices.refresh(index="xxxxxxxxx-index")
if filtersearchStatus>0:
jfinaldata,filteredUniProtIDs=filterSearch(jfinaldata,filterSearchTerm,filterSearchType)
foundHits=len(jfinaldata)
if foundHits <= 0:
return Response({"error": "No information found!"}, status=status.HTTP_400_BAD_REQUEST)
else:
jfinaldata=updateDataToDownload(jfinaldata)
jsonfilename=str(uuid.uuid4())+'_restapi_search.json'
jsonfilepath=os.path.join(settings.BASE_DIR, 'resultFile', 'jsonData','resultJson', 'restapisearch', jsonfilename)
jsonfileoutput= open(jsonfilepath,'w')
json.dump(jfinaldata,jsonfileoutput)
jsonfileoutput.close()
df=pd.read_json(jsonfilepath)
df.rename(columns ={'UniProtKB Accession':'Mouse UniProtKB accession','Protein':'Mouse Protein name',\
'Gene':'Mouse Gene','Present in isoforms':'Peptide present in isoforms',\
'Peptide Sequence':'Peptide sequence','Knockout':'Mutant',\
'Unique in protein':'Peptide unique in proteome','Human UniProtKB Accession': \
'UniProtKB accession of human ortholog','Human ProteinName': 'Human ortholog',\
'Peptide ID':'Assay ID','Present in human isoforms':'Peptide present in human isoforms',\
'Unique in human protein':'Peptide unique in human protein',\
'SubCellular':'Subcellular localization','Mouse Kegg Pathway':'Molecular pathway(s) Mouse',\
'Present in human ortholog':'Peptide present in human ortholog',\
'Human Kegg Pathway':'Molecular pathway(s) Human','Human UniProt DiseaseData':'Involvement in disease-Human(UniProt)',\
'Human DisGen DiseaseData':'Involvement in disease-Human(DisGeNET)','Human Drug Bank':\
'Drug associations-Human','CZE Purity':'CZE','AAA Concentration':'AAA',\
'Mouse Go':'GO Mouse','Human Go':'GO Human','LLOQ':'Assay LLOQ','ULOQ':'Assay ULOQ'}, inplace =True)
#df=df.loc[:,restApiColname]
updatedresult=df.to_json(orient='records')
updatedresult=json.loads(updatedresult)
updatedUniInfo=pepbasedInfoRESTAPI(updatedresult,uniprotpepinfo)
return Response(updatedUniInfo)
def peptideUniqueness(request):
"""
This function is searching results, based on given multi search parameters
in database.
"""
ip = get_ip(request, right_most_proxy=True)
IpAddressInformation.objects.create(ip_address=ip)
if request.method=='GET':
response_data={}
useruniprotkb=str(request.GET.get("Uniprotkb")).strip()
userpepseq=str(request.GET.get("pepseq")).strip()
userfastafilename=str(request.GET.get("fastafile")).strip()
userpepseq=userpepseq.upper()
reachable=True
valid=False
pepjsondatalist=[]
es.indices.refresh(index="xxxxxxxxx-index")
query={"query": {
"bool": {
"must": [
{"match": {"UniProtKB Accession": useruniprotkb}},
{"match": {"Peptide Sequence": userpepseq}} ]
}
}
}
res = es.search(index="xxxxxxxxx-index", doc_type="xxxxxxxx-type", body=query)
foundHits=res["hits"]["total"]
originalpepunqstatus="Not unique"
uniprotkbstatus="NA"
for hit in res['hits']['hits']:
jdic=hit["_source"]
jdic={str(tkey):force_text(tvalue) for tkey,tvalue in jdic.items()}
uniprotkbstatus=str(jdic["UniprotKb entry status"]).strip()
if jdic["Unique in protein"].upper() =='NA':
jdic["Unique in protein"]=jdic["Unique in protein"].replace('NA','No')
if jdic["Present in isoforms"].upper() =='NA':
jdic["Present in isoforms"]=jdic["Present in isoforms"].replace('NA','No')
if len(str(jdic["Unique in protein"]).strip())>0:
originalpepunqstatus=str(jdic["Unique in protein"]).strip()
es.indices.refresh(index="xxxxxxxxx-index")
fastafilepath=os.path.join(settings.BASE_DIR, 'resultFile', 'fastaFile', userfastafilename+'.fasta')
if os.path.exists(fastafilepath) and foundHits>0:
proseq=''
try:
sleep(random.randint(5,10))
requests.get("https://www.uniprot.org/", timeout=1)
unidatafasta = urllib.urlopen("https://www.uniprot.org/uniprot/" + useruniprotkb + ".fasta")
for i in range(1):
header=unidatafasta.next()
if '>' in header[0]:
valid=True
if valid:
for line in unidatafasta:
proseq+=line.strip()
unidatafasta.close()
except ConnectionError as e:
reachable=False
if reachable:
fastaseq=[]
contextpepuser=[]
peptide_pattern = re.compile(userpepseq,re.IGNORECASE)
for match in re.finditer(peptide_pattern,proseq):
matchpdbseqpos=range(int(match.start()),match.end())
proseq=proseq.upper()
tseq=proseq
seqlen=len(proseq)
proseqlist=list(proseq)
for y in range(0,len(proseqlist)):
if y in matchpdbseqpos:
proseqlist[y]='<b><font color="red">'+proseqlist[y]+'</font></b>'
if y%60 ==0 and y !=0:
proseqlist[y]=proseqlist[y]+'<br/>'
proseq="".join(proseqlist)
contextpepuser.append(['<a target="_blank" href="https://www.uniprot.org/uniprot/'+useruniprotkb+'">'+useruniprotkb+'</a>',(int(match.start())+1),match.end(),matchpdbseqpos,tseq,seqlen,proseq,'MouseQuaPro'])
for useq_record in SeqIO.parse(fastafilepath, 'fasta'):
seqheader = useq_record.id
sequniID = seqheader.split(' ')[0]
sequniID=sequniID.replace('>','')
tempseqs = str(useq_record.seq).strip()
fastaseq.append(tempseqs.upper())
for fmatch in re.finditer(peptide_pattern,tempseqs.upper()):
fmatchpdbseqpos=range(int(fmatch.start()),fmatch.end())
tempseqs=tempseqs.upper()
tseq=tempseqs
seqlen=len(tempseqs)
tempseqslist=list(tempseqs)
for y in range(0,len(tempseqslist)):
if y in fmatchpdbseqpos:
tempseqslist[y]='<b><font color="red">'+tempseqslist[y]+'</font></b>'
if y%60 ==0 and y !=0:
tempseqslist[y]=tempseqslist[y]+'<br/>'
tempseqs="".join(tempseqslist)
contextpepuser.append([sequniID,(int(fmatch.start())+1),fmatch.end(),fmatchpdbseqpos,tseq,seqlen,tempseqs,'User data'])
useruniqstatus=''
unqfastaseq=list(set(fastaseq))
indices = [i for i, s in enumerate(fastaseq) if userpepseq.upper() in s]
if len(indices)==0:
useruniqstatus ="Not present"
elif len(indices) > 1:
useruniqstatus="Present but not unique"
else:
useruniqstatus="Present and unique"
for x in contextpepuser:
tempdatadic={}
tempdatadic["proteinID"]=x[0]
tempdatadic["peptideSequence"]=userpepseq
tempdatadic["start"]=str(x[1])
tempdatadic["end"]=str(x[2])
tempdatadic["seqlen"]=str(x[-3])
tempdatadic["seq"]=str(x[-4])
if 'target' in x[0]:
tempdatadic["peptideuniqueinprotein"]=originalpepunqstatus
else:
tempdatadic["peptideuniqueinprotein"]=useruniqstatus
tempdatadic["datasource"]=str(x[-1])
tempdatadic["highlightedpepseq"]=str(x[-2])
pepjsondatalist.append(tempdatadic)
pepunqdata={"data":pepjsondatalist}
response_data={'pepunqdata':json.dumps(pepunqdata),'reachable':reachable}
else:
response_data={'reachable':reachable}
return HttpResponse(json.dumps(response_data), content_type="application/json")
def contact(request):
"""
This is contact form where
Admin will recieve email from contact page.
"""
ip = get_ip(request, right_most_proxy=True)
IpAddressInformation.objects.create(ip_address=ip)
if request.method=='GET':
contactdetails=json.loads(request.GET.get('contactdetails').strip())
form_email = contactdetails["contactFormEmail"].strip() # get email address
form_full_name = contactdetails["contactFormName"].strip() # get name
form_message = contactdetails["contactFormMessage"].strip() # get message
form_userWantForward = contactdetails["contactFormCopy"] # user Want to Forward this email
subject='Site contact form for QMPKB'
from_email=settings.EMAIL_HOST_USER
to_email=[from_email, '<EMAIL>','<EMAIL>','<EMAIL>']
contact_message="%s: %s via %s"%(
form_full_name,
form_message,
form_email)
send_mail(subject,contact_message,from_email,to_email,fail_silently=True) # sent email
#foward user the same email
if form_userWantForward:
contact_message_user="%s: %s via %s"%(
form_full_name,
form_message,
form_email)
send_mail(subject,contact_message_user,from_email,[form_email],fail_silently=True) # sent email
return HttpResponse({}, content_type="application/json")
def foldChange(request):
if request.method=='GET':
dropDownTerm=request.GET.get("dropDownTerm")# user input for searching result
dropDownTerm= str(dropDownTerm).strip()
checkBoxTerm=request.GET.get("checkBoxTerm")# user input for searching result
checkBoxTerm= str(checkBoxTerm).strip()
resultfileName=request.GET.get("fileName")# user input for searching result
resultfileName= str(resultfileName).strip()
queryDataDic=json.loads(request.GET.get("queryData"))# user input for searching result
homedir = os.path.normpath(os.getcwd() + os.sep + os.pardir)
matrixFilePath= os.path.join(homedir, 'src/qmpkbmotherfile', 'mouseQuaProMatrix.tsv')
resultfilePath=os.path.join(homedir, 'src/','/'.join(resultfileName.split('/')[1:]))
foldChangeStatus=True
response_data={}
log2foldChangeData=[]
foldchangePvalue=[]
flagData=[]
foldPairLegend=[]
defaultDropDownMenus=['Biological Matrix','Sex','Strain']
dropdownQuery=dropDownTerm
defaultDropDownMenus.remove(dropdownQuery)
checkedQuery=checkBoxTerm.split(',')
resultDF=pd.read_csv(resultfilePath)
proteinData=list(resultDF['Peptide sequence'] + '_' + resultDF['Mouse UniProtKB accession'])
df=pd.read_csv(matrixFilePath,delimiter='\t', na_filter=False)
columns=list(df.columns)[:3]+proteinData
del queryDataDic[dropdownQuery]
querkeys=queryDataDic.keys()
df=df.loc[(df[querkeys[0]].isin(queryDataDic[querkeys[0]])) & (df[querkeys[1]].isin(queryDataDic[querkeys[1]]))]
df=df[columns]
df.drop(defaultDropDownMenus, axis=1, inplace=True)
df = df[(df[dropdownQuery] == checkedQuery[0]) | (df[dropdownQuery] == checkedQuery[1])]
for protID in proteinData:
subDF=df[[dropdownQuery,protID]]
pair1=subDF[protID][(subDF[dropdownQuery]==checkedQuery[0]) & (subDF[protID].astype(str) !='nan')]
pair1=list(pair1.astype(float))
pair2=subDF[protID][(subDF[dropdownQuery]==checkedQuery[1]) & (subDF[protID].astype(str) !='nan')]
pair2=list(pair2.astype(float))
if len(pair1)>0 and len(pair2)>0:
meanConcPair1=np.mean(pair1)
meanConcPair2=np.mean(pair2)
log2foldChangeData.append(math.log(abs(meanConcPair1/meanConcPair2),2))
pair1=[math.log(v1) for v1 in pair1]
pair2=[math.log(v2) for v2 in pair2]
if len(pair1)==1 or len(pair2)==1:
flagData.append('Yes')
foldchangePvalue.append(1)
else:
try:
stat, pval = mannwhitneyu(pair1, pair2)
foldchangePvalue.append(pval)
flagData.append('No')
except ValueError:
flagData.append('Yes')
foldchangePvalue.append(1)
foldPairLegend.append(protID)
#foldchangePvalue_adjust =statsR.p_adjust(FloatVector(foldchangePvalue), method = 'BH')
foldchangePvalue_adjust=(p_adjust_bh(foldchangePvalue)).tolist()
foldchangePvalue_adjust=[-math.log10(p) for p in foldchangePvalue_adjust]
indicesYes = [i for i, x in enumerate(flagData) if x == "Yes"]
indicesNo = [i for i, x in enumerate(flagData) if x == "No"]
try:
maxAbsValLog2=max(list(map(abs,log2foldChangeData)))
maxValPval=max(foldchangePvalue_adjust)
hLine=abs(math.log10(0.05))
if hLine > maxValPval:
maxValPval=hLine
flaggedData={
'Yes':[list(np.array(log2foldChangeData)[indicesYes]),list(np.array(foldchangePvalue_adjust)[indicesYes]),list(np.array(foldPairLegend)[indicesYes])],
'No':[list(np.array(log2foldChangeData)[indicesNo]),list(np.array(foldchangePvalue_adjust)[indicesNo]),list(np.array(foldPairLegend)[indicesNo])]
}
response_data ={
'log2FoldData':flaggedData,
'maxAbsValLog2':maxAbsValLog2,
'hLine':hLine,
'maxValPval':maxValPval,
'foldChangeStatus':foldChangeStatus
}
except ValueError:
foldChangeStatus=False
response_data ={
'log2FoldData':{},
'maxAbsValLog2':0,
'hLine':0,
'maxValPval':0,
'foldChangeStatus':foldChangeStatus
}
return HttpResponse(json.dumps(response_data), content_type="application/json")
def detailInformation(request):
ip = get_ip(request, right_most_proxy=True)
IpAddressInformation.objects.create(ip_address=ip)
if request.method=='GET':
uniprotkb=str(request.GET.get("uniProtKb")).strip()
resultfileName=request.GET.get("fileName")# user input for searching result
resultfileName= str(resultfileName).strip()
homedir = os.path.normpath(os.getcwd() + os.sep + os.pardir)
resultfilePath='NA'
if resultfileName != 'NA':
resultfilePath=os.path.join(homedir, 'src/resultFile/jsonData/resultJson/search/results/',resultfileName+'_search_proteincentric.json')
else:
resultfilePath=os.path.join(homedir, 'src/resultFile/preDownloadFile/json/all_data_proteincentric.json')
fastafilename=request.GET.get("fastafilename")
fastafilename= str(fastafilename).strip()
if fastafilename != 'NA':
fastafilename=fastafilename.replace('|','_')
contextgoterm =[]
reachable=True
jvenndataseries=[]
response_data = {}
if len(uniprotkb)>0:
uniprotkblist=[]
code=None
geneName=None
protname=None
humanProtName=None
humanGeneName=None
humanUniKb=None
pepPresentInHumanOrtholog=None
availableAssayInHumanOrtholog=None
subcell=None
humanDiseaseUniProt=['NA']
humanDiseaseDisGeNet=['NA']
drugBank=None
orgID=None
disStat=0
drugStat=0
assayStat=0
bioMatStat=0
strainStat=0
es.indices.refresh(index="xxxxxxxxx-index")
#build elasticsearch query based provided uniprotkb acc
query={"query": {
"bool": {
"must": [
{"match": {"UniProtKB Accession": uniprotkb}},
{"match": {"UniprotKb entry status": "Yes"}}
]
}
}
}
res = es.search(index="xxxxxxxxx-index", doc_type="xxxxxxxx-type", body=query)
foundHits=res["hits"]["total"]
for hit in res['hits']['hits']:
jdic=hit["_source"]
jdic={str(tkey):force_text(tvalue) for tkey,tvalue in jdic.items()}
geneName=str(jdic["Gene"]).strip()
protname=str(jdic["Protein"]).strip()
es.indices.refresh(index="xxxxxxxxx-index")
if foundHits >0:
with open(resultfilePath) as rjf:
for resitem in json.load(rjf)['data']:
if resitem["UniProtKB Accession"]==uniprotkb:
orgID=resitem["Organism ID"].strip()
if len(resitem["Human ProteinName"].strip()) > 0 and resitem["Human ProteinName"].strip() != "NA":
tempLst =resitem["Human ProteinName"].strip().split('|')
humanProtName= "<br>".join(tempLst)
else:
humanProtName='NA'
if len(resitem["Human Gene"].strip()) > 0 and resitem["Human Gene"].strip() != "NA":
tempLst =(resitem["Human Gene"].strip()).split('|')
humanGeneName= "<br>".join(tempLst)
else:
humanGeneName='NA'
if len(resitem["Human UniProtKB Accession"].strip()) > 0 and resitem["Human UniProtKB Accession"].strip() != "NA":
tempLst =(resitem["Human UniProtKB Accession"].strip()).split(',')
for idx, val in enumerate(tempLst):
tempLst[idx]='<a target="_blank" routerLinkActive="active" href="https://www.uniprot.org/uniprot/' + val+'">'+val+ '</a>'
humanUniKb= "<br>".join(tempLst)
else:
humanUniKb='NA'
pepPresentInHumanOrtholog=resitem["Present in human ortholog"][0].strip()
if resitem["Available assays in human ortholog"].strip() != "NA":
availableAssayInHumanOrtholog= '<a target="_blank" routerLinkActive="active" href="'+ resitem["Available assays in human ortholog"] + '">' + 'View' + '</a>'
else:
availableAssayInHumanOrtholog='NA'
if len(resitem["SubCellular"].strip()) > 0:
subcell =(resitem["SubCellular"].strip()).split('|')
else:
subcell=['NA']
if len(resitem["Human UniProt DiseaseData"].strip()) > 0 and resitem["Human UniProt DiseaseData"].strip() != "NA":
humanDiseaseUniProt=resitem["Human UniProt DiseaseData URL"].strip().split('|')
else:
humanDiseaseUniProt=['NA']
if len(resitem["Human DisGen DiseaseData"].strip()) > 0 and resitem["Human DisGen DiseaseData"].strip() != "NA":
humanDiseaseDisGeNet=resitem["Human DisGen DiseaseData URL"].strip().split('|')
else:
humanDiseaseDisGeNet=['NA']
if len(resitem['Human Disease Name'].strip()) > 0 and resitem['Human Disease Name'].strip() != "NA":
disStat=len(resitem['Human Disease Name'].strip().split('|'))
if len(resitem['Peptide Sequence'].strip()) > 0 and resitem['Peptide Sequence'].strip() != "NA":
assayStat=len(resitem['Peptide Sequence'].strip().split('<br>'))
if len(resitem['Biological Matrix'].strip()) > 0 and resitem['Biological Matrix'].strip() != "NA":
bioMatStat=len(resitem['Biological Matrix'].strip().split('<br>'))
if len(resitem['Strain'].strip()) > 0 and resitem['Strain'].strip() != "NA":
strainStat=len(resitem['Strain'].strip().split('<br>'))
if len(resitem["Human Drug Bank"].strip()) > 0 and resitem["Human Drug Bank"].strip() != "NA":
#tempLst =resitem["Human Drug Bank"].strip().split('|')
drugBank=resitem["Human Drug Bank"].strip().split('|')
drugStat=len(drugBank)
else:
drugBank=['NA']
break
orthologData=[
{
"humanProtName":humanProtName,
"humanGeneName":humanGeneName,
"humanUniKb":humanUniKb,
"pepPresentInHumanortholog":pepPresentInHumanOrtholog,
"availableAssayInHumanortholog":availableAssayInHumanOrtholog,
"disStat":disStat,
"drugStat":drugStat
}
]
response_data ={
"resultFilePath":resultfilePath,"proteinName":protname,"geneName":geneName,"uniprotkb":uniprotkb,"foundHits":foundHits,
"orthologData":orthologData,"subcell":subcell,"humanDiseaseUniProt":humanDiseaseUniProt,"humanDiseaseDisGeNet":\
humanDiseaseDisGeNet,"drugBankData":drugBank,"fastafilename":fastafilename,"orgID":orgID,
"assayStat":assayStat,"bioMatStat":bioMatStat,"strainStat":strainStat
}
return HttpResponse(json.dumps(response_data), content_type="application/json")
def detailConcentration(request):
ip = get_ip(request, right_most_proxy=True)
IpAddressInformation.objects.create(ip_address=ip)
if request.method=='GET':
uniprotkb=str(request.GET.get("uniProtKb")).strip()
resultFilePath= request.GET['resultFilePath']
resultFilePath= str(request.GET.get("resultFilePath")).strip()
filterSearchType=[str('sex'),str('strain'),str('biologicalMatrix'),str('knockout')]
concUnit=[]
strainData=None
knockoutData=None
bioMatData=None
sexData=None
allConcSamLLOQ=None
allConc=None
summaryConcData=[]
es.indices.refresh(index="xxxxxxxxx-index")
query={"query": {
"bool": {
"must": [
{"match": {"UniProtKB Accession": uniprotkb}},
{"match": {"UniprotKb entry status": "Yes"}}
]
}
}
}
res = es.search(index="xxxxxxxxx-index", doc_type="xxxxxxxx-type", body=query)
protinfo={}
with open(resultFilePath) as rjf:
for resitem in json.load(rjf)['data']:
if resitem["UniProtKB Accession"]==uniprotkb:
allConcSamLLOQ=resitem["All Concentration Range Data-Sample LLOQ Based"];
allConc=resitem["All Concentration Range Data"];
bioMatData=resitem["Biological Matrix Details"]
strainData=resitem["Strain Details"]
sexData=resitem["Sex Details"]
knockoutData=resitem["Knockout Details"]
pepinfo =resitem["Peptide Based Info"]
for pepItem in pepinfo:
tempPepSeq=pepItem["Peptide Sequence"].strip()
if len(pepItem["concenQuery"].strip()) > 0 and pepItem["concenQuery"].strip().upper() !="NA":
tempQuery=pepItem["concenQuery"].strip().replace('!','/')
queryInfo=tempQuery.split('@')
tempfilterSearchTerm=[str(queryInfo[0]),str(queryInfo[1]),str(queryInfo[2]),str(queryInfo[3])]
protinfo[tempPepSeq]=tempfilterSearchTerm
break
finalconclist=[]
for protKey in protinfo:
sumconclist=[]
foundHits=res["hits"]["total"]
protList=[]
jfinaldata=[]
sampleLLOQ=''
ULOQ=''
filterSearchTerm=protinfo[protKey]
for hit in res['hits']['hits']:
jdic=hit["_source"]
jdic={str(tkey):force_text(tvalue) for tkey,tvalue in jdic.items()}
if str(jdic["Peptide Sequence"]).strip() ==protKey:
if (str(jdic["Summary Concentration Range Data"]).strip()) >0 and (str(jdic["Summary Concentration Range Data"]).strip()).lower() !='na':
sampleLLOQ=str(jdic["Sample LLOQ"]).strip()
ULOQ=str(jdic["ULOQ"]).strip()
jfinaldata.append(jdic)
es.indices.refresh(index="xxxxxxxxx-index")
jfinaldata=filterConcentration(jfinaldata,filterSearchTerm,filterSearchType)
sampleLLOQ=sampleLLOQ.replace(' (fmol target protein/ug extracted protein)','')
sampleLLOQ=dict([samval.split('|') for samval in sampleLLOQ.split(';')])
ULOQ=ULOQ.replace(' (fmol target protein/ug extracted protein)','')
ULOQ=dict([uval.split('|') for uval in ULOQ.split(';')])
sumconcdata=str(jfinaldata[0]["Summary Concentration Range Data"]).strip()
allconcdata=str(jfinaldata[0]["All Concentration Range Data"]).strip()
allconcdataSampleLLOQ=str(jfinaldata[0]["All Concentration Range Data-Sample LLOQ Based"]).strip()
sumconcdata=sumconcdata.replace('fmol target protein/u','fmol target protein/µ')
sumconcdata=sumconcdata.replace('ug extracted protein/uL','µg extracted protein/µL')
sumconcdata=sumconcdata.replace('ug extracted protein/mg','µg extracted protein/mg')
allconcdata=allconcdata.replace('fmol target protein/u','fmol target protein/µ')
allconcdata=allconcdata.replace('ug extracted protein/u','µg protein/µ')
allconcdata=allconcdata.replace('ug extracted protein/mg','µg extracted protein/mg')
allconcdataSampleLLOQ=allconcdataSampleLLOQ.replace('fmol target protein/u','fmol target protein/µ')
allconcdataSampleLLOQ=allconcdataSampleLLOQ.replace('ug extracted protein/u','µg extracted protein/µ')
sumconcinfo=sumconcdata.split(';')
allconinfo=allconcdata.split(';')
allconinfoSampleLLOQ=allconcdataSampleLLOQ.split(';')
for scitem in sumconcinfo:
scinfo =scitem.split('|')
tempSampleLLOQ=sampleLLOQ[scinfo[2]]
tempULOQ=ULOQ[scinfo[2]]
stempid='|'.join(map(str,scinfo[2:5]))
tempMatchConcList=[]
for acitem in allconinfo:
acinfo =acitem.split('|')
del acinfo[3]
atempid='|'.join(map(str,acinfo[2:5]))
if stempid.lower() ==atempid.lower():
concUnit.append('(' + acinfo[-2].strip().split(' (')[-1].strip())
if float(acinfo[-3].strip().split(' ')[0].strip()) >0:
tempMatchConcList.append(acinfo[-3].strip().split(' ')[0].strip())
tempMatchConcData='|'.join(map(str,tempMatchConcList))
tempMatchConcDataSampleLLOQ='NA'
templen=1
try:
templen=len(filter(None,map(str,list(set(allconinfoSampleLLOQ)))))
except UnicodeEncodeError:
pass
if 'NA' != ''.join(list(set(allconinfoSampleLLOQ))) and templen>0:
tempMatchConcListSampleLLOQ=[]
for slacitem in allconinfoSampleLLOQ:
if slacitem.upper().strip() !='NA':
slacinfo =slacitem.split('|')
del slacinfo[3]
slatempid='|'.join(map(str,slacinfo[2:5]))
if stempid.lower() ==slatempid.lower():
tempMatchConcListSampleLLOQ.append(slacinfo[-3].strip().split(' ')[0].strip())
tempMatchConcDataSampleLLOQ='|'.join(map(str,tempMatchConcListSampleLLOQ))
scinfo.append(str(jfinaldata[0]["UniProtKB Accession"]).strip())
scinfo.append(str(jfinaldata[0]["Protein"]).strip())
scinfo.append(str(jfinaldata[0]["Peptide Sequence"]).strip())
stempid=stempid+'|'+protKey[0:3]+'..'
scinfo.append(stempid)
scinfo.append(tempMatchConcData)
scinfo.append(tempMatchConcDataSampleLLOQ)
scinfo.append(tempSampleLLOQ)
scinfo.append(tempULOQ)
scinfo=[scI.split('(')[0].strip() if '(' in scI else scI for scI in scinfo]
sumconclist.append(scinfo)
summaryConcData.insert(0,str(jfinaldata[0]["Peptide Sequence"]).strip())
summaryConcData.insert(0,str(jfinaldata[0]["Protein"]).strip())
summaryConcData.insert(0,str(jfinaldata[0]["UniProtKB Accession"]).strip())
sumconclist=sorted(sumconclist,key=lambda l:l[4])
sumconclist=sorted(sumconclist,key=lambda l:l[3])
sumconclist=sorted(sumconclist,key=lambda l:l[2])
for conItem in sumconclist:
finalconclist.append(conItem)
concUnit=list(set(concUnit))
concUnit='&'.join(concUnit)
lenOfConcData=len(finalconclist)
response_data ={'conclist':finalconclist,'foundHits':foundHits,'concUnit':concUnit,'lenOfConcData':lenOfConcData,
"strainData":strainData,"knockoutData":knockoutData,"bioMatData":bioMatData,"sexData":sexData,
"allConcSamLLOQ":allConcSamLLOQ,"allConc":allConc
}
return HttpResponse(json.dumps(response_data), content_type="application/json")
def saveFastaFile(request):
"""
This is function save fasta file.
"""
ip = get_ip(request, right_most_proxy=True)
IpAddressInformation.objects.create(ip_address=ip)
if request.method=='GET':
userInputFastaFileContext=''
userInputFastaFileContext=str(request.GET.get('fastaFileContext')).strip()
userInputFastaFileContext=userInputFastaFileContext.replace('\\n','\n')
userInputFastaFileContext=userInputFastaFileContext.replace('"','')
nameFile=str(uuid.uuid4()) # generate random file name to store user search result
fastaseq=[]
finalsearhdata=''
currdate=str(datetime.datetime.now())
currdate=currdate.replace('-','_')
currdate=currdate.replace(' ','_')
currdate=currdate.replace(':','_')
currdate=currdate.replace('.','_')
nameFIle=currdate+'_'+nameFile
fastafilename=nameFile+'.fasta'
#storing user provided fasta file
fastafilepath=os.path.join(settings.BASE_DIR, 'resultFile', 'fastaFile', fastafilename)
fastafilewrite=open(fastafilepath,"w")
fastafilewrite.write(userInputFastaFileContext)
fastafilewrite.close()
response_data={'nameFile':nameFile}
return HttpResponse(json.dumps(response_data), content_type="application/json")
def submission(request):
"""
This is submission form where
Admin will recieve email from submission page.
"""
ip = get_ip(request, right_most_proxy=True)
IpAddressInformation.objects.create(ip_address=ip)
if request.method=='GET':
submissiondetails=json.loads(request.GET.get('submissiondetails').strip())
form_email = submissiondetails["submissionFormEmail"].strip() # get email address
form_full_name = submissiondetails["submissionFormName"].strip() # get name
form_laboratory = submissiondetails["submissionFormLaboratory"].strip() # get Laboratory
form_experiment = submissiondetails["submissionFormExperiment"].strip() # get Experiment
try:
form_publication = submissiondetails["submissionFormPublication"].strip() # get Publication
except AttributeError:
form_publication = 'NA'
form_data_repository = submissiondetails["submissionFormDataRepository"].strip() # get Data Repository
form_data_acession_number = submissiondetails["submissionFormDataAcessionNumber"].strip() # get Data Acession Number
try:
form_repository_password = submissiondetails["submissionFormRepositoryPassword"].strip() # get Repository Password
except AttributeError:
form_repository_password = 'NA'
form_message = submissiondetails["submissionFormMessage"].strip() # get message
form_userWantForward = submissiondetails["submissionFormCopy"] # user Want to Forward this email
subject='Site data submission form for MouseQuaPro'
from_email=settings.EMAIL_HOST_USER
to_email=['<EMAIL>','<EMAIL>','<EMAIL>']
submission_message="Full Name:%s, Email:%s,Laboratory:%s, Description of experiment:%s, Publication(s) DOI:%s,Data repository:%s,Data acession number:%s,Repository password:%s,Message: %s"%(
form_full_name,
form_email,
form_laboratory,
form_experiment,
form_publication,
form_data_repository,
form_data_acession_number,
form_repository_password,
form_message)
send_mail(subject,submission_message,from_email,to_email,fail_silently=True) # sent email
#foward user the same email
if form_userWantForward:
submission_message_user="Full Name:%s, Email:%s,Laboratory:%s, Description of experiment:%s, Publication(s) DOI:%s,Data repository:%s,Data acession number:%s,Repository password:%s,Message: %s"%(
form_full_name,
form_email,
form_laboratory,
form_experiment,
form_publication,
form_data_repository,
form_data_acession_number,
form_repository_password,
form_message)
send_mail(subject,submission_message_user,from_email,[form_email],fail_silently=True) # sent email
return HttpResponse({}, content_type="application/json")
def generateDownload(request):
"""
This is generate download file
"""
ip = get_ip(request, right_most_proxy=True)
IpAddressInformation.objects.create(ip_address=ip)
if request.method=='GET':
resultJsonfilepath=request.GET.get('jsonfile').strip()
fastaFileStatus=resultJsonfilepath.split('|')[1]
resultJsonfileName=resultJsonfilepath.split('/')[-1].split('_')[0]
downloadFilename='Results_'+resultJsonfileName+'_search.csv'
downloadResultFilePath=os.path.join(settings.BASE_DIR, 'resultFile', 'downloadResult', 'search', downloadFilename)
homedir = os.path.normpath(os.getcwd() + os.sep + os.pardir)
fullresultfilePath=os.path.join(homedir, 'src/resultFile/jsonData/resultJson/search/downloadversion/',resultJsonfilepath.split('/')[-1].split('|')[0])
with open(fullresultfilePath) as rjf:
resultsJsonData=json.load(rjf)
resultsJsonData=updateDataToDownload(resultsJsonData)
df=pd.read_json(json.dumps(resultsJsonData))
df.rename(columns ={'UniProtKB Accession':'Mouse UniProtKB accession','Protein':'Mouse Protein name',\
'Gene':'Mouse Gene','Present in isoforms':'Peptide present in isoforms',\
'Peptide Sequence':'Peptide sequence','Knockout':'Mutant',\
'Unique in protein':'Peptide unique in proteome','Human UniProtKB Accession': \
'UniProtKB accession of human ortholog','Human ProteinName': 'Human ortholog',\
'Peptide ID':'Assay ID','Present in human isoforms':'Peptide present in human isoforms',\
'Unique in human protein':'Peptide unique in human protein',\
'SubCellular':'Subcellular localization','Mouse Kegg Pathway':'Molecular pathway(s) Mouse',\
'Present in human ortholog':'Peptide present in human ortholog',\
'Human Kegg Pathway':'Molecular pathway(s) Human','Human UniProt DiseaseData':'Involvement in disease-Human(UniProt)',\
'Human DisGen DiseaseData':'Involvement in disease-Human(DisGeNET)','Human Drug Bank':\
'Drug associations-Human','CZE Purity':'CZE','AAA Concentration':'AAA',\
'Mouse Go':'GO Mouse','Human Go':'GO Human','LLOQ':'Assay LLOQ','ULOQ':'Assay ULOQ'}, inplace =True)
if fastaFileStatus == 'NA':
df.to_csv(downloadResultFilePath,index=False, encoding='utf-8',columns=downloadColName)
if fastaFileStatus == 'Fasta':
df.to_csv(downloadResultFilePath,index=False, encoding='utf-8',columns=downloadColNameUserSeq)
response_data ={'downloadFileName':downloadFilename}
return HttpResponse(json.dumps(response_data), content_type="application/json")<file_sep>/client/qmpkb-app/src/app/dropdown-service/dropdown.service.ts
import { Injectable } from '@angular/core';
import {Select} from '../dropdown-service/select';
import {Where} from '../dropdown-service/where';
import {QmpkbService} from '../qmpkb-service/qmpkb.service';
@Injectable({
providedIn: 'root'
})
export class DropdownService {
constructor(private _qmpkb:QmpkbService) {
}
getSelect(){
return [
new Select('Protein', 'protein' ),
new Select('Gene', 'gene' ),
new Select('UniProtKB accession', 'uniProtKBAccession'),
new Select('Peptide sequence', 'pepSeq' ),
new Select('Panel', 'panel' ),
new Select('Strain', 'strain' ),
new Select('Mutant', 'mutant' ),
new Select('Sex', 'sex' ),
new Select('Biological matrix', 'biologicalMatrix' ),
new Select('Subcellular localization', 'subCellLoc' ),
new Select('Molecular pathway(s)', 'keggPathway' ),
new Select('Involvement in disease', 'disCausMut' ),
new Select('GO ID', 'goId' ),
new Select('GO term', 'goTerm' ),
new Select('GO aspects', 'goAspects' ),
new Select('Drug associations ID', 'drugId' ),
new Select('Own protein sequences in FASTA format', 'fastaFile' )
];
}
getWhere(){
return this._qmpkb.dropDownStorage;
}
}<file_sep>/client/qmpkb-app/src/app/contact/contact.component.ts
import { Component, OnInit, HostListener } from '@angular/core';
import { HttpClient,HttpErrorResponse } from '@angular/common/http';
import { FormBuilder, FormGroup, Validators, FormControl } from '@angular/forms';
@Component({
selector: 'app-contact',
templateUrl: './contact.component.html',
styleUrls: ['./contact.component.css']
})
export class ContactComponent implements OnInit {
contactForm: FormGroup;
disabledSubmitButton: boolean = true;
optionsSelect: Array<any>;
@HostListener('input') oninput() {
if (this.contactForm.valid) {
this.disabledSubmitButton = false;
}
}
constructor(
private http: HttpClient,
private fb: FormBuilder
) {
this.contactForm = fb.group({
'contactFormName': ['', Validators.required],
'contactFormEmail': ['', Validators.compose([Validators.required, Validators.email])],
'contactFormMessage': ['', Validators.required],
'contactFormCopy': [''],
});
}
ngOnInit() { }
onSubmit() {
if (this.contactForm.valid) {
alert('Your message has been sent.');
this.http.get('/contactapi/?contactdetails=' + JSON.stringify(this.contactForm.value)).subscribe(response => {},errors => {console.log(errors)});
this.contactForm.reset();
this.disabledSubmitButton = true;
}
}
} | 0bbe5fb7791687276cb39fa5f6d991393161d29a | [
"HTML",
"Python",
"Text",
"TypeScript"
] | 67 | Python | uvic-proteincentre/mousequapro | 928a8c6a64d124707ef41e3ed15e5aae0d9848d9 | 4c0226f72b4810a85e0270a568547fd5b35617e1 | |
refs/heads/main | <file_sep>package OOCDBankManagementSystem;
public class Main {
public static void main(String[] args) {
// write your code here
AccountHolder ah = new AccountHolder();
ah.inputAllInformation();
ah.setDeposit();
ah.setInterest();
double currentBalanceJony = ah.getCurrentBalance();
AccountHolder islam = new AccountHolder();
islam.inputAllInformation();
islam.setWithdraw();
islam.inputLoan(5000.0);
double currentBalanceIslam = islam.getCurrentBalance();
double balanceOfAllAccountHolder = currentBalanceJony+currentBalanceIslam;
Manager m = new Manager();
m.inputManagerInfo(balanceOfAllAccountHolder);
m.display();
}
}
<file_sep>package OOCDBankManagementSystem;
import java.util.Scanner;
public class AccountHolder {
private String accountHolderName;
private double currentBalance;
private double deposit=0.0;
private double withdraw;
final double interest = .1;
private double loan;
Scanner sc = new Scanner(System.in);
public void inputAllInformation(){
System.out.println("Account holder's name: ");
accountHolderName = sc.nextLine();
System.out.println("Current Balance: ");
currentBalance = sc.nextDouble();
withdraw = 0.0;
loan = 0.0;
}
public boolean checkLoan(){
return currentBalance>500;
}
public void inputLoan(double l){
if(checkLoan()){
System.out.println("Current Balance: "+currentBalance);
currentBalance += l;
System.out.println("Current Balance after taking a loan: "+currentBalance);
}
else{
System.out.println("You are not eligible for taking loan....");
}
}
public void setInterest(){
currentBalance = currentBalance + (currentBalance*interest);
System.out.println("Balance after getting interest: "+currentBalance);
}
public void setWithdraw(){
System.out.println("Withdraw amount: ");
withdraw = sc.nextDouble();
if(currentBalance>withdraw){
currentBalance = currentBalance-withdraw;
System.out.println("You have successfully withdraw "+withdraw+" BDT");
System.out.println("Current Balance: "+currentBalance);
}
else {
System.out.println("You don't have sufficient balance.......");
}
}
public void setDeposit(){
System.out.println("deposit Amount: ");
deposit = sc.nextDouble();
currentBalance = currentBalance+deposit;
System.out.println("Current Balance: "+currentBalance);
}
public double getCurrentBalance(){
return currentBalance;
}
}
| 8a877a2dcac24093ac767eaed45d5e8c70935a66 | [
"Java"
] | 2 | Java | Jotirmoysarkar/Bankmanagementsystem | ebdd485de7512f2e1e727e2b0e2e965af55854f3 | e17b0ad4986f5d9867fb629e4fcf8051488a4c66 | |
refs/heads/master | <repo_name>xiangxuan-zhao/practice<file_sep>/manual_practice/src/test/java/com/zxx/serial/Address.java
package com.zxx.serial;
import lombok.AllArgsConstructor;
import lombok.Data;
/**
* @author Administrator
* @date 2020/04/21
*/
@Data
@AllArgsConstructor
public class Address {
private String detail;
}
<file_sep>/manual_practice/src/main/java/com/zxx/serial/Male.java
package com.zxx.serial;
import lombok.Data;
/**
* @author Administrator
* @date 2020/04/20
*/
@Data
public class Male extends PersonHessian{
private Long id;
}
<file_sep>/manual_practice/src/test/java/com/zxx/serial/TestJdkSerial.java
package com.zxx.serial;
import com.zxx.utils.JdkSerialUtil;
import org.junit.Assert;
import org.junit.Test;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
/**
* @author Administrator
* @date 2020/04/21
*/
public class TestJdkSerial {
@Test
public void testJDKSerialOverwrite() throws IOException, ClassNotFoundException {
PersonTransit person = new PersonTransit();
person.setId(1L);
person.setName("张三");
person.setMale(true);
person.setFriends(new ArrayList<PersonTransit>());
Address address = new Address("某某小区xxx栋yy号");
person.setAddress(address);
File file = new File("testJdk.txt");
// 序列化
JdkSerialUtil.writeObject(file, person);
// 反序列化
PersonTransit personTransit = JdkSerialUtil.readObject(file);
// 判断是否相等
Assert.assertEquals(personTransit.getName(), person.getName());
Assert.assertEquals(personTransit.getAddress().getDetail(), person.getAddress().getDetail());
}
}
<file_sep>/manual_practice/src/test/java/com/zxx/serial/PersonTransit.java
package com.zxx.serial;
import lombok.Data;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.Serializable;
import java.util.List;
/**
* @author Administrator
* @date 2020/04/21
*/
@Data
public class PersonTransit implements Serializable {
private Long id;
private String name;
private Boolean male;
private List<PersonTransit> friends;
private transient Address address;
/**
* 自定义序列化写方法
*/
private void writeObject(ObjectOutputStream oos) throws IOException {
oos.defaultWriteObject();
oos.writeObject(address.getDetail());
}
/**
* 自定义序列化读方法
*/
private void readObject(ObjectInputStream ois) throws ClassNotFoundException, IOException {
ois.defaultReadObject();
this.setAddress(new Address((String)ois.readObject()));
}
}
<file_sep>/README.md
# practice
《Java开发手册》
| bd5614adac063953ec6cdf47a30df24acbe891cc | [
"Markdown",
"Java"
] | 5 | Java | xiangxuan-zhao/practice | ad9668c6251cfeef01193de9d376ade2690864fb | 778adeefcaa8ff2e478959933a73fa20ec5f9aab | |
refs/heads/master | <repo_name>200Tigersbloxed/BSMulti-Installer<file_sep>/BSMulti Installer2/Form1.cs
using Microsoft.Win32;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Management;
using System.Net;
using Newtonsoft.Json;
namespace BSMulti_Installer2
{
public partial class Form1 : Form
{
public const int WM_NCLBUTTONDOWN = 0xA1;
public const int HT_CAPTION = 0x2;
[System.Runtime.InteropServices.DllImport("user32.dll")]
public static extern int SendMessage(IntPtr hWnd, int Msg, int wParam, int lParam);
[System.Runtime.InteropServices.DllImport("user32.dll")]
public static extern bool ReleaseCapture();
[DllImport("Gdi32.dll", EntryPoint = "CreateRoundRectRgn")]
private static extern IntPtr CreateRoundRectRgn
(
int nLeftRect, // x-coordinate of upper-left corner
int nTopRect, // y-coordinate of upper-left corner
int nRightRect, // x-coordinate of lower-right corner
int nBottomRect, // y-coordinate of lower-right corner
int nWidthEllipse, // width of ellipse
int nHeightEllipse // height of ellipse
);
public bool userownssteam = false;
public bool userownsoculus = false;
string steaminstallpath = "";
string oculusinstallpath = "";
public string bsl;
public bool allownext = false;
public string version = "v2.0.5";
public Form1()
{
InitializeComponent();
Region = System.Drawing.Region.FromHrgn(CreateRoundRectRgn(0, 0, Width, Height, 20, 20));
}
private void Form1_Load(object sender, EventArgs e)
{
// check for internet
if (CheckForInternetConnection() == true) { }
else
{
MessageBox.Show("An Internet Connection is required!", "Not Connected to Internet", MessageBoxButtons.OK, MessageBoxIcon.Error);
Application.Exit();
}
// check if user can access website
if (CheckForWebsiteConnection() == true) { }
else
{
MessageBox.Show("Failed to connect to https://tigersserver.xyz. Please try again soon.", "Failed to Connect", MessageBoxButtons.OK, MessageBoxIcon.Error);
Application.Exit();
}
WebClient client = new WebClient();
Stream stream = client.OpenRead("https://pastebin.com/raw/S8v9a7Ba");
StreamReader reader = new StreamReader(stream);
String content = reader.ReadToEnd();
if(version != content)
{
DialogResult drUpdate = MessageBox.Show("BSMulti-Installer is not up to date! Would you like to download the newest version?", "Uh Oh!", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
if(drUpdate == DialogResult.Yes)
{
System.Diagnostics.Process.Start("https://github.com/200Tigersbloxed/BSMulti-Installer/releases/latest");
Application.Exit();
}
}
checkForMessage();
Directory.CreateDirectory("Files");
}
private void panel1_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
ReleaseCapture();
SendMessage(Handle, WM_NCLBUTTONDOWN, HT_CAPTION, 0);
}
}
private void closeForm1_Click(object sender, EventArgs e)
{
Application.Exit();
}
private void button1_Click(object sender, EventArgs e)
{
// Find the Steam folder
RegistryKey rk1s = RegistryKey.OpenBaseKey(RegistryHive.CurrentUser, RegistryView.Registry64);
if (rk1s != null)
{
RegistryKey rk2 = rk1s.OpenSubKey("Software");
if (rk2 != null)
{
RegistryKey rk3 = rk2.OpenSubKey("Valve");
if (rk3 != null)
{
RegistryKey rk4 = rk3.OpenSubKey("Steam");
if (rk4 != null)
{
userownssteam = true;
string phrase = rk4.GetValue("SteamPath").ToString();
steaminstallpath = phrase;
}
}
}
}
if(userownssteam == false)
{
MessageBox.Show("Uh Oh!", "Steam Could not be found!", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
else{
bsl = steaminstallpath + @"/steamapps/common/Beat Saber";
if(Directory.Exists(bsl))
{
if(File.Exists(bsl + @"\Beat Saber.exe"))
{
if(File.Exists(bsl + @"\IPA.exe"))
{
textBox1.Text = bsl;
pictureBox1.Image = BSMulti_Installer2.Properties.Resources.tick;
button4.BackColor = SystemColors.MenuHighlight;
allownext = true;
runVerifyCheck();
findMultiplayerVersion();
}
else
{
MessageBox.Show("IPA.exe Could not be found! Is Beat Saber Modded?", "Uh Oh!", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
else
{
MessageBox.Show("Beat Saber.exe Could not be found! Is Beat Saber Installed?", "Uh Oh!", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
else
{
MessageBox.Show("Beat Saber Could not be found! Is Beat Saber Installed under Steam?", "Uh Oh!", MessageBoxButtons.OK, MessageBoxIcon.Error);
bsl = "";
}
}
}
private void button4_Click(object sender, EventArgs e)
{
if (allownext)
{
Form2 f2 = new Form2();
f2.bsl = bsl;
f2.Show();
this.Hide();
}
}
private void button2_Click(object sender, EventArgs e)
{
//Find the Oculus Folder
RegistryKey rk1s = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry64);
if (rk1s != null)
{
RegistryKey rk2 = rk1s.OpenSubKey("Software");
if (rk2 != null)
{
RegistryKey rk3 = rk2.OpenSubKey("WOW6432Node");
if (rk3 != null)
{
RegistryKey rk4 = rk3.OpenSubKey("Oculus VR, LLC");
if (rk4 != null)
{
RegistryKey rk5 = rk4.OpenSubKey("Oculus");
if(rk5 != null)
{
RegistryKey rk6 = rk5.OpenSubKey("Config");
if(rk6 != null)
{
userownsoculus = true;
string phrase = rk6.GetValue("InitialAppLibrary").ToString();
oculusinstallpath = phrase;
}
}
}
}
}
}
if (userownsoculus == false)
{
MessageBox.Show("Oculus Could not be found!", "Uh Oh!", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
else
{
bsl = oculusinstallpath + @"/Software/Software/hyperbolic-magnetism-beat-saber";
if (Directory.Exists(bsl))
{
if (File.Exists(bsl + @"\Beat Saber.exe"))
{
if (File.Exists(bsl + @"\IPA.exe"))
{
textBox1.Text = bsl;
pictureBox1.Image = BSMulti_Installer2.Properties.Resources.tick;
button4.BackColor = SystemColors.MenuHighlight;
allownext = true;
runVerifyCheck();
findMultiplayerVersion();
}
else
{
MessageBox.Show("IPA.exe Could not be found! Is Beat Saber Modded?", "Uh Oh!", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
else
{
MessageBox.Show("Beat Saber.exe Could not be found! Is Beat Saber Installed?", "Uh Oh!", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
else
{
MessageBox.Show("Beat Saber Could not be found! Is Beat Saber Installed under Oculus?", "Uh Oh!", MessageBoxButtons.OK, MessageBoxIcon.Error);
bsl = "";
}
}
}
private void button3_Click(object sender, EventArgs e)
{
this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog();
if (folderBrowserDialog1.ShowDialog() == DialogResult.OK)
{
string selectedPath = folderBrowserDialog1.SelectedPath;
if (File.Exists(selectedPath + @"\Beat Saber.exe"))
{
if (File.Exists(selectedPath + @"\IPA.exe"))
{
bsl = selectedPath;
textBox1.Text = bsl;
pictureBox1.Image = BSMulti_Installer2.Properties.Resources.tick;
button4.BackColor = SystemColors.MenuHighlight;
allownext = true;
runVerifyCheck();
findMultiplayerVersion();
}
else
{
MessageBox.Show("IPA.exe was not found! Is Beat Saber Modded?", "Uh Oh!", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
else
{
MessageBox.Show("Beat Saber was not found in this location! Is Beat Saber Installed?", "Uh Oh!", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
}
private bool verifyPermissions(string dir)
{
try
{
System.Security.AccessControl.DirectorySecurity ds = Directory.GetAccessControl(dir);
return true;
}
catch (UnauthorizedAccessException)
{
return false;
}
}
void runVerifyCheck()
{
if (verifyPermissions(bsl)) { }
else
{
MessageBox.Show("Please run the installer as administrator to continue! (Beat Saber Folder Denied)", "Access Denied to Folder", MessageBoxButtons.OK, MessageBoxIcon.Error);
Application.Exit();
}
if(Directory.Exists(AppDomain.CurrentDomain.BaseDirectory + @"\Files"))
{
if (verifyPermissions(AppDomain.CurrentDomain.BaseDirectory + @"\Files")) { }
else
{
MessageBox.Show("Please run the installer as administrator to continue! (Installer Folder Denied)", "Access Denied to Folder", MessageBoxButtons.OK, MessageBoxIcon.Error);
Application.Exit();
}
}
else
{
Directory.CreateDirectory("Files");
if (verifyPermissions(AppDomain.CurrentDomain.BaseDirectory + @"\Files")) { }
else
{
MessageBox.Show("Please run the installer as administrator to continue! (Installer Folder Denied)", "Access Denied to Folder", MessageBoxButtons.OK, MessageBoxIcon.Error);
Application.Exit();
}
}
}
void findMultiplayerVersion()
{
string mj;
string mlj;
// check for the json data
if(File.Exists(bsl + @"/UserData/BeatSaberMultiplayer.json"))
{
mj = bsl + @"/UserData/BeatSaberMultiplayer.json";
if (File.Exists(bsl + @"/Plugins/BeatSaberMultiplayer.dll")) {
// multiplayer is installed
string json = System.IO.File.ReadAllText(mj);
dynamic bsmj = JsonConvert.DeserializeObject(json);
label8.Text = "Multiplayer Version: " + bsmj["_modVersion"];
}
else
{
// no multiplayer
label8.Text = "Multiplayer Version: Not Installed";
}
}
else
{
// no multiplayer
label8.Text = "Multiplayer Version: Not Installed";
}
if (File.Exists(bsl + @"/UserData/BeatSaberMultiplayer.json"))
{
mlj = bsl + @"/UserData/BeatSaberMultiplayerLite.json";
if (File.Exists(bsl + @"/Plugins/BeatSaberMultiplayerLite.dll"))
{
// multiplayer is installed
string json = System.IO.File.ReadAllText(mlj);
dynamic bsmj = JsonConvert.DeserializeObject(json);
label9.Text = "MultiplayerLite Version: " + bsmj["_modVersion"];
}
else
{
// no multiplayer
label9.Text = "MultiplayerLite Version: Not Installed";
}
}
else
{
// no multiplayer
label9.Text = "MultiplayerLite Version: Not Installed";
}
}
void checkForMessage()
{
WebClient client = new WebClient();
Stream stream = client.OpenRead("https://pastebin.com/raw/vaXRephy");
StreamReader reader = new StreamReader(stream);
String content = reader.ReadToEnd();
string[] splitcontent = content.Split('|');
if(splitcontent[0] == "Y")
{
MessageBox.Show(splitcontent[1], "Message From Developer", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
public static bool CheckForInternetConnection()
{
try
{
using (var client = new WebClient())
using (client.OpenRead("http://google.com/generate_204"))
return true;
}
catch
{
return false;
}
}
public static bool CheckForWebsiteConnection()
{
try
{
using (var client = new WebClient())
using (client.OpenRead("https://tigersserver.xyz"))
return true;
}
catch
{
return false;
}
}
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
System.Diagnostics.Process.Start("https://github.com/200Tigersbloxed/BSMulti-Installer/blob/master/README.md");
}
}
}
<file_sep>/README.md
# IMPORTANT
Due to a recent Attack to the main server, this installer won't work anymore. The website was breached, and I had to delete it. Don't worry, they got no info, cause I don't log any info on there (lolw they hacked it for nothing) but yeah.
All BSMulti-Installer services will be disbanded on 12/1/2020 in place for the official multiplayer. After 12/1/2020, this installer will no longer work properly. **THIS DOES NOT MEAN THE MULTIPLAYER/LITE MOD WILL NOT WORK**, you just won't be able to use this installer anymore.
This Repo will no longer recieve updates. All bugs will be marked with `wont fix` and any PRs will not be pulled. Making a Fork would be a better option.
All current issues will be closed.
For modded multiplayer on PC on v1.12+, check out
[MultiplayerExtensions](https://github.com/Zingabopp/MultiplayerExtensions)
[ServerBrowser](https://github.com/roydejong/BeatSaberServerBrowser)
# BSMulti-Installer
Install and Uninstall Beat Saber Multiplayer Easily

## ATTENTION
**THIS REPO. IS NOT FOR SUPPORT! DO NOT OPEN AN ISSUE ASKING FOR SUPPORT! PLEASE JOIN THE BSMG DISCORD AND ASK FOR SUPPORT IN #pc-help!!!**
https://discord.gg/beatsabermods
Please make sure the Multiplayer Installer has it's own dedicated Directory!
Also check out the wiki for help before creating issues
https://github.com/200Tigersbloxed/BSMulti-Installer/wiki
okay now time for actual information
## What is this?
This is a simple installer for Beat Saber Multiplayer and Beat Saber Multiplayer Lite
(their links)
Multiplayer: https://github.com/andruzzzhka/BeatSaberMultiplayer
Multiplayer Lite: https://github.com/Zingabopp/BeatSaberMultiplayer
## Is it simple
yeah
All you do is download the latest release, unzip, run the executable, allow it past screen thingy (it says it's dangerous cause it's not signed), select which multiplayer you want to install, select your Beat Saber directory, and press start and it's done.
## Is it a virus? It says "Windows Protected your PC"?
If you get the smart screen filter, you get it because the application isn't signed with a certificate. I assure you, this isn't a virus. Why would I make a virus and release it's source to GitHub? KEKW 5Head moment ladies and gentlemen.

*(this image is in no way to be harmful towards anyone)*
## I need help with installing it
read the wiki
https://github.com/200Tigersbloxed/BSMulti-Installer/wiki
## Somethings wrong/doesn't do what it's supposed to do/broken lol
**BEFORE SUBMITTING AN ISSUE, MAKE SURE THE ISSUE HAS TO DO WITH THE INSTALLER AND NOT THE MULTIPLAYER MOD!**
Submit an issue at https://github.com/200Tigersbloxed/BSMulti-Installer/issues
"how do i do that"
login to your github account, press big green button in top right that says "New Issue", and describe the issue the best you can.
"what if i don't want to create account"
if you don't login, you can't submit an issue, if you can't submit an issue, i can't fix it, if i don't fix it then you unhappy
tl;dr do it anyways
"but github virus!!!!! :O:O:O:O"
no
<file_sep>/.github/ISSUE_TEMPLATE/installing-issue.md
---
name: Installing Issue
about: Issues with installing Multiplayer Through the Installer
title: ''
labels: ''
assignees: ''
---
PLEASE JOIN THE BSMG DISCORD FOR INSTALLING SUPPORT
Ask for support in #pc-help, NOT IN #multiplayer
https://discord.gg/beatsabermods
You may receive 0 support when asking for help by creating an issue
<file_sep>/BSMulti Installer2/Form2.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.IO.Compression;
using System.Linq;
using System.Net;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace BSMulti_Installer2
{
public partial class Form2 : Form
{
public const int WM_NCLBUTTONDOWN = 0xA1;
public const int HT_CAPTION = 0x2;
[System.Runtime.InteropServices.DllImport("user32.dll")]
public static extern int SendMessage(IntPtr hWnd, int Msg, int wParam, int lParam);
[System.Runtime.InteropServices.DllImport("user32.dll")]
public static extern bool ReleaseCapture();
[DllImport("Gdi32.dll", EntryPoint = "CreateRoundRectRgn")]
private static extern IntPtr CreateRoundRectRgn
(
int nLeftRect, // x-coordinate of upper-left corner
int nTopRect, // y-coordinate of upper-left corner
int nRightRect, // x-coordinate of lower-right corner
int nBottomRect, // y-coordinate of lower-right corner
int nWidthEllipse, // width of ellipse
int nHeightEllipse // height of ellipse
);
public string multiselected = "";
public bool currentlyinstallinguninstalling = false;
public bool allowinstalluninstall = false;
public string bsl { get; set; }
public Form2()
{
InitializeComponent();
Region = System.Drawing.Region.FromHrgn(CreateRoundRectRgn(0, 0, Width, Height, 20, 20));
}
private void panel1_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
ReleaseCapture();
SendMessage(Handle, WM_NCLBUTTONDOWN, HT_CAPTION, 0);
}
}
private void button1_Click(object sender, EventArgs e)
{
if (currentlyinstallinguninstalling == false)
{
multiselected = "a";
pictureBox1.Image = BSMulti_Installer2.Properties.Resources.tick;
button3.BackColor = SystemColors.MenuHighlight;
button4.BackColor = SystemColors.MenuHighlight;
button1.BackColor = Color.Green;
button2.BackColor = SystemColors.MenuHighlight;
allowinstalluninstall = true;
}
}
private void button2_Click(object sender, EventArgs e)
{
if (currentlyinstallinguninstalling == false)
{
multiselected = "z";
pictureBox1.Image = BSMulti_Installer2.Properties.Resources.tick;
button3.BackColor = SystemColors.MenuHighlight;
button4.BackColor = SystemColors.MenuHighlight;
button2.BackColor = Color.Green;
button1.BackColor = SystemColors.MenuHighlight;
allowinstalluninstall = true;
}
}
void InstallMulti()
{
statuslabel.Text = "Status: Preparing";
progressBar1.Value = 10;
allowinstalluninstall = false;
currentlyinstallinguninstalling = true;
button3.BackColor = SystemColors.GrayText;
button4.BackColor = SystemColors.GrayText;
Directory.CreateDirectory("Files");
DirectoryInfo di = new DirectoryInfo("Files");
foreach (FileInfo file in di.GetFiles())
{
file.Delete();
}
foreach (DirectoryInfo dir in di.GetDirectories())
{
dir.Delete(true);
}
Directory.CreateDirectory(@"Files\multiplayer");
Directory.CreateDirectory(@"Files\dovr");
Directory.CreateDirectory(@"Files\ca");
Directory.CreateDirectory(@"Files\dc");
Directory.CreateDirectory(@"Files\dep");
statuslabel.Text = "Status: Downloading Multiplayer 1/6";
progressBar1.Value = 20;
using (var wc = new WebClient())
{
wc.DownloadFileCompleted += new AsyncCompletedEventHandler(wc_DownloadCompleted);
wc.DownloadProgressChanged += wc_DownloadProgressChanged;
if(multiselected == "a") {
if(File.Exists(bsl + @"\Plugins\BeatSaberMultiplayerLite.dll"))
{
statuslabel.Text = "Status: Failed";
allowinstalluninstall = true;
currentlyinstallinguninstalling = false;
button3.BackColor = SystemColors.MenuHighlight;
button4.BackColor = SystemColors.MenuHighlight;
MessageBox.Show("Beat Saber Multiplayer Lite is installed! Installation Failed. Please Uninstall Zingabopp's Multiplayer Lite to continue installing Andruzzzhka's Multiplayer", "Uh Oh!", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
else
{
wc.DownloadFileAsync(new System.Uri("https://tigersserver.xyz/andruzzzhkalatest"), AppDomain.CurrentDomain.BaseDirectory + @"\Files\multiplayer.zip");
}
}
else if(multiselected == "z")
{
if (File.Exists(bsl + @"\Plugins\BeatSaberMultiplayer.dll"))
{
statuslabel.Text = "Status: Failed";
allowinstalluninstall = true;
currentlyinstallinguninstalling = false;
button3.BackColor = SystemColors.MenuHighlight;
button4.BackColor = SystemColors.MenuHighlight;
MessageBox.Show("Beat Saber Multiplayer is installed! Installation Failed. Please Uninstall Andruzzzhka's Multiplayer to continue installing Zingabopp's Multiplayer Lite", "Uh Oh!", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
else
{
wc.DownloadFileAsync(new System.Uri("https://tigersserver.xyz/zingabopplatest"), AppDomain.CurrentDomain.BaseDirectory + @"\Files\multiplayer.zip");
}
}
}
}
void wc_DownloadProgressChanged(object sender, DownloadProgressChangedEventArgs e)
{
progressBar2.Value = e.ProgressPercentage;
}
void wc_DownloadCompleted(object sender, AsyncCompletedEventArgs e)
{
statuslabel.Text = "Status: Downloading CA 2/6";
progressBar1.Value = 30;
using (var wc = new WebClient())
{
wc.DownloadFileCompleted += new AsyncCompletedEventHandler(wc_DownloadCompletedca);
wc.DownloadProgressChanged += wc_DownloadProgressChanged;
wc.DownloadFileAsync(new System.Uri("https://tigersserver.xyz/customavatars"), AppDomain.CurrentDomain.BaseDirectory + @"\Files\ca.zip");
}
}
void wc_DownloadCompletedca(object sender, AsyncCompletedEventArgs e)
{
statuslabel.Text = "Status: Downloading DOVR 3/6";
progressBar1.Value = 40;
using (var wc = new WebClient())
{
wc.DownloadFileCompleted += new AsyncCompletedEventHandler(wc_DownloadCompleteddovr);
wc.DownloadProgressChanged += wc_DownloadProgressChanged;
wc.DownloadFileAsync(new System.Uri("https://tigersserver.xyz/dynamicopenvr"), AppDomain.CurrentDomain.BaseDirectory + @"\Files\dovr.zip");
}
}
void wc_DownloadCompleteddovr(object sender, AsyncCompletedEventArgs e)
{
statuslabel.Text = "Status: Downloading DC 4/6";
progressBar1.Value = 50;
using (var wc = new WebClient())
{
wc.DownloadFileCompleted += new AsyncCompletedEventHandler(wc_DownloadCompleteddc);
wc.DownloadProgressChanged += wc_DownloadProgressChanged;
wc.DownloadFileAsync(new System.Uri("https://tigersserver.xyz/discordcore"), AppDomain.CurrentDomain.BaseDirectory + @"\Files\dc.zip");
}
}
void wc_DownloadCompleteddc(object sender, AsyncCompletedEventArgs e)
{
statuslabel.Text = "Status: Downloading CustomAvatar.dll 5/6";
progressBar1.Value = 60;
using (var wc = new WebClient())
{
wc.DownloadFileCompleted += new AsyncCompletedEventHandler(wc_DownloadCompletedcadll);
wc.DownloadProgressChanged += wc_DownloadProgressChanged;
wc.DownloadFileAsync(new System.Uri("https://tigersserver.xyz/cadll"), AppDomain.CurrentDomain.BaseDirectory + @"\Files\CustomAvatar.dll");
}
}
void wc_DownloadCompletedcadll(object sender, AsyncCompletedEventArgs e)
{
statuslabel.Text = "Status: Downloading DEP 6/6";
progressBar1.Value = 70;
using (var wc = new WebClient())
{
wc.DownloadFileCompleted += new AsyncCompletedEventHandler(wc_DownloadCompleteddep);
wc.DownloadProgressChanged += wc_DownloadProgressChanged;
wc.DownloadFileAsync(new System.Uri("https://tigersserver.xyz/dep"), AppDomain.CurrentDomain.BaseDirectory + @"\Files\dep.zip");
}
}
void wc_DownloadCompleteddep(object sender, AsyncCompletedEventArgs e)
{
InstallMultiContinued();
}
void InstallMultiContinued()
{
statuslabel.Text = "Status: Extracting Files";
progressBar1.Value = 80;
DirectoryInfo di = new DirectoryInfo(AppDomain.CurrentDomain.BaseDirectory + @"\Files");
foreach (FileInfo file in di.GetFiles())
{
string[] splitdot = file.Name.Split('.');
if (splitdot[1] == "zip")
{
ZipFile.ExtractToDirectory(AppDomain.CurrentDomain.BaseDirectory + @"\Files\" + splitdot[0] + @".zip", @"Files\" + splitdot[0]);
}
}
statuslabel.Text = "Status: Moving Files";
progressBar1.Value = 90;
foreach (DirectoryInfo dir in di.GetDirectories())
{
if (multiselected == "a")
{
if (dir.Name == "ca")
{
DirectoryInfo cadi = new DirectoryInfo(AppDomain.CurrentDomain.BaseDirectory + @"\Files\ca");
if (Directory.Exists(bsl + @"\CustomAvatars"))
{
// dont u dare delete someone's custom avatars folder
}
else
{
Microsoft.VisualBasic.FileIO.FileSystem.MoveDirectory(AppDomain.CurrentDomain.BaseDirectory + @"\Files\ca\CustomAvatars", bsl + @"\CustomAvatars");
}
if (Directory.Exists(bsl + @"\DynamicOpenVR"))
{
Directory.Delete(bsl + @"\DynamicOpenVR", true);
Microsoft.VisualBasic.FileIO.FileSystem.MoveDirectory(AppDomain.CurrentDomain.BaseDirectory + @"\Files\ca\DynamicOpenVR", bsl + @"\DynamicOpenVR");
}
else
{
Microsoft.VisualBasic.FileIO.FileSystem.MoveDirectory(AppDomain.CurrentDomain.BaseDirectory + @"\Files\ca\DynamicOpenVR", bsl + @"\DynamicOpenVR");
}
foreach (DirectoryInfo cadir in cadi.GetDirectories())
{
if (cadir.Name == "Plugins")
{
// Don't move CustomAvatar's DLL
}
}
}
}
if(dir.Name == "dc")
{
DirectoryInfo dcdi = new DirectoryInfo(AppDomain.CurrentDomain.BaseDirectory + @"Files\dc");
foreach (DirectoryInfo dcdir in dcdi.GetDirectories())
{
if (dcdir.Name == "Plugins")
{
foreach (FileInfo file in dcdir.GetFiles())
{
if (File.Exists(bsl + @"\Plugins\" + file.Name)) {
File.Delete(bsl + @"\Plugins\" + file.Name);
File.Move(file.FullName, bsl + @"\Plugins\" + file.Name);
}
else
{
File.Move(file.FullName, bsl + @"\Plugins\" + file.Name);
}
}
}
if (dcdir.Name == "Libs")
{
foreach (DirectoryInfo dcnativedir in dcdir.GetDirectories())
{
if (Directory.Exists(bsl + @"\Libs\Native")) {
Directory.Delete(bsl + @"\Libs\Native", true);
Microsoft.VisualBasic.FileIO.FileSystem.MoveDirectory(AppDomain.CurrentDomain.BaseDirectory + @"\Files\dc\Libs\Native", bsl + @"\Libs\Native");
}
else
{
Microsoft.VisualBasic.FileIO.FileSystem.MoveDirectory(AppDomain.CurrentDomain.BaseDirectory + @"\Files\dc\Libs\Native", bsl + @"\Libs\Native");
}
}
}
}
}
if(dir.Name == "dep")
{
DirectoryInfo depdi = new DirectoryInfo(AppDomain.CurrentDomain.BaseDirectory + @"Files\dep\dep");
foreach (DirectoryInfo depdir in depdi.GetDirectories())
{
if (depdir.Name == "Plugins")
{
foreach (FileInfo file in depdir.GetFiles())
{
if (File.Exists(bsl + @"\Plugins\" + file.Name)) {
File.Delete(bsl + @"\Plugins\" + file.Name);
File.Move(file.FullName, bsl + @"\Plugins\" + file.Name);
}
else
{
File.Move(file.FullName, bsl + @"\Plugins\" + file.Name);
}
}
}
}
}
if (multiselected == "a")
{
if (dir.Name == "dovr")
{
DirectoryInfo dovrdi = new DirectoryInfo(AppDomain.CurrentDomain.BaseDirectory + @"Files\dovr");
foreach (DirectoryInfo dovrdir in dovrdi.GetDirectories())
{
if (dovrdir.Name == "Plugins")
{
foreach (FileInfo file in dovrdir.GetFiles())
{
if (File.Exists(bsl + @"\Plugins\" + file.Name))
{
File.Delete(bsl + @"\Plugins\" + file.Name);
File.Move(file.FullName, bsl + @"\Plugins\" + file.Name);
}
else
{
File.Move(file.FullName, bsl + @"\Plugins\" + file.Name);
}
}
}
if (dovrdir.Name == "Libs")
{
foreach (FileInfo file in dovrdir.GetFiles())
{
if (File.Exists(bsl + @"\Libs\" + file.Name))
{
File.Delete(bsl + @"\Libs\" + file.Name);
File.Move(file.FullName, bsl + @"\Libs\" + file.Name);
}
else
{
File.Move(file.FullName, bsl + @"\Libs\" + file.Name);
}
}
}
}
}
}
if (dir.Name == "multiplayer")
{
DirectoryInfo multiplayerdi = new DirectoryInfo(AppDomain.CurrentDomain.BaseDirectory + @"Files\multiplayer");
foreach (DirectoryInfo multiplayerdir in multiplayerdi.GetDirectories())
{
if (multiplayerdir.Name == "Plugins")
{
foreach (FileInfo file in multiplayerdir.GetFiles())
{
if (File.Exists(bsl + @"\Plugins\" + file.Name)) {
File.Delete(bsl + @"\Plugins\" + file.Name);
File.Move(file.FullName, bsl + @"\Plugins\" + file.Name);
}
else
{
File.Move(file.FullName, bsl + @"\Plugins\" + file.Name);
}
}
}
if (multiplayerdir.Name == "Libs")
{
foreach (FileInfo file in multiplayerdir.GetFiles())
{
if (File.Exists(bsl + @"\Libs\" + file.Name)) {
File.Delete(bsl + @"\Libs\" + file.Name);
File.Move(file.FullName, bsl + @"\Libs\" + file.Name);
}
else
{
File.Move(file.FullName, bsl + @"\Libs\" + file.Name);
}
}
}
}
}
}
if(multiselected == "a")
{
if (File.Exists(@"Files\CustomAvatar.dll"))
{
if (File.Exists(bsl + @"\Plugins\CustomAvatar.dll"))
{
File.Delete(bsl + @"\Plugins\CustomAvatar.dll");
File.Move(@"Files\CustomAvatar.dll", bsl + @"\Plugins\CustomAvatar.dll");
}
else
{
File.Move(@"Files\CustomAvatar.dll", bsl + @"\Plugins\CustomAvatar.dll");
}
}
}
statuslabel.Text = "Status: Complete!";
progressBar1.Value = 100;
allowinstalluninstall = true;
currentlyinstallinguninstalling = false;
button3.BackColor = SystemColors.MenuHighlight;
button4.BackColor = SystemColors.MenuHighlight;
DialogResult dialogResult = MessageBox.Show("Multiplayer is installed! Would you like to exit?", "Complete!", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
if (dialogResult == DialogResult.Yes)
{
Application.Exit();
}
}
void UninstallMulti()
{
bool continuewithuninstall = false;
statuslabel.Text = "Status: Preparing";
progressBar1.Value = 25;
allowinstalluninstall = false;
currentlyinstallinguninstalling = true;
button3.BackColor = SystemColors.GrayText;
button4.BackColor = SystemColors.GrayText;
statuslabel.Text = "Status: Uninstalling Multiplayer";
progressBar1.Value = 50;
if (multiselected == "a")
{
if(File.Exists(bsl + @"\Plugins\BeatSaberMultiplayer.dll"))
{
File.Delete(bsl + @"\Plugins\BeatSaberMultiplayer.dll");
continuewithuninstall = true;
}
else
{
DialogResult dialogResult2 = MessageBox.Show("Multiplayer was not found! Would you like to continue?", "Uh Oh!", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
if(dialogResult2 == DialogResult.Yes)
{
continuewithuninstall = true;
}
else
{
continuewithuninstall = false;
}
}
}
if (multiselected == "z")
{
if (File.Exists(bsl + @"\Plugins\BeatSaberMultiplayerLite.dll"))
{
File.Delete(bsl + @"\Plugins\BeatSaberMultiplayerLite.dll");
continuewithuninstall = true;
}
else
{
DialogResult dialogResult2 = MessageBox.Show("Multiplayer Lite was not found! Would you like to continue?", "Uh Oh!", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
if (dialogResult2 == DialogResult.Yes)
{
continuewithuninstall = true;
}
else
{
continuewithuninstall = false;
}
}
}
statuslabel.Text = "Status: Uninstalling Dependencies";
progressBar1.Value = 75;
if (continuewithuninstall == true)
{
if(checkBox1.Checked == true)
{
if(File.Exists(bsl + @"\Plugins\SongCore.dll"))
{
File.Delete(bsl + @"\Plugins\SongCore.dll");
}
}
if(checkBox2.Checked == true)
{
if (File.Exists(bsl + @"\Plugins\BSML.dll"))
{
File.Delete(bsl + @"\Plugins\BSML.dll");
}
}
if(checkBox3.Checked == true)
{
if (File.Exists(bsl + @"\Plugins\BS_Utils.dll"))
{
File.Delete(bsl + @"\Plugins\BS_Utils.dll");
}
}
if(checkBox4.Checked == true)
{
if (File.Exists(bsl + @"\Plugins\CustomAvatar.dll"))
{
File.Delete(bsl + @"\Plugins\CustomAvatar.dll");
}
Directory.Delete(bsl + @"\DynamicOpenVR", true);
}
if(checkBox5.Checked == true)
{
if (File.Exists(bsl + @"\Plugins\DiscordCore.dll"))
{
File.Delete(bsl + @"\Plugins\DiscordCore.dll");
}
Directory.Delete(bsl + @"\Libs\Native", true);
}
if(checkBox6.Checked == true)
{
if (File.Exists(bsl + @"\Plugins\DynamicOpenVR.manifest"))
{
File.Delete(bsl + @"\Plugins\DynamicOpenVR.manifest");
}
if (File.Exists(bsl + @"\Libs\DynamicOpenVR.dll"))
{
File.Delete(bsl + @"\Libs\DynamicOpenVR.dll");
}
}
if(checkBox7.Checked == true)
{
if(File.Exists(bsl + @"\Plugins\ScoreSaber.dll"))
{
File.Delete(bsl + @"\Plugins\ScoreSaber.dll");
}
}
}
statuslabel.Text = "Status: Complete!";
progressBar1.Value = 100;
allowinstalluninstall = true;
currentlyinstallinguninstalling = false;
button3.BackColor = SystemColors.MenuHighlight;
button4.BackColor = SystemColors.MenuHighlight;
DialogResult dialogResult = MessageBox.Show("Multiplayer is uninstalled :( Would you like to exit?", "Complete!", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
if (dialogResult == DialogResult.Yes)
{
Application.Exit();
}
}
private void closeForm1_Click(object sender, EventArgs e)
{
Form1 f1 = new Form1();
f1.Show();
this.Hide();
}
private void button4_Click(object sender, EventArgs e)
{
if (allowinstalluninstall)
{
progressBar1.Value = 0;
InstallMulti();
}
}
private void button3_Click(object sender, EventArgs e)
{
if (allowinstalluninstall)
{
progressBar1.Value = 0;
UninstallMulti();
}
}
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
System.Diagnostics.Process.Start("https://github.com/200Tigersbloxed/BSMulti-Installer/wiki/Which-Multiplayer-Should-I-Install%3F");
}
private void checkBox4_CheckedChanged(object sender, EventArgs e)
{
}
}
}
| 077bfb72de9cc3555a6982c68848c25ed026d6c2 | [
"Markdown",
"C#"
] | 4 | C# | 200Tigersbloxed/BSMulti-Installer | dc2915cefcf3a4fd96e216dbf12e14840c9d4dc8 | 419cf9d36d2f56352f175016cebfce607c89904b | |
refs/heads/master | <repo_name>wjkcow/SJTU489P<file_sep>/BitTorrent/ThreadObject.h
#ifndef THREAD_OBJECT_H
#define THREAD_OBJECT_H
#include <thread>
#include <mutex>
#include <condition_variable>
#include <functional>
#include <queue>
#include <atomic>
class ThreadObject{
public:
ThreadObject();
virtual ~ThreadObject();
bool add_task(std::function<void(void)> task);
void stop();
void stop_when_done();
void join();
private:
void handle_task();
bool get_task();
std::queue<std::function<void(void)>> tasks;
std::function<void(void)> task;
std::thread my_thread;
std::mutex mtx;
std::condition_variable cv;
enum class ThreadState{
RUNNING,
FINISH_TASK_AND_DONE,
DONE
};
std::atomic<ThreadState> state;
};
#endif
<file_sep>/BitTorrent/TorrentServerMsgs.h
#ifndef TORRENT_SERVER_MESSAGES_H
#define TORRENT_SERVER_MESSAGES_H
// This file includes all the messages that could be received by TorrentServer
#include <memory>
#include "Message.h"
#include "TorrentServer.h"
#include "Connection.h"
class Connection;
class Torrent;
const int upload_torrent_ID_c = 1;
const int download_torrent_ID_c = 2;
const int list_torrent_ID_c = 3;
class TorrentServerMsg : public Message {
public:
virtual void handle(std::shared_ptr<TorrentServerWorker>) = 0;
};
// Message send by uploader
class UploadTorrentRequest : public TorrentServerMsg,
public std::enable_shared_from_this<UploadTorrentRequest>
{
public:
UploadTorrentRequest(std::shared_ptr<Torrent> torrent_ptr);
UploadTorrentRequest(std::shared_ptr<Connection> connection);
void handle(std::shared_ptr<TorrentServerWorker>) override;
std::shared_ptr<Torrent> get_torrent(){
return torrent_ptr;
}
protected:
char get_message_ID() override {return upload_torrent_ID_c;}
private:
std::shared_ptr<Torrent> torrent_ptr;
};
// Message send by downloader
class DownloadTorrentRequest : public TorrentServerMsg,
public std::enable_shared_from_this<DownloadTorrentRequest>{
public:
DownloadTorrentRequest(const std::string& torrent_id_);
DownloadTorrentRequest(std::shared_ptr<Connection> connection);
void handle(std::shared_ptr<TorrentServerWorker>) override;
std::string get_torrent_id(){
return torrent_id;
}
protected:
char get_message_ID() override {return download_torrent_ID_c;}
private:
std::string torrent_id;
};
// Message send by downloader
class ListTorrentRequest : public TorrentServerMsg,
public std::enable_shared_from_this<ListTorrentRequest>{
public:
void handle(std::shared_ptr<TorrentServerWorker>) override;
protected:
char get_message_ID() override {return list_torrent_ID_c;}
};
#endif
<file_sep>/BitTorrent/Server.cpp
#include "Server.h"
#include <algorithm>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <cstdint>
#include <iostream>
#include "Log.h"
#include <exception>
Server::Server(const char* port){
int rc;
addrinfo hints;
memset(&hints, 0, sizeof(hints));
hints.ai_family = AF_INET;
hints.ai_socktype = SOCK_STREAM;
hints.ai_flags = AI_PASSIVE;
addrinfo *ai;
getaddrinfo(nullptr, port, &hints, &ai);
if (rc) {
fprintf(stderr, "getaddrinfo error: %s\n", gai_strerror(rc));
throw std::exception();
}
listen_sock = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol);
if (listen_sock < 0) {
logerr("creating socket");
throw std::exception();
}
int yes = 1;
rc = setsockopt(listen_sock, SOL_SOCKET, SO_REUSEADDR, &yes, sizeof(yes));
if (rc) {
logerr("setsockopt failed");
throw std::exception();
}
rc = bind(listen_sock, ai->ai_addr, ai->ai_addrlen);
if (rc) {
logerr("bind failed");
throw std::exception();
}
freeaddrinfo(ai);
rc = listen(listen_sock, 10);
if (rc) {
logerr("listen failed");
throw std::exception();
}
struct sockaddr_in addr;
socklen_t len = sizeof(addr);
rc = getsockname(listen_sock, (struct sockaddr *)&addr, &len);
if (rc) {
logerr("getsockname failed");
throw std::exception();
}
std::cout << "Server accepting connection " << ntohs(addr.sin_port) << std::endl;
_thread = std::thread(&Server::accept_connection, this);
// add_task(std::bind(&ServerConnection::accept_connection, this));
}
Server::~Server(){
log("Server connection is going to be closed");
close(listen_sock);
}
void Server::drop_connection(std::shared_ptr<Connection> connection){
connections.erase(std::find(connections.begin(), connections.end(), connection));
}
void Server::accept_connection(){
while (true) {
log("Server is accepting connection");
int socket = accept(listen_sock, nullptr, 0);
log("New connection accepted");
connections.push_back(get_connection(socket));
}
}
<file_sep>/BitTorrent/Downloader.h
#ifndef DOWNLOADER_H
#define DOWNLOADER_H
#include <stdio.h>
#endif
<file_sep>/BitTorrent/UploaderMsgs.cpp
#include "UploaderMsgs.h"
<file_sep>/BitTorrent/DownloaderMsgs.h
#ifndef DOWNLOADER_MESSAGES_H
#define DOWNLOADER_MESSAGES_H
#include "Message.h"
// Message send by torrent server
class ListTorrentResponse : public Message {
public:
void send_through(std::shared_ptr<Connection> connection);
};
// send by tracker, recv by downloader
class ListPeerResponse : public Message{
public:
void send_through(std::shared_ptr<Connection> connection);
};
// send by uploader
class MsgHandShakeReply : public Message{
};
// send by uploader
class MsgBitField : public Message {
};
// send by uploader
class MsgReplyContent : public Message {
};
// send by uploader
class MsgHave : public Message {
};
#endif
<file_sep>/BitTorrent/TorrentServerMsgs.cpp
#include "TorrentServerMsgs.h"
#include <string>
#include "TorrentServer.h"
#include "Torrent.h"
#include "Connection.h"
using namespace std;
UploadTorrentRequest::UploadTorrentRequest(std::shared_ptr<Torrent> torrent_ptr_) : torrent_ptr{torrent_ptr_} {
append_str(torrent_ptr->to_string());
}
UploadTorrentRequest::UploadTorrentRequest(std::shared_ptr<Connection> connection) : torrent_ptr{make_shared<Torrent>(connection->get_str())}{
}
void UploadTorrentRequest::handle(std::shared_ptr<TorrentServerWorker> worker){
worker->handle(shared_from_this());
}
DownloadTorrentRequest::DownloadTorrentRequest(const std::string& torrent_id_):
torrent_id{torrent_id_}{
append_str(torrent_id);
}
DownloadTorrentRequest::DownloadTorrentRequest(std::shared_ptr<Connection> connection){
torrent_id = connection->get_str();
append_str(torrent_id);
}
void DownloadTorrentRequest::handle(std::shared_ptr<TorrentServerWorker> worker){
worker->handle(shared_from_this());
}
void ListTorrentRequest::handle(std::shared_ptr<TorrentServerWorker> worker){
worker->handle(shared_from_this());
}
<file_sep>/BitTorrent/ThreadObject.cpp
#include "ThreadObject.h"
#include <iostream>
#include "Log.h"
using namespace std;
ThreadObject::ThreadObject():my_thread{bind(&ThreadObject::handle_task, this)}, state{ThreadState::RUNNING}{}
ThreadObject::~ThreadObject() {
stop();
if (my_thread.joinable()) {
my_thread.join();
}
// log("thread done");
}
bool ThreadObject::add_task(std::function<void(void)> task){
unique_lock<mutex> lkg(mtx);
if (state == ThreadState::DONE) {
return false;
}
tasks.push(task);
cv.notify_all();
return true;
}
void ThreadObject::stop(){
unique_lock<mutex> lkg(mtx);
state = ThreadState::DONE;
cv.notify_all();
}
void ThreadObject::stop_when_done(){
unique_lock<mutex> lkg(mtx);
state = ThreadState::FINISH_TASK_AND_DONE;
cv.notify_all();
}
void ThreadObject::join(){
return my_thread.join();
}
void ThreadObject::handle_task(){
while (get_task()) task();
}
bool ThreadObject::get_task(){
unique_lock<mutex> lkg(mtx);
while (tasks.empty() && state == ThreadState::RUNNING) {
cv.wait(lkg);
}
if (!tasks.empty() && state != ThreadState::DONE) {
task = tasks.front();
tasks.pop();
return true;
} else {
state = ThreadState::DONE;
return false;
}
}<file_sep>/BitTorrent/TorrentServer.h
#ifndef TORRENT_SERVER_H
#define TORRENT_SERVER_H
#include "Server.h"
#include <memory>
#include <map>
#include <string>
class Connection;
class Torrent;
class UploadTorrentRequest;
class DownloadTorrentRequest;
class ListTorrentRequest;
class TorrentServer : public Server{
public:
using torrents_t = std::map<std::string, std::shared_ptr<Torrent>>;
static void start(char* port);
static std::shared_ptr<TorrentServer> instance();
void add_torrent(std::shared_ptr<Torrent> torrent);
std::vector<std::string> list_torrent();
std::shared_ptr<Torrent> get_torrent(const std::string t_hash);
protected:
std::shared_ptr<Connection> get_connection(int sock_);
private:
TorrentServer(char* port): Server(port){
}
torrents_t torrents;
static std::shared_ptr<TorrentServer> _instance;
};
class TorrentServerWorker : public Connection,
public std::enable_shared_from_this<TorrentServerWorker>{
public:
TorrentServerWorker(int sock_);
void handle(std::shared_ptr<UploadTorrentRequest> request){}
void handle(std::shared_ptr<DownloadTorrentRequest> request){}
void handle(std::shared_ptr<ListTorrentRequest> request){}
private:
void handle();
};
#endif
<file_sep>/BitTorrent/Log.h
#ifndef LOG_H
#define LOG_H
#include <string>
void log(const std::string& str);
void logerr(const std::string& str);
#endif
<file_sep>/BitTorrent/DownloaderMsgs.cpp
#include "DownloaderMsgs.h"
<file_sep>/BitTorrent/Log.cpp
#include "Log.h"
#include <thread>
#include <mutex>
#include <iostream>
using namespace std;
mutex log_mtx;
void log(const std::string& str){
unique_lock<mutex> lk(log_mtx);
cout << str << endl;
}
void logerr(const std::string& str){
unique_lock<mutex> lk(log_mtx);
cerr << str << endl;
}
<file_sep>/BitTorrent/Message.cpp
#include "Message.h"
#include "Connection.h"
#include "Log.h"
#include <iostream>
using namespace std;
const int reserve_size_c = sizeof(int32_t) + 1;
// <length> <message_ID> .<contents> ...
Message::Message() : data{reserve_size_c} {}
void Message::send_through(std::shared_ptr<Connection> connection){
update_message_type();
update_size();
connection->send(data.data(), static_cast<int>(data.size()));
}
void Message::append_int32(int32_t i){
char* value_ptr = reinterpret_cast<char*>(&i);
data.insert(data.end(), value_ptr, value_ptr + sizeof(int32_t));
}
void Message::append_char(char c){
data.push_back(c);
}
void Message::append_str(const char* c_str, int sz){
data.insert(data.end(), c_str, c_str + sz);
}
void Message::append_str(const string& str){
append_int32(static_cast<int32_t>(str.size()));
append_str(str.c_str(), static_cast<int>(str.size()));
}
char* Message::get_buffer(int sz){
int before_size = static_cast<int>(data.size());
data.resize(before_size + sz);
return &data[before_size];
}
void Message::update_size(){
int sz = static_cast<int>(data.size()) - reserve_size_c;
char* size_ptr = reinterpret_cast<char*>(&sz);
copy(size_ptr, size_ptr + sizeof(int32_t), data.data());
}
void Message::update_message_type(){
data[sizeof(int32_t)] = get_message_ID();
}
<file_sep>/BitTorrent/main.cpp
#include <iostream>
#include <string>
#include <sstream>
using namespace std;
int main(int argc, const char * argv[]) {
string str = "1";
cout << str.size();
return 0;
}
<file_sep>/BitTorrent/Message.h
#ifndef MESSAGE_H
#define MESSAGE_H
#include <vector>
#include <memory>
#include <exception>
#include <cstdint>
const char default_message_id_c = 0;
class Connection;
class Message {
public:
Message();
virtual ~Message(){}
virtual void send_through(std::shared_ptr<Connection> connection);
Message(const Message&) = delete;
Message(Message&&) = delete;
Message& operator=(const Message&) = delete;
Message& operator=(Message&&) = delete;
protected:
virtual char get_message_ID() {return default_message_id_c;}
void append_int32(int32_t i);
void append_char(char c);
void append_str(const char* c_str, int sz);
void append_str(const std::string& str);
char* get_buffer(int sz);
private:
void update_size();
void update_message_type();
std::vector<char> data;
};
#endif
<file_sep>/BitTorrent/ClientConnection.cpp
#include "ClientConnection.h"
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <exception>
#include "Log.h"
ClientConnection::ClientConnection(char* host, char* port) :
Connection(setup_connection(host, port)){
}
int ClientConnection::setup_connection(char* host, char* port){
int rc;
addrinfo hints;
memset(&hints, 0, sizeof(hints));
hints.ai_family = AF_UNSPEC;
hints.ai_socktype = SOCK_STREAM;
addrinfo *ai;
rc = getaddrinfo(host, port, &hints, &ai);
if (rc) {
fprintf(stderr, "getaddrinfo error: %s\n", gai_strerror(rc));
throw std::exception();
}
int sock = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol);
if (sock < 0) {
logerr("creating socket");
throw std::exception();
}
rc = connect(sock, ai->ai_addr, ai->ai_addrlen);
if (rc) {
logerr("failed to connect");
throw std::exception();
}
freeaddrinfo(ai);
return sock;
}
<file_sep>/BitTorrent/Uploader.cpp
#include "Uploader.h"
<file_sep>/BitTorrent/TrackerMsgs.cpp
#include "TrackerMsgs.h"
#include "Tracker.h"
using namespace std;
ServeTorrentRequest::ServeTorrentRequest(const std::string& torrent_id_) :
torrent_id{torrent_id_}{
append_str(torrent_id);
}
void ServeTorrentRequest::handle(shared_ptr<TrackerWorker> worker){
worker->handle(shared_from_this());
}
void ListPeerRequest::handle(shared_ptr<TrackerWorker> worker){
worker->handle(shared_from_this());
}
void HeartBeat::handle(shared_ptr<TrackerWorker> worker){
worker->handle(shared_from_this());
}
<file_sep>/BitTorrent/Address.h
#ifndef ADDRESS_H
#define ADDRESS_H
#include <Memory>
#include <string>
class Address{
public:
std::string to_string(){
return std::string();
}
static std::shared_ptr<Address> from_string(const std::string& str){
return std::make_shared<Address>();
}
};
#endif
<file_sep>/BitTorrent/TrackerMsgs.h
#ifndef TRACKER_MESSAGES_H
#define TRACKER_MESSAGES_H
// This file includes all the messages that could be received by Tracker
#include <memory>
#include <string>
#include "Message.h"
const char serve_torrent_ID_c = 1;
const char list_peer_ID_c = 2;
const char heartbeat_ID_c = 3;
class Connection;
class TrackerWorker;
class TrackerMsg : public Message {
public:
virtual void handle(std::shared_ptr<TrackerWorker>) = 0;
};
// send by uploader
class ServeTorrentRequest : public TrackerMsg,
public std::enable_shared_from_this<ServeTorrentRequest>{
public:
ServeTorrentRequest(const std::string& torrent_id_);
void handle(std::shared_ptr<TrackerWorker>) override;
protected:
std::string torrent_id;
char get_message_ID() override {return serve_torrent_ID_c;}
};
// send by downloaer
class ListPeerRequest : public TrackerMsg,
public std::enable_shared_from_this<ListPeerRequest>{
public:
void handle(std::shared_ptr<TrackerWorker>) override;
protected:
char get_message_ID() override {return list_peer_ID_c;}
};
// send by uploader
class HeartBeat : public TrackerMsg,
public std::enable_shared_from_this<HeartBeat>{
public:
void handle(std::shared_ptr<TrackerWorker>) override;
protected:
char get_message_ID() override {return heartbeat_ID_c;}
};
#endif
<file_sep>/BitTorrent/Tracker.h
#ifndef TRACKER_H
#define TRACKER_H
#include "Server.h"
#include "Peer.h"
#include <vector>
#include <mutex>
#include <memory>
#include <map>
class Connection;
class ServeTorrentRequest;
class ListPeerRequest;
class HeartBeat;
class Tracker : public Server{
public:
protected:
std::shared_ptr<Connection> get_connection(int sock_);
private:
std::mutex peer_mtx;
std::map<std::string, Peer> torrent_peer;
std::vector<Peer> peers;
std::vector<Peer> time_out_peers;
};
class TrackerWorker : public Connection{
public:
TrackerWorker(int sock_);
void handle(std::shared_ptr<ServeTorrentRequest>){}
void handle(std::shared_ptr<ListPeerRequest>){}
void handle(std::shared_ptr<HeartBeat>){}
private:
void handle();
};
#endif
<file_sep>/BitTorrent/Uploader.h
#ifndef UPLOADER_H
#define UPLOADER_H
#endif
<file_sep>/BitTorrent/Connection.cpp
#include "Connection.h"
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <cstdint>
Connection::~Connection(){
close(sock);
}
int Connection::get_int32(){
int32_t i;
if (!force_receive(&i, sizeof(int32_t))) {
throw UnableToReadFromConnection();
}
return i;
}
char Connection::get_char(){
char c;
ssize_t read_len = recv(sock, &c, sizeof(char), 0);
if (read_len != sizeof(char)) {
throw UnableToReadFromConnection();
}
return c;
}
void Connection::get_c_str(char* buffer, int sz){
if (!force_receive(buffer, sz)) {
throw UnableToReadFromConnection();
}
}
std::string Connection::get_str(){
int32_t str_size = get_int32();
char buffer[str_size];
get_c_str(buffer, str_size);
return std::string{buffer, static_cast<size_t>(str_size)};
}
void Connection::send(char* buffer, int size){
::send(sock, buffer, size, 0);
}
bool Connection::force_receive(void* buffer, int sz){
ssize_t read_len{0};
while (read_len < sz) {
ssize_t new_read_len = recv(sock, (char *)buffer + read_len, sz - read_len, 0);
if (new_read_len == 0) {
return false;
}
read_len += new_read_len;
}
return true;
}
<file_sep>/BitTorrent/Peer.h
#ifndef PEER_H
#define PEER_H
#include "Address.h"
using Peer = Address;
#endif
<file_sep>/BitTorrent/ClientConnection.h
#ifndef CLIENT_CONNECTION_H
#define CLIENT_CONNECTION_H
#include "Connection.h"
class ClientConnection : public Connection{
public:
ClientConnection(char* host, char* port);
private:
int setup_connection(char* host, char* port);
};
#endif
<file_sep>/BitTorrent/Torrent.cpp
#include "Torrent.h"
#include <fstream>
#include <iostream>
#include <memory>
#include <sstream>
#include <iterator>
#include <cassert>
#include "hashlibpp.h"
#include "Log.h"
using namespace::std;
const int size_4m_c = 4 << 20;
Torrent::Torrent(const string& filename_, Address tracker_address): filename{filename_}, tracker(tracker_address){
std::ifstream infile(filename_, ifstream::ate | std::ifstream::binary);
if (!infile){
cerr << "file cannot be opened" << endl;
throw exception();
}
file_size = static_cast<int>(infile.tellg());
infile.seekg(0);
unique_ptr<char []> buffer{new char[size_4m_c]};
int tmp_size{file_size};
shared_ptr<hashwrapper> sha1 = make_shared<sha1wrapper>();
while (tmp_size) {
int read_size{tmp_size < size_4m_c ? tmp_size : size_4m_c};
tmp_size -= read_size;
infile.read(buffer.get(), read_size);
if (!infile){
assert(0);
}
filehash.push_back(sha1->getHashFromMemory(buffer.get(), read_size));
}
infile.close();
}
Torrent::Torrent(const std::string& content){
stringstream ss(content);
ss >> filename;
ss >> file_size;
int pieces;
ss >> pieces;
string hash;
for (int i = 0; i < pieces; ++i) {
ss >> hash;
filehash.push_back(hash);
}
tracker = *Address::from_string(content.substr(ss.tellg()));
if(!ss){
logerr("Parsing error");
throw exception();
}
}
string Torrent::to_string(){
stringstream ss;
ss << filename << endl << file_size << endl << filehash.size() << endl;
for (auto ite =filehash.begin(); ite != filehash.end(); ++ ite) {
ss << *ite << endl;
}
ss << tracker.to_string();
return ss.str();
}
string Torrent::hash(){
shared_ptr<hashwrapper> sha1 = make_shared<sha1wrapper>();
return sha1->getHashFromString(to_string());
}
<file_sep>/BitTorrent/Connection.h
#ifndef CONNECTION_H
#define CONNECTION_H
#include <memory>
#include <exception>
#include <string>
class Message;
class Connection :
public std::enable_shared_from_this<Connection>{
public:
virtual ~Connection();
Connection(int sock_) : sock{sock_} {}
// std::shared_ptr<Message> recv_message();
int get_int32();
char get_char();
void get_c_str(char* buffer, int sz);
std::string get_str();
void send(char* buffer, int sz);
private:
int sock;
bool force_receive(void* buffer, int sz);
class UnableToReadFromConnection : public std::exception{
const char* what() const noexcept
{return "Unable to read from this connection \n";}
};
class UnableToSendToConnection : public std::exception{
const char* what() const noexcept
{return "Unable to send to this connection \n";}
};
};
#endif
<file_sep>/BitTorrent/Torrent.h
#ifndef TORRENT_H
#define TORRENT_H
#include <memory>
#include <string>
#include <vector>
#include "Address.h"
class Connection;
class Torrent{
public:
Torrent(const std::string& file, Address tracker_address);
Torrent(const std::string& content);
std::string to_string();
Address get_tracker();
std::string get_filename(){
return filename;
}
int get_file_size(){
return file_size;
}
int get_piece_number(){
return static_cast<int>(filehash.size());
}
std::string get_hash(int piece){
return filehash[piece];
}
std::string hash();
private:
Address tracker;
int file_size;
std::string filename;
std::vector<std::string> filehash;
};
#endif
<file_sep>/BitTorrent/TorrentServer.cpp
#include "TorrentServer.h"
#include <algorithm>
#include <iterator>
#include "Connection.h"
#include "Torrent.h"
#include "Log.h"
using namespace std;
std::shared_ptr<TorrentServer> TorrentServer::_instance{nullptr};
void TorrentServer::start(char* port){
if (!_instance) {
_instance.reset(new TorrentServer(port)); // cannot use make shared as constructor is private
}
}
shared_ptr<TorrentServer> TorrentServer::instance(){
if (!_instance) {
logerr("Torrent Server has not been started");
}
return _instance;
}
void TorrentServer::add_torrent(shared_ptr<Torrent> torrent){
if (torrents.count(torrent->hash())) {
logerr("Already have the same torrent");
}
torrents[torrent->hash()] = torrent;
}
vector<string> TorrentServer::list_torrent(){
vector<string> torrent_list;
transform(torrents.begin(), torrents.end(),
insert_iterator<vector<string>>(torrent_list, torrent_list.end()),
mem_fn(&torrents_t::value_type::first));
return torrent_list;
}
shared_ptr<Torrent> TorrentServer::get_torrent(const string t_hash){
auto ite = torrents.find(t_hash);
if (ite != torrents.end()) {
return ite->second;
}
return nullptr;
}
shared_ptr<Connection> TorrentServer::get_connection(int sock_){
return make_shared<TorrentServerWorker>(sock_);
}
TorrentServerWorker::TorrentServerWorker(int sock_) : Connection{sock_}{
}
void TorrentServerWorker::handle(){
}
<file_sep>/BitTorrent/UploaderMsgs.h
#ifndef UPLOADER_MESSAGES_H
#define UPLOADER_MESSAGES_H
// This file includes all the messages that could be received by Uploader
#include "Message.h"
class UploaderMsg : public Message{
public:
virtual void handle();
};
class MsgHandshake : public UploaderMsg {
};
class MsgRequestContent : public UploaderMsg {
};
#endif
<file_sep>/BitTorrent/Server.h
#ifndef SERVER_H
#define SERVER_H
#include <thread>
#include <memory>
#include <vector>
#include "Connection.h"
class Server {
public:
Server(const char* port);
virtual ~Server();
void drop_connection(std::shared_ptr<Connection> connection);
protected:
virtual std::shared_ptr<Connection> get_connection(int sock_) = 0;
private:
int listen_sock;
void accept_connection();
std::vector<std::shared_ptr<Connection>> connections;
std::thread _thread;
};
#endif
| 1ef60834fcf0ce8739bcd22151e92f4a0e9552ee | [
"C",
"C++"
] | 31 | C++ | wjkcow/SJTU489P | 96a52feabf290f573b68c54e8d1ba006619cc694 | 372eb6f1258f14ee1ca2210b83aa313727b35887 | |
refs/heads/master | <repo_name>PutuEsa/TugasPWD<file_sep>/application/views/utama.php
<!DOCTYPE html>
<html lang="en">
<head>
<title>Home</title>
<link rel="stylesheet" href="<?=base_url()?>assets/utama.css">
</head>
<body style="margin: 40px; font-family: fantasy; background-color: #2378cc; text-align: center;">
<img style="width: 500px; margin-top: -152px;" src="<?base_url()?>assets/ngkrun.png" alt="">
<p class="box" style="font-family: monoscope;
font-style: italic;
font-size: 5mm;
background-color: cadetblue;
text-align: center;"> Selamat Datang
<br>
Lorem ipsum dolor sit amet consectetur, adipisicing elit. Et tempora tempore odio, ullam esse nesciunt minima amet aliquam dolorum error fuga illum inventore odit cupiditate, itaque doloribus recusandae facilis culpa?</p>
</body>
</html><file_sep>/application/views/viewprogram.php
<!DOCTYPE html>
<html lang="en">
<head>
</head>
<body>
<h1><a href="<?=base_url()?>index.php/welcome/dashboard/Esa/Cowok">Welcome</a></h1>
<?= $this->uri->segment(1) ?> <br>
<?= $this->uri->segment(2) ?> <br>
<?= $this->uri->segment(3) ?>
</body>
</html><file_sep>/application/views/beranda.php
<!DOCTYPE html>
<html lang="en">
<head>
<title>Beranda</title>
<link rel="stylesheet" type="text/css" href="<?=base_url()?>assets/style.css">
</head>
<body>
<header class="ob">
<div class="atas">
<div id="logo"><img style="width: 127px; margin-left: 40px; float: left;" src="<?=base_url()?>assets/ngkrun.png" alt=""></div>
<nav>
<ul>
<li class = "qw"><a href="<?=base_url()?>index.php/welcome/beranda"> Home </a></li>
<li class = "qw"><a href="<?=base_url()?>index.php/welcome/event"> Event </a></li>
<li class = "qw"><a href="<?=base_url()?>index.php/welcome/gallery"> gallery </a></li>
<li class = "qw"><a href="<?=base_url()?>index.php/welcome/contact"> contact </a></li>
<li><a href="<?=base_url()?>index.php/welcome/profil"> MyProfil </a></li>
</ul>
</nav>
</div>
</header>
<br><br><br>
<div id = "content">
<h1 align="center" style="text-align: center; font-size: 10.3mm; margin-top :
30px; margin-left : 12px;">welcome
</h1>
<h1 align="center" style="text-align: center; font-size: 10.3mm; margin-top :
30px; margin-left : 12px;">To
</h1>
<h1 align="center" style="text-align: center; font-size: 10.3mm; margin-top :
30px; margin-left : 12px;">ChewyGums Gaming Store
<br></h1>
</div>
</body>
</html><file_sep>/application/views/profil.php
<!DOCTYPE html>
<html lang="en">
<head>
<title>Profil Admin</title>
<link rel="stylesheet" href="<?=base_url()?>assets/Profilstyle.css" >
</head>
<body style="text-align: center;">
<header class="ob">
<div class="atas">
<div id="logo"><img style="width: 127px; margin-left: 40px; float: left;" src="<?=base_url()?>assets/ngkrun.png" alt=""></div>
<nav>
<ul>
<li class = "qw"><a href="<?=base_url()?>index.php/welcome/beranda"> Home </a></li>
<li class = "qw"><a href="<?=base_url()?>index.php/welcome/event"> Event </a></li>
<li class = "qw"><a href="<?=base_url()?>index.php/welcome/gallery"> gallery </a></li>
<li class = "qw"><a href="<?=base_url()?>index.php/welcome/contact"> contact </a></li>
<li><a href="<?=base_url()?>index.php/welcome/profil"> MyProfil </a></li>
</ul>
</nav>
</div>
</header>
<div class="box">
<b>
<h1>I Putu <NAME></h1> <br>
<h2>
Web Developer</h2> <br>
<p>Professional Gamer</p> <br>
<p>Jl <NAME> 1, G2D 24E</p> <br>
<p>Hubungi Kontak saya : 082234429883</p>
</b>
</div>
</body>
</html> | 4f4ecd54cf95136d71b94778520ec6b81660050f | [
"PHP"
] | 4 | PHP | PutuEsa/TugasPWD | c422cd049e1d382adb8a8b9e806e9188ef8bd88b | c516e2b647bc53cfeb9ee3bbd48cf4468441dcdd | |
refs/heads/main | <file_sep>/*----------------------------------------------------------------------------
* Name: sample.c
* Purpose: to control led through EINT buttons and manage the bouncing effect
* - key1 switches on the led at the left of the current led on,
* - it implements a circular led effect.
* Note(s): this version supports the LANDTIGER Emulator
* Author: <NAME> - PoliTO - last modified 15/12/2020
*----------------------------------------------------------------------------
*
* This software is supplied "AS IS" without warranties of any kind.
*
* Copyright (c) 2017 Politecnico di Torino. All rights reserved.
*----------------------------------------------------------------------------*/
#include <stdio.h>
#include "LPC17xx.H" /* LPC17xx definitions */
#include "led/led.h"
#include "button_EXINT/button.h"
#include "timer/timer.h"
#include "RIT/RIT.h"
#include "stdbool.h"
#include "variables.h"
/* Led external variables from funct_led */
extern unsigned char led_value; /* defined in funct_led */
#ifdef SIMULATOR
extern uint8_t ScaleFlag; // <- ScaleFlag needs to visible in order for the emulator to find the symbol (can be placed also inside system_LPC17xx.h but since it is RO, it needs more work)
#endif
int labyrinth[13][15] = {
{2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2},
{0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0},
{1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0},
{1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0},
{1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0},
{1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2},
};
void startGame(){
start = 1;
}
bool led_est_acceso = false;
bool led_ovest_acceso = false;
bool led_nord_acceso = false;
bool led_sud_acceso = false;
const int led_running = 5;
bool led_running_acceso = false;
/*
0 -> est
1 -> nord
2 -> ovest
3 -> sud
*/
//int direzione_arr[] = {0,1,2,3};
int direzione = 0;
int pos_X = 7;
int pos_Y = 7;
int distance = 5;
int button = -1;
int win=0;
int win_flag=0;
int conteggio;
bool start=false;
void runTimer(){
reset_timer(0);
LED_Out(0);
if(win==1)
{
LED_Out(0);
reset_timer(0);
init_timer(0, 25000000/(2*1));
enable_timer(0);
}
else if(distance > 5) {
switch(direzione){
case 0:
LED_Off(0);
break;
case 1:
LED_Off(1);
break;
case 2:
LED_Off(2);
break;
case 3:
LED_Off(0);
break;
}
}
else if((distance >= 3 && distance <= 5) && win_flag==0)
{
init_timer(0, 25000000/(2 *2));
enable_timer(0);
}
else if((distance > 0 && distance <3)&& win_flag==0)
{
init_timer(0, 25000000/(2 *4));
enable_timer(0);
}
else if (win_flag==0)
{
init_timer(0, 25000000/(2 *5));
enable_timer(0);
}
}
void run(void){
calc_distance();
if(distance<=0){}
else move();
runTimer();
}
void rotate(){
if(direzione == 0) direzione = 3;
else direzione = direzione - 1;
LED_Out(0);
calc_distance();
runTimer();
}
void buttonRun(void){
if(start) run();
//runLed();
}
void buttonStart(void){
startGame();
calc_distance();
runTimer();
}
void buttonRotate(void){
if(start){
rotate();
calc_distance();
}
}
void calc_distance(void){
int i=0;
if(direzione == 0)
{
//Calcolo distanza verso est
win_flag=0;
for(i = pos_X+1; i<15; i++)
{
if(labyrinth[pos_Y][i] == 1) break;
if(labyrinth[pos_Y][i] == 2)
{
win_flag=1;
}
}
distance = i - pos_X - 1 ;
}
//Calcolo distanza verso nord
else if(direzione == 1)
{
win_flag=0;
for(i = pos_Y-1; i>=0; i--){
if(labyrinth[i][pos_X] == 1) break;
if(labyrinth[i][pos_X] == 2)
{
win_flag=1;
}
}
distance = pos_Y - i - 1;
}
//Calcolo distanza verso ovest
else if(direzione == 2)
{
win_flag=0;
for(i = pos_X-1; i>=0; i--){
if(labyrinth[pos_Y][i] == 1) break;
if(labyrinth[pos_Y][i] == 2)
{
win_flag=1;
}
}
distance = pos_X - i - 1;
}
//Calcolo distanza verso sud
else if(direzione == 3){
win_flag=0;
for(i = pos_Y+1; i<13; i++){
if(labyrinth[i][pos_X] == 1) break;
if(labyrinth[i][pos_X] == 2)
{
win_flag=1;
}
}
distance = i - pos_Y - 1;
}
}
void move(void){
if((pos_X>=0 && pos_X<=15) && (pos_Y>=0 && pos_Y<=12)){
switch(direzione){
case 0:
if(labyrinth[pos_Y][pos_X+1] != 1)
{
pos_X++;
break;
}
case 1:
if(labyrinth[pos_Y-1][pos_X] != 1)
pos_Y--;
break;
case 2:
if(labyrinth[pos_Y][pos_X-1] != 1)
pos_X--;
break;
case 3:
if(labyrinth[pos_Y+1][pos_X] != 1)
pos_Y++;
break;
}
if(labyrinth[pos_Y][pos_X]==2) win=1;
calc_distance();
}
}
/*----------------------------------------------------------------------------
Main Program
*----------------------------------------------------------------------------*/
int main (void) {
SystemInit(); /* System Initialization (i.e., PLL) */
LED_init(); /* LED Initialization */
BUTTON_init(); /* BUTTON Initialization */
//init_timer(0,312500); //0x017D7840
init_RIT(1250000); /* RIT Initialization 50 msec */
LED_Out(0); //spegniamo tutti i led
LPC_SC->PCON |= 0x1; /* power-down mode */
LPC_SC->PCON &= ~(0x2);
while (1) { // Loop forever
__ASM("wfi");
}
}
<file_sep># Blind_Labyrinth_Simulator
Simulation of the game Blind Labyrinth using a LPC176x/5x Microcontroller
<file_sep><html>
<body>
<pre>
<h1>ÁVision Build Log</h1>
<h2>Tool Versions:</h2>
IDE-Version: ÁVision V5.33.0.0
Copyright (C) 2020 ARM Ltd and ARM Germany GmbH. All rights reserved.
License Information: <NAME>, Politecnico di Torino, LIC=----
Tool Versions:
Toolchain: MDK-Lite Version: 5.33.0.0
Toolchain Path: C:\Keil_v5\ARM\ARMCC\Bin
C Compiler: Armcc.exe V5.06 update 7 (build 960)
Assembler: Armasm.exe V5.06 update 7 (build 960)
Linker/Locator: ArmLink.exe V5.06 update 7 (build 960)
Library Manager: ArmAr.exe V5.06 update 7 (build 960)
Hex Converter: FromElf.exe V5.06 update 7 (build 960)
CPU DLL: SARMCM3.DLL V5.33.0.0
Dialog DLL: DARMP1.DLL V1.27.0.0
Target DLL: UL2CM3.DLL V1.163.9.0
Dialog DLL: TARMP1.DLL V1.26.0.0
<h2>Project:</h2>
F:\UniversitÓ\Magistrale\Architetture dei Sistemi di Elaborazione\Labs\extra_points_2\sample.uvprojx
Project File Date: 01/17/2021
<h2>Output:</h2>
*** Using Compiler 'V5.06 update 7 (build 960)', folder: 'C:\Keil_v5\ARM\ARMCC\Bin'
Build target 'Target 1'
compiling IRQ_RIT.c...
RIT\../variables.h(17): warning: #1295-D: Deprecated declaration game_init - give arg types
extern void game_init();
RIT\../variables.h(24): warning: #1295-D: Deprecated declaration buttonRun - give arg types
extern void buttonRun();
RIT\../variables.h(25): warning: #1295-D: Deprecated declaration buttonStart - give arg types
extern void buttonStart();
RIT\../variables.h(26): warning: #1295-D: Deprecated declaration move - give arg types
extern void move();
RIT\../variables.h(27): warning: #1295-D: Deprecated declaration drawButtons - give arg types
extern void drawButtons();
RIT\../variables.h(28): warning: #1295-D: Deprecated declaration drawBot - give arg types
extern void drawBot();
RIT\../variables.h(29): warning: #1295-D: Deprecated declaration drawGrid - give arg types
extern void drawGrid();
RIT\../variables.h(30): warning: #1295-D: Deprecated declaration clearBot - give arg types
extern void clearBot();
RIT\../variables.h(31): warning: #1295-D: Deprecated declaration restartGame - give arg types
extern void restartGame();
RIT\../variables.h(32): warning: #1295-D: Deprecated declaration startGame - give arg types
extern void startGame();
RIT\IRQ_RIT.c(41): warning: #223-D: function "changeMode" declared implicitly
changeMode();
RIT\IRQ_RIT.c: 11 warnings, 0 errors
linking...
Program Size: Code=27432 RO-data=1772 RW-data=872 ZI-data=680
".\sample.axf" - 0 Error(s), 11 Warning(s).
<h2>Software Packages used:</h2>
Package Vendor: ARM
http://www.keil.com/pack/ARM.CMSIS.5.7.0.pack
ARM.CMSIS.5.7.0
CMSIS (Cortex Microcontroller Software Interface Standard)
* Component: CORE Version: 5.4.0
Package Vendor: Keil
http://www.keil.com/pack/Keil.LPC1700_DFP.2.6.0.pack
Keil.LPC1700_DFP.2.6.0
NXP LPC1700 Series Device Support, Drivers and Examples for MCB1700 and LPC1788-32
<h2>Collection of Component include folders:</h2>
.\RTE\_Target_1
C:\Users\Luca\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include
C:\Users\Luca\AppData\Local\Arm\Packs\Keil\LPC1700_DFP\2.6.0\Device\Include
<h2>Collection of Component Files used:</h2>
* Component: ARM::CMSIS:CORE:5.4.0
Build Time Elapsed: 00:00:01
</pre>
</body>
</html>
<file_sep>#include "stdbool.h"
extern bool start;
extern int direzione;
extern int button;
extern int pos_X;
extern int pos_Y;
extern int distance;
extern int win;
extern int win_flag;
extern int conteggio;
extern int mode;
extern void game_init();
extern void rotate(void);
extern void run(void);
extern void calc_distance(void);
extern int labyrinth[13][15];
extern void buttonRotate(void);
extern void buttonRun();
extern void buttonStart();
extern void move();
extern void drawButtons();
extern void drawBot();
extern void drawGrid();
extern void clearBot();
extern void restartGame();
extern void startGame();
<file_sep>#include "stdbool.h"
#define led_est 2
#define led_ovest 0
#define led_nord 3
#define led_sud 1
extern bool led_est_acceso;
extern bool led_ovest_acceso;
extern bool led_nord_acceso;
extern bool led_sud_acceso;
extern bool led_running_acceso;
extern bool start;
extern int direzione;
extern int button;
extern int const led_running;
extern bool led_zero;
extern int pos_X;
extern int pos_Y;
extern int distance;
extern int win;
extern int win_flag;
extern int conteggio;
extern void rotate(void);
extern void run(void);
extern void calc_distance(void);
extern int labyrinth[13][15];
extern void buttonRotate(void);
extern void buttonRun();
extern void buttonStart();
extern void move();
<file_sep>/*********************************************************************************************************
**--------------File Info---------------------------------------------------------------------------------
** File name: IRQ_RIT.c
** Last modified Date: 2014-09-25
** Last Version: V1.00
** Descriptions: functions to manage T0 and T1 interrupts
** Correlated files: RIT.h
**--------------------------------------------------------------------------------------------------------
*********************************************************************************************************/
#include "lpc17xx.h"
#include "RIT.h"
#include "../led/led.h"
#include "../variables.h"
/******************************************************************************
** Function name: RIT_IRQHandler
**
** Descriptions: REPETITIVE INTERRUPT TIMER handler
**
** parameters: None
** Returned value: None
**
******************************************************************************/
void RIT_IRQHandler (void)
{
//static int down =0;
static int down0=0;
static int down1=0;
static int down2=0;
//10, 11, 12
//button0, button1, button2
if(button==0){
down0++;
if((LPC_GPIO2->FIOPIN & (1<<10)) == 0 && !(LPC_PINCON->PINSEL4 &(1<<20))){
// static uint8_t position=0;
reset_RIT();
switch(down0){
case 1:
buttonStart();
/*if( position == 7){
LED_On(0);
LED_Off(7);
position = 0;
*/
}
}else{ /* button released */
down0 = 0;
button = -1;
disable_RIT();
reset_RIT();
NVIC_EnableIRQ(EINT0_IRQn);
LPC_PINCON->PINSEL4 |= (1 << 20);
//LED_Off(position);
//LED_On(++position);
}
}else if(button==1){
down1++;
if((LPC_GPIO2->FIOPIN & (1<<11)) == 0 && !(LPC_PINCON->PINSEL4 &(1<<22))){
// static uint8_t position=0;
reset_RIT();
}else{ /* button released */
if(down1>3) buttonRotate();
down1 = 0;
button = -1;
disable_RIT();
reset_RIT();
NVIC_EnableIRQ(EINT1_IRQn);
LPC_PINCON->PINSEL4 |= (1 << 22);
//LED_Off(position);
//LED_On(++position);
}
}
else if(button==2){ //Bottone per muovere il robot = run()
if((LPC_GPIO2->FIOPIN & (1<<12)) == 0 && !(LPC_PINCON->PINSEL4 &(1<<24))){
// static uint8_t position=0;
down2++;
reset_RIT();
if(down2%40==0){
buttonRun();
}
if(distance==0 && win!=1)
{
if(down2%20==10) LED_On(led_running);
if(down2%20==0) LED_Off(led_running);
}
else if(win!=1)
{
if(down2%40==20) LED_On(led_running);
if(down2%40==0) LED_Off(led_running);
}
}else{ /* button released */
if(win!=1) LED_Off(led_running);
down2 = 0;
button = -1;
disable_RIT();
reset_RIT();
NVIC_EnableIRQ(EINT2_IRQn);
LPC_PINCON->PINSEL4 |= (1 << 24);
}
}
LPC_RIT->RICTRL |= 0x1; /* clear interrupt flag */
return;
}
/******************************************************************************
** End Of File
******************************************************************************/
<file_sep>/*********************************************************************************************************
**--------------File Info---------------------------------------------------------------------------------
** File name: IRQ_timer.c
** Last modified Date: 2014-09-25
** Last Version: V1.00
** Descriptions: functions to manage T0 and T1 interrupts
** Correlated files: timer.h
**--------------------------------------------------------------------------------------------------------
*********************************************************************************************************/
#include <string.h>
#include "stdbool.h"
#include "lpc17xx.h"
#include "timer.h"
#include "../GLCD/GLCD.h"
#include "../TouchPanel/TouchPanel.h"
#include "../variables.h"
/******************************************************************************
** Function name: Timer0_IRQHandler
**
** Descriptions: Timer/Counter 0 interrupt handler
**
** parameters: None
** Returned value: None
**
******************************************************************************/
void TIMER0_IRQHandler (void)
{
//static int clear = 0;
//char time_in_char[5] = "";
getDisplayPoint(&display, Read_Ads7846(), &matrix ) ;
#ifdef SIMULATOR
if(!start){
#elif
if(display.x <= 240 && display.x > 0 && display.y != 0){
#endif
if(display.x <= 240 && display.x > 0 && display.y < 317){
startGame();
game_init();
}
}
else if (start){
if((display.x <= 105 && display.x > 15) && (display.y >= 270 &&display.y < 300)){
//restartGame
restartGame();
}
else if((display.y >= 270 &&display.y < 300) && (display.x <= 225 && display.x > 135) && win==0){
//clear
game_init();
}
}
LPC_TIM0->IR = 1; // clear interrupt flag
return;
}
/******************************************************************************
** Function name: Timer1_IRQHandler
**
** Descriptions: Timer/Counter 1 interrupt handler
**
** parameters: None
** Returned value: None
**
******************************************************************************/
void TIMER1_IRQHandler (void)
{
LPC_TIM1->IR = 1; /* clear interrupt flag */
return;
}
/******************************************************************************
** End Of File
******************************************************************************/
<file_sep>/*********************************************************************************************************
**--------------File Info---------------------------------------------------------------------------------
** File name: IRQ_RIT.c
** Last modified Date: 2014-09-25
** Last Version: V1.00
** Descriptions: functions to manage T0 and T1 interrupts
** Correlated files: RIT.h
**--------------------------------------------------------------------------------------------------------
*********************************************************************************************************/
#include "lpc17xx.h"
#include "RIT.h"
#include "../variables.h"
/******************************************************************************
** Function name: RIT_IRQHandler
**
** Descriptions: REPETITIVE INTERRUPT TIMER handler
**
** parameters: None
** Returned value: None
**
******************************************************************************/
void RIT_IRQHandler (void)
{
static int press=1;
static int right=1;
static int left=1;
static int up=1;
static int down=1;
//PRESS
if((LPC_GPIO1->FIOPIN & (1<<25)) == 0 && start){
/* Joytick Select pressed */
press++;
switch(press){
case 2:
changeMode();
break;
default:
break;
}
} else{
press=1;
}//DOWN
if(((LPC_GPIO1->FIOPIN & (1<<26)) == 0) && ((LPC_GPIO1->FIOPIN & (1<<27)) != 0) && ((LPC_GPIO1->FIOPIN & (1<<28)) != 0) && ((LPC_GPIO1->FIOPIN & (1<<29)) != 0) && start){
down++;
switch(down%20){
case 0:
if(win==0){
if(mode==1){
direzione=3;
buttonRun();
drawBot();
}
else{
direzione=3;
drawBot();
calc_distance();
}
}
break;
default:
break;
}
}
else{
down=1;
}//LEFT
if(((LPC_GPIO1->FIOPIN & (1<<26)) != 0) && ((LPC_GPIO1->FIOPIN & (1<<27)) == 0) && ((LPC_GPIO1->FIOPIN & (1<<28)) != 0) && ((LPC_GPIO1->FIOPIN & (1<<29)) != 0) && start){
left++;
switch(left%20){
case 0:
if(win==0){
if(mode==1){
direzione=2;
buttonRun();
drawBot();
}else{
direzione=2;
drawBot();
calc_distance();
}
}
break;
default:
break;
}
}
else{
left=1;
}//RIGHT
if(((LPC_GPIO1->FIOPIN & (1<<26)) != 0) && ((LPC_GPIO1->FIOPIN & (1<<27)) != 0) && ((LPC_GPIO1->FIOPIN & (1<<28)) == 0) && ((LPC_GPIO1->FIOPIN & (1<<29)) != 0) && start){
right++;
switch(right%20){
case 0:
if(win==0){
if(mode==1) {
direzione=0;
buttonRun();
drawBot(); }
else{
direzione=0;
drawBot();
calc_distance();}
}
break;
default:
break;
}
}
else{
right=1;
}//UP
if(((LPC_GPIO1->FIOPIN & (1<<26)) != 0) && ((LPC_GPIO1->FIOPIN & (1<<27)) != 0) && ((LPC_GPIO1->FIOPIN & (1<<28)) != 0) && ((LPC_GPIO1->FIOPIN & (1<<29)) == 0) && start){
up++;
switch(up%20){
case 0:
if(win==0){
if(mode==1){
direzione=1;
buttonRun();
drawBot();
}else{
direzione=1;
drawBot();
calc_distance();
}
}
break;
default:
break;
}
}
else{
up=1;
}
LPC_RIT->RICTRL |= 0x1; /* clear interrupt flag */
disable_RIT();
init_RIT(1250000);
enable_RIT();
return;
}
/******************************************************************************
** End Of File
******************************************************************************/
<file_sep>/*********************************************************************************************************
**--------------File Info---------------------------------------------------------------------------------
** File name: IRQ_timer.c
** Last modified Date: 2014-09-25
** Last Version: V1.00
** Descriptions: functions to manage T0 and T1 interrupts
** Correlated files: timer.h
**--------------------------------------------------------------------------------------------------------
*********************************************************************************************************/
#include "lpc17xx.h"
#include "timer.h"
#include "../led/led.h"
#include "stdbool.h"
#include "../variables.h"
/******************************************************************************
** Function name: Timer0_IRQHandler
**
** Descriptions: Timer/Counter 0 interrupt handler
**
** parameters: None
** Returned value: None
**
******************************************************************************/
extern unsigned char led_value; /* defined in funct_led */
static bool led_zero = false;
void TIMER0_IRQHandler (void)
{
if(win==1)
{
if(led_zero == 0)
{
LED_Out(255);
led_zero=1;
}
else
{
LED_Out(0);
led_zero = 0;
}
}
else {
switch(direzione){
case 0:
if(!led_zero)
{
LED_On(2);
led_zero=true;
}
else
{
LED_Off(2);
led_zero = false;
}
break;
case 1:
if(!led_zero )
{
LED_On(3);
led_zero=true;
}
else
{
LED_Off(3);
led_zero = false;
}
break;
case 2:
if(!led_zero)
{
LED_On(0);
led_zero=true;
}
else
{
LED_Off(0);
led_zero = false;
}
break;
case 3:
if(!led_zero)
{
LED_On(1);
led_zero=true;
}
else
{
LED_Off(1);
led_zero = false;
}
break;
}
}
LPC_TIM0->IR = 1; /* clear interrupt flag */
return;
}
/******************************************************************************
** Function name: Timer1_IRQHandler
**
** Descriptions: Timer/Counter 1 interrupt handler
**
** parameters: None
** Returned value: None
**
******************************************************************************/
void TIMER1_IRQHandler (void)
{
/*
conteggio++;
if(conteggio % 10 && distance != 0 && button == 2)
{
if(led_running_acceso == 0)
{
LED_On(led_running);
led_running_acceso=1;
}
else
{
LED_Off(led_running);
led_running_acceso = 0;
}
}
else LED_Off(led_running);
*/
/*
LED_Off(led_running);
disable_timer(1);
LPC_TIM1->IR = 1; // clear interrupt flag */
return;
}
/******************************************************************************
** End Of File
******************************************************************************/
| 4cf64456e9fe56c7e0f2c44d98e9f1915454c97e | [
"Markdown",
"C",
"HTML"
] | 9 | C | italianconcerto/Blind_Labyrinth_Simulator | 53f447170b3f575cb7b6945553564da51c7f213f | 4fba01dbf84b40adcfc9590371d763182043d9f4 | |
refs/heads/master | <file_sep>public class Conta{
private int numero = 0;
private double saldo = 0;
private double limite = 0;
private Cliente cliente = new Cliente();
int getNumero(){
return this.numero;
}
void setNumero(int numero){
this.numero = numero;
}
double getSaldo(){
return this.saldo;
}
double getLimite(){
return this.limite;
}
void setLimite(double limite){
this.limite = limite;
}
Cliente getCliente(){
return this.cliente;
}
boolean sacar(double valor){
if ((this.saldo >= valor) && (valor>0)){
this.saldo -= valor;
return true;
}
return false;
}
void depositar(double valor){
this.saldo += valor;
}
boolean transferirPara(Conta contaDestino, double valor){
if (this.sacar(valor)){
contaDestino.depositar(valor);
}
return false;
}
void exibirConta(){
System.out.println("--------------------------------------------");
System.out.println("Conta");
System.out.println("--------------------------------------------");
System.out.println("Dono: "+this.getCliente().getNome());
System.out.println("Número: "+this.getNumero());
System.out.println("Saldo: "+this.getSaldo());
System.out.println("Limite: "+this.getLimite());
System.out.println("Saque realizado? "+this.sacar(10));
System.out.println("Saldo agora: "+this.getSaldo());
}
}<file_sep>public class TesteAluguelImoveis{
public static void main(String[] args){
Imovel imovel = new Imovel();
Casa casa = new Casa();
Apartamento apartamento = new Apartamento();
imovel.setValor(25000);
casa.setValor(25000);
apartamento.setValor(25000);
System.out.println("Imovel qualquer:");
System.out.println("Valor: R$ "+imovel.getValor());
System.out.println("Aluguel: R$ "+imovel.getAluguel());
System.out.println("Iptu: R$ "+imovel.getIptu());
System.out.println("-------------");
System.out.println("Casa:");
System.out.println("Valor: R$ "+casa.getValor());
System.out.println("Aluguel: R$ "+casa.getAluguel());
System.out.println("Iptu: R$ "+casa.getIptu());
System.out.println("-------------");
System.out.println("Apartamento:");
System.out.println("Valor: R$ "+apartamento.getValor());
System.out.println("Aluguel: R$ "+apartamento.getAluguel());
System.out.println("Iptu: R$ "+apartamento.getIptu());
System.out.println("-------------------------------------------");
ComissaoCorretor comissao = new ComissaoCorretor();
comissao.registraComissao(imovel);
comissao.registraComissao(casa);
comissao.registraComissao(apartamento);
System.out.println("Total de comissao: R$ "+comissao.getTotalDeComissao());
}
}<file_sep>public class Cliente{
private String nome;
private String cpf;
private String endereco;
String getNome(){
return this.nome;
}
void setNome(String nome){
this.nome = nome;
}
String getCpf(){
return this.cpf;
}
void setCpf(String cpf){
this.cpf = cpf;
}
String getEndereco(){
return this.endereco;
}
void setEndereco(String endereco){
this.endereco = endereco;
}
}
<file_sep>package br.com.empresa.banco.conta;
public class ContaCorrente extends Conta {
}
<file_sep>package br.com.empresa.banco;
import br.com.empresa.banco.conta.Conta;
import br.com.empresa.banco.conta.ContaCorrente;
public class TestaExceptionsConta {
public static void main(String[] args) {
Conta contaCorrente = new ContaCorrente();
contaCorrente.depositar(10);
try {
contaCorrente.sacar(45555);
System.out.println("Sacou corretamente");
} catch (Exception e) {
System.out.println(e.getMessage());
}
}
}
<file_sep>package br.com.triadworks.model;
public class Empresa{
String nome;
String cnpj;
Funcionario[] funcionarios = new Funcionario[10];
void adiciona(Funcionario f){
for (int x=0; x<funcionarios.length; x++ ){
if (funcionarios[x] == null){
this.funcionarios[x] = f;
break;
}
}
}
void mostraFuncionarios(){
System.out.println("Funcionarios da Empresa:");
for (Funcionario funcionario : this.funcionarios){
if (funcionario != null){
System.out.println(funcionario);
System.out.println("--");
}
}
}
}<file_sep>package br.com.triadworks.model;
class Exercicio01{
public static void main (String[] args){
System.out.println("Exercicio 01 - Imprime intervalo de 30 há 180");
System.out.println("--");
for (int i=0; i<=180; i++){
if(i>30 && i<180){
System.out.print(i + ",");
}
}
System.out.println();
System.out.println("--");
}
}<file_sep>package br.com.empresa.banco.conta;
public class LisoException extends Exception {
public LisoException(String mensagem){
super(mensagem);
}
}
<file_sep>package br.com.empresa.banco.sistema;
import java.util.LinkedList;
import java.util.List;
import br.com.empresa.banco.conta.Conta;
public class Banco {
private List<Conta> listaContas = new LinkedList<Conta>();
public List<Conta> getListaContas(){
return this.listaContas;
}
public void adicionaConta(Conta conta){
this.listaContas.add(conta);
}
public void imprimeContas(){
for (Conta conta : getListaContas()) {
System.out.println(conta);
}
}
}
<file_sep>public class Funcionario {
String nome;
double salario = 0;
String cargo = "Sem cargo";
String rg = "0";
public Funcionario(){}
public Funcionario(String nome){
this.nome = nome;
}
void bonifica(double valor){
this.salario += valor;
}
double calculaGanhoAnual(){
return this.salario*12;
}
void exibirSalario(){
System.out.println("Salario atual: "+this.salario);
}
void exibirGanhoAnual(){
System.out.println("Ganho anual: "+this.calculaGanhoAnual());
}
void mostra(){
System.out.println("Nome: "+this.nome);
System.out.println("Cargo: "+this.cargo);
System.out.println("RG: "+this.rg);
System.out.println("Salario: "+this.salario);
}
}<file_sep>package br.com.triadworks;
import br.com.triadworks.model.Funcionario;
import br.com.triadworks.model.Gerente;
public class TestaFuncionario{
public static void main(String [] args){
Funcionario funcionario01 = new Gerente();
funcionario01.setNome("Frodo");
funcionario01.setSalario(300);
Funcionario funcionario02 = funcionario01;
if (funcionario01 == funcionario02){
System.out.println("iguais");
} else {
System.out.println("diferentes");
}
}
}<file_sep>package br.com.triadworks;
import br.com.triadworks.model.Funcionario;
import br.com.triadworks.model.Gerente;
public class TestaStrings {
public static void main(String[] args) {
Funcionario funcionario = new Gerente();
funcionario.setNome("<NAME>");
funcionario.setSalario(1000);
System.out.println(funcionario);
}
}
<file_sep>class Exercicio03{
public static void main (String[] args){
int qtdImpares = 0;
System.out.println("Exercicio03 - Imprime Impares contidos entre 10 há 50");
System.out.println("--");
for (int i=0; i<=100; i++){
if((i>=10) && (i<=50) &&(i%2 != 0)){
qtdImpares++;
}
}
System.out.println(qtdImpares);
System.out.println("--");
}
}<file_sep>
public class ModeloLGSmartTV extends TV implements ControleRemoto{
public ModeloLGSmartTV() {
super("SmartTVLG", 42);
}
@Override
public void volume(int volume) {
System.out.println("aumentando volume");
}
@Override
public void mudarCanal(int canal) {
System.out.println("mudando de canal");
}
@Override
public void ligar() {
System.out.println("Ligando sua TV "+getMarca()+"...");
setLigada(true);
}
@Override
public void desligar() {
System.out.println("Desligando"+getMarca());
setLigada(false);
}
@Override
public void status() {
String mensagem = "OFFLINE";
String status = "desligada";
if (isLigada()) {
mensagem = "TVON";
status = "ligada";
}
System.out.println(getMarca()+" - Sua TV está "+status);
System.out.println("Canal:"+getCanal());
System.out.println("Volume:"+getVolume());
System.out.println(getMarca() + " - "+mensagem );
}
}
<file_sep>package br.com.empresa.banco.conta;
public class Conta implements Comparable<Conta>{
private int numero = 0;
private double saldo = 0;
private double limite = 0;
private Cliente cliente = new Cliente();
public int getNumero(){
return this.numero;
}
public void setNumero(int numero){
this.numero = numero;
}
public double getSaldo(){
return this.saldo;
}
public double getLimite(){
return this.limite;
}
public void setLimite(double limite){
this.limite = limite;
}
public Cliente getCliente(){
return this.cliente;
}
public void setCliente(Cliente cliente) {
this.cliente = cliente;
}
public boolean sacar(double valor) throws LisoException{
if (this.saldo < valor){
throw new LisoException("Você esta liso");
} else{
this.saldo -= valor;
return true;
}
}
public void depositar(double valor){
this.saldo += valor;
}
public boolean transferirPara(Conta contaDestino, double valor) throws LisoException{
if (sacar(valor)){
contaDestino.depositar(valor);
return true;
}
return false;
}
public void setSaldo(double saldo) {
this.saldo = saldo;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + numero;
return result;
}
@Override
public boolean equals(Object obj) {
if (obj == null)
return false;
if (!(obj instanceof Conta))
return false;
Conta other = (Conta) obj;
if (numero != other.numero)
return false;
return true;
}
@Override
public String toString() {
return "Conta [numero=" + getNumero() + ", Saldo = R$ "+getSaldo()+"]";
}
@Override
public int compareTo(Conta o) {
return this.getNumero() - o.getNumero();
}
}<file_sep>package br.com.empresa.banco.conta;
public class ContaPoupanca extends Conta {
@Override
public void setCliente(Cliente cliente) {
// TODO Auto-generated method stub
super.setCliente(cliente);
}
}
<file_sep>package br.com.triadworks.model;
public class ComissaoCorretor{
private double totalDeComissao;
public void registraComissao(Imovel imovel){
this.totalDeComissao += imovel.getAluguel() * 5/100;
}
public double getTotalDeComissao(){
return this.totalDeComissao;
}
}<file_sep>package br.com.triadworks;
import br.com.triadworks.model.Empresa;
import br.com.triadworks.model.Funcionario;
import br.com.triadworks.model.Gerente;
public class TestaEmpresa{
public static void main(String [] args){
Empresa empresa = new Empresa();
empresa.funcionarios = new Funcionario[10];
for (int i = 0; i<empresa.funcionarios.length; i++){
empresa.funcionarios[i] = new Gerente("Funcionario 0"+i);
empresa.funcionarios[i].setSalario(100 + 10*i);
empresa.adiciona(empresa.funcionarios[i]);
}
empresa.mostraFuncionarios();
}
}<file_sep>package br.com.empresa.banco;
import java.util.Collections;
import br.com.empresa.banco.conta.Conta;
import br.com.empresa.banco.sistema.Banco;
public class TestaBanco {
public static void main(String[] args) {
Banco banco = new Banco();
Conta c1 = new Conta();
c1.setNumero(800);
c1.setSaldo(600);
Conta c2 = new Conta();
c2.setNumero(400);
c2.setSaldo(6320);
Conta c3 = new Conta();
c3.setNumero(340);
c3.setSaldo(677);
Conta c4 = new Conta();
c4.setNumero(2340);
c4.setSaldo(784);
banco.adicionaConta(c1);
banco.adicionaConta(c2);
banco.adicionaConta(c3);
banco.adicionaConta(c4);
banco.imprimeContas();
Collections.sort(banco.getListaContas());
System.out.println("--------------");
System.out.println("Ordenado");
banco.imprimeContas();
}
}
| 6a58fd8e6ea449ba85fd06e38b2bc9ff52b2c7ec | [
"Java"
] | 19 | Java | lucasapoena/triadworks_joop | cd16460f84be4880681466b3d6e8306293e7f79e | 2ab4fdc7aa970d57f913d93ba304204fa3ce2451 | |
refs/heads/master | <file_sep>#ifndef MODELTEST_H
#define MODELTEST_H
#include <QObject>
#include <QTest>
class ModelTest : public QObject
{
Q_OBJECT
private slots:
void testNormalModel();
void testVertexStrWithoutComponents();
void testEmptyStringInputInVertex();
void testVertexFloatComponent();
void testVertexDoubleDotInNumber();
void testNotNumberInputInVertex01();
void testNotNumberInputInVertex02();
void testNotNumberInputInVertex03();
void testLessStrLengthInVertex01();
void testExtraStrLengthInVertex01();
void testEmptyInputStringInFace();
void testWrongFormatInputInFace01();
void testWrongFormatInputInFace02();
void testWrongFormatInputInFace03();
void testRightRefferenceInFace01();
void testRightRefferenceInFace02();
void testWrongRefferenceInFace01();
void testWrongRefferenceInFace02();
void testWrongRefferenceInFace03();
void testInputRefOnDifComponentInFace();
};
#endif // MODELTEST_H
<file_sep>#include "mainwindow.h"
#include <QApplication>
#include "modeltest.h"
//void runTests()
//{
// ModelTests tests;
// QTest::qExec(&tests);
//}
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
MainWindow w;
w.show();
return a.exec();
}
<file_sep>#include "modeltest.h"
#include "model.h"
#include <QDebug>
#include <QTextStream>
void ModelTest::testNormalModel()
{
QString test = "v 1 2 3\n v 4 5 6\n v 56 13 1\n f 1 2 3";
Model model;
QTextStream stream(&test);
QString errInput = model.importModel(stream);
//qDebug() << errStr;
//QVERIFY(errInput);
QCOMPARE(QString(errInput), QString("Success"));
}
void ModelTest::testVertexStrWithoutComponents()
{
QString test = "v 1 2 3 \n v\n v 56 13 1\n f 1 2 3";
Model model;
QTextStream stream(&test);
//QTextStream* stream = new QTextStream(&test);
QString errInput = model.importModel(stream);
//qDebug() << errStr;
//QVERIFY(errInput);
QCOMPARE(QString(errInput), QString("Incorrect count of component in vertex (line 2)"));
}
void ModelTest :: testVertexFloatComponent()
{
QString test = "v 1.5 5 1";
Model model;
QTextStream stream(&test);
//QTextStream* stream = new QTextStream(&test);
QString errInput = model.importModel(stream);
//qDebug() << errStr;
//QVERIFY(errInput);
QCOMPARE(QString(errInput), QString("Success"));
}
void ModelTest :: testVertexDoubleDotInNumber()
{
QString test = "v 3.56.3 5 1";
Model model;
QTextStream stream(&test);
//QTextStream* stream = new QTextStream(&test);
QString errInput = model.importModel(stream);
//qDebug() << errStr;
//QVERIFY(errInput);
QCOMPARE(QString(errInput), QString("Input vertex string contents letters or wrong symbols (line 1)"));
}
void ModelTest :: testNotNumberInputInVertex03()
{
QString test = "v a1.5 5b 1";
Model model;
QTextStream stream(&test);
//QTextStream* stream = new QTextStream(&test);
QString errInput = model.importModel(stream);
//qDebug() << errStr;
//QVERIFY(errInput);
QCOMPARE(QString(errInput), QString("Input vertex string contents letters or wrong symbols (line 1)"));
}
void ModelTest::testEmptyStringInputInVertex()
{
QString test = "v 1 2 3\n\nv 56 13 1\nv 56 13 115\n f 1 2 3";
Model model;
QTextStream stream(&test);
//QTextStream* stream = new QTextStream(&test);
QString errInput = model.importModel(stream);
//qDebug() << errStr;
//QVERIFY(errInput);
QCOMPARE(QString(errInput), QString("Success"));
}
void ModelTest::testNotNumberInputInVertex01()
{
QString test = "v 1 2 3\n v lox 5 1\n v 56 13 1\n f 1 2 3";
Model model;
QTextStream stream(&test);
//QTextStream* stream = new QTextStream(&test);
QString errInput = model.importModel(stream);
//qDebug() << errStr;
//QVERIFY(errInput);
QCOMPARE(QString(errInput), QString("Input vertex string contents letters or wrong symbols (line 2)"));
}
void ModelTest::testNotNumberInputInVertex02()
{
QString test = "v 1 2 3\n v 1 lox 7.3\n v 56 13 1\n f 1 2 33";
Model model;
QTextStream stream(&test);
//QTextStream* stream = new QTextStream(&test);
QString errInput = model.importModel(stream);
//qDebug() << errStr;
//QVERIFY(errInput);
QCOMPARE(QString(errInput), QString("Input vertex string contents letters or wrong symbols (line 2)"));
}
void ModelTest::testLessStrLengthInVertex01()
{
QString test = "v 1 2 3\n v 5 1\n v 56 13 1\n f 1 2 3";
Model model;
QTextStream stream(&test);
//QTextStream* stream = new QTextStream(&test);
QString errInput = model.importModel(stream);
//qDebug() << errStr;
//QVERIFY(errInput);
QCOMPARE(QString(errInput), QString("Incorrect count of component in vertex (line 2)"));
}
void ModelTest::testExtraStrLengthInVertex01()
{
QString test = "v 1 2 3\n v 2 5 1 76\n v 56 13 1\n f 1 2 3";
Model model;
QTextStream stream(&test);
//QTextStream* stream = new QTextStream(&test);
QString errInput = model.importModel(stream);
//qDebug() << errStr;
//QVERIFY(errInput);
QCOMPARE(QString(errInput), QString("Incorrect count of component in vertex (line 2)"));
}
void ModelTest :: testEmptyInputStringInFace()
{
QString test = "v 1 2 3\n v 2 5 1\n v 56 13 1\n f 2 3";
Model model;
QTextStream stream(&test);
//QTextStream* stream = new QTextStream(&test);
QString errInput = model.importModel(stream);
QCOMPARE(QString (errInput), QString("Incorrect count of component in face (line 4)"));
}
void ModelTest :: testWrongFormatInputInFace01()
{
QString test = "v 1 2 3\n v 2 5 1\n v 56 13 1\n f 1 p2 3";
Model model;
QTextStream stream(&test);
//QTextStream* stream = new QTextStream(&test);
QString errInput = model.importModel(stream);
QCOMPARE(QString (errInput), QString("Input face string has wrong format (line 4)"));
}
void ModelTest :: testWrongFormatInputInFace02()
{
QString test = "v 1 2 3\n v 2 5 1\n v 56 13 1\n f 1/ p/2 3";
Model model;
QTextStream stream(&test);
//QTextStream* stream = new QTextStream(&test);
QString errInput = model.importModel(stream);
QCOMPARE(QString (errInput), QString("Input face string has wrong format (line 4)"));
}
void ModelTest :: testWrongFormatInputInFace03()
{
QString test = "v 1 2 3\n v 2 5 1\n v 56 13 1\n f 1//1 1//2 3/5/";
Model model;
QTextStream stream(&test);
//QTextStream* stream = new QTextStream(&test);
QString errInput = model.importModel(stream);
QCOMPARE(QString (errInput), QString("Input face string has wrong format (line 4)"));
}
void ModelTest :: testRightRefferenceInFace01()
{
QString test = "v 1 2 3\n v 2 5 1\n v 56 13 1\n vn 1 2 3\n vn 2 5 1\n vn 56 13 1\n f 2//2 1//3 3//1";
Model model;
QTextStream stream(&test);
//QTextStream* stream = new QTextStream(&test);
QString errInput = model.importModel(stream);
QCOMPARE(QString (errInput), QString("Success"));
}
void ModelTest :: testRightRefferenceInFace02()
{
QString test = "v 1 2 3\n v 2 5 1\n v 56 13 1\n v 10 20 30\n f 4 1 3\n f 2 1 4";
Model model;
QTextStream stream(&test);
//QTextStream* stream = new QTextStream(&test);
QString errInput = model.importModel(stream);
QCOMPARE(QString (errInput), QString("Success"));
}
void ModelTest :: testWrongRefferenceInFace01()
{
QString test = "v 1 2 3\n v 2 5 1\n v 56 13 1\n vn 1 2 3\n vn 2 5 1\n vn 56 13 1\n f 4//2 1//3 3//1";
Model model;
QTextStream stream(&test);
//QTextStream* stream = new QTextStream(&test);
QString errInput = model.importModel(stream);
QCOMPARE(QString (errInput), QString("Refference on unexistable vertex (line 7)"));
}
void ModelTest :: testWrongRefferenceInFace02()
{
QString test = "v 1 2 3\n v 2 5 1\n v 56 13 1\n vn 1 2 3\n vn 2 5 1\n vn 56 13 1\n f 2//2 1//3 3//4";
Model model;
QTextStream stream(&test);
//QTextStream* stream = new QTextStream(&test);
QString errInput = model.importModel(stream);
QCOMPARE(QString (errInput), QString("Refference on unexistable normal vector (line 7)"));
}
void ModelTest :: testWrongRefferenceInFace03()
{
QString test = "v 1 2 3\n v 2 5 1\n v 56 13 1\n v 10 20 30\n f 3 -1 2\n f 2 1 4";
Model model;
QTextStream stream(&test);
//QTextStream* stream = new QTextStream(&test);
QString errInput = model.importModel(stream);
QCOMPARE(QString (errInput), QString("Input face string has wrong format (line 5)"));
}
void ModelTest :: testInputRefOnDifComponentInFace()
{
QString test = "v 1 2 3\n v 2 5 1\n v 56 13 1\n vn 1 2 3\n vn 2 5 1\n vt 56 13 1\n f 1//1 3 2/1";
Model model;
QTextStream stream(&test);
//QTextStream* stream = new QTextStream(&test);
QString errInput = model.importModel(stream);
QCOMPARE(QString (errInput), QString("Success"));
}
<file_sep>#include "mainwindow.h"
#include "ui_mainwindow.h"
#include "modeltest.h"
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
}
MainWindow::~MainWindow()
{
delete ui;
}
void MainWindow::on_openFileButton_clicked()
{
QString fileName = QFileDialog::getOpenFileName(this, "Open the file");
// QFile file(fileName);
// currentFile = fileName;
// if (!file.open(QIODevice::ReadOnly | QFile::Text))
// {
// QMessageBox::warning(this,"..","File not opened.");
// return;
// }
// QTextStream inputStream(&file);
model.importModel(fileName);
//QString text = in.readAll();
//ui->textEdit->setText(text);
//file.close();
}
void MainWindow::on_runTestButton_clicked()
{
ModelTest tests;
// QStringList testNames;
// testNames << "testNotNumberInputModel01";
QTest::qExec(&tests/*, testNames*/);
}
void MainWindow::on_saveButton_clicked()
{
model.exportModel();
}
| 6576ce06fda1a73f7f1e0f401c4a03b69cf7b97a | [
"C++"
] | 4 | C++ | Georgly/OBJ_Parser | fadb73cacd2aa51c7f4f9a00099e539b9639f805 | 295d5f7f66b38657fac330e85393d49771db6c3b |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.